After migrating from Ubuntu 19.04 to 19.10 I encounter the following errors when trying to link against `libQt5WebKit.so` or `libQt5WebKitWidgets.so` (from official qt.io release package): > /usr/bin/ld: /opt/Qt5.5.1/5.5/gcc_64/lib/libQt5WebKitWidgets.so: .dynsym local symbol at index 2 (>= sh_info of 2) > /usr/bin/ld: /opt/Qt5.5.1/5.5/gcc_64/lib/libQt5WebKitWidgets.so: .dynsym local symbol at index 3 (>= sh_info of 2) > /usr/bin/ld: /opt/Qt5.5.1/5.5/gcc_64/lib/libQt5WebKitWidgets.so: .dynsym local symbol at index 4 (>= sh_info of 2) > /usr/bin/ld: /opt/Qt5.5.1/5.5/gcc_64/lib/libQt5WebKit.so: .dynsym local symbol at index 2 (>= sh_info of 2) > /usr/bin/ld: /opt/Qt5.5.1/5.5/gcc_64/lib/libQt5WebKit.so: .dynsym local symbol at index 3 (>= sh_info of 2) > /usr/bin/ld: /opt/Qt5.5.1/5.5/gcc_64/lib/libQt5WebKit.so: .dynsym local symbol at index 4 (>= sh_info of 2) Using the gold linker (-fuse-ld=gold) works fine without error or warning. Using the lld linker (-fuse-ld=lld) works, but gives warnings: > ld.lld: warning: found local symbol '__bss_start' in global part of symbol table in file /opt/Qt5.5.1/5.5/gcc_64/lib/libQt5WebKitWidgets.so > ld.lld: warning: found local symbol '_end' in global part of symbol table in file /opt/Qt5.5.1/5.5/gcc_64/lib/libQt5WebKitWidgets.so > ld.lld: warning: found local symbol '_edata' in global part of symbol table in file /opt/Qt5.5.1/5.5/gcc_64/lib/libQt5WebKitWidgets.so > ld.lld: warning: found local symbol '_end' in global part of symbol table in file /opt/Qt5.5.1/5.5/gcc_64/lib/libQt5WebKit.so > ld.lld: warning: found local symbol '__bss_start' in global part of symbol table in file /opt/Qt5.5.1/5.5/gcc_64/lib/libQt5WebKit.so > ld.lld: warning: found local symbol '_edata' in global part of symbol table in file /opt/Qt5.5.1/5.5/gcc_64/lib/libQt5WebKit.so The error is generated in `elflink.c`: https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=bfd/elflink.c;h=9d7f69afda52472bfc63b783d60053cecb386452;hb=HEAD#l4494 Since these libraries were working with previous versions of binutils and are working with either gold and lld, I would expect to be able to link against them using ld.
This has already been fixed on the 2.33 branch. *** This bug has been marked as a duplicate of bug 24857 ***
The commit that fixes bug 24857 if from July: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=0231a51ef7ff49336d3a2f0e4eec09cd17b23c95 Tags binutils-2_33 and binutils-2_33_1 both contain this commit. I tested with versions binutils 2.33 (from eoan) and binutils 2.33.1 (from devel). I still have the issue with both versions.
I fail to see what you're complaining about then. The message doesn't say "warning", but that is what it is when reported for a shared library. Linking should complete successfully despite the warning unless you pass --fatal-warnings to the linker.
(In reply to Alan Modra from comment #3) > I fail to see what you're complaining about then. The message doesn't say > "warning", but that is what it is when reported for a shared library. > Linking should complete successfully despite the warning unless you pass > --fatal-warnings to the linker. After further inspection the linking does complete and g++ output status is 0. For some reason it is the tools that I am using (IDE and others) that understand this as an error (not warning) and report a build failure... Thank you for your time.
Would it be possible to add "warning:" to the error message? Pretty much like what is done with the lld messages. Looking at your code base it seems that it is what is usually done and it would allow external tools to detect it as warnings, not errors.
There are many warnings that don't contain the word "warning". There are even errors that contain the word "warning". If you would like to correct this, please audit the source for this sort of problem and submit patches to binutils@sourceware.org. A patch just fixing this one warning isn't very useful.