Hi,

On 2024-05-28 17:49, PICCA Frederic-Emmanuel wrote:
following a different path...,

I added this in the rules file

-export POSIX_CFLAGS+=$(CFLAGS)
+export POSIX_CFLAGS+=$(CFLAGS) $(shell pkgconf --cflags yajl)
export POSIX_CFLAGS+=$(CPPFLAGS)
export POSIX_CPPFLAGS+=$(CPPFLAGS)
-export POSIX_LDFLAGS+=$(LDFLAGS)
+export POSIX_LDFLAGS+=$(LDFLAGS) $(shell pkgconf --libs yajl)

This is much better than my previous method, thanks!

but it ends up like this

/usr/bin/gcc  -D_GNU_SOURCE -D_DEFAULT_SOURCE          -D_X86_64_ -DUNIX  -Dlinux     -g -O2 
-Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. 
-fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection 
-I/usr/include/yajl  -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -Werror=implicit-function-declaration 
-ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection 
-Wformat -Werror=format-security -fcf-protection -I/usr/include/yajl  -Wdate-time -D_FORTIFY_SOURCE=2 
-O3 -g   -Wall -Werror-implicit-function-declaration      -mtune=generic     -m64  -I. -I../O.Common 
-I. -I. -I.. -I../../../../include/compiler/gcc -I../../../../include/os/Linux -I../../../../include    
     -c ../yajl_test.c
../yajl_test.c: In function ‘main’:
../yajl_test.c:209:23: error: ‘yajl_allow_json5’ undeclared (first use in this 
function)
   209 |     yajl_config(hand, yajl_allow_json5, 0);
       |                       ^~~~~~~~~~~~~~~~
../yajl_test.c:209:23: note: each undeclared identifier is reported only once 
for each function it appears in

the embeded version seems to provide at least this extra symbols.

It is worth checking whether these extra symbols are added locally, or is this unmodified upstream source of yajl, but just a different version.

what about integrating this symbol in the yajl library ?

This is a solution, yes. But I would like to explore other options first.

Thanks a lot,
Andrius

Reply via email to