Open david-xk opened 4 years ago
I'm having this issue as well. A workaround I found is to add -lm
to
OpenNetworkLinux/packages/base/any/onlp-snmpd/builds/Makefile:29
:
@CommitThis Hi Paul, yes I have same workaround attached in my comment. Just wondering if community has a plan to fix it. Thanks, David
@david-xk Sorry David, I missed the diff. I'll raise a PR and see what happens.
@CommitThis Hi Paul, thanks a lot. Keep in touch. Best, David
Branch: ONLPv2
Build command:
docker/tools/onlbuilder --isolate --pull --autobuild --non-interactive
Build Log:
BUILD/jessie/x86_64-linux-gnu/lib/cjson.a(cJSON.o): In function
parse_number': /home/david/workspace/github/opencomputeproject/OpenNetworkLinux_ONLPv2/sm/bigcode/modules/cjson/module/src/cJSON.c:113: undefined reference topow' BUILD/jessie/x86_64-linux-gnu/lib/cjson.a(cJSON.o): In function
print_number': /home/david/workspace/github/opencomputeproject/OpenNetworkLinux_ONLPv2/sm/bigcode/modules/cjson/module/src/cJSON.c:136: undefined reference tofloor' BUILD/jessie/x86_64-linux-gnu/lib/cjson_util.a(cjson_util.o): In function
cjson_util_vlookup_svalue': /home/david/workspace/github/opencomputeproject/OpenNetworkLinux_ONLPv2/sm/bigcode/modules/cjson_util/module/src/cjson_util.c:454: undefined reference to `floor' collect2: error: ld returned 1 exit status /home/david/workspace/github/opencomputeproject/OpenNetworkLinux_ONLPv2/sm/infra/builder/unix/toolchains/gcc-local/bin.mk:47: recipe for target 'BUILD/jessie/x86_64-linux-gnu/bin/onlp-snmpd' failed make[4]: *** [BUILD/jessie/x86_64-linux-gnu/bin/onlp-snmpd] Error 1Patch to fix the issue: `diff --git a/packages/base/any/onlp-snmpd/builds/Makefile b/packages/base/any/onlp-snmpd/builds/Makefile index 6a5f08da..9f47b387 100644 --- a/packages/base/any/onlp-snmpd/builds/Makefile +++ b/packages/base/any/onlp-snmpd/builds/Makefile @@ -26,7 +26,7 @@ GLOBAL_CFLAGS += -g
LIBONLP := $(shell $(ONLPM) --find-file onlp:$(ARCH) libonlp.so)
-GLOBAL_LINK_LIBS += -lpthread $(LIBONLP) +GLOBAL_LINK_LIBS += -lm -lpthread $(LIBONLP) GLOBAL_LINK_LIBS += -Wl,--unresolved-symbols=ignore-in-shared-libs
.DEFAULT_GOAL := onlp-snmpd`
Attachements: build.log onlp-snmpd.Makefile.diff.txt