NetBSD Problem Report #36953
From martin@duskware.de Sun Sep 9 09:11:36 2007
Return-Path: <martin@duskware.de>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by narn.NetBSD.org (Postfix) with ESMTP id 5954463B8E9
for <gnats-bugs@gnats.netbsd.org>; Sun, 9 Sep 2007 09:11:36 +0000 (UTC)
Message-Id: <20070909040128.8484E63B8A2@narn.NetBSD.org>
Date: Sun, 9 Sep 2007 04:01:28 +0000 (UTC)
From: jpeterson275@comcast.net
Reply-To: jpeterson275@comcast.net
To: netbsd-bugs-owner@NetBSD.org
Subject: Darwin/8.10 PowerPC build of pkgsrc binary kit fails to compile
X-Send-Pr-Version: www-1.0
>Number: 36953
>Category: pkg
>Synopsis: Darwin/8.10 PowerPC build of pkgsrc binary kit fails to compile
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: darwin-pkg-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Sep 09 09:15:01 +0000 2007
>Closed-Date: Wed Nov 10 03:08:16 +0000 2010
>Last-Modified: Wed Nov 10 03:08:16 +0000 2010
>Originator: Jesse Peterson
>Release:
>Organization:
>Environment:
Darwin localhost 8.10.0 Darwin Kernel Version 8.10.0: Wed May 23 16:50:59 PDT 2007; root:xnu-792.21.3~1/RELEASE_PPC Power Macintosh powerpc
>Description:
When attempting to compile the pkg_install tool as a part of the boostrap process (under the mkbinarykit script) the compilation fails (on the first file) with this error:
gcc: -E, -S, -save-temps and -M options are not allowed with multiple -arch flags
Where of course the multiple -arch flags are created in the CFLAGS by the mkbinarykit script.
Ideally the use of universal binaries would be an option. On that same note the use of Mac OS X installer should be optional on Darwin as well (ie, an option to use
>How-To-Repeat:
On Mac OS X 10.4.10 PPC Mac:
1. [fresh checkout/extraction of pkgsrc]
2. cd /usr/pkgsrc/bootstrap
3. ./mkbinarykit
>Fix:
>Release-Note:
>Audit-Trail:
From: Joerg Sonnenberger <joerg@britannica.bec.de>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/36953: Darwin/8.10 PowerPC build of pkgsrc binary kit
fails to compile
Date: Mon, 10 Sep 2007 06:09:13 +0200
On Sun, Sep 09, 2007 at 09:15:03AM +0000, jpeterson275@comcast.net wrote:
> When attempting to compile the pkg_install tool as a part of the
> boostrap process (under the mkbinarykit script) the compilation fails
> (on the first file) with this error:
>
> gcc: -E, -S, -save-temps and -M options are not allowed with multiple -arch flags
>
> Where of course the multiple -arch flags are created in the CFLAGS by the mkbinarykit script.
Can you give me the actual failing command as well?
Joerg
From: Jesse Peterson <jpeterson275@comcast.net>
To: gnats-bugs@NetBSD.org
Cc: Joerg Sonnenberger <joerg@britannica.bec.de>,
pkg-manager@netbsd.org, gnats-admin@netbsd.org,
pkgsrc-bugs@netbsd.org
Subject: Re: pkg/36953: Darwin/8.10 PowerPC build of pkgsrc binary kit fails
to compile
Date: Mon, 10 Sep 2007 00:30:31 -0700
On Mon, 10 Sep 2007 04:10:06 +0000 (UTC)
Joerg Sonnenberger <joerg@britannica.bec.de> wrote:
> On Sun, Sep 09, 2007 at 09:15:03AM +0000, jpeterson275@comcast.net wrote:
> > When attempting to compile the pkg_install tool as a part of the
> > boostrap process (under the mkbinarykit script) the compilation fails
> > (on the first file) with this error:
> >
> > gcc: -E, -S, -save-temps and -M options are not allowed with multiple -arch flags
> >
> > Where of course the multiple -arch flags are created in the CFLAGS by the mkbinarykit script.
>
> Can you give me the actual failing command as well?
Yes. Not quite sure why I didn't include that in the first place...
[some time after the 'mkbinarykit' command...]
touch ./config.h.in
cd . && /bin/sh ./config.status config.h
config.status: creating config.h
config.status: config.h is unchanged
/usr/pkgsrc-local/wrkobjdir/binarykit/bin/bmake all-am
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I./libarch
ive -D_LARGEFILE_SOURCE -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -DDEF_UMASK=0022 -
I/usr/pkgsrc-local/wrkobjdir/binarykit/wrk/pkgtools/pkg_install/work/libarchive/
libarchive -DHAVE_NBCOMPAT_H=1 -I/usr/pkgsrc-local/wrkobjdir/binarykit/wrk/pkgto
ols/pkg_install/work/libnbcompat -no-cpp-precomp -arch i386 -arch ppc -arch ppc
64 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -MT libarchive/libarch
ive_la-archive_check_magic.lo -MD -MP -MF libarchive/.deps/libarchive_la-archive
_check_magic.Tpo -c -o libarchive/libarchive_la-archive_check_magic.lo `test -f
'libarchive/archive_check_magic.c' || echo './'`libarchive/archive_check_magic.c
gcc -DHAVE_CONFIG_H -I. -I./libarchive -D_LARGEFILE_SOURCE -D_LARGE_FILES -D_FI
LE_OFFSET_BITS=64 -DDEF_UMASK=0022 -I/usr/pkgsrc-local/wrkobjdir/binarykit/wrk/p
kgtools/pkg_install/work/libarchive/libarchive -DHAVE_NBCOMPAT_H=1 -I/usr/pkgsrc
-local/wrkobjdir/binarykit/wrk/pkgtools/pkg_install/work/libnbcompat -no-cpp-pre
comp -arch i386 -arch ppc -arch ppc64 -arch x86_64 -isysroot /Developer/SDKs/Mac
OSX10.4u.sdk -MT libarchive/libarchive_la-archive_check_magic.lo -MD -MP -MF lib
archive/.deps/libarchive_la-archive_check_magic.Tpo -c libarchive/archive_check_
magic.c -o libarchive/libarchive_la-archive_check_magic.o
gcc: -E, -S, -save-temps and -M options are not allowed with multiple -arch flag
s
*** Error code 1
Stop.
bmake: stopped in /usr/pkgsrc-local/wrkobjdir/binarykit/wrk/pkgtools/pkg_install
/work/libarchive
*** Error code 1
From: Jesse Peterson <jpeterson275@comcast.net>
To: gnats-bugs@NetBSD.org
Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org,
pkgsrc-bugs@netbsd.org
Subject: Re: pkg/36953: Darwin/8.10 PowerPC build of pkgsrc binary kit fails
to compile
Date: Wed, 19 Sep 2007 21:33:01 -0700
I can also confirm that this is an issue on Intel Macs.
On Mon, 10 Sep 2007 07:35:03 +0000 (UTC)
Jesse Peterson <jpeterson275@comcast.net> wrote:
> pkg/36953: Darwin/8.10 PowerPC build of pkgsrc binary kit fails to compile
Responsible-Changed-From-To: pkg-manager->darwin-pkg-people
Responsible-Changed-By: obache@netbsd.org
Responsible-Changed-When: Sun, 23 Sep 2007 08:20:35 +0000
Responsible-Changed-Why:
Darwin specific problem.
From: Joerg Sonnenberger <joerg@britannica.bec.de>
To: gnats-bugs@NetBSD.org
Cc: Jesse Peterson <jpeterson275@comcast.net>
Subject: Re: pkg/36953: Darwin/8.10 PowerPC build of pkgsrc binary kit
fails to compile
Date: Sun, 23 Sep 2007 17:13:12 +0200
--Dxnq1zWXvFF0Q93v
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
On Mon, Sep 10, 2007 at 07:35:03AM +0000, Jesse Peterson wrote:
> gcc: -E, -S, -save-temps and -M options are not allowed with multiple -arch flag
Ah, right. The attempt to create universal binaries conflicts with the
dependency extraction. Can you try the attached patch?
Joerg
--Dxnq1zWXvFF0Q93v
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="pkg_install.diff"
Index: Makefile
===================================================================
RCS file: /home/joerg/repo/netbsd/pkgsrc/pkgtools/pkg_install/Makefile,v
retrieving revision 1.142
diff -u -r1.142 Makefile
--- Makefile 8 Sep 2007 21:57:59 -0000 1.142
+++ Makefile 23 Sep 2007 15:11:40 -0000
@@ -137,7 +137,8 @@
cd ${WRKDIR}/libarchive && \
${SETENV} ${_CONFIGURE_SCRIPT_ENV} \
${CONFIG_SHELL} ${CONFIG_SHELL_FLAGS} \
- ./configure --disable-shared --disable-bsdtar
+ ./configure --disable-shared --disable-bsdtar \
+ --disable-dependency-tracking
cd ${WRKDIR}/libarchive && ${BUILD_MAKE_CMD}
.endif
--Dxnq1zWXvFF0Q93v--
State-Changed-From-To: open->feedback
State-Changed-By: joerg@netbsd.org
State-Changed-When: Thu, 27 Sep 2007 13:32:19 +0000
State-Changed-Why:
Patch committed to address this. Does this problem still exist?
From: Joerg Sonnenberger <joerg@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: PR/36953 CVS commit: pkgsrc/pkgtools/pkg_install
Date: Thu, 27 Sep 2007 13:30:28 +0000 (UTC)
Module Name: pkgsrc
Committed By: joerg
Date: Thu Sep 27 13:30:28 UTC 2007
Modified Files:
pkgsrc/pkgtools/pkg_install: Makefile
pkgsrc/pkgtools/pkg_install/files/lib: dewey.c version.h
Log Message:
- Be less aggressive when resizing the version field, just resize if
the old size is not enough. Fixes PR 37031.
- Disable dependency tracking in libarchive build. Supposed to address
PR 36953.
Bump version to 20070927.
To generate a diff of this commit:
cvs rdiff -r1.142 -r1.143 pkgsrc/pkgtools/pkg_install/Makefile
cvs rdiff -r1.7 -r1.8 pkgsrc/pkgtools/pkg_install/files/lib/dewey.c
cvs rdiff -r1.82 -r1.83 pkgsrc/pkgtools/pkg_install/files/lib/version.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Jesse Peterson <jpeterson275@comcast.net>
To: gnats-bugs@NetBSD.org
Cc: joerg@netbsd.org, darwin-pkg-people@netbsd.org,
pkgsrc-bugs@netbsd.org, gnats-admin@netbsd.org
Subject: Re: pkg/36953 (Darwin/8.10 PowerPC build of pkgsrc binary kit fails
to compile)
Date: Mon, 5 Nov 2007 23:36:46 -0800
Apologies for the delay in my response. I cannot determine if the issue is fixed
as pkg_install is now getting missing symbols for bzip2 in the ppc64 and x86_64
architectures. An Intel Mac is building this:
gcc -arch i386 -arch ppc -arch ppc64 -arch x86_64 -Wl,-syslibroot,/Developer/SDK
s/MacOSX10.4u.sdk -L/tmp/binarykitbuild/wrk/pkgtools/pkg_install/work/libarchive
/.libs -L/tmp/binarykitbuild/wrk/pkgtools/pkg_install/work/libnbcompat -L/usr/pk
g/lib -L../lib -o pkg_create main.o perform.o pl.o util.o build.o -linstall -lar
chive -lbz2 -lz -ltermcap -lnbcompat
ld64 warning: in /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/libbz2.dylib, missing r
equired architecture ppc64 in file
Undefined symbols for architecture ppc64:
_BZ2_bzCompressEnd, referenced from:
_archive_compressor_bzip2_finish in libarchive.a(libarchive_la-archive_wri
te_set_compression_bzip2.o)
_BZ2_bzCompressInit, referenced from:
_archive_compressor_bzip2_init in libarchive.a(libarchive_la-archive_write
_set_compression_bzip2.o)
_BZ2_bzCompress, referenced from:
_drive_compressor in libarchive.a(libarchive_la-archive_write_set_compress
ion_bzip2.o)
ld64-62.1 failed: symbol(s) not found for architecture ppc64
collect2: ld returned 1 exit status
ld64 warning: in /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/libbz2.dylib, missing r
equired architecture x86_64 in file
Undefined symbols for architecture x86_64:
_BZ2_bzCompressEnd, referenced from:
_archive_compressor_bzip2_finish in libarchive.a(libarchive_la-archive_wri
te_set_compression_bzip2.o)
_BZ2_bzCompressInit, referenced from:
_archive_compressor_bzip2_init in libarchive.a(libarchive_la-archive_write
_set_compression_bzip2.o)
_BZ2_bzCompress, referenced from:
_drive_compressor in libarchive.a(libarchive_la-archive_write_set_compress
ion_bzip2.o)
ld64-62.1 failed: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
lipo: can't open input file: /var/tmp//ccl01IzT.out (No such file or directory)
*** Error code 1
Thanks,
- J
On Thu, 27 Sep 2007 13:32:21 +0000 (UTC)
joerg@netbsd.org wrote:
> Patch committed to address this. Does this problem still exist?
From: Joerg Sonnenberger <joerg@britannica.bec.de>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/36953 (Darwin/8.10 PowerPC build of pkgsrc binary kit
fails to compile)
Date: Tue, 6 Nov 2007 15:34:46 +0100
On Tue, Nov 06, 2007 at 08:45:02AM +0000, Jesse Peterson wrote:
> Apologies for the delay in my response. I cannot determine if the issue is fixed
> as pkg_install is now getting missing symbols for bzip2 in the ppc64 and x86_64
> architectures. An Intel Mac is building this:
Does it actually build libbz2 before this? Or does it use the system
library? If it isn't, you can try by adding
USE_BUILTIN.bzip2=no
directly before line 96 in pkgsrc/pkgtools/pkg_install/Makefile.
Joerg
>
> gcc -arch i386 -arch ppc -arch ppc64 -arch x86_64 -Wl,-syslibroot,/Developer/SDK
> s/MacOSX10.4u.sdk -L/tmp/binarykitbuild/wrk/pkgtools/pkg_install/work/libarchive
> /.libs -L/tmp/binarykitbuild/wrk/pkgtools/pkg_install/work/libnbcompat -L/usr/pk
> g/lib -L../lib -o pkg_create main.o perform.o pl.o util.o build.o -linstall -lar
> chive -lbz2 -lz -ltermcap -lnbcompat
> ld64 warning: in /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/libbz2.dylib, missing r
> equired architecture ppc64 in file
> Undefined symbols for architecture ppc64:
> _BZ2_bzCompressEnd, referenced from:
> _archive_compressor_bzip2_finish in libarchive.a(libarchive_la-archive_wri
> te_set_compression_bzip2.o)
> _BZ2_bzCompressInit, referenced from:
> _archive_compressor_bzip2_init in libarchive.a(libarchive_la-archive_write
> _set_compression_bzip2.o)
> _BZ2_bzCompress, referenced from:
> _drive_compressor in libarchive.a(libarchive_la-archive_write_set_compress
> ion_bzip2.o)
> ld64-62.1 failed: symbol(s) not found for architecture ppc64
> collect2: ld returned 1 exit status
> ld64 warning: in /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/libbz2.dylib, missing r
> equired architecture x86_64 in file
> Undefined symbols for architecture x86_64:
> _BZ2_bzCompressEnd, referenced from:
> _archive_compressor_bzip2_finish in libarchive.a(libarchive_la-archive_wri
> te_set_compression_bzip2.o)
> _BZ2_bzCompressInit, referenced from:
> _archive_compressor_bzip2_init in libarchive.a(libarchive_la-archive_write
> _set_compression_bzip2.o)
> _BZ2_bzCompress, referenced from:
> _drive_compressor in libarchive.a(libarchive_la-archive_write_set_compress
> ion_bzip2.o)
> ld64-62.1 failed: symbol(s) not found for architecture x86_64
> collect2: ld returned 1 exit status
> lipo: can't open input file: /var/tmp//ccl01IzT.out (No such file or directory)
> *** Error code 1
>
> Thanks,
> - J
>
>
> On Thu, 27 Sep 2007 13:32:21 +0000 (UTC)
> joerg@netbsd.org wrote:
>
> > Patch committed to address this. Does this problem still exist?
>
From: Jesse Peterson <jpeterson275@comcast.net>
To: gnats-bugs@NetBSD.org
Cc: Joerg Sonnenberger <joerg@britannica.bec.de>,
darwin-pkg-people@netbsd.org, gnats-admin@netbsd.org,
pkgsrc-bugs@netbsd.org
Subject: Re: pkg/36953 (Darwin/8.10 PowerPC build of pkgsrc binary kit fails
to compile)
Date: Sun, 20 Jan 2008 17:53:14 -0800
On Tue, 6 Nov 2007 14:50:02 +0000 (UTC)
Joerg Sonnenberger <joerg@britannica.bec.de> wrote:
> From: Joerg Sonnenberger <joerg@britannica.bec.de>
> To: gnats-bugs@NetBSD.org
> Cc:
> Subject: Re: pkg/36953 (Darwin/8.10 PowerPC build of pkgsrc binary kit
> fails to compile)
> Date: Tue, 6 Nov 2007 15:34:46 +0100
>
> On Tue, Nov 06, 2007 at 08:45:02AM +0000, Jesse Peterson wrote:
> > Apologies for the delay in my response. I cannot determine if the issue is fixed
> > as pkg_install is now getting missing symbols for bzip2 in the ppc64 and x86_64
> > architectures. An Intel Mac is building this:
>
> Does it actually build libbz2 before this? Or does it use the system
> library? If it isn't, you can try by adding
> USE_BUILTIN.bzip2=no
> directly before line 96 in pkgsrc/pkgtools/pkg_install/Makefile.
Tried that fix - same result.
It would appear that Mac OS X 10.4 Tiger doesn't include quad-universal binaries of libbz2. The newest Developer Tools (Xcode), version 2.5, has a copy of /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/libbz2.dylib that is only has ppc and i386 architectures.
However it appears that Mac OS X 10.5 Leopard things build just fine. I dont have a Leopard machine right in front of me at the moment but because I was able to successfully build the binary kit on a Leopard machine I'm assuming things are fine.
So that some people don't have to go editing Makefiles to get their binary kit's supported might there be a simpler solution that automatically determines the proper binary kit flags? Perhaps one of:
- An option to NOT compile universal binaries
- An option to pick which architectures for the universal binaries
- As an aside here many of Apple's binaries are only dual-architecture. Is there a good reason to be build all four?
Also as an aside I think there's value in choosing whether or not to use a package installer versus a tarball for the binary kit package.
Thanks,
- Jesse
State-Changed-From-To: feedback->open
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sun, 04 May 2008 01:53:21 +0000
State-Changed-Why:
feedback received.
State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Wed, 10 Nov 2010 03:08:16 +0000
State-Changed-Why:
This works on MacOS 10.5 and only fails on 10.4; our policy with 10.4 at
this point is to not gratuitously break it, but not put effort into fixing
it either, so after some discussion the conclusion is that this problem
won't be fixed.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.