Hi,
On 27-02-16 23:29, Jakub Jelinek wrote:
On Sat, Feb 27, 2016 at 11:18:35PM +0100, Hans de Goede wrote:
On 27-02-16 23:08, Jakub Jelinek wrote:
On Sat, Feb 27, 2016 at 11:03:57PM +0100, Hans de Goede wrote:
I'm having this weird issue in rawhide / f24 where I get the following
error:
ldd -r /usr/lib64/libsfml-graphics.so
<snip>
undefined symbol: __cpu_model (/usr/lib64/libsfml-graphics.so)
How do you link the shared library?
Do you use the gcc or g++ driver to link that, without -nostdlib?
If you say link directly with ld -shared or something similar,
then this would be caused by libgcc.a not being linked into the
shared library.
/usr/lib64/ccache/c++ -fPIC \
-O2 -g -pipe -Wall -Werror=format-sec... -mtune=generic \
-DNDEBUG \
-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld \
-shared -Wl,-soname,libsfml-graphics.so.2.3 -o libsfml-system.so.2.3.2 \
-lfoo -lbar -l... \
-Wl,-rpath,/home/hans/projects/fedora/SFML/master/SFML-2.3.2/lib:
Which AFAICT should be fine.
If you want a quick workaround, just link with -lgcc_s -lgcc last (or don't
link with c++, but gcc). The rules for when exactly is -lgcc_s linked in,
when -lgcc, when -lgcc_eh, and in what order are quite complex (depending on
g++ vs. gcc driver, -shared-libgcc/-static-libgcc, -shared vs. executable
etc.); on ppc32 I remember libgcc_s.so is a linker script which links in
-lgcc_s -lgcc, perhaps we need it on x86_64/i686 too.
I've tried both adding -lgcc_s -lgcc (near the end of the list of libs /
-l options, but not at the end because cmake) and simply building and linking
everything with "gcc" as compile / link command (also cutting out ccache),
neither one helped I'm afraid.
As said I've a workaround, but still it would be good to figure out what
is going on. Should I take this to bugzilla ? And if so which bugzilla ?
Regards,
Hans
--
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
http://lists.fedoraproject.org/admin/lists/devel@xxxxxxxxxxxxxxxxxxxxxxx