Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 773325

Summary: app-misc/hddled-0.3 undefined reference to `XOpenDisplay'
Product: Gentoo Linux Reporter: Alessandro Barbieri <lssndrbarbieri>
Component: Current packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED INVALID    
Severity: normal CC: ionen
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: hddled-0.3:20210227-200653.log

Description Alessandro Barbieri 2021-02-27 20:25:00 UTC
Compiling source in /var/tmp/portage/app-misc/hddled-0.3/work ...
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/app-misc/hddled-0.3/temp/ccHgkm46.o: in function `led':
hddled.c:(.text+0x211): undefined reference to `XChangeKeyboardControl'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: hddled.c:(.text+0x21b): undefined reference to `XFlush'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/app-misc/hddled-0.3/temp/ccHgkm46.o: in function `main':
hddled.c:(.text.startup+0x148): undefined reference to `XOpenDisplay'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: hddled.c:(.text.startup+0x2d6): undefined reference to `XCloseDisplay'
collect2: error: ld returned 1 exit status
 * ERROR: app-misc/hddled-0.3::gentoo failed (compile phase):
 *   (no error message)
 *
 * Call stack:
 *     ebuild.sh, line 125:  Called src_compile
 *   environment, line 2039:  Called die
 * The specific snippet of code:
 *           $(tc-getCC) ${CFLAGS} -DX -lX11 -o x${PN} ${PN}.c ${LDFLAGS} || die;
 *
Comment 1 Alessandro Barbieri 2021-02-27 20:25:56 UTC
Created attachment 688632 [details]
hddled-0.3:20210227-200653.log

buildlog
Comment 2 Ionen Wolkens gentoo-dev 2021-02-27 20:32:37 UTC
CFLAGS="[...] -Wl,--as-needed"

What is this doing in CFLAGS, will work if it's only in LDFLAGS