Subject: gnome 2.12.1 build fails (amd64+i386)
To: None <tech-pkg@netbsd.org, jmmv@netbsd.org>
From: Anders Lindgren <ali@df.lth.se>
List: tech-pkg
Date: 10/24/2005 10:45:50
   I have been trying to build gnome 2.12.1 from a fresh pkgsrc tarball as 
of ~48h ago on:

   amd64: 3.0_BETA NetBSD 3.0_BETA (GENERIC) #0: Sat Oct  8 11:09:08 UTC 2005

and:

   i386: 3.0_BETA NetBSD 3.0_BETA (GENERIC) #0: Sat Aug  6 00:09:04 CEST 2005

   On the amd64, graphics/cairo doesn't build with pkgsrc gcc 3.4.4. The 
only thing in my mk.conf was (modelled after the cpuflags manpage):

   COPTS?=  -pipe -mcpu=athlon64 -mtune=athlon64 ${DEFCOPTS}
   CFLAGS+= -pipe -mcpu=athlon64 -mtune=athlon64

..and removing it made no difference, as expected. It somehow ends up 
referencing a private function in libgcc:

---------------8<--------------------8<----------------------
Making all in test
/bin/sh ../libtool --tag=CC --mode=link cc  -O2 -pipe -mcpu=athlon64
-mtune=athlon64 -I/usr/pkg/include -I/usr/include
-I/usr/pkg/include/freetype2 -DGLX_GLXEXT_LEGACY -I/usr/pkg/gcc34/include
-I/usr/pkg/gcc34/lib/gcc/x86_64--netbsd3.0/3.4.4/include
-L/usr/pkg/gcc34/lib/gcc/x86_64--netbsd3.0/3.4.4
-Wl,-R/usr/pkg/gcc34/lib/gcc/x86_64--netbsd3.0/3.4.4 -L/usr/pkg/gcc34/lib
-Wl,-R/usr/pkg/gcc34/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/lib
-Wl,-R/usr/lib -L/usr/pkg/gcc34/lib/gcc/x86_64--netbsd3.0/3.4.4/
-Wl,-R/usr/pkg/gcc34/lib/gcc/x86_64--netbsd3.0/3.4.4/ -L/usr/X11R6/lib
-Wl,-R/usr/X11R6/lib -o imagediff  imagediff.o libcairotest.la
../src/libcairo.la   -pthread  -lintl -lm
cc -O2 -pipe -mcpu=athlon64 -mtune=athlon64
-I/usr/pkgsrc/graphics/cairo/work/.buildlink/include
-I/usr/pkgsrc/graphics/cairo/work/.buildlink/include/freetype2
-DGLX_GLXEXT_LEGACY
-I/usr/pkgsrc/graphics/cairo/work/.buildlink/gcc34/include
-I/usr/pkgsrc/graphics/cairo/work/.buildlink/gcc34/lib/gcc/x86_64--netbsd3.0
/3.4.4/include -Wl,-R/usr/pkg/gcc34/lib/gcc/x86_64--netbsd3.0/3.4.4
-Wl,-R/usr/pkg/gcc34/lib -Wl,-R/usr/pkg/lib
-Wl,-R/usr/pkg/gcc34/lib/gcc/x86_64--netbsd3.0/3.4.4/ -Wl,-R/usr/X11R6/lib
-o .libs/imagediff imagediff.o -pthread
-L/usr/pkgsrc/graphics/cairo/work/.buildlink/gcc34/lib/gcc/x86_64--netbsd3.0
/3.4.4 -L/usr/pkgsrc/graphics/cairo/work/.buildlink/gcc34/lib
-L/usr/pkgsrc/graphics/cairo/work/.buildlink/lib
-L/usr/pkgsrc/graphics/cairo/work/.buildlink/gcc34/lib/gcc/x86_64--netbsd3.0
/3.4.4/ -L/usr/pkgsrc/graphics/cairo/work/.x11-buildlink/lib
./.libs/libcairotest.a ../src/.libs/libcairo.so
/usr/pkgsrc/graphics/cairo/work/.buildlink/lib/libXrender.so -lX11
/usr/pkgsrc/graphics/cairo/work/.buildlink/lib/libpng.so
/usr/pkgsrc/graphics/cairo/work/.buildlink/lib/libglitz.so
/usr/pkgsrc/graphics/cairo/work/.buildlink/lib/libfontconfig.so
/usr/pkgsrc/graphics/cairo/work/.buildlink/lib/libexpat.so
/usr/pkgsrc/graphics/cairo/work/.buildlink/lib/libfreetype.so -lz -lintl 
-lm
-Wl,--rpath -Wl,/usr/pkg/lib -Wl,--rpath
-Wl,/usr/pkgsrc/graphics/cairo/work/.buildlink/lib
/usr/bin/ld: .libs/imagediff: hidden symbol `__popcountdi2' in
/usr/pkgsrc/graphics/cairo/work/.buildlink/gcc34/lib/gcc/x86_64--netbsd3.0/3
.4.4/libgcc.a(_popcountsi2.oS) is referenced by DSO
collect2: ld returned 1 exit status
*** Error code 1
---------------8<--------------------8<----------------------

   The package builds and installs fine with the base gcc 3.3.3, however.

   I built graphics/cairo with gcc 3.3.3 and continued building the rest 
with gcc 3.4.4 again. Next stop was net/bug-buddy:

---------------8<--------------------8<----------------------
cc  -O2 -pipe -mcpu=athlon64 -mtune=athlon64 -I/usr/pkg/include 
-I/usr/include -I/usr/include/krb5 -DGLX_GLXEXT_LEGACY 
-I/usr/pkg/include/freetype2 -I/usr/X11R6/include -I/usr/pkg/gcc34/include 
-I/usr/pkg/gcc34/lib/gcc/x86_64--netbsd3.0/3.4.4/include 
-L/usr/pkg/gcc34/lib/gcc/x86_64--netbsd3.0/3.4.4 
-Wl,-R/usr/pkg/gcc34/lib/gcc/x86_64--netbsd3.0/3.4.4 -L/usr/pkg/gcc34/lib 
-Wl,-R/usr/pkg/gcc34/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/lib 
-Wl,-R/usr/lib -L/usr/X11R6/lib 
-L/usr/pkg/gcc34/lib/gcc/x86_64--netbsd3.0/3.4.4/ 
-Wl,-R/usr/pkg/gcc34/lib/gcc/x86_64--netbsd3.0/3.4.4/ -Wl,-R/usr/X11R6/lib 
-o bug-buddy --export-dynamic bb-marshal.o bug-buddy.o md5-utils.o 
bugzilla.o cell-renderer-uri.o config.o gdb-buddy.o distribution.o 
save-buddy.o signal-buddy.o united-states-of-bug-buddy.o 
-Wl,-R/usr/pkg/lib -Wl,--export-dynamic -pthread -L/usr/pkg/lib 
-lgnome-desktop-2 -lstartup-notification-1 -lgnome-menu -lgnomeui-2 
-lbonoboui-2 -lgnome-keyring -lgnomecanvas-2 -lgnome-2 -lpopt -lart_lgpl_2 
-lpangoft2-1.0 -lgnomevfs-2 -lbonobo-2 -lgconf-2 -lbonobo-activation 
-lORBit-2 -lgthread-2.0 -lglade-2.0 -lxml2 -lz -lintl -lgtk-x11-2.0 
-lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lpango-1.0 
-lcairo -lgobject-2.0 -lgmodule-2.0 -lglib-2.0   -lintl
/usr/lib/librpcsvc.so.0: warning: warning: this program uses 
xdr_domainname(), which is deprecated and buggy.
/usr/lib/librpcsvc.so.0: warning: warning: this program uses 
xdr_mapname(), which is deprecated and buggy.
/usr/lib/librpcsvc.so.0: warning: warning: this program uses 
xdr_peername(), which is deprecated and buggy.
/usr/pkg/gcc34/lib/libstdc++.so.6: undefined reference to `_Unwind_GetIP'
/usr/pkg/gcc34/lib/libstdc++.so.6: undefined reference to `_Unwind_Resume_or_Rethrow'
/usr/pkg/gcc34/lib/libstdc++.so.6: undefined reference to `_Unwind_GetRegionStart'
/usr/pkg/lib/libfam.so.0: undefined reference to `_Unwind_Resume'
/usr/pkg/gcc34/lib/libstdc++.so.6: undefined reference to `_Unwind_DeleteException'
/usr/pkg/gcc34/lib/libstdc++.so.6: undefined reference to `_Unwind_RaiseException'
/usr/pkg/gcc34/lib/libstdc++.so.6: undefined reference to `_Unwind_SetIP'
/usr/pkg/gcc34/lib/libstdc++.so.6: undefined reference to `_Unwind_GetTextRelBase'
/usr/pkg/gcc34/lib/libstdc++.so.6: undefined reference to `_Unwind_GetLanguageSpecificData'
/usr/pkg/gcc34/lib/libstdc++.so.6: undefined reference to `_Unwind_SetGR'
/usr/pkg/gcc34/lib/libstdc++.so.6: undefined reference to `_Unwind_GetDataRelBase'
collect2: ld returned 1 exit status
gmake[2]: *** [bug-buddy] Error 1
gmake[2]: Leaving directory 
`/usr/pkgsrc/net/bug-buddy/work/bug-buddy-2.12.1/src'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory 
`/usr/pkgsrc/net/bug-buddy/work/bug-buddy-2.12.1'
gmake: *** [all] Error 2
*** Error code 2

