#64952 closed defect (invalid)
Can Macports base be built as universal? configure: error: C preprocessor "/lib/cpp" fails sanity check
Reported by: | barracuda156 | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | base | Version: | 2.7.2 |
Keywords: | powerpc, leopard, ppc64 | Cc: | |
Port: |
Description
I tried configuring with ./configure --prefix=/opt/bootstrap --with-applications-dir=/opt/bootstrap/Applications --without-startupitems CC='gcc-4.2 -arch ppc -arch ppc64' CXX='g++-4.2 -arch ppc -arch ppc64'
on Leopard, and that failed:
configure: running /bin/sh ./configure '--cache-file=/dev/null' '--disable-option-checking' '--prefix=/opt/bootstrap/libexec/macports' '--enable-threads' '--without-startupitems' 'CC=gcc-4.2 -arch ppc -arch ppc64' 'CXX=g++-4.2 -arch ppc -arch ppc64' '--srcdir=.' 'CC=gcc-4.2 -arch ppc -arch ppc64 -std=gnu99' in vendor/tcl/unix checking whether to use symlinks for manpages... no checking whether to compress the manpages... no checking whether to add a package name suffix for the manpages... no checking for gcc... gcc-4.2 -arch ppc -arch ppc64 -std=gnu99 checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc-4.2 -arch ppc -arch ppc64 -std=gnu99 accepts -g... yes checking for gcc-4.2 -arch ppc -arch ppc64 -std=gnu99 option to accept ANSI C... none needed checking for inline... inline checking how to run the C preprocessor... /lib/cpp configure: error: C preprocessor "/lib/cpp" fails sanity check See `config.log' for more details. configure: error: configure failed for vendor/tcl/unix
If it cannot work, not a big deal, but if there is a correct way to configure it, please let me know.
Attachments (1)
Change History (6)
comment:1 follow-up: 3 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)
comment:2 Changed 3 years ago by jmroot (Joshua Root)
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:3 Changed 3 years ago by barracuda156
Replying to ryandesign:
Yes, MacPorts installers have always (since the introduction of Macs witth Intel processors) been built universal.
Instead of specifying
-arch
flags manually withinCC
andCXX
, use the configure argument--with-universal-archs="ppc ppc64"
.If that fails, attach the config.log so we can see why it failed.
Apparently it fails to produce universal binaries. I configured as ./configure --with-universal-archs="ppc ppc64" --with-curlprefix=/opt/bootstrap
, compiled, and then checked a couple of resulting ones:
36-109:MacPorts-2.7.2 svacchanda$ file /opt/local/libexec/macports/bin/tclsh8.5 /opt/local/libexec/macports/bin/tclsh8.5: Mach-O executable ppc 36-109:MacPorts-2.7.2 svacchanda$ lipo -info /opt/local/libexec/macports/lib/libtclstub8.5.a input file /opt/local/libexec/macports/lib/libtclstub8.5.a is not a fat file Non-fat file: /opt/local/libexec/macports/lib/libtclstub8.5.a is architecture: ppc7400
Changed 3 years ago by barracuda156
Attachment: | mp_universal_log added |
---|
comment:4 follow-up: 5 Changed 3 years ago by kencu (Ken)
look here for info on how MacPorts does this itself:
https://github.com/macports/macports-ports/blob/master/sysutils/MacPorts/Portfile
this for example seems to do it for i386/ppc builds:
configure.cflags-append -arch ppc -arch i386 configure.args-append SHLIB_LDFLAGS='-arch ppc -arch i386'
You no doubt know by now that to do that manually (outside of a MacPorts build) you have to take steps to add those flags manually into the environment variables and args during your build.
comment:5 Changed 3 years ago by barracuda156
Replying to kencu:
look here for info on how MacPorts does this itself:
https://github.com/macports/macports-ports/blob/master/sysutils/MacPorts/Portfile
this for example seems to do it for i386/ppc builds:
configure.cflags-append -arch ppc -arch i386 configure.args-append SHLIB_LDFLAGS='-arch ppc -arch i386'You no doubt know by now that to do that manually (outside of a MacPorts build) you have to take steps to add those flags manually into the environment variables and args during your build.
Oh, I just saw your message here. Thank you, will do!
Yes, MacPorts installers have always (since the introduction of Macs witth Intel processors) been built universal.
Instead of specifying
-arch
flags manually withinCC
andCXX
, use the configure argument--with-universal-archs="ppc ppc64"
.If that fails, attach the config.log so we can see why it failed.