Subject: toolchain/32954: devel/glib2 fails to build under current/amd64 due to ld bug
To: None <,,>
From: None <>
List: netbsd-bugs
Date: 02/28/2006 20:05:00
>Number:         32954
>Category:       toolchain
>Synopsis:       devel/glib2 fails to build under current/amd64 due to ld bug
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Feb 28 20:05:00 +0000 2006
>Release:        NetBSD 3.99.15
System: NetBSD 3.99.15 NetBSD 3.99.15 (ATLAS) #1: Thu Feb 16 16:05:50 CET 2006 amd64
Architecture: x86_64
Machine: amd64
  devel/glib2 no longer compiles on AMD64/current. This problem didn't exist
  prior to the beginning of February -at which point various parts of the
  toolchain got updated-. The previous version of glib2 in pkgsrc failed to
  compile with exactly the same error, and hadn't been touched in a while. This
  is the reason I made it a toolchain/ bug, not a pkg/ bug. 

  The build fails with an error from ld:

cc -shared  .libs/garray.o .libs/gasyncqueue.o .libs/gatomic.o .libs/gbacktrace.o .libs/gcache.o .libs/gcompletion.o .libs/gconvert.o .libs/gdataset.o .libs/gdate.o .libs/gdir.o .libs/gerror.o .libs/gfileutils.o .libs/ghash.o .libs/ghook.o .libs/giochannel.o .libs/gkeyfile.o .libs/glist.o .libs/gmain.o .libs/gmappedfile.o .libs/gmarkup.o .libs/gmem.o .libs/gmessages.o .libs/gnode.o .libs/goption.o .libs/gpattern.o .libs/gprimes.o .libs/gqsort.o .libs/gqueue.o .libs/grel.o .libs/grand.o .libs/gscanner.o .libs/gshell.o .libs/gslice.o .libs/gslist.o .libs/gstdio.o .libs/gstrfuncs.o .libs/gstring.o .libs/gthread.o .libs/gthreadpool.o .libs/gtimer.o .libs/gtree.o .libs/guniprop.o .libs/gutf8.o .libs/gunibreak.o .libs/gunicollate.o .libs/gunidecomp.o .libs/gutils.o .libs/gprintf.o .libs/giounix.o .libs/gspawn.o -Wl,--whole-archive libcharset/.libs/libcharset.a gnulib/.libs/libgnulib.a -Wl,--no-whole-archive  -L/usr/export/pkgsrc/devel/glib2/work/.buildlink/lib -lintl  -Wl,-R/usr/pk
 g/lib -Wl,-soname -Wl, -Wl,-retain-symbols-file -Wl,.libs/libglib-2.0.exp -o .libs/
ld: .libs/gconvert.o: relocation R_X86_64_PC32 against `_g_charset_get_aliases' can not be used when making a shared object; recompile with -fPIC
ld: final link failed: Bad value

  However, gconvert.o *has* been compiled with -fPIC. 

  ( full build log available on )

  Other packages (including www/firefox, when a binary glib2 package has been
  used to satisfy dependencies) exhibit this problem as well.
  Try to build devel/glib2 on an AMD64 machine running -current.