octave-maintainers
[Top][All Lists]
Advanced

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

Re: Building on OSX without package managers


From: John W. Eaton
Subject: Re: Building on OSX without package managers
Date: Tue, 25 Jan 2011 00:36:48 -0500

On 25-Jan-2011, Richard Campbell wrote:

| Sure enough, I got the following:
| 
| configure:10333: checking for Fortran 77 name-mangling scheme
| configure:10346: gfortran -c -O conftest.f >&5
| configure:10346: $? = 0
| configure:10387: gcc -o conftest -g -O2  -I/usr/X11/include/freetype2 
-I/usr/X11/include  conftest.c cfortran_test.o -lz -lm  -L/usr/X11/lib 
-lfreetype -lz -Wl,-framework,CoreServices -Wl,-framework,ApplicationServices 
-Wl,-framework -Wl,OpenGL  -L/usr/X11/lib 
-L/usr/local/lib/gcc/i686-apple-darwin8/4.2.3 
-L/usr/local/lib/gcc/i686-apple-darwin8/4.2.3/../../.. -lz -lm -lfreetype 
-lgfortranbegin -lgfortran >&5
| ld: warning: in cfortran_test.o, file was built for i386 which is not the 
architecture being linked (x86_64)
| ld: warning: in 
/usr/local/lib/gcc/i686-apple-darwin8/4.2.3/libgfortranbegin.a, file was built 
for unsupported file format which is not the architecture being linked (x86_64)
| ld: warning: in /usr/local/lib/gcc/i686-apple-darwin8/4.2.3/libgcc.a, file 
was built for unsupported file format which is not the architecture being 
linked (x86_64)
| Undefined symbols:
|   "_foobar", referenced from:
|       _main in cc0BG9Jy.o
| ld: symbol(s) not found
| collect2: ld returned 1 exit status
| 
| which led me to believe that --build=i686-apple-darwin10 wasn't sufficient to 
tell it not to compile as 64-bit. I tried again with "CFLAGS=-arch i686" and 
"FFLAGS=-arch i686" and it didn't give the same error. However, I'm now getting 
"configure: WARNING: I need GNU Readline 4.2 or later" since I compiled 
readline as 64-bit earlier. I'll try to compile readline as a 32 bit binary.

I don't think you should ever need to pass --build=... to Octave's
configure script and I would not expect to have to pass "-arch ..." to
a compiler either.

| I think the root of the issue might be that newer Macs (as in newer
| hardware, not newer OS) want to default to compiling as 64 bit
| rather than 32 bit.

That is independent of Octave's --enable-64 configure option, but
whatever you choose to do, you Obviously need to have a consistent set
of tools.  It probably doesn't make sense to mix some parts compiled
with 64-bit pointers and some with 32-bit pointers, and it looks like
you may have an inconsistent set of tools installed, given that they
don't appear to work properly by default.  It's unfortunate that Apple
seems to makes this a PITA by not providing current tools.  I don't
know what to do about that.  Is there no current version (4.4 or 4.5)
of GCC packaged for OS X systems that provides gcc, g++, and gfortran?

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]