Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config.mk: fix static build with cjson #1976

Closed
wants to merge 1 commit into from
Closed

config.mk: fix static build with cjson #1976

wants to merge 1 commit into from

Conversation

ffontaine
Copy link
Contributor

Add -lcjson to CLIENT_LDFLAGS to fix the following failure when building statically:

/home/buildroot/autobuild/instance-0/output-1/host/bin/microblazeel-buildroot-linux-uclibc-gcc rr_client.o client_props.o client_shared.o pub_shared.o sub_client_output.o ../lib/libmosquitto.a -o mosquitto_rr -static -L../lib  -lssl -lcrypto -lpthread -lcares -L/home/buildroot/autobuild/instance-0/output-1/host/bin/../microblazeel-buildroot-linux-uclibc/sysroot/usr/lib -lssl -L/home/buildroot/autobuild/instance-0/output-1/host/bin/../microblazeel-buildroot-linux-uclibc/sysroot/usr/lib -lz -latomic -lpthread -lcrypto -lz -latomic -lpthread
/home/buildroot/autobuild/instance-0/output-1/host/lib/gcc/microblazeel-buildroot-linux-uclibc/9.3.0/../../../../microblazeel-buildroot-linux-uclibc/bin/ld: sub_client_output.o: in function `json_print':
(.text+0xe4): undefined reference to `cJSON_CreateObject'

Fixes:

Signed-off-by: Fabrice Fontaine fontaine.fabrice@gmail.com

Add -lcjson to CLIENT_LDFLAGS to fix the following failure when building
statically:

/home/buildroot/autobuild/instance-0/output-1/host/bin/microblazeel-buildroot-linux-uclibc-gcc rr_client.o client_props.o client_shared.o pub_shared.o sub_client_output.o ../lib/libmosquitto.a -o mosquitto_rr -static -L../lib  -lssl -lcrypto -lpthread -lcares -L/home/buildroot/autobuild/instance-0/output-1/host/bin/../microblazeel-buildroot-linux-uclibc/sysroot/usr/lib -lssl -L/home/buildroot/autobuild/instance-0/output-1/host/bin/../microblazeel-buildroot-linux-uclibc/sysroot/usr/lib -lz -latomic -lpthread -lcrypto -lz -latomic -lpthread
/home/buildroot/autobuild/instance-0/output-1/host/lib/gcc/microblazeel-buildroot-linux-uclibc/9.3.0/../../../../microblazeel-buildroot-linux-uclibc/bin/ld: sub_client_output.o: in function `json_print':
(.text+0xe4): undefined reference to `cJSON_CreateObject'

Fixes:
 - http://autobuild.buildroot.org/results/98e0bccf3e1a964bb6a52265bd6f11a681ec220d

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
@ffontaine
Copy link
Contributor Author

I'm closing this PR, the build failure was raised because CLIENT_STATIC_LDADD was overridden inside buildroot.

@ffontaine ffontaine closed this Dec 25, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant