x86_64 on Mac with xcode

x86_64 on Mac with xcode

I am running on a Macbook pro (core duo 2), osx 10.5.2, xcode 3.0, using Intel Fortran 10.1.014. If I compile with i386 I am OK, and I have used OpenMP and other libraries. If I switch to x86_64 I get the error:

ifort: error #10149: option '-cxxlib-gcc' not supported with the current installed GCC

Why is it looking for a gcc library at this point? And if it is, my installation should be up to date, as I just recently downloaded the newest developer package form Apple.

Any thoughts? Thanks in advance..

-Chuck

7 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Your gcc installation may not have not been installed properly. Can you please check if you can compile/link/execute a program using gcc/g++ successfully?

If your gcc build is successful, then you may have a faulty Intel Compiler Installation.

Normally you should find c++config.h file for gcc at the following file path (substitute your gcc version if it is nt 3.3):

/usr/include/gcc/darwin/3.3/c++/i386-darwin/bits/c++config.h

Note that Mac uses default directories while searching the .h and .lib files. And the default locations are

/usr/include
/usr/bin
/usr/lib

If you have installed gcc/g++ on some other path then you will have to add the respective path to the Env Variables.

If you are building a mixed-language (C/C++ and Fortran) application, there may be other considerations, so let us know if this is not a Fortran-only app.

I can compile/link/execute a C program using gcc, but I did it using xcode, which may not be what you are really suggesting. Also, I can compile using the i386 or x86_64 options in C.

I am not sure the gcc installation is normal on the Mac. The gcc tree starts in the Developer folder under particular sdk versions. These paths are defined in the build specifications for a project.

As an example, my gcc compiler is in

/Developer/SDKs/MacOSX10.5.sdk/usr/include/gcc etc.

My app is Fortran only.

I am not sure what the error means at this point. It is an ifort option that is not being accepted as far as I can tell. Why is concerned with using the gcc runtime libraries?

If I do need them, what path is it expecting (where are they in the gcc tree)?

Thanks again for the help.

-Chuck

I suppose
g++ -m32 -print-search-dirs
should indicate where your 32-bit g++ is installed. As Bonnie hinted, ifort depends on the 32-bit g++, including libstdc++, and your message indicates a problem satisfying that dependency. So, you would want to verify that it can find the include file which Bonnie specified.

I am beginning to understand. First, I did not have a path set to my gcc compiler, that is fixed, although most of my gcc bin versions are in /Developer/usr/bin.

The gcc libraries are in /Developer/usr/lib/gcc/[type such as i686]/[version such as 4.01]/...

and

Developer/SDKs/MacOSX10.5.sdk/usr/lib/[type such as i686]/[version such as 4.01]/...

The file Bonnie mentioned, c++config.h, is only in my MacOSX10.5.sdk path with copies in each of the 3.3, 4.0 and 4.0.1 directories, and darwin 8 or 9 directories. (Strangely darwin8 is only in the 4.0.1 path and darwin9 only in the 4.0 path.

For whatever it is worth, I have gcc 4.2 versions in other places, such as /usr/bin/. go figure.

As might be evident, I am confused about what needs to be in the right (right for Intel Fortran) place, what I can fix with a PATH, what I can fix with a reference(path) in the Build specifications in xcode, and what I can fix with a symbolic link.

Is there a reference to a standard layout that Apple and Intel have worked out ?

ifort will have been tested only with standard gcc installations active, as supported by Apple. I would not expect it to matter where the active gcc is installed, if it is in accordance with the reported gcc search paths; at least on linux, ifort gets required libraries using the paths it gets from g++. It should be possible, within limits, for ifort work with other versions of gcc active, although gcc 4.2 isn't fully supported.

Problem solved!

The hint was to test my gcc complier. I attempted to compile a simple c program and it did not work. xcode was fine, but not gcc from the terminal.

I checked for locations of libraries, includes and reset paths with no luck. I finally reinstalled xcode, which should have fixed the problem. That didn't help, and after a day I reinstalled xcode again. Still no go.

After searching the web for similar experiences I found two instances where folks had reinstalled xcode twice. I gave it a try. I installed xcode, rebooted and installed it again before I did anything else. Problem fixed. Not sure I can explain this, but I am back coding. Thanks for all the help.

-Chuck

Leave a Comment

Please sign in to add a comment. Not a member? Join today