From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 766 invoked by alias); 3 Jun 2010 04:45:45 -0000 Received: (qmail 367 invoked by uid 48); 3 Jun 2010 04:44:49 -0000 Date: Thu, 03 Jun 2010 04:45:00 -0000 Subject: [Bug c/44396] New: x86_64 linking problems with gcc4.4.1 on Snow Leopard X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "christine dot mecklenborg at gmail dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-06/txt/msg00288.txt.bz2 I'm running gcc4.4.1, courtesy of Fink, on Mac OS 10.6.3. I'm trying to compile mex files for use with 64-bit Matlab 2010a, but build fails at the linking stage. The source files successfully compile as x86_64 architecture (confirmed with the 'file' command in the terminal), but gcc/ld is trying to link as i386, for some unknown reason. /sw/bin/gcc-4 -O -Wl,-twolevel_namespace -undefined error -arch x86_64 -Wl,-syslibroot,/Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.6 -bundle -Wl,-exported_symbols_list,/Applications/Scientific/MATLAB_R2010a.app/extern/lib/maci64/fexport.map -o "FAST_SFunc.mexmaci64" DoubPrec.o SysMatlab.o NWTC_IO.o NWTC_Num.o NWTC_Aero.o NWTC_Library.o SharedInflowDefs.o HHWind.o FFWind.o FDWind.o CTWind.o UserWind.o InflowWindMod.o SharedTypes.o AeroMods.o GenSubs.o AeroSubs.o AeroDyn.o FAST_Mods.o Noise.o fftpack.o FFTMod.o HydroCalc.o AeroCalc.o FAST_IO.o FAST.o PitchCntrl_ACH.o SetVersion.o UserSubs.o UserVSCont_KP.o FASTSimulink.o FASTGateway.o -L/Applications/Scientific/MATLAB_R2010a.app/bin/maci64 -lmx -lmex -lmat -L/sw/lib/gcc4.4/lib/x86_64/ -lgfortran -L/sw/lib/gcc4.4/lib/gcc/i686-apple-darwin10/4.4.1/x86_64/ -lgfortranbegin d: warning: in DoubPrec.o, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in SysMatlab.o, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in NWTC_IO.o, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in NWTC_Num.o, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in NWTC_Aero.o, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in NWTC_Library.o, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in SharedInflowDefs.o, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in HHWind.o, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in FFWind.o, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in FDWind.o, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in CTWind.o, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in UserWind.o, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in InflowWindMod.o, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in SharedTypes.o, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in AeroMods.o, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in GenSubs.o, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in AeroSubs.o, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in AeroDyn.o, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in FAST_Mods.o, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in Noise.o, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in fftpack.o, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in FFTMod.o, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in HydroCalc.o, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in AeroCalc.o, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in FAST_IO.o, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in FAST.o, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in PitchCntrl_ACH.o, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in SetVersion.o, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in UserSubs.o, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in UserVSCont_KP.o, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in FASTSimulink.o, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in FASTGateway.o, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in /Applications/Scientific/MATLAB_R2010a.app/bin/maci64/libmx.dylib, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in /Applications/Scientific/MATLAB_R2010a.app/bin/maci64/libmex.dylib, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in /Applications/Scientific/MATLAB_R2010a.app/bin/maci64/libmat.dylib, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in /sw/lib/gcc4.4/lib/x86_64//libgfortran.dylib, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in /sw/lib/gcc4.4/lib/gcc/i686-apple-darwin10/4.4.1/x86_64//libgfortranbegin.a, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in /sw/lib/gcc4.4/lib/gcc/i686-apple-darwin10/4.4.1/x86_64//libgcc.a, file was built for unsupported file format which is not the architecture being linked (i386) Undefined symbols: "_mexfunction_", referenced from: -exported_symbol[s_list] command line option ld: symbol(s) not found collect2: ld returned 1 exit status mex: link of ' "FAST_SFunc.mexmaci64"' failed. -- Summary: x86_64 linking problems with gcc4.4.1 on Snow Leopard Product: gcc Version: 4.4.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: christine dot mecklenborg at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44396