---------------8<--------------------8<----------------------

   Those symbols appear to be defined in /usr/pkg/gcc34/lib/libgcc_s.so.

   The same error appears if I try to build this package with gcc 3.3.3, 
but at this point, I have almost all of gnome built with gcc 3.4.4, plus 
a libcairo (which is included in the link) built with gcc 3.3.3. The same 
package builds without problems on the i386, where everything is built 
with the base gcc 3.3.3

   Additionally, on both amd64 and i386, the following packages failed to 
install (a bunch of "No such file or directory" errors etc; sorry, don't 
have preserved output) when built as dependencies to meta-pkgs/gnome:

   devel/libgnome
   x11/gnome-themes

   Both build and install fine, when you cd to their respective directories 
and rebuild them with "make clean" and "make install".

   Apart from the dependency mishaps just mentioned, meta-pkgs/gnome build 
to completion using the base gcc 3.3.3 -- I haven't tried with pkgsrc 
gcc-3.4.4. The i386 box is a PIII866 so it didn't seem worth the effort to 
build it again just to test if i386 also fails with 3.4.4 -- building 
gnome takes on the order of 24h on that box (But if anyone knows of 
substantional improvements in 3.4.4 over 3.3.3 for PIII targets I'd be 
interested in hearing it).

   And thanks for a generally fantastic work keeping gnome up to date in 
pkgsrc guys!

Best regards
/ali
:wq