Closed razr closed 4 years ago
I have grabbed also the latest release from here https://github.com/openil/openil/archive/OpenIL-v1.8-202005.tar.gz and it is the same error.
I'm using Ubuntu 18.04 as a build host
Hi there,
Please apply this patch to OpenIL (aka paste it into a "snmp4lptp.patch" file, and then run "git am snmp4lptp.patch"):
From 4b466ea8835dedae9a865f2e90f37a69d654df9e Mon Sep 17 00:00:00 2001
From: Vladimir Oltean <vladimir.oltean@nxp.com>
Date: Sat, 23 May 2020 12:48:24 +0300
Subject: [PATCH] package/qoriq-ptp4l: pull upstream patch for removing
snmp4lptp
Currently, the snmpflg.sh script searches for include paths that contain
net-snmp-agent-includes.h. If the host environment has this header
installed through the package manager, then the linuxptp makefile will
try to bring in this dependency, which will make cross-compilation fail,
as seen below:
output/host/bin/aarch64-linux-gnu-gcc timemaster.o print.o rtnl.o sk.o util.o version.o -lm -lrt -o timemaster
output/host/bin/aarch64-linux-gnu-gcc -Wall -DVER=2.0 -D_GNU_SOURCE
-DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC
-DHAVE_NET_SNMP -DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -g -O2
-fdebug-prefix-map=/build/net-snmp-ry1JTp/net-snmp-5.7.3+dfsg=.
-fstack-protector-strong -Wformat -Werror=format-security
-DNETSNMP_USE_INLINE -Ulinux -Dlinux=linux -D_REENTRANT -D_GNU_SOURCE
-DDEBIAN -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-I/usr/lib/x86_64-linux-gnu/perl/5.26/CORE -Wdate-time
-D_FORTIFY_SOURCE=2 -I. -I/usr/include -c snmp4lptp.c
aarch64-linux-gnu-gcc: ERROR: unsafe header/library path used in cross-compilation: '-I/usr/local/include'
makefile:92: recipe for target 'snmp4lptp.o' failed
make[2]: *** [snmp4lptp.o] Error 1
package/pkg-generic.mk:266: recipe for target 'output/build/qoriq-ptp4l-eee6d0fb995dddf27acde2addfb1fe89b71ab82d/.stamp_built' failed
make[1]: *** [output/build/qoriq-ptp4l-eee6d0fb995dddf27acde2addfb1fe89b71ab82d/.stamp_built] Error 2
Makefile:84: recipe for target '_all' failed
make: *** [_all] Error 2
But the SNMP code was removed from mainline linuxptp, so the bug will
never get resolved. So remove it from our downstream linuxptp too.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
...0001-Remove-the-unfinished-SNMP-code.patch | 470 ++++++++++++++++++
1 file changed, 470 insertions(+)
create mode 100644 package/nxp/qoriq-ptp4l/0001-Remove-the-unfinished-SNMP-code.patch
diff --git a/package/nxp/qoriq-ptp4l/0001-Remove-the-unfinished-SNMP-code.patch b/package/nxp/qoriq-ptp4l/0001-Remove-the-unfinished-SNMP-code.patch
new file mode 100644
index 000000000000..cc4abac9c6b5
--- /dev/null
+++ b/package/nxp/qoriq-ptp4l/0001-Remove-the-unfinished-SNMP-code.patch
@@ -0,0 +1,470 @@
+From aad2b768ebf994c57da1873eb37235622634253c Mon Sep 17 00:00:00 2001
+From: Richard Cochran <richardcochran@gmail.com>
+Date: Sun, 29 Dec 2019 11:20:10 -0800
+Subject: [PATCH] Remove the unfinished SNMP code.
+
+Unfortunately the SNMP code still has issues like not passing the
+valgrind test, and no one is able to finish this up right now. This
+patch removes the SNMP program so that the upcoming release does not
+contain unfinished work, potentially misleading end users about the
+scope and completeness of the features.
+
+Signed-off-by: Richard Cochran <richardcochran@gmail.com>
+Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
+---
+ makefile | 14 ----
+ snmp4lptp.8 | 119 ------------------------------
+ snmp4lptp.c | 192 ------------------------------------------------
+ snmp4lptp_mib.h | 30 --------
+ snmpflg.sh | 42 -----------
+ 5 files changed, 397 deletions(-)
+ delete mode 100644 snmp4lptp.8
+ delete mode 100644 snmp4lptp.c
+ delete mode 100644 snmp4lptp_mib.h
+ delete mode 100755 snmpflg.sh
+
+diff --git a/makefile b/makefile
+index 45014e7b9093..eb78d853f445 100644
+--- a/makefile
++++ b/makefile
+@@ -47,16 +47,9 @@ SRC = $(OBJECTS:.o=.c)
+ DEPEND = $(OBJECTS:.o=.d)
+ srcdir := $(dir $(lastword $(MAKEFILE_LIST)))
+ incdefs := $(shell $(srcdir)/incdefs.sh)
+-snmpflg := $(shell $(srcdir)/snmpflg.sh)
+ version := $(shell $(srcdir)/version.sh $(srcdir))
+ VPATH = $(srcdir)
+
+-ifneq (,$(findstring -DHAVE_NET_SNMP,$(snmpflg)))
+-PRG += snmp4lptp
+-OBJECTS += snmp4lptp.o
+-snmplib := $(shell net-snmp-config --netsnmp-agent-libs)
+-endif
+-
+ prefix = /usr/local
+ sbindir = $(prefix)/sbin
+ mandir = $(prefix)/man
+@@ -84,13 +77,6 @@ hwstamp_ctl: hwstamp_ctl.o version.o
+
+ phc_ctl: phc_ctl.o phc.o sk.o util.o clockadj.o sysoff.o print.o version.o
+
+-snmp4lptp: config.o hash.o msg.o pmc_common.o print.o raw.o sk.o \
+- snmp4lptp.o tlv.o transport.o udp.o udp6.o uds.o util.o
+- $(CC) $^ $(LDFLAGS) $(LOADLIBES) $(LDLIBS) $(snmplib) -o $@
+-
+-snmp4lptp.o: snmp4lptp.c
+- $(CC) $(CPPFLAGS) $(CFLAGS) $(snmpflg) -c $<
+-
+ timemaster: print.o rtnl.o sk.o timemaster.o util.o version.o
+
+ version.o: .version version.sh $(filter-out version.d,$(DEPEND))
+diff --git a/snmp4lptp.8 b/snmp4lptp.8
+deleted file mode 100644
+index 7dda4d0cf599..000000000000
+--- a/snmp4lptp.8
++++ /dev/null
+@@ -1,119 +0,0 @@
+-.TH SNMP4LPTP 8 "September 2018" "linuxptp"
+-.SH NAME
+-snmp4lptp - SNMP sub agent
+-
+-.SH SYNOPSIS
+-.B snmp4lptp
+-[
+-.BI \-f " config-file"
+-] [
+-.B \-m
+-] [
+-.B \-q
+-] [
+-.I long-options
+-]
+-
+-.SH DESCRIPTION
+-.B snmp4lptp
+-is an implementation of a sub agent for handling SNMP requests on
+-the device running ptp4l. Via the UDS port, the sub agent retrieves
+-management information from ptp4l and translates the information to
+-or from an SNMP-specific form.
+-
+-.SH OPTIONS
+-.TP
+-.BI \-f " file"
+-Specify the path to the \fBsnmp4lptp\fR configuration file.
+-.TP
+-.B \-h
+-Display a help message.
+-.TP
+-.B \-m
+-Print messages to the standard output.
+-.TP
+-.B \-q
+-Don't send messages to the system logger.
+-
+-.SH LONG OPTIONS
+-
+-Each and every configuration file option (see below in sections
+-.BR PROGRAM\ OPTIONS
+-and
+-.BR PORT\ OPTIONS )
+-may also appear
+-as a "long" style command line argument. For example, the transportSpecific
+-option may be set using either of these two forms:
+-
+-.RS
+-\f(CW\-\-transportSpecific 1 \-\-transportSpecific=1\fP
+-.RE
+-
+-Option values given on the command line override values in the global
+-section of the configuration file (which, in turn, overrides default
+-values).
+-
+-.SH CONFIGURATION FILE
+-
+-The configuration file is divided into sections. Each section starts with a
+-line containing its name enclosed in brackets and it follows with settings.
+-Each setting is placed on a separate line, it contains the name of the
+-option and the value separated by whitespace characters. Empty lines and lines
+-starting with # are ignored.
+-
+-The global section (indicated as
+-.BR [global] )
+-sets the global program options as well as the default port specific options.
+-Other sections are port specific sections and they override the default port
+-options. The name of the section is the name of the configured port (e.g.
+-.BR [eth0]
+-). Currently no port specific options other than default are considered.
+-
+-.SH PROGRAM OPTIONS
+-.TP
+-.B domainNumber
+-The domain attribute of the local clock.
+-The default is 0.
+-.TP
+-.B logging_level
+-The maximum logging level of messages which should be printed.
+-The default is 6 (LOG_INFO).
+-.TP
+-.B message_tag
+-The tag which is added to all messages printed to the standard output or system
+-log.
+-The default is an empty string (which cannot be set in the configuration file
+-as the option requires an argument).
+-.TP
+-.B use_syslog
+-Print messages to the system log if enabled.
+-The default is 1 (enabled).
+-.TP
+-.B verbose
+-Print messages to the standard output if enabled.
+-The default is 0 (disabled).
+-.TP
+-.B uds_address
+-Specifies the address of the server's UNIX domain socket.
+-The default is /var/run/ptp4l.
+-
+-.SH PORT OPTIONS
+-.TP
+-.B transportSpecific
+-The transport specific field. Must be in the range 0 to 255.
+-The default is 0.
+-
+-.SH WARNING
+-
+-Be cautious when the same configuration file is used for both ptp4l
+-and snmp4lptp. Keep in mind that values specified in the configuration
+-file take precedence over their default values. If a certain option which
+-is common to ptp4l and snmp4lptp is specified to a non-default value in
+-the configuration file (e.g. for ptp4l), then this non-default value
+-applies also for snmp4lptp. This might be not what is expected.
+-
+-To avoid securely these unexpected behaviour, different configuration files
+-for ptp4l and snmp4lptp are recommended.
+-
+-.SH SEE ALSO
+-.BR ptp4l (8)
+diff --git a/snmp4lptp.c b/snmp4lptp.c
+deleted file mode 100644
+index e06f2121a6e8..000000000000
+--- a/snmp4lptp.c
++++ /dev/null
+@@ -1,192 +0,0 @@
+-/**
+- * @file snmp4lptp.c
+- * @brief Implements SNMP sub agent program for linuxptp
+- * @note Copyright (C) 2018 Anders Selhammer <anders.selhammer@est.tech>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2 of the License, or
+- * (at your option) any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License along
+- * with this program; if not, write to the Free Software Foundation, Inc.,
+- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+- */
+-#include <errno.h>
+-#include <poll.h>
+-
+-#include <net-snmp/net-snmp-config.h>
+-#include <net-snmp/net-snmp-includes.h>
+-#include <net-snmp/agent/net-snmp-agent-includes.h>
+-
+-#include "config.h"
+-#include "pmc_common.h"
+-#include "print.h"
+-#include "snmp4lptp_mib.h"
+-#include "util.h"
+-
+-#define SNMP_NFD 1
+-static struct pmc *pmc;
+-
+-struct ptp_message* snmp4lptp_run_pmc(char *cmd)
+-{
+- struct pollfd pollfd[SNMP_NFD];
+- int cnt, tmo = 100;
+-
+- pollfd[0].fd = pmc_get_transport_fd(pmc);
+- pollfd[0].events = POLLIN | POLLPRI;
+-
+- if (cmd && pmc_do_command(pmc, cmd)) {
+- pr_err("bad command: %s", cmd);
+- }
+-
+- while (is_running()) {
+- cnt = poll(pollfd, SNMP_NFD, tmo);
+- if (cnt < 0) {
+- if (EINTR == errno) {
+- continue;
+- } else {
+- pr_emerg("poll failed");
+- break;
+- }
+- } else if (!cnt) {
+- break;
+- }
+-
+- if (pollfd[0].revents & (POLLIN|POLLPRI)) {
+- return pmc_recv(pmc);
+- }
+- }
+- return NULL;
+-}
+-
+-static int open_pmc(struct config *cfg)
+-{
+- char uds_local[MAX_IFNAME_SIZE + 1];
+- snprintf(uds_local, sizeof(uds_local), "/var/run/snmp4lptp.%d", getpid());
+-
+- pmc = pmc_create(cfg, TRANS_UDS, uds_local, 0,
+- config_get_int(cfg, NULL, "domainNumber"),
+- config_get_int(cfg, NULL, "transportSpecific") << 4,
+- 1);
+-
+- return pmc ? 0 : -1;
+-}
+-
+-static int open_snmp()
+-{
+- snmp_enable_calllog();
+- netsnmp_ds_set_boolean(NETSNMP_DS_APPLICATION_ID,
+- NETSNMP_DS_AGENT_ROLE, 1);
+- init_agent("linuxptpAgent");
+-
+- init_snmp("linuxptpAgent");
+-
+- return 0;
+-}
+-
+-static void usage(char *progname)
+-{
+- fprintf(stderr,
+- "\nusage: %s [options]\n\n"
+- " -f [file] read configuration from 'file'\n"
+- " -h prints this message and exits\n"
+- " -m print messages to stdout\n"
+- " -q do not print messages to the syslog\n"
+- "\n",
+- progname);
+-}
+-
+-int main(int argc, char *argv[])
+-{
+- char *config = NULL, *progname;
+- int c, err = 0, index;
+- struct option *opts;
+- struct config *cfg;
+-
+- if (handle_term_signals()) {
+- return -1;
+- }
+-
+- cfg = config_create();
+- if (!cfg) {
+- return -1;
+- }
+-
+- opts = config_long_options(cfg);
+- print_set_verbose(1);
+- print_set_syslog(0);
+-
+- /* Process the command line arguments. */
+- progname = strrchr(argv[0], '/');
+- progname = progname ? 1+progname : argv[0];
+- while (EOF != (c = getopt_long(argc, argv, "f:hmq", opts, &index))) {
+- switch (c) {
+- case 0:
+- if (config_parse_option(cfg, opts[index].name, optarg)) {
+- config_destroy(cfg);
+- return -1;
+- }
+- break;
+- case 'f':
+- config = optarg;
+- break;
+- case 'h':
+- usage(progname);
+- err = -1;
+- goto out;
+- case 'm':
+- config_set_int(cfg, "verbose", 1);
+- break;
+- case 'q':
+- config_set_int(cfg, "use_syslog", 0);
+- break;
+- case '?':
+- default:
+- usage(progname);
+- err = -1;
+- goto out;
+- }
+- }
+-
+- if (config && (err = config_read(config, cfg))) {
+- err = -1;
+- goto out;
+- }
+-
+- print_set_progname(progname);
+- print_set_tag(config_get_string(cfg, NULL, "message_tag"));
+- print_set_verbose(config_get_int(cfg, NULL, "verbose"));
+- print_set_syslog(config_get_int(cfg, NULL, "use_syslog"));
+- print_set_level(config_get_int(cfg, NULL, "logging_level"));
+-
+-
+- if (open_pmc(cfg)) {
+- err = -1;
+- goto pmc_out;
+- }
+-
+- if (open_snmp()) {
+- err = -1;
+- goto snmp_out;
+- }
+-
+- while (is_running()) {
+- agent_check_and_process(1);
+- }
+-
+- snmp_shutdown("linuxptpAgent");
+-
+-snmp_out:
+- pmc_destroy(pmc);
+- msg_cleanup();
+-pmc_out:
+-out:
+- config_destroy(cfg);
+- return err;
+-}
+diff --git a/snmp4lptp_mib.h b/snmp4lptp_mib.h
+deleted file mode 100644
+index f13500611d5d..000000000000
+--- a/snmp4lptp_mib.h
++++ /dev/null
+@@ -1,30 +0,0 @@
+-/**
+- * @file snmp4lptp_mib.h
+- * @brief Common header file for all supported mibs in linuxptp
+- * @note Copyright (C) 2018 Anders Selhammer <anders.selhammer@est.tech>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2 of the License, or
+- * (at your option) any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License along
+- * with this program; if not, write to the Free Software Foundation, Inc.,
+- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+- */
+-#ifndef HAVE_SNMP4LPTP_MIB_H
+-#define HAVE_SNMP4LPTP_MIB_H
+-
+-#include "msg.h"
+-
+-/*
+- * function declarations
+- */
+-struct ptp_message* snmp4lptp_run_pmc(char *cmd);
+-
+-#endif /* HAVE_SNMP4LPTP_MIB_H */
+diff --git a/snmpflg.sh b/snmpflg.sh
+deleted file mode 100755
+index 3c58bcb21d68..000000000000
+--- a/snmpflg.sh
++++ /dev/null
+@@ -1,42 +0,0 @@
+-#!/bin/sh
+-#
+-# Discover the SNMP CFLAGS to use during compilation.
+-#
+-# Copyright (C) 2018 Anders Selhammer <anders.selhammer@est.tech>
+-#
+-# This program is free software; you can redistribute it and/or modify
+-# it under the terms of the GNU General Public License as published by
+-# the Free Software Foundation; either version 2 of the License, or
+-# (at your option) any later version.
+-#
+-# This program is distributed in the hope that it will be useful,
+-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-# GNU General Public License for more details.
+-#
+-# You should have received a copy of the GNU General Public License along
+-# with this program; if not, write to the Free Software Foundation, Inc.,
+-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+-
+-#
+-# Look for libsnmp presence. When cross compiling, the user will
+-# specify the include path in EXTRA_CFLAGS.
+-#
+-snmp_flags()
+-{
+- # Get list of directories searched for header files.
+- dirs=$(echo "" | ${CROSS_COMPILE}cpp ${EXTRA_CFLAGS} -Wp,-v 2>&1 >/dev/null | grep ^" /")
+-
+- # Look for libsnmp presence
+- for d in $dirs; do
+- files=$(find $d -type f -name net-snmp-agent-includes.h)
+- for f in $files; do
+- if grep -q NET_SNMP_AGENT_INCLUDES_H $f; then
+- printf " -DHAVE_NET_SNMP `net-snmp-config --cflags`"
+- break 2
+- fi
+- done
+- done
+-}
+-
+-echo "$(snmp_flags)"
+--
+2.25.1
+
--
2.25.1
and then do the following:
rm -rf output/build/qoriq-ptp4l*
rm -rf dl/qoriq-ptp4l*
make
Thanks, -Vladimir
akholodn@razilix:~/github/openil/openil$ git am snmp4lptp.patch
Applying: package/qoriq-ptp4l: pull upstream patch for removing snmp4lptp
.git/rebase-apply/patch:48: trailing whitespace.
.git/rebase-apply/patch:59: trailing whitespace.
.git/rebase-apply/patch:61: trailing whitespace.
.git/rebase-apply/patch:70: trailing whitespace.
.git/rebase-apply/patch:99: trailing whitespace.
-or from an SNMP-specific form.
warning: squelched 2 whitespace errors
warning: 7 lines add whitespace errors.
akholodn@razilix:~/github/openil/openil$ rm -rf output/build/qoriq-ptp4l*
akholodn@razilix:~/github/openil/openil$ rm -rf dl/qoriq-ptp4l*
akholodn@razilix:~/github/openil/openil$ make
>>> qoriq-ptp4l eee6d0fb995dddf27acde2addfb1fe89b71ab82d Downloading
Initialized empty Git repository in /home/akholodn/github/openil/openil/dl/qoriq-ptp4l/git/.git/
Fetching all references
remote: Enumerating objects: 805, done.
remote: Counting objects: 100% (805/805), done.
remote: Compressing objects: 100% (20/20), done.
remote: Total 5133 (delta 794), reused 785 (delta 785), pack-reused 4328
Receiving objects: 100% (5133/5133), 1.04 MiB | 1.22 MiB/s, done.
Resolving deltas: 100% (3868/3868), done.
From https://github.com/openil/linuxptp
* [new branch] master -> origin/master
remote: Enumerating objects: 20, done.
remote: Counting objects: 100% (20/20), done.
remote: Total 152 (delta 20), reused 20 (delta 20), pack-reused 132
Receiving objects: 100% (152/152), 51.69 KiB | 433.00 KiB/s, done.
Resolving deltas: 100% (88/88), completed with 7 local objects.
From https://github.com/openil/linuxptp
* [new tag] OpenIL-linuxptp-201705 -> OpenIL-linuxptp-201705
* [new tag] OpenIL-linuxptp-201708 -> OpenIL-linuxptp-201708
* [new tag] OpenIL-linuxptp-201712 -> OpenIL-linuxptp-201712
warning: refname 'eee6d0fb995dddf27acde2addfb1fe89b71ab82d' is ambiguous.
Git normally never creates a ref that ends with 40 hex characters
because it will be ignored when you just specify 40-hex. These refs
may be created by mistake. For example,
git checkout -b $br $(git rev-parse ...)
where "$br" is somehow empty and a 40-hex ref is created. Please
examine these refs and maybe delete them. Turn this message off by
running "git config advice.objectNameWarning false"
WARNING: no hash file for qoriq-ptp4l-eee6d0fb995dddf27acde2addfb1fe89b71ab82d.tar.gz
>>> qoriq-ptp4l eee6d0fb995dddf27acde2addfb1fe89b71ab82d Extracting
gzip -d -c /home/akholodn/github/openil/openil/dl/qoriq-ptp4l/qoriq-ptp4l-eee6d0fb995dddf27acde2addfb1fe89b71ab82d.tar.gz | tar --strip-components=1 -C /home/akholodn/github/openil/openil/output/build/qoriq-ptp4l-eee6d0fb995dddf27acde2addfb1fe89b71ab82d -xf -
>>> qoriq-ptp4l eee6d0fb995dddf27acde2addfb1fe89b71ab82d Patching
Applying 0001-Remove-the-unfinished-SNMP-code.patch using patch:
patching file makefile
Hunk #1 succeeded at 47 (offset 9 lines).
Hunk #2 FAILED at 64.
1 out of 2 hunks FAILED -- saving rejects to file makefile.rej
patching file snmp4lptp.8
patching file snmp4lptp.c
patching file snmp4lptp_mib.h
patching file snmpflg.sh
package/pkg-generic.mk:228: recipe for target '/home/akholodn/github/openil/openil/output/build/qoriq-ptp4l-eee6d0fb995dddf27acde2addfb1fe89b71ab82d/.stamp_patched' failed
make[1]: *** [/home/akholodn/github/openil/openil/output/build/qoriq-ptp4l-eee6d0fb995dddf27acde2addfb1fe89b71ab82d/.stamp_patched] Error 1
Makefile:84: recipe for target '_all' failed
make: *** [_all] Error 2
akholodn@razilix:~/github/openil/openil$ cat ./output/build/qoriq-ptp4l-eee6d0fb995dddf27acde2addfb1fe89b71ab82d/makefile.rej
--- makefile
+++ makefile
@@ -64,13 +57,6 @@ hwstamp_ctl: hwstamp_ctl.o version.o
phc_ctl: phc_ctl.o phc.o sk.o util.o clockadj.o sysoff.o print.o version.o
-snmp4lptp: config.o hash.o interface.o msg.o phc.o pmc_common.o print.o sk.o \
- snmp4lptp.o tlv.o $(TRANSP) util.o
- $(CC) $^ $(LDFLAGS) $(LOADLIBES) $(LDLIBS) $(snmplib) -o $@
-
-snmp4lptp.o: snmp4lptp.c
- $(CC) $(CPPFLAGS) $(CFLAGS) $(snmpflg) -c $<
-
timemaster: phc.o print.o rtnl.o sk.o timemaster.o util.o version.o
version.o: .version version.sh $(filter-out version.d,$(DEPEND))
I fixed up the patch, please copy and try again.
yeap, it works. Thanks @vladimiroltean
hello @vladimiroltean, did you commit your patch?
ah, I see you did it here :) https://github.com/openil/openil/commit/e15c5f088c904354311bb349add1932ddbdeaa7c
what are talking about?
I'm trying to build OpenIL 1.8 for the NXP LS1028A, so I did
git clone https://github.com/openil/openil.git cd openil git checkout OpenIL-v1.8-202005 make nxp_ls1028ardb-64b_ubuntu_full_defconfig make 2>&1 | tee build.log
After a while I got
/home/akholodn/github/openil/openil/output/host/bin/aarch64-linux-gnu-gcc timemaster.o print.o rtnl.o sk.o util.o version.o -lm -lrt -o timemaster /home/akholodn/github/openil/openil/output/host/bin/aarch64-linux-gnu-gcc -Wall -DVER=2.0 -D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -DHAVE_NET_SNMP -DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -g -O2 -fdebug-prefix-map=/build/net-snmp-ry1JTp/net-snmp-5.7.3+dfsg=. -fstack-protector-strong -Wformat -Werror=format-security -DNETSNMP_USE_INLINE -Ulinux -Dlinux=linux -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib/x86_64-linux-gnu/perl/5.26/CORE -Wdate-time -D_FORTIFY_SOURCE=2 -I. -I/usr/include -c snmp4lptp.c aarch64-linux-gnu-gcc: ERROR: unsafe header/library path used in cross-compilation: '-I/usr/local/include' makefile:92: recipe for target 'snmp4lptp.o' failed make[2]: [snmp4lptp.o] Error 1 package/pkg-generic.mk:266: recipe for target '/home/akholodn/github/openil/openil/output/build/qoriq-ptp4l-eee6d0fb995dddf27acde2addfb1fe89b71ab82d/.stamp_built' failed make[1]: [/home/akholodn/github/openil/openil/output/build/qoriq-ptp4l-eee6d0fb995dddf27acde2addfb1fe89b71ab82d/.stamp_built] Error 2 Makefile:84: recipe for target '_all' failed make: *** [_all] Error 2