When you attempt to compile avahi 0.1 on amd64 it fails with the message /bin/sh ../libtool --tag=CC --mode=link x86_64-pc-linux-gnu-gcc -I.. '-DDEBUG_TR AP=__asm__("int $3")' -march=k8 -pipe -O2 -std=c99 -Wall -W -Wextra -pedantic -p ipe -Wformat -Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decl s -Wmissing-noreturn -Wshadow -Wendif-labels -Wlarger-than-4000 -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Winline -Wno-unuse d-parameter -o libavahi-client.la -rpath /usr/lib64 -export-dynamic -version- info 0:0:0 libavahi_client_la-client.lo libavahi_client_la-entrygroup.lo libavah i_client_la-browser.lo libavahi_client_la-resolver.lo -ldbus-1 ../avahi-commo n/libavahi-common.la ../avahi-common/libdbus-common.la x86_64-pc-linux-gnu-gcc -shared .libs/libavahi_client_la-client.o .libs/libavah i_client_la-entrygroup.o .libs/libavahi_client_la-browser.o .libs/libavahi_clien t_la-resolver.o -Wl,--whole-archive ../avahi-common/.libs/libdbus-common.a -Wl,- -no-whole-archive -Wl,--rpath -Wl,/var/tmp/portage/avahi-0.1/work/avahi-0.1/ava hi-common/.libs /usr/lib64/libdbus-1.so ../avahi-common/.libs/libavahi-common.so -march=k8 -Wl,-soname -Wl,libavahi-client.so.0 -o .libs/libavahi-client.so.0.0 .0 /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../x86_64-pc-linux-gnu/bin/ld: . ./avahi-common/.libs/libdbus-common.a(libdbus_common_la-dbus-watch-glue.o): relo cation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC ../avahi-common/.libs/libdbus-common.a(libdbus_common_la-dbus-watch-glue.o): cou ld not read symbols: Bad value collect2: ld returned 1 exit status make[2]: *** [libavahi-client.la] Error 1 make[2]: Leaving directory `/var/tmp/portage/avahi-0.1/work/avahi-0.1/avahi-clie nt' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/avahi-0.1/work/avahi-0.1' make: *** [all] Error 2 !!! ERROR: net-dns/avahi-0.1 failed. !!! Function src_compile, Line 51, Exitcode 2 !!! emake failed !!! If you need support, post the topmost build error, NOT this status message. Reproducible: Always Steps to Reproduce: 1. add ~amd64 to keywords in avahi-0.1.ebuild 2. emerge avahi 3. Actual Results: Avahi build fails with the above error Expected Results: Avahi should compile cleanly Portage 2.0.51.22-r2 (default-linux/amd64/2005.0, gcc-3.4.4, glibc-2.3.5-r1, 2.6.12-gentoo-r7 x86_64) ================================================================= System uname: 2.6.12-gentoo-r7 x86_64 AMD Athlon(tm) 64 Processor 3500+ Gentoo Base System version 1.12.0_pre6 distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.4 [enabled] dev-lang/python: 2.3.5, 2.4.1-r1 sys-apps/sandbox: 1.2.12 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6 sys-devel/binutils: 2.16.1 sys-devel/libtool: 1.5.18-r1 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="amd64 ~amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=k8 -pipe -O2" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=k8 -pipe -O2" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig ccache distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://gentoo.ccccom.com" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage /usr/local/portage-gentopia" SYNC="rsync://rsync.us.gentoo.org/gentoo-portage" USE="amd64 X a52 aac alsa apache2 avi berkdb bitmap-fonts bzip2 crypt cups curl dbus dts dvb dvd eds encode fam ffmpeg fftw flac foomaticdb fortran gd gdbm gif gpm gstreamer gtk gtk2 hal imlib java jpeg kde kdeenablefinal libwww lzw lzw-tiff mozilla mp3 mpeg mpeg4 mysql ncurses nls nptl ogg oggvorbis opengl pam pdflib perl php png python qt quicktime readline samba sdl server spell sql sqlite ssl tcpd theora tidy tiff transcode truetype truetype-fonts type1-fonts usb userlocales v4l vorbis xine xml xml2 xpm xv zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
Created attachment 66628 [details, diff] patch to avahi ebuild This patch is applied to the avahi ebuild to let you compile on amd64, and to apply the PIC patch to the avahi source
Created attachment 66630 [details, diff] files/avahi-0.1-PIC.patch This patch is to enable -fPIC when compiling avahi-common
avahi doesn't have an amd64 keyword at all, and it's hard-masked on x86
Just had a talk with one of the upstream developers and their going to fix this in their repository. avahi is just hardmasked because of it's dependency on a hardmasked version of dbus.
http://bur.st/~lathiat/avahi-patches/fpic.patch That is the patch that was applied upstream, could you please verify it works?
Well it doesn't break anything, but it doesn't fix anything either. The build still crashes in the same place using that patch.
Merges fine here WITHOUT the patch Jim Portage 2.0.51.22-r2 (default-linux/amd64/2005.1, gcc-3.4.4, glibc-2.3.5-r1, 2.6.12-gentoo-r9 x86_64) ================================================================= System uname: 2.6.12-gentoo-r9 x86_64 AMD Athlon(tm) 64 Processor 3200+ Gentoo Base System version 1.6.13 dev-lang/python: 2.3.5, 2.4.1-r1 sys-apps/sandbox: 1.2.12 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5 sys-devel/binutils: 2.15.92.0.2-r10 sys-devel/libtool: 1.5.18-r1 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -march=athlon64 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/splash /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=athlon64 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks multilib-strict sandbox sfperms strict" GENTOO_MIRRORS="http://gentoo.blueyonder.co.uk" LINGUAS="en_GB" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X aac alsa amarok amd64 avi berkdb bitmap-fonts browserplugin cdb cdr crypt cups curl directfb dvd dvdr dvdread eds encode esd fam foomaticdb fortran gdbm gif gphoto2 gpm gstreamer gtk gtk2 hal imagemagick imlib ipv6 java jpeg junit kde kdeenablefinal libwww lzw lzw-tiff mad mikmod mp3 mpeg mplayer msn ncurses nls nocd nvidia ogg oggvorbis opengl oss pam pdflib perl pic png python qt quicktime readline real ruby samba sdl spell ssl symlink tcltk tcpd tetex theora tiff truetype truetype-fonts type1-fonts usb userlocales v4l vcd vorbis xine xml2 xpm xv zlib linguas_en_GB userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS
Nathan, could you please provide us with a complete failing build output using the patch? It has been requested by upstream developers.
Using a cross-compile toolchain the patch fixes the error for me.
Tested on my ~amd64 system, per Jim's request. Builds fine without the patch. However, it appears to be missing a depend on sys-apps/dbus, possibly due to the python keyword.
Created attachment 66689 [details] build log Build log while using the provided fpic.patch
The patch modifies Makefile.am and automake needs to be run afterwards to update Makefile.in. Did you include this step in your ebuild modifcation?
(In reply to comment #12) > The patch modifies Makefile.am and automake needs to be run afterwards to update > Makefile.in. Did you include this step in your ebuild modifcation? No I didn't, sorry about that. Builds just fine when I do include it, though.