I am almost thinking there is a tutorial which has -Wall hard-coded into error checking for configure.ac input. In any case, this is a configure error I am encountering very very frequently since the beginning of this year. When I get a reply to this I will have the syntax for xlc available - again. I should have kept it around last time I researched it for another project. Michael
The error I during make is:
+ /opt/bin/make > .buildaix/make.out
xlc: 1501-210 (S) command option Wall contains an incorrect subargument
make[2]: Entering directory `/data/prj/aixtools/json-c-0.12'
/bin/sh ./libtool --tag=CC --mode=link xlc -qlanglvl=extc99 -D_GNU_SOURCE -D_REENTRANT -I/opt/include -I/opt/buildaix/include -O2 -version-info 2:1:0 -no-undefined -Wl,-Bsymbolic-functions -o libjson-c.la -rpath /opt/lib arraylist.lo debug.lo json_c_version.lo json_object.lo json_object_iterator.lo json_tokener.lo json_util.lo linkhash.lo printbuf.lo random_seed.lo
libtool: link: rm -fr .libs/libjson-c.exp
libtool: link: /usr/bin/nm -B -BCpg .libs/arraylist.o .libs/debug.o .libs/json_c_version.o .libs/json_object.o .libs/json_object_iterator.o .libs/json_tokener.o .libs/json_util.o .libs/linkhash.o .libs/printbuf.o .libs/random_seed.o | awk '{ if ((($ 2 == "T") || ($ 2 == "D") || ($ 2 == "B")) && (substr($ 3,1,1) != ".")) { print $ 3 } }' | sort -u > .libs/libjson-c.exp
libtool: link: xlc -Wl,-bM:SRE -o .libs/libjson-c.so.2 .libs/arraylist.o .libs/debug.o .libs/json_c_version.o .libs/json_object.o .libs/json_object_iterator.o .libs/json_tokener.o .libs/json_util.o .libs/linkhash.o .libs/printbuf.o .libs/random_seed.o -lc -Wl,-bnoentry -qlanglvl=extc99 -O2 -Wl,-Bsymbolic-functions -Wl,-bE:.libs/libjson-c.exp -Wl,-bernotok
ld: 0706-027 The -B symbolic-functions flag is ignored.
ld: 0711-317 ERROR: Undefined symbol: .rpl_realloc
ld: 0711-317 ERROR: Undefined symbol: .rpl_malloc
ld: 0711-317 ERROR: Undefined symbol: ._isnan
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
make[2]: *** [libjson-c.la] Error 8
make[2]: Leaving directory `/data/prj/aixtools/json-c-0.12'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/data/prj/aixtools/json-c-0.12'
make: *** [all] Error 2
"/usr/include/time.h", line 292.2: 1506-460 (I) else nesting level is 3.
"/usr/include/time.h", line 292.2: 1506-456 (I) Stop skipping tokens.
"/usr/include/time.h", line 300.2: 1506-460 (I) if nesting level is 4.
"/usr/include/time.h", line 300.13: 1506-455 (I) defined(_THREAD_SAFE) evaluates to 0.
"/usr/include/time.h", line 300.2: 1506-454 (I) if condition evaluates to 1.
"/usr/include/time.h", line 307.2: 1506-460 (I) endif nesting level is 4.
On Oct 1, 2015 4:43 AM, "Michael Felt" <aixt...@gmail.com> wrote:
> FYI - much further, but still a bad (now linker flag), and a few undefined symbols.
>
> Will update later when I have time to try again - for now -
>
> make[2]: Entering directory `/data/prj/aixtools/json-c-0.12'
> /bin/sh ./libtool --tag=CC --mode=link xlc -qlanglvl=extc99 -D_GNU_SOURCE -D_REENTRANT -I/opt/include -I/opt/buildaix/include -O2 -version-info 2:1:0 -no-undefined -Wl,-Bsymbolic-functions -o libjson-c.la -rpath /opt/lib arraylist.lo debug.lo json_c_version.lo json_object.lo json_object_iterator.lo json_tokener.lo json_util.lo linkhash.lo printbuf.lo random_seed.lo
Are those options (e.g. -Bsymbolic-functions) specified in the json-c sources somewhere? If not, maybe there's something wrong with your copy of libtool.
> libtool: link: xlc -Wl,-bM:SRE -o .libs/libjson-c.so.2 .libs/arraylist.o .libs/debug.o .libs/json_c_version.o .libs/json_object.o .libs/json_object_iterator.o .libs/json_tokener.o .libs/json_util.o .libs/linkhash.o .libs/printbuf.o .libs/random_seed.o -lc -Wl,-bnoentry -qlanglvl=extc99 -O2 -Wl,-Bsymbolic-functions -Wl,-bE:.libs/libjson-c.exp -Wl,-bernotok
> ld: 0706-027 The -B symbolic-functions flag is ignored.
> ld: 0711-317 ERROR: Undefined symbol: .rpl_realloc
> ld: 0711-317 ERROR: Undefined symbol: .rpl_malloc
Huh? Your system doesn't include malloc in libc? If it's in some other library I would think that libtool would know enough to include it.
> ld: 0711-317 ERROR: Undefined symbol: ._isnan
Fixing this probably needs a -lm added.
> Further, -qinfo=all is overkill - getting MANY MANY messages such as:
> "/usr/include/time.h", line 292.2: 1506-460 (I) else nesting level is 3.
It sounds more like qinfo isn't the same thing as gcc's warnings. For instance, it would make sense to cause the build to fail because of any of these messages you listed.
If there isn't an equivalent set of options, then just drop them altogether. The -W options don't change the compiled output, so it's just a matter of how resilient you want to be to catching stupid programming mistakes when building on your system.
Eric
On Oct 1, 2015 3:34 AM, "Michael Felt" <aixt...@gmail.com> wrote:
>
> I am almost thinking there is a tutorial which has -Wall hard-coded into
> error checking for configure.ac input. In any case, this is a configure
> error I am encountering very very frequently since the beginning of this
> year.
You must not have been looking at many OS targeted builds before the beginning of the year; it seems to me to be a common occurrence for quite some time. IMO, using appropriate options to turn on compile time error checking is a good idea, and since json-c has mainly been used on systems that have gcc as their compiler (Linux, NetBSD, etc...), the fact that -Wall, et al. are hard coded is entirely reasonable.
> When I get a reply to this I will have the syntax for xlc available -
> again. I should have kept it around last time I researched it for
> another project.
If you know the appropriate autoconf/automake syntax to override the default flags when building with another compiler, such as xlc, I'll be happy to merge in a patch.
Eric
--
You received this message because you are subscribed to the Google Groups "json-c" group.
To unsubscribe from this group and stop receiving emails from it, send an email to json-c+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
-B... no idea where that is coming from, maybe just a hard-coded something like -Wall is.This has been on the back burner due to work.I think IBM xlc "warnings", with no additional arguments - are close to -Wall for gcc. I certainly see many messages going to stderr all the time.
re: *alloc* - there are lots of definitions, just none with rpl in the name
On Thu, Oct 15, 2015 at 8:03 AM, Michael Felt <aixt...@gmail.com> wrote:-B... no idea where that is coming from, maybe just a hard-coded something like -Wall is.This has been on the back burner due to work.I think IBM xlc "warnings", with no additional arguments - are close to -Wall for gcc. I certainly see many messages going to stderr all the time.We can fix this by using AX_APPEND_FLAG from the Autoconf Archive to figure out what flags the compiler accepts. I'm pretty sure I know how to get that to work, so when I have a bit more time I'll take a look at implementing it.