Subject: Build problems on Debian GNU/Linux 3.1 x86_64
To: None <pkgsrc-users@netbsd.org>
From: Christoph Leuzinger <chris+ml@westworks.ch>
List: pkgsrc-users
Date: 04/16/2007 15:23:50
Hello,

I'm experiencing various build problems with pkgsrc packages on a Debian GNU/Linux 3.1 x86_64 machine (unprivileged pkgsrc-2007Q1 installation).

The first problem is related to linking against libX11.so and libXext.so. For example, when building x11/Xfixes:

-------------------------------
gcc -shared  .libs/Cursor.o .libs/Region.o .libs/SaveSet.o .libs/Selection.o .libs/Xfixes.o  -L/home/leuzinge/pkgsrc/x11/Xfixes/work/.x11-buildlink/lib -L/home/leuzinge/pkgsrc/x11/Xfixes/work/.x11-buildlink/lib64 -lX11 -L/home/leuzinge/pkgsrc/x11/Xfixes/work/.buildlink/lib  -Wl,-R/home/leuzinge/pkg/lib -Wl,-soname -Wl,libXfixes.so.0 -o .libs/libXfixes.so.0.1.0
/usr/bin/ld: cannot find -lX11
collect2: ld returned 1 exit status

[wrapper.sh] note: The real command line, after the pkgsrc wrapper, was:
/home/leuzinge/pkgsrc/x11/Xfixes/work/.gcc/bin/gcc -shared .libs/Cursor.o .libs/Region.o .libs/SaveSet.o .libs/Selection.o .libs/Xfixes.o -L/home/leuzinge/pkgsrc/x11/Xfixes/work/.x11-buildlink/lib -L/home/leuzinge/pkgsrc/x11/Xfixes/work/.x11-buildlink/lib64 -L/home/leuzinge/pkgsrc/x11/Xfixes/work/.buildlink/lib -Wl,-R/home/leuzinge/pkg/lib -Wl,-soname -Wl,libXfixes.so.0 -o .libs/libXfixes.so.0.1.0 -I/home/leuzinge/pkgsrc/x11/Xfixes/work/.buildlink/include  -lX11

[wrapper.sh] note: The real command line, after the pkgsrc wrapper, was:
/home/leuzinge/pkg/bin/libtool --mode=link gcc -I/home/leuzinge/pkgsrc/x11/Xfixes/work/.buildlink/include -I/home/leuzinge/pkgsrc/x11/Xfixes/work/.x11-buildlink/include -DXTHREADS -O2 -Wno-format -fno-builtin -L/home/leuzinge/pkgsrc/x11/Xfixes/work/.x11-buildlink/lib -Wl,-R/home/leuzinge/pkg/lib -L/home/leuzinge/pkgsrc/x11/Xfixes/work/.x11-buildlink/lib64 -o libXfixes.la -rpath /home/leuzinge/pkg/lib -version-info 1:0:1 -no-undefined Cursor.lo Region.lo SaveSet.lo Selection.lo Xfixes.lo -lX11 -L/home/leuzinge/pkgsrc/x11/Xfixes/work/.buildlink/lib
*** Error code 1

Stop.
bmake: stopped in /home/leuzinge/pkgsrc/x11/Xfixes/work/libXfixes-2.0.1
*** Error code 1

Stop.
bmake: stopped in /home/leuzinge/pkgsrc/x11/Xfixes/work/libXfixes-2.0.1
*** Error code 1

Stop.
bmake: stopped in /home/leuzinge/pkgsrc/x11/Xfixes
*** Error code 1

Stop.
bmake: stopped in /home/leuzinge/pkgsrc/x11/Xfixes
-------------------------------

Manually creating a link to the /usr/X11R6/lib/libX11.so file is a workaround for this problem.


The second problem occurs during the build of devel/glib2:

-------------------------------
make[4]: Entering directory `/home/leuzinge/pkgsrc/devel/glib2/work/glib-2.12.11/glib'
if /bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -DG_LOG_DOMAIN=\"GLib\" -DG_DISABLE_CAST_CHECKS -DG_DISABLE_DEPRECATED -DGLIB_COMPILATION   -DPREFIX="\"/home/leuzinge/pkg\"" -DPKGLOCALEDIR="\"share\"" -DPKG_SYSCONFDIR="\"/home/leuzinge/pkg/etc\"" -I/usr/include  -pthread   -O2 -I/usr/include -Wall -MT gatomic.lo -MD -MP -MF ".deps/gatomic.Tpo" \
  -c -o gatomic.lo `test -f 'gatomic.c' || echo './'`gatomic.c; \
then mv -f ".deps/gatomic.Tpo" ".deps/gatomic.Plo"; \
else rm -f ".deps/gatomic.Tpo"; exit 1; \
fi
gcc -DHAVE_CONFIG_H -I. -I.. -DG_LOG_DOMAIN=\"GLib\" -DG_DISABLE_CAST_CHECKS -DG_DISABLE_DEPRECATED -DGLIB_COMPILATION -DPREFIX=\"/home/leuzinge/pkg\" -DPKGLOCALEDIR=\"share\" -DPKG_SYSCONFDIR=\"/home/leuzinge/pkg/etc\" -pthread -O2 -Wall -MT gatomic.lo -MD -MP -MF .deps/gatomic.Tpo -c gatomic.c  -fPIC -DPIC -o .libs/gatomic.o
/tmp/cc0g74B7.s: Assembler messages:
/tmp/cc0g74B7.s:69: Error: Incorrect register `%esi' used with `q' suffix

[wrapper.sh] note: The real command line, after the pkgsrc wrapper, was:
/home/leuzinge/pkgsrc/devel/glib2/work/.gcc/bin/gcc -DHAVE_CONFIG_H -I. -I.. -DG_LOG_DOMAIN=\"GLib\" -DG_DISABLE_CAST_CHECKS -DG_DISABLE_DEPRECATED -DGLIB_COMPILATION -DPREFIX=\"/home/leuzinge/pkg\" -DPKGLOCALEDIR=\"share\" -DPKG_SYSCONFDIR=\"/home/leuzinge/pkg/etc\" -pthread -O2 -Wall -MT gatomic.lo -MD -MP -MF .deps/gatomic.Tpo -c gatomic.c -fPIC -DPIC -o .libs/gatomic.o -std=gnu99 -I/home/leuzinge/pkgsrc/devel/glib2/work/.buildlink/include -L/home/leuzinge/pkgsrc/devel/glib2/work/.buildlink/lib

[wrapper.sh] note: The real command line, after the pkgsrc wrapper, was:
/home/leuzinge/pkg/bin/libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -DG_LOG_DOMAIN=\"GLib\" -DG_DISABLE_CAST_CHECKS -DG_DISABLE_DEPRECATED -DGLIB_COMPILATION -DPREFIX=\"/home/leuzinge/pkg\" -DPKGLOCALEDIR=\"share\" -DPKG_SYSCONFDIR=\"/home/leuzinge/pkg/etc\" -pthread -O2 -Wall -MT gatomic.lo -MD -MP -MF .deps/gatomic.Tpo -c -o gatomic.lo gatomic.c
make[4]: *** [gatomic.lo] Error 1
make[4]: Leaving directory `/home/leuzinge/pkgsrc/devel/glib2/work/glib-2.12.11/glib'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/leuzinge/pkgsrc/devel/glib2/work/glib-2.12.11/glib'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/leuzinge/pkgsrc/devel/glib2/work/glib-2.12.11/glib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/leuzinge/pkgsrc/devel/glib2/work/glib-2.12.11'
make: *** [all] Error 2
*** Error code 2

Stop.
bmake: stopped in /home/leuzinge/pkgsrc/devel/glib2
*** Error code 1

Stop.
bmake: stopped in /home/leuzinge/pkgsrc/devel/glib2
-------------------------------

I'm not sure what causes these errors. Any hints?

TIA,
Christoph