Subject: pkg/36460: wm/windowmaker build fails on Mac OS X i36 and PPC (patches included)
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: Mark E. Perkins <perkinsm@bway.net>
List: pkgsrc-bugs
Date: 06/08/2007 21:15:00
>Number: 36460
>Category: pkg
>Synopsis: wm/windowmaker build fails on Mac OS X i36 and PPC (patches included)
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Jun 08 21:15:00 +0000 2007
>Originator: Mark E. Perkins
>Release: Darwin 8.9.1 i386
>Organization:
>Environment:
System: Darwin owl.fringe.mep 8.9.1 Darwin Kernel Version 8.9.1: Thu Feb 22 20:55:00 PST 2007; root:xnu-792.18.15~1/RELEASE_I386 i386
>Description:
Build fails for two reasons. The first is an assembly code issue for Darwin/i386
(which can be bypassed with the first patch included below):
gcc -DHAVE_CONFIG_H -I. -I../src -no-cpp-precomp -I/usr/pkgsrc/wm/windowmaker/work/.buildlink/include -I/usr/pkgsrc/wm/windowmaker/work/.buildlink/include/freetype2 -I/usr/pkgsrc/wm/windowmaker/work/.x11-buildlink/include -pipe -O2 -O0 -c x86_specific.c -fno-common -DPIC -o .libs/x86_specific.o
x86_specific.c: In function 'x86_mmx_TrueColor_32_to_16':
x86_specific.c:107: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'
*** Error code 1
Stop.
bmake: stopped in /usr/pkgsrc/wm/windowmaker/work/WindowMaker-0.92.0/wrlib
*** Error code 1
The next problem(s) are undefined __Xsetlocale in various places (both for i36 and PPC).
The configure phase finds this in libX11, but there are problems in two Makefile.in files.
Looking at those Makefile.in's, there seems to be more than one way to patch this problem
in way that is consistent with other parts of the Makefile.in's. My approach is included in the
last two patches included below.
/bin/sh ../../libtool --mode=link gcc -pipe -O2 -I/usr/pkg/include -I/usr/include -I/usr/pkg/include/freetype2 -I/usr/X11R6/include -L/usr/pkg/lib -L/usr/lib -L/usr/X11R6/lib -o connect connect.o ../../WINGs/libWUtil.a -L/lib -L/lib -lintl -liconv
mkdir .libs
gcc -pipe -O2 -I/usr/pkgsrc/wm/windowmaker/work/.buildlink/include -I/usr/pkgsrc/wm/windowmaker/work/.buildlink/include/freetype2 -I/usr/pkgsrc/wm/windowmaker/work/.x11-buildlink/include -o connect connect.o -L/usr/pkgsrc/wm/windowmaker/work/.buildlink/lib -L/usr/pkgsrc/wm/windowmaker/work/.x11-buildlink/lib ../../WINGs/libWUtil.a /usr/pkgsrc/wm/windowmaker/work/.buildlink/lib/libintl.dylib -lc /usr/lib/libiconv.dylib
/usr/bin/ld: Undefined symbols:
__Xsetlocale
collect2: ld returned 1 exit status
*** Error code 1
Stop.
bmake: stopped in /usr/pkgsrc/wm/windowmaker/work/WindowMaker-0.92.0/WINGs/Examples
*** Error code 1
>How-To-Repeat:
bmake in pkgsrc/wm/windowmaker on Darwin
>Fix:
============================================================
--- Makefile 2007-02-02 21:59:22.000000000 -0500
+++ Makefile.new 2007-06-08 16:34:14.000000000 -0400
@@ -34,6 +34,10 @@
CONFIGURE_ENV+= ac_cv_c_inline_asm=no
.endif
+.if ${OPSYS} == "Darwin"
+CONFIGURE_ENV+= ac_cv_c_inline_asm=no
+.endif
+
.if ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "arm32"
GCC_REQD+= 3.0
.endif
============================================================
--- WINGs/Examples/Makefile.in.orig 2005-06-18 23:23:00.000000000 -0400
+++ WINGs/Examples/Makefile.in 2007-05-19 16:49:26.000000000 -0400
@@ -127,12 +127,12 @@
connect_DEPENDENCIES = $(top_builddir)/WINGs/libWUtil.a
-connect_LDADD = $(top_builddir)/WINGs/libWUtil.a @LIBRARY_SEARCH_PATH@ @NETLIBS@ @INTLIBS@
+connect_LDADD = $(top_builddir)/WINGs/libWUtil.a @LIBRARY_SEARCH_PATH@ @NETLIBS@ @INTLIBS@ @XLIBS@
server_DEPENDENCIES = $(top_builddir)/WINGs/libWUtil.a
-server_LDADD = $(top_builddir)/WINGs/libWUtil.a @LIBRARY_SEARCH_PATH@ @NETLIBS@ @INTLIBS@
+server_LDADD = $(top_builddir)/WINGs/libWUtil.a @LIBRARY_SEARCH_PATH@ @NETLIBS@ @INTLIBS@ @XLIBS@
INCLUDES = -I$(top_srcdir)/WINGs -I$(top_srcdir)/wrlib -I$(top_srcdir)/src -DRESOURCE_PATH=\"$(datadir)/WINGs\" @HEADER_SEARCH_PATH@ -DDEBUG
============================================================
--- util/Makefile.in.orig 2007-05-19 16:05:08.000000000 -0400
+++ util/Makefile.in 2007-05-19 16:45:17.000000000 -0400
@@ -126,15 +126,15 @@
liblist = @LIBRARY_SEARCH_PATH@ @INTLIBS@
-wdwrite_LDADD = $(top_builddir)/WINGs/libWUtil.a $(liblist)
+wdwrite_LDADD = $(top_builddir)/WINGs/libWUtil.a @XLFLAGS@ @XLIBS@ $(liblist)
-wdread_LDADD = $(top_builddir)/WINGs/libWUtil.a $(liblist)
+wdread_LDADD = $(top_builddir)/WINGs/libWUtil.a @XLFLAGS@ @XLIBS@ $(liblist)
wxcopy_LDADD = @XLFLAGS@ @XLIBS@
wxpaste_LDADD = @XLFLAGS@ @XLIBS@
-getstyle_LDADD = $(top_builddir)/WINGs/libWUtil.a $(liblist)
+getstyle_LDADD = $(top_builddir)/WINGs/libWUtil.a @XLFLAGS@ @XLIBS@ $(liblist)
getstyle_SOURCES = getstyle.c fontconv.c
@@ -143,13 +143,13 @@
setstyle_SOURCES = setstyle.c fontconv.c
-convertfonts_LDADD = $(top_builddir)/WINGs/libWUtil.a $(liblist)
+convertfonts_LDADD = $(top_builddir)/WINGs/libWUtil.a @XLFLAGS@ @XLIBS@ $(liblist)
convertfonts_SOURCES = convertfonts.c fontconv.c
-seticons_LDADD = $(top_builddir)/WINGs/libWUtil.a $(liblist)
+seticons_LDADD = $(top_builddir)/WINGs/libWUtil.a @XLFLAGS@ @XLIBS@ $(liblist)
-geticonset_LDADD = $(top_builddir)/WINGs/libWUtil.a $(liblist)
+geticonset_LDADD = $(top_builddir)/WINGs/libWUtil.a @XLFLAGS@ @XLIBS@ $(liblist)
wmagnify_LDADD = $(top_builddir)/WINGs/libWINGs.a $(top_builddir)/wrlib/libwraster.la @XFTLIBS@ @INTLIBS@ @DLLIBS@