Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 621812 - app-emulation/playonlinux-4.2.11 - linking fails with default LDFLAGS
Summary: app-emulation/playonlinux-4.2.11 - linking fails with default LDFLAGS
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Adam Feldman
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-15 03:24 UTC by adebeus
Modified: 2017-07-15 09:53 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Makefile patch (makefile.patch,746 bytes, patch)
2017-06-15 03:24 UTC, adebeus
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description adebeus 2017-06-15 03:24:14 UTC
Created attachment 476516 [details, diff]
Makefile patch

When attempting to build app-emulation/playonlinux-4.2.11, I get the following error:

gcc -O2 -pipe -march=haswell -Wl,-O1 -Wl,--as-needed -Wl,-z,now -Wl,-z,relro -lGL -lX11 ./src/check_direct_rendering.c -o ./bin/playonlinux-check_dd
/var/tmp/portage/app-emulation/playonlinux-4.2.11/temp/ccEoJYO5.o: In function `main':
check_direct_rendering.c:(.text.startup+0x28): undefined reference to `XOpenDisplay'
check_direct_rendering.c:(.text.startup+0xe4): undefined reference to `glXChooseVisual'
check_direct_rendering.c:(.text.startup+0x102): undefined reference to `glXCreateContext'
check_direct_rendering.c:(.text.startup+0x112): undefined reference to `glXIsDirect'
check_direct_rendering.c:(.text.startup+0x169): undefined reference to `XFree'
check_direct_rendering.c:(.text.startup+0x182): undefined reference to `glXChooseVisual'

The older app-emulation/4.2.10-r1 builds fine.

I have traced the problem to the upstream Makefile including "-lGL -lX11" in CFLAGS, causing them to appear before the source file and get filtered by "-Wl,--as-needed" in LDFLAGS (Gentoo default). I have submitted a PR on the upstream Github to fix the issue, but in the meantime this patch fixes the issue.
Comment 1 Pacho Ramos gentoo-dev 2017-07-15 09:53:21 UTC
fixed in .12