[lsb-discuss] undefined reference to `__isoc99_sscanf
craig.scott at csiro.au
Wed Dec 29 05:17:08 PST 2010
Hi all. Sorry for the bombardment of LSB+Qt posts today. ;) After applying various workarounds, I have managed to get most of Qt building against LSB 4.0 on a SLED11.1 machine. However, I'm pretty much stumped on one point and I suspect others on this list will be able to provide some hints on where to look. All the Qt libraries I need can now be built, but I encounter an issue when an executable tries to link against them (for the curious, it is linking the assistant executable and the problem library reported is QtNetwork). The tail of the error message is:
/path/hidden/Build/qt-everywhere-opensource-src-4.7.1/lib/libQtNetwork.so: undefined reference to `__isoc99_sscanf'
collect2: ld returned 1 exit status
The funny thing is, even when none of the source code that goes into libQtNetwork.so uses sscanf, I still see this error. There is only one usage of sscanf in that library's source and I removed it but still got the above. I've seen various Google posts that suggest defining __GNU_SOURCE as a workaround, but this doesn't seem to be tackling the right problem for me. It is almost as though some other library is creeping into the link, but I can't see how.
I know it's pretty hard without all the details of my build, but if anyone has any suggestions on where to look or what to look for in tracking this one down, that might be helpful. It would be a shame to get this close to a working build but end up throwing in the towel on something like this!
PS: For anyone wanting to follow along, here's the trail of bug reports that describe more or less how I got to where I am:
In the end, I had to disable some of the Qt modules because they were just too hard. Specifically, I disabled Qt3Support, glib and the JIT. Qt3Support I didn't try because it gave trouble last time around with Qt 4.7.0, but maybe it can be made buildable now. The glib support seemed to pull in non-LSB system libs and I was unable to figure out why (but maybe I'll have another go at it another day). The JIT was just too problematic with workarounds leading to further problems.
Dr Craig Scott
Computational Software Engineering Team Leader, CSIRO (CMIS)
More information about the lsb-discuss