Opened 14 years ago

Closed 13 years ago

#28376 closed defect (fixed)

gcc44, gcc45, gcc46: non-default build_arch fails: Building GCC requires GMP 4.1+ and MPFR 2.3.2+.

Reported by: tseidl42@… Owned by: mww@…
Priority: Normal Milestone:
Component: ports Version: 1.9.2
Keywords: Cc: ryandesign (Ryan Carsten Schmidt), dia@…
Port: gcc44, gcc45, gcc46

Description (last modified by ryandesign (Ryan Carsten Schmidt))

Hi I'm trying to install packages for launchpad's dorsal installer and everything has worked up until gcc44

I get this message

Macintosh-3:~ user$ sudo port install gcc44
--->  Computing dependencies for gcc44
--->  Configuring gcc44
Error: Target org.macports.configure returned: configure failure: shell command failed (see log for details)

I've attached the log file .. I've tried a couple of things but nothing has worked : / I would really appreciate any help!

-tseidl

Attachments (1)

main.log (9.4 KB) - added by tseidl42@… 14 years ago.

Download all attachments as: .zip

Change History (23)

Changed 14 years ago by tseidl42@…

Attachment: main.log added

comment:1 Changed 14 years ago by tseidl42@…

*solved it, by cleaning and re-trying

comment:2 Changed 14 years ago by tseidl42@…

I lied...It just failed with the same error but took longer to do so.

I'm running OS X 10.6.6 on a macbookpro from 2006.

comment:3 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Owner: changed from macports-tickets@… to mww@…
Port: gcc44 added

comment:4 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

The relevant error from the log is:

configure: error: Building GCC requires GMP 4.1+ and MPFR 2.3.2+.

What versions of gmp and mpfr are installed? Use

port installed gmp mpfr

to find out.

comment:5 Changed 14 years ago by tseidl42@…

The versions seem to be ok.... I'm not sure what to do.

Macintosh-3:include user$ port installed gmp mpfr
The following ports are currently installed:
  gmp @5.0.1_0 (active)
  mpfr @3.0.0-p8_0 (active)

comment:6 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added
Summary: gcc44 fail to configuregcc44: Building GCC requires GMP 4.1+ and MPFR 2.3.2+.

Is your computer 64-bit capable (what's the output of sysctl hw.cpu64bit_capable) and what is build_arch set to in your macports.conf? I am able to reproduce this problem if I set build_arch to i386 on my 64-bit capable Snow Leopard Mac.

comment:7 Changed 14 years ago by tseidl42@…

My computer isn't 64 bit

Macintosh-3:include user$ sysctl  hw.cpu64bit_capable
hw.cpu64bit_capable: 0

The build_arch is set to was set to # CPU architectures to use for Universal Binaries (+universal variant)

#universal_archs		x86_64 i386

I'm guessing that this is a problem, but I changed it to i386 and the installation failed with the same error.

Thanks for the help

comment:8 Changed 14 years ago by Richard.Beare@…

I am also seeing this problem on a 32 bit build on 64bit capable snow leopard system. For some reason the configure call for gcc seems to want to find a 64 bit mpfr:

:debug:configure Assembled command: 'cd "/opt/local32/var/macports/build/_opt_local32_var_macports_sources_rsync.macports.org_release_ports_lang_gcc44/work/build" && ../gcc-4.4.5/configure --prefix=/opt/local32 --build=i386-apple-darwin10 --enable-languages=c,c++,objc,obj-c++,java,fortran --libdir=/opt/local32/lib/gcc44 --includedir=/opt/local32/include/gcc44 --infodir=/opt/local32/share/info --mandir=/opt/local32/share/man --with-local-prefix=/opt/local32 --with-system-zlib --disable-nls --program-suffix=-mp-4.4 --with-gxx-include-dir=/opt/local32/include/gcc44/c++/ --with-gmp=/opt/local32 --with-mpfr=/opt/local32 --enable-stage1-checking --disable-multilib --enable-fully-dynamic-string'

then

mpfr.hconfigure:4701: /usr/bin/gcc-4.2 -o conftest -pipe -O2 -I/opt/local32/include -I/opt/local32/include -I/opt/local32/include -L/opt/local32/lib conftest.c  -L/opt/local32/lib -L/opt/local32/lib -lmpfr -lgmp >&5
ld: warning: in /opt/local32/lib/libmpfr.dylib, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: in /opt/local32/lib/libgmp.dylib, file was built for i386 which is not the architecture being linked (x86_64)
Undefined symbols:
  "_mpfr_subnormalize", referenced from:
      _main in ccXpXese.o
  "_mpfr_erfc", referenced from:
      _main in ccXpXese.o
  "_mpfr_atan2", referenced from:
      _main in ccXpXese.o
  "_mpfr_init", referenced from:
      _main in ccXpXese.o
      _main in ccXpXese.o
ld: symbol(s) not found

So for some reason the architecture isn't being passed to the right parts of the gcc configure process.

I have

build_arch                      i386

on macports.conf

Resolution of this issue would be welcome. I'm attempting to build a 32bit version of Octave for use with the PsychToolbox and can't find any prebuilt 32 bit versions around.

Thanks

comment:9 Changed 13 years ago by dia@…

I'm having the same problem. Is there a workaround?

comment:10 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

It doesn't appear that we know of a workaround at this time. Have you tried gcc45 or gcc46?

comment:11 Changed 13 years ago by dia@…

I wouldn't mind using gcc45 or gcc46 - I'm actually in need of pygtk - and these packages depend on gcc44. A workaround that worked for me is to remove the "i386" architecture definition from macports.conf - but there are users waiting for pure 32bit builds...

comment:12 Changed 13 years ago by dia@…

Cc: dia@… added

Cc Me!

comment:13 in reply to:  11 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Port: gcc45 gcc46 added
Summary: gcc44: Building GCC requires GMP 4.1+ and MPFR 2.3.2+.gcc44, gcc45, gcc46: non-default build_arch fails: Building GCC requires GMP 4.1+ and MPFR 2.3.2+.

Replying to dia@…:

I wouldn't mind using gcc45 or gcc46 - I'm actually in need of pygtk - and these packages depend on gcc44.

For the record, I tried gcc45 and gcc46 and they have the same problem (building 32-bit on a 64-bit system).

A workaround that worked for me is to remove the "i386" architecture definition from macports.conf - but there are users waiting for pure 32bit builds...

In other words you went back to a 64-bit build, on a 64-bit system? Yeah that would work but isn't a solution for this ticket which is about building 32-bit.

comment:14 in reply to:  11 ; Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to dia@…:

I'm actually in need of pygtk - and these packages depend on gcc44.

As far as I can tell, none of the pygtk ports have any gcc ports anywhere in their dependency chains.

$ port rdeps py27-gtk | grep gcc
$ port rdeps py26-gtk | grep gcc
$ port rdeps py25-gtk | grep gcc
$ port rdeps py-gtk2 | grep gcc
$

comment:15 in reply to:  14 ; Changed 13 years ago by blb@…

Replying to ryandesign@…:

As far as I can tell, none of the pygtk ports have any gcc ports anywhere in their dependency chains.

Do you have '-atlas' or something in variants.conf? gcc44 is needed by py2?-numpy, unless you have '-atlas' as a variant for py27-numpy (or equivalent) that is.

Unless an atlas-enabled numpy is needed, I would suggest just installing the right numpy with '-atlas' then install the pygtk needed:

$ sudo port install py27-numpy -atlas
$ sudo port install py27-gtk

comment:16 in reply to:  15 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to blb@…:

Do you have '-atlas' or something in variants.conf?

Ah, yes I do.

comment:17 in reply to:  15 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to blb@…:

gcc44 is needed by py2?-numpy, unless you have '-atlas' as a variant

But of course you can choose which gcc you want:

$ port variants py27-numpy
py27-numpy has the variants:
(-)atlas: Use the MacPorts' ATLAS libraries  instead of Apple's Accelerate framework
   gcc43: Use the gcc43 compiler (enables fortran linking)
     * conflicts with gcc44 gcc45
[+]gcc44: Use the gcc44 compiler (enables fortran linking)
     * conflicts with gcc43 gcc45
   gcc45: Use the gcc45 compiler (enables fortran linking)
     * conflicts with gcc43 gcc44
   universal: Build for multiple architectures

comment:18 Changed 13 years ago by crispy1975@…

Just adding that I have the same problem on Leopard (10.5.8) trying to compile gcc46 with a build arch of ppc64.

checking for the correct version of gmp.h... yes
checking for the correct version of mpfr.h... yes
checking for the correct version of mpc.h... yes
checking for the correct version of the gmp/mpfr/mpc libraries... no
configure: error: Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0+.

I've just updated to MacPorts 2.0.0 and I've cleaned out all the dependencies and started from scratch, still no dice. I should also not I've tried disabling the variants gfortan and java to see if it helps, it does not.

Any further ideas? I don't mind trying patches or testing.

comment:19 Changed 13 years ago by jeremyhu (Jeremy Huddleston Sequoia)

based on the config.log above, it looks like the configure script is not using $CFLAGS in its check.

comment:20 Changed 13 years ago by jmroot (Joshua Root)

This might be fixable by configure.cc-append -arch $build_arch?

comment:21 Changed 13 years ago by artemyk@…

I had the same issue trying to build a 64-bit version of gcc 4.6 on Leopard. Leopard defaults to the i386 architecture; I changed the default architecture to x64_86 in macports.conf and was not able to build gcc4.6 (same error as above). My issue had the same cause: the configure script for gcc4.6 did not pass the appropriate parameter (such as -m64) to gcc when doing tests.

I fixed this problem by reverting the default architecture back to i386, and adding x64_86 to universal_archs in macports.conf. I could then do

sudo port install gcc4.6 +universal

to get the 64-bit version of gcc installed.

comment:22 Changed 13 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.