Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 193885 - media-sound/alsa-tools wont build with USE="fltk" and ALSA_CARDS="hdsp" if fltk is built with LDFLAGS="-Wl,--as-needed"
Summary: media-sound/alsa-tools wont build with USE="fltk" and ALSA_CARDS="hdsp" if fl...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High enhancement (vote)
Assignee: Gentoo ALSA team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: as-needed
  Show dependency tree
 
Reported: 2007-09-26 16:30 UTC by Chris Smith
Modified: 2008-03-12 16:19 UTC (History)
1 user (show)

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


Attachments
alsa-tools-1.0.14-as-needed.patch (alsa-tools-1.0.14-as-needed.patch,256 bytes, patch)
2007-09-26 17:31 UTC, Santiago M. Mola (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Smith 2007-09-26 16:30:31 UTC
media-sound/alsa-tools requires x11-libs/fltk in order to display the hdsp mixer

if x11-libs/fltk is built with LDFLAGS="-Wl,--as-needed" then alsa-tools will fail to build the hdsp module with USE="fltk" (necessary to use the hdsp mixer)

workaround is to not build x11-libs/fltk with LDFLAGS="-Wl,--as-needed"

no biggie, just wanted it documented in case helps someone

Reproducible: Always
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-09-26 16:36:56 UTC
Please post the errors...
Comment 2 Chris Smith 2007-09-26 16:50:35 UTC
========================================================
x86_64-pc-linux-gnu-g++  -march=nocona -O2 -fomit-frame-pointer -pipe -I/usr/include/fltk-1.1  -I/usr/include/fltk-1.1 -fno-exceptions  -Wl,--as-needed -L/usr/lib64/fltk-1.1  -lasound -lm -ldl -lpthread -L/usr/lib64/fltk-1.1 -Wl,-rpath,/usr/lib64/fltk-1.1 -lfltk -lXft -lpthread -lm -lXext -lX11 -L/usr/lib64 -o hdspconf  hdspconf.o HC_CardPane.o HC_SyncCheck.o HC_SpdifFreq.o HC_AutoSyncRef.o HC_SystemClock.o HC_ClockSource.o HC_SpdifIn.o HC_SpdifOut.o HC_PrefSyncRef.o HC_Aeb.o HC_BreakoutCable.o HC_InputLevel.o HC_OutputLevel.o HC_Phones.o HC_XpmRenderer.o HC_AboutText.o pixmaps.o labels.o  -lasound -lm -ldl -lpthread
hdspconf.o: In function `refresh_cb(void*)':
hdspconf.cxx:(.text+0xc0): undefined reference to `Fl_Group::array() const'
hdspconf.cxx:(.text+0x2c0): undefined reference to `Fl::add_timeout(double, void (*)(void*), void*)'
hdspconf.o: In function `main':
hdspconf.cxx:(.text+0x46a): undefined reference to `Fl_Window::Fl_Window(int, int, char const*)'
hdspconf.cxx:(.text+0x497): undefined reference to `Fl_Tabs::Fl_Tabs(int, int, int, int, char const*)'
hdspconf.cxx:(.text+0x4a0): undefined reference to `Fl_Group::end()'
hdspconf.cxx:(.text+0x4d8): undefined reference to `Fl_Group::add(Fl_Widget&)'
hdspconf.cxx:(.text+0x515): undefined reference to `Fl_Group::Fl_Group(int, int, int, int, char const*)'
hdspconf.cxx:(.text+0x5cf): undefined reference to `Fl_Group::end()'
hdspconf.cxx:(.text+0x5da): undefined reference to `Fl_Group::add(Fl_Widget&)'
hdspconf.cxx:(.text+0x5f2): undefined reference to `Fl_Window::show(int, char**)'
hdspconf.cxx:(.text+0x5f7): undefined reference to `Fl::run()'
HC_CardPane.o: In function `HC_CardPane::HC_CardPane(int, int, HDSP_IO_Type)':
HC_CardPane.cxx:(.text+0x2e): undefined reference to `Fl_Group::Fl_Group(int, int, int, int, char const*)'
HC_CardPane.cxx:(.text+0x81): undefined reference to `Fl_Widget::label(char const*)'
HC_CardPane.o: In function `HC_CardPane::HC_CardPane(int, int, HDSP_IO_Type)':
HC_CardPane.cxx:(.text+0xa40): undefined reference to `Fl_Group::Fl_Group(int, int, int, int, char const*)'
HC_CardPane.cxx:(.text+0xa93): undefined reference to `Fl_Widget::label(char const*)'
HC_CardPane.o: In function `HC_CardPane::HC_CardPane(int, int, HDSP_IO_Type)':
HC_CardPane.cxx:(.text+0xbc): undefined reference to `Fl_Group::end()'
HC_CardPane.o: In function `HC_CardPane::HC_CardPane(int, int, HDSP_IO_Type)':
HC_CardPane.cxx:(.text+0xace): undefined reference to `Fl_Group::end()'
HC_CardPane.o: In function `HC_CardPane::~HC_CardPane()':
HC_CardPane.cxx:(.text._ZN11HC_CardPaneD0Ev[HC_CardPane::~HC_CardPane()]+0xc): undefined reference to `Fl_Group::~Fl_Group()'
HC_CardPane.o: In function `HC_CardPane::~HC_CardPane()':
HC_CardPane.cxx:(.text._ZN11HC_CardPaneD1Ev[HC_CardPane::~HC_CardPane()]+0x8): undefined reference to `Fl_Group::~Fl_Group()'
<snip>
HC_Phones.o:(.rodata._ZTI9HC_Phones[typeinfo for HC_Phones]+0x10): undefined reference to `typeinfo for Fl_Group'
HC_XpmRenderer.o: In function `HC_XpmRenderer::HC_XpmRenderer(int, int, int, int, char* const*)':
HC_XpmRenderer.cxx:(.text+0x27): undefined reference to `Fl_Widget::Fl_Widget(int, int, int, int, char const*)'
HC_XpmRenderer.o: In function `HC_XpmRenderer::HC_XpmRenderer(int, int, int, int, char* const*)':
HC_XpmRenderer.cxx:(.text+0x4f): undefined reference to `Fl_Widget::Fl_Widget(int, int, int, int, char const*)'
HC_XpmRenderer.o: In function `HC_XpmRenderer::draw()':
HC_XpmRenderer.cxx:(.text+0x12): undefined reference to `fl_draw_pixmap(char* const*, int, int, Fl_Color)'
HC_XpmRenderer.o: In function `HC_XpmRenderer::~HC_XpmRenderer()':
HC_XpmRenderer.cxx:(.text._ZN14HC_XpmRendererD0Ev[HC_XpmRenderer::~HC_XpmRenderer()]+0xc): undefined reference to `Fl_Widget::~Fl_Widget()'
HC_XpmRenderer.o: In function `HC_XpmRenderer::~HC_XpmRenderer()':
HC_XpmRenderer.cxx:(.text._ZN14HC_XpmRendererD1Ev[HC_XpmRenderer::~HC_XpmRenderer()]+0x8): undefined reference to `Fl_Widget::~Fl_Widget()'
HC_XpmRenderer.o:(.rodata._ZTV14HC_XpmRenderer[vtable for HC_XpmRenderer]+0x28): undefined reference to `Fl_Widget::handle(int)'
HC_XpmRenderer.o:(.rodata._ZTV14HC_XpmRenderer[vtable for HC_XpmRenderer]+0x30): undefined reference to `Fl_Widget::resize(int, int, int, int)'
HC_XpmRenderer.o:(.rodata._ZTI14HC_XpmRenderer[typeinfo for HC_XpmRenderer]+0x10): undefined reference to `typeinfo for Fl_Widget'
HC_AboutText.o: In function `HC_AboutText::draw()':
HC_AboutText.cxx:(.text+0xe): undefined reference to `fl_color(Fl_Color)'
HC_AboutText.cxx:(.text+0x1a): undefined reference to `fl_font(int, int)'
HC_AboutText.cxx:(.text+0x4a): undefined reference to `fl_draw(char const*, int, int, int, int, Fl_Align, Fl_Image*, int)'
HC_AboutText.o: In function `HC_AboutText::HC_AboutText(int, int, int, int)':
HC_AboutText.cxx:(.text+0x5f): undefined reference to `Fl_Widget::Fl_Widget(int, int, int, int, char const*)'
HC_AboutText.o: In function `HC_AboutText::HC_AboutText(int, int, int, int)':
HC_AboutText.cxx:(.text+0x7f): undefined reference to `Fl_Widget::Fl_Widget(int, int, int, int, char const*)'
HC_AboutText.o: In function `HC_AboutText::~HC_AboutText()':
HC_AboutText.cxx:(.text._ZN12HC_AboutTextD0Ev[HC_AboutText::~HC_AboutText()]+0xc): undefined reference to `Fl_Widget::~Fl_Widget()'
HC_AboutText.o: In function `HC_AboutText::~HC_AboutText()':
HC_AboutText.cxx:(.text._ZN12HC_AboutTextD1Ev[HC_AboutText::~HC_AboutText()]+0x8): undefined reference to `Fl_Widget::~Fl_Widget()'
HC_AboutText.o:(.rodata._ZTV12HC_AboutText[vtable for HC_AboutText]+0x28): undefined reference to `Fl_Widget::handle(int)'
HC_AboutText.o:(.rodata._ZTV12HC_AboutText[vtable for HC_AboutText]+0x30): undefined reference to `Fl_Widget::resize(int, int, int, int)'
HC_AboutText.o:(.rodata._ZTI12HC_AboutText[typeinfo for HC_AboutText]+0x10): undefined reference to `typeinfo for Fl_Widget'
collect2: ld returned 1 exit status
make[1]: *** [hdspconf] Error 1
make[1]: Leaving directory `/var/tmp/portage/media-sound/alsa-tools-1.0.14/work/alsa-tools-1.0.14/hdspconf/src'
make: *** [all-recursive] Error 1
========================================================

Many more undefined reference errors.

just to add that under this scenario (fltk hdsp) both fltk and alsa-tools need to be built without LDFLAGS="-Wl,--as-needed"
Comment 3 Santiago M. Mola (RETIRED) gentoo-dev 2007-09-26 17:31:49 UTC
Created attachment 131961 [details, diff]
alsa-tools-1.0.14-as-needed.patch

This should be enough. There's no problem with fltk itself on my system.
Comment 4 Chris Smith 2007-09-26 17:56:04 UTC
(In reply to comment #3)
> There's no problem with fltk itself on my system.

fltk did build with as-needed but alsa-tools wouldn't build against it (even if as-needed was removed for the alsa-tools build)


Comment 5 Santiago M. Mola (RETIRED) gentoo-dev 2007-09-26 18:13:07 UTC
(In reply to comment #4)
> 
> fltk did build with as-needed but alsa-tools wouldn't build against it (even if
> as-needed was removed for the alsa-tools build)
> 

It works perfectly on my system after applying the attached patch to alsa-tools. So, be more specific, please. When you compile alsa-tools without as-needed, do you get the same error you posted?

Could you also post the output of "emerge --info" and "emerge -pv fltk alsa-tools"?

Thanks.
Comment 6 Santiago M. Mola (RETIRED) gentoo-dev 2007-09-26 18:24:11 UTC
fltk built with as-needed makes alsa-tools compile with as-needed too, even if you disable it. Problem will be solved after the patch is applied. Don't worry about emerge --info and stuff.
Comment 7 Chris Smith 2007-09-26 18:36:44 UTC
(In reply to comment #6)
> fltk built with as-needed makes alsa-tools compile with as-needed too, even if
> you disable it. Problem will be solved after the patch is applied. Don't worry
> about emerge --info and stuff.
 
Doesn't work here. Same symptoms as before. So I'll provide the above info.
---------------------------
emerge -pv fltk
[ebuild   R   ] x11-libs/fltk-1.1.7-r2  USE="opengl -debug -noxft"

emerge -pv alsa-tools
[ebuild   R   ] media-sound/alsa-tools-1.0.14  USE="fltk midi -gtk" ALSA_CARDS="hdsp -darla20 -darla24 -echo3g -emu10k1 -emu10k1x -gina20 -gina24 -hdspm -ice1712 -indigo -indigoio -layla20 -layla24 -mia -mixart -mona -pcxhr -rme32 -rme96 -sb16 -sbawe -sscape -usb-usx2y -vx222"
---------------------------
emerge --info
Portage 2.1.3.9 (default-linux/amd64/2007.0, gcc-4.2.0, glibc-2.6.1-r0, 2.6.22-gentoo-r7 x86_64)
=================================================================
System uname: 2.6.22-gentoo-r7 x86_64 Intel(R) Core(TM)2 CPU 6600 @ 2.40GHz
Timestamp of tree: Wed, 26 Sep 2007 12:50:01 +0000
app-shells/bash:     3.2_p17-r1
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.4.4-r4, 2.5.1-r2
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.10-r5
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18
sys-devel/gcc-config: 1.4.0-r2
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.22-r2
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -fomit-frame-pointer -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=nocona -O2 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y"
FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://gentoo.mirrors.tds.net/gentoo http://gentoo.cites.uiuc.edu/pub/gentoo/ ftp://gentoo.chem.wisc.edu/gentoo/ http://prometheus.cs.wmich.edu/gentoo http://gentoo.chem.wisc.edu/gentoo/"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,--as-needed"
LINGUAS="en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/local/overlays/xeffects/trunk"
SYNC="rsync://davinci.mw.realcomputerguy.com/gentoo-portage"
USE="X a52 aac aalib acl acpi alsa amd64 amr apache2 audiofile avi bash-completion berkdb bitmap-fonts bzip2 cairo cdparanoia cdr cli cracklib crypt cups curl dbus dri dts dv dvb dvd dvdr dvdread encode exif fam ffmpeg flac fortran gdbm gif glitz gphoto2 gpm gstreamer gtk2 hal iconv imagemagick imap imlib ipv6 isdnlog jack java jpeg jpeg2k kde kdeenablefinal lame lcd lcms ldap mad midi mmap mmx mozcalendar mozilla mp3 mudflap musicbrainz ncurses newspr nls nodrm nptl nptlonly nsplugin nvidia ofx ogg oggvorbis openexr opengl openmp pam pcre pda pdf perl pertty png pppd python qt3 qt4 quicktime readline reflection samba sasl scanner sdl session slp sndfile spell spl sse sse2 ssl subversion svg tcltk tcpd theora threads tiff tk truetype truetype-fonts type1-fonts unicode usb utf8 v4l v4l2 vcd vorbis wmf xattr xcomposite xine xml xorg xscreensaver xv xvid xvmc zlib" ALSA_CARDS="hda-intel hdsp" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" CAMERAS="ptp2" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="nvidia nv vesa fbdev vmware v4l"
Unset:  CTARGET, INSTALL_MASK, LANG, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


Comment 8 Santiago M. Mola (RETIRED) gentoo-dev 2007-09-26 18:42:46 UTC
Did you apply the patch?
Comment 9 Chris Smith 2007-09-26 18:44:48 UTC
(In reply to comment #8)
> Did you apply the patch?
> 

Of course.
Comment 10 Santiago M. Mola (RETIRED) gentoo-dev 2007-09-26 18:51:59 UTC
Probably you didn't run eautoreconf after the epatch. Please, wait to the maintainers to fix the ebuild, as the solution is trivial.
Comment 11 Chris Smith 2007-09-26 19:08:17 UTC
(In reply to comment #10)
> Probably you didn't run eautoreconf after the epatch. Please, wait to the
> maintainers to fix the ebuild, as the solution is trivial.

Right. I just did:
===============================================
diff /usr/portage/media-sound/alsa-tools/alsa-tools-1.0.14.ebuild /usr/local/portage/media-sound/alsa-tools/alsa-tools-1.0.14.ebuild
89,90c89,90
<       epatch "${FILESDIR}/${PN}-1.0.11-asneeded.patch"
<
---
>       epatch "${FILESDIR}/${PN}-1.0.14-as-needed.patch"
>
===============================================

Although the following doesn't work - 
===============================================
diff /usr/portage/media-sound/alsa-tools/alsa-tools-1.0.14.ebuild /usr/local/portage/media-sound/alsa-tools/alsa-tools-1.0.14.ebuild
89c89,91
<       epatch "${FILESDIR}/${PN}-1.0.11-asneeded.patch"
---
>       epatch "${FILESDIR}/${PN}-1.0.14-as-needed.patch"
>
>       eautoreconf
===============================================
Comment 12 Tony Vroon (RETIRED) gentoo-dev 2008-03-12 16:19:27 UTC
Santiago's patch has been added to the 1.0.16 ebuild of alsa-tools. Thank you for your contribution to Gentoo Linux, and sorry about the delay.