Error Unable To Compile Mixed C/fortran Code
[ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ] From: Jason Swails Date: Wed, 14 May 2014 07:47:24 -0400 On Wed, 2014-05-14 at 11:48 +0300, Fabian Glaser wrote: > Hi all, > > I am trying for a while to install AmberTools14 on my OSX 10.9.2, and I solved several issues, but still am not able to install it :-( > > Here is the last trial, can somebody please help me???? > > > ========================================================== > > > fabian.fabians-imac { ..amber14 }-> ./configure -macAccelerate gnu > Checking for updates... > Checking for available patches online. This may take a few seconds... > > Available AmberTools 14 patches: > > No patches available > Searching for python2... Found python2.7: /opt/local/bin/python2.7 > > Obtaining the gnu suite version: > gcc -v > The version is version > ./configure2: line 786: [: version: integer expression expected > ./configure2: line 805: [: version: integer expression expected > ./configure2: line 806: [: version: integer expression expected This isn't good. What is the output of "gcc -v" in your terminal? > > Testing the gcc compiler: > gcc -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -o testp testp.c > ld: warning: directory not found for option '-L/Developer/SDKs/MacOSX10.5.sdk/usr/lib' > OK > > Testing the g++ compiler: > g++ -o testp testp.cpp > ld: warning: directory not found for option '-L/Developer/SDKs/MacOSX10.5.sdk/usr/lib' > OK > > Testing the gfortran compiler: > gfortran -O0 -o testp testp.f > OK > > Testing mixed C/Fortran compilation: > gcc -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -c -o testp.c.o testp.c > gfortran -O0 -c -o testp.f.o testp.f > gcc -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -o testp testp.c.o testp.f.o -lgfortran -w -framework Accelerate > Undefined symbols for architecture x86_64: > "__gfortran_transfer_character_write", referenced from: > _hello_ in testp.f.o > ld: symbol(s) not found for architecture x86_64 > clang: error: linker command failed with exit code 1 (use -v to see invocation) > ./configure2: line 1762: ./testp: No such file or directory > Error: Unable to compile mixed C/Fortran code.
by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ] From: Jason Swails Date: Tue, 4 May 2010 09:29:06 -0400 Hello, You do not need another intel compiler to compile amber. The configure script is written to take the GNU or INTEL options (for the first, it'll try to use gcc and gfortran, for the second it'll try to use icc and ifort). If you want to use the gcc/ifort combo, you'll have to hack the configure script to set icc to gcc (and you'll http://archive.ambermd.org/201405/0339.html have to change the corresponding CFLAGS/OCFLAGS (flags for the c-compiler and optimized flags for the c-compiler, respectively). Before I get into that, though, is there a reason you didn't install icc/icpc? As far as I know, the Mac download that you purchase comes with ifort, icc, icpc, and the intel MKL . It would be easiest if you could get your hands on icc/icpc and just use ./configure intel. If you http://archive.ambermd.org/201005/0086.html can't, follow the instructions below: cc=icc cplusplus=icpc locate those lines in configure. Change them to cc=gcc cplusplus=g++ And everywhere within the intel) case block, remove intel-specific cflags and ocflags (-O3/2/1/0 are not specific. If you're not sure whether a flag is specific or not, remove it). If you fail to remove a flag, the configure script will most likely fail with some comment like "Don't recognize -ip" or something. Just locate where that flag is being set and remove it. Once you get no complaints from configure, the software should build just fine. Good luck! Jason On Tue, May 4, 2010 at 9:18 AM, Emily Curtis wrote: > Hi. I am trying to install ambertools on a mac. I installed MacPorts and > I > have the intel version of the ifort compiler to compile fortran. Do I > still > need to install gfortran? > > *When I try to run "./compile gnu" I get the following error messages:* > > Emily-Curtis-MacBook-Pro:src emily$ ./configure gnu > Your AMBERHOME environment variable should be set to > /Users/emily/amber11/amber11 > > > Obtaining the gnu suite version: > gcc -v > The version is 4.2.1 > > Testing the gcc compiler: > gcc -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -o testp testp.c > OK > > Va
SCAP-on-Apple SmartCard Services WebKit XQuartz Contact Terms of Use Privacy Policy All user-submitted text and content on this website is licensed https://trac.macports.org/ticket/27223 under a Creative Commons Attribution 2.5 License unless otherwise noted. Copyright © 2011 Apple Inc. All rights reserved. New Ticket Tickets Wiki Browse Source Timeline Roadmap Ticket Reports Search Search: Context Navigation ← Previous TicketNext Ticket → Ticket #27223 (closed defect: fixed) error unable Opened 6 years ago Last modified 5 years ago PETSc doesn't compile Reported by: mkr@… Owned by: mmoll@… Priority: Normal Milestone: Component: ports Version: 1.9.2 Keywords: Cc: Port: petsc Description PETSc doesn't compile on MacOSX 10.6 due to some linking problem with mixed C++ and Fortran objects (full logs are attached): ... Pushing language FC error unable to sh: gfortran -c -o conftest.o -PIC -Wall -Wno-unused-variable -g conftest.F Executing: gfortran -c -o conftest.o -PIC -Wall -Wno-unused-variable -g conftest.F sh: Pushing language FC Popping language FC sh: gfortran -o conftest -Wl,-multiply_defined,suppress -Wl,-multiply_defined -Wl,suppress -Wl,-commons,use_dylibs -Wl,-search_paths_first -PIC -Wall -Wno-unused-variable -g conftest.o cxxobj.o confc.o -ldl -lsz Executing: gfortran -o conftest -Wl,-multiply_defined,suppress -Wl,-multiply_defined -Wl,suppress -Wl,-commons,use_dylibs -Wl,-search_paths_first -PIC -Wall -Wno-unused-variable -g conftest.o cxxobj.o confc.o -ldl -lsz sh: Possible ERROR while running linker: Undefined symbols: "___gxx_personality_v0", referenced from: foo() in cxxobj.o CIE in cxxobj.o _d1chk_ in confc.o CIE in confc.o ld: symbol(s) not found collect2: ld returned 1 exit status output: ret = 256 error message = {Undefined symbols: "___gxx_personality_v0", referenced from: foo() in cxxobj.o CIE in cxxobj.o _d1chk_ in confc.o CIE in confc.o ld: symbol(s) not found collect2: ld returned 1 exit status } Pushing language FC Popping language FC in gfortran -o conftest -Wl,-multiply_defined,suppress -Wl,-multiply_defined -Wl,suppress -Wl,-commons,use_dylibs -Wl,-search_paths_first -PIC -Wall -Wno-unused-variable -g conftest.o cxxobj.o confc.o -ldl -lsz Source: program main call d1chk() end Popping language FC *************************************************