Open acoul opened 7 years ago
Thanks. It's tricky because of the way that src/json/ is shared across all platforms (Linux, Solaris, FreeBSD, Darwin, ...) but perhaps we should allow each platform the discretion to compile and link cJSON in it's own way.
Greetings,
on a 32bit gentoo-latest (Gentoo Base System release 2.3) I am getting the following error:
gcc -std=gnu99 -I. -I../json -I../sflow -fPIC -g -O2 -D_GNU_SOURCE -DHSP_VERSION=2.0.9 -DUTHEAP -DHSP_OPTICAL_STATS -DHSP_MOD_DIR=/etc/hsflowd/modules -Wall -Wstrict-prototypes -Wunused-value -Wunused-function -c mod_json.c ld -o mod_json.so mod_json.o -shared mod_json.o: In function
evt_packet_tock': /inet/netflow/host-sflow/src/Linux/mod_json.c:1280: undefined reference to
stack_chk_fail_local' mod_json.o: In functiongetApplication': /inet/netflow/host-sflow/src/Linux/mod_json.c:284: undefined reference to
__stack_chk_fail_local' mod_json.o: In functionreadJSON': /inet/netflow/host-sflow/src/Linux/mod_json.c:1250: undefined reference to
stack_chk_fail_local' ld: mod_json.so: hidden symbol `__stack_chk_fail_local' isn't defined ld: final link failed: Bad value make[1]: *** [Makefile:251: mod_json.so] Error 1the following patch resolves this issue
src/Linux/Makefile -LD=ld +LD=gcc
I am also getting this warning: