Opened 15 years ago

Last modified 12 years ago

#22766 closed defect

octave-database-1.0.4 fails to compile because gcc43 doesn't understand command line option "-arch" — at Initial Version

Reported by: earcar@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.9.1
Keywords: swig Cc:
Port: octave-database

Description

Other strange things happens in octave related packages:

checking for gcc... /usr/bin/gcc-4.2
checking whether /usr/bin/gcc-4.2 accepts -g... yes
checking for /usr/bin/gcc-4.2 option to accept ISO C89... none needed
checking how to run the C preprocessor... /usr/bin/gcc-4.2 -E
[cut]
/opt/local/bin/g++-mp-4.3 -c -I/opt/local/include -I/opt/local/include -fPIC -I/opt/local/include/octave-3.2.3 -I/opt/local/include/octave-3.2.3/octave -I/opt/local/include -mieee-fp -I/opt/local/include/freetype2 -I/opt/local/include -pipe -arch x86_64 -DHAVE_OCTAVE_32 sqlite3_wrap.cpp -o sqlite3_wrap.o
cc1plus: error: unrecognized command line option "-arch"

This happens because the configure script at first tests for the default compiler (the apple one in my case) and then uses the compiler that built octave (gcc43).

The worst part is that it seems to use MacPorts' default CXXFLAGS:

-pipe -O2 -arch x86_64

in combination with the compiler that built octave:

$ mkoctfile -p CXX     
/opt/local/bin/g++-mp-4.3

The Makeconf file is in fact hilarious about this:

# Most octave programs will be compiled with $(MKOCTFILE).  Those which
# cannot use mkoctfile directly can request the flags that mkoctfile 
# would use as follows:
#    FLAG = $(shell $(MKOCTFILE) -p FLAG)
# The following flags are for compiling programs that are independent
# of Octave.  How confusing.

Yeah, how confusing.

Change History (1)

Changed 15 years ago by earcar@…

Attachment: octave-database.log added

octave database build log

Note: See TracTickets for help on using tickets.