pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/47541: devel/libFoundation fails to build on x86 and doesn't need devel/gnustep-objc-lf2



>Number:         47541
>Category:       pkg
>Synopsis:       devel/libFoundation fails to build on x86 and doesn't need 
>gnustep-objc-lf2
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Feb 07 21:45:00 +0000 2013
>Originator:     Onno van der Linden
>Release:        NetBSD 6.99.16
>Organization:
>Environment:
System: NetBSD sheep 6.99.16 NetBSD 6.99.16 (SHEEP) #41: Tue Jan 1 14:08:03 MET 
2013 onno@sheep:/usr/src/sys/arch/i386/compile/SHEEP i386
Architecture: i386
Machine: i386
>Description:
devel/libFoudation currently does not build on x86. It's caused by
1) gnustep-make/gnustep.mk setting GNU_STEP_HOST to a wrong value if
   MACHINE_GNU_ARCH equals i[456]86
2) gnustep-make/Makefile setting GNUSTEP_ARCH to wrong value if
   MACHINE_ARCH equals i[456]86
3) libFoundation/common.mk not using the already existing config/i386
   directory for the already mentioned i[456]86 case.
Additionally 
1) libFoundation's Changelog says that devel/gnustep-objc-lf2
   is no longer needed to compile the library:
   "Foundation/NSConcreteString.m: activated NSConstantString, deactivated
   NXConstantString, this requires GCC 3 plus a matching runtime (libobjc.1),
   it obsoletes the lF specific libobjc.lf". This is for 1.1.0
   and we're on 1.1.7 and do have gcc 3. If needed the fix in the
   diff for this can be changed to something that depends on a
   compiler (version). Or we can throw that library away altogether.
2) gnustep-make/gnustep.mk's PKGSRC_COMPILER += line seems to
   unconditionally add -Qunused-arguments which is nice for clang
   but gcc doesn't like it. In the diff I threw that line out.
   Not sure if it's completely right though.
3) after the patches are applied gcc compiles fine, however clang will
   not compile libFoundation with PKG_OPTIONS.gnustep=fragile in
   /etc/mk.conf on my x86 machine, complaining about several illegal
   (syntax) constructions.
>How-To-Repeat:
On a x86 machine with PKG_OPTIONS.gnu=fragile in /etc/mk.conf
(non-fragile is 64-bit only afaict):
cd /usr/pkgsrc/devel/libFoundation
make
>Fix:
--- /usr/pkgsrc/devel/gnustep-make/Makefile.orig        2013-01-30 17:44:57
+++ /usr/pkgsrc/devel/gnustep-make/Makefile     2013-02-07 17:09:15
@@ -37,7 +37,7 @@
 CONFIGURE_ARGS+=       --enable-objc-nonfragile-abi
 .endif
 
-.if ${MACHINE_ARCH} == "i386"
+.if ${GNUSTEP_HOST_CPU} == "ix86"
 GNUSTEP_ARCH=  ix86
 .else
 GNUSTEP_ARCH=  ${MACHINE_ARCH}
--- /usr/pkgsrc/devel/gnustep-make/gnustep.mk.orig      2013-02-01 17:41:13
+++ /usr/pkgsrc/devel/gnustep-make/gnustep.mk   2013-02-07 20:51:38
@@ -6,7 +6,6 @@
 .ifndef GNUSTEP_SKIP_DEFAULT_OPTIONS
 PKG_OPTIONS_VAR?=      PKG_OPTIONS.gnustep
 PKG_SUPPORTED_OPTIONS+=        fragile
-PKGSRC_COMPILER+=      clang
 
 .include "../../mk/bsd.options.mk"
 
@@ -25,7 +24,7 @@
 GNUSTEP_NETWORK_ROOT=  ${GNUSTEP_ROOT}/Network
 GNUSTEP_MAKEFILES=     ${GNUSTEP_ROOT}/${GNUSTEP_SUBDIR}/Makefiles
 GNUSTEP_HOST=          ${MACHINE_GNU_PLATFORM}
-GNUSTEP_HOST_CPU=      ${MACHINE_GNU_ARCH:S/i386/ix86/}
+GNUSTEP_HOST_CPU=      ${MACHINE_GNU_ARCH:C/i[3-6]86/ix86/}
 GNUSTEP_HOST_VENDOR=   ${LOWER_VENDOR}
 GNUSTEP_HOST_OS=       ${LOWER_OPSYS}
 GNUSTEP_CONFIG_FILE=   ${PKG_SYSCONFDIR}/GNUstep.conf
--- /usr/pkgsrc/devel/libFoundation/Makefile.orig       2013-01-31 23:04:53
+++ /usr/pkgsrc/devel/libFoundation/Makefile    2013-02-07 17:14:55
@@ -25,7 +25,6 @@
 PLIST_SUBST+=  LIBF_HOST_OS=${LIBF_HOST_OS}
 
 .include "../../devel/gnustep-make/buildlink3.mk"
-.include "../../devel/gnustep-objc-lf2/buildlink3.mk"
 .include "../../mk/pthread.buildlink3.mk"
 
 post-configure:
--- /usr/pkgsrc/devel/libFoundation/buildlink3.mk.orig  2013-02-01 00:09:07
+++ /usr/pkgsrc/devel/libFoundation/buildlink3.mk       2013-02-01 00:09:27
@@ -18,7 +18,6 @@
 .endif
 
 .include "../../devel/gnustep-make/buildlink3.mk"
-.include "../../devel/gnustep-objc-lf2/buildlink3.mk"
 .endif # LIBFOUNDATION_BUILDLINK3_MK
 
 BUILDLINK_TREE+=       -libFoundation
--- /usr/pkgsrc/devel/libFoundation/common.mk.orig      2013-01-30 21:38:35
+++ /usr/pkgsrc/devel/libFoundation/common.mk   2013-02-07 21:43:41
@@ -21,7 +21,11 @@
 PLIST_SUBST+=  LIBF_HOST_OS=${LIBF_HOST_OS}
 
 pre-configure:
+.if ${GNUSTEP_HOST_CPU} == "ix86"
+       ${LN} -s i386 ${WRKSRC}/config/${MACHINE_GNU_ARCH}
+.else
        ${MKDIR} ${WRKSRC}/config/${MACHINE_GNU_ARCH}
+.endif
        [ -e ${WRKSRC}/config/${MACHINE_GNU_ARCH}/${GNUSTEP_HOST_OS}.h ] || \
        ${LN} -s linux.h 
${WRKSRC}/config/${MACHINE_GNU_ARCH}/${GNUSTEP_HOST_OS}.h
 .if ${GNUSTEP_HOST_OS} != ${LIBF_HOST_OS}



Home | Main Index | Thread Index | Old Index