Re: gcc-6 unresolved symbol __cpu_model in code using __builtin_cpu_supports("sse2")

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

	Jakub
--
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
http://lists.fedoraproject.org/admin/lists/devel@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux