[hdf-forum] Compiling C++ library under OS X 10.5 (version 1.6.9)
Mike Jackson
mike.jackson at bluequartz.net
Thu Jun 11 22:55:57 EDT 2009
OK. I started with a clean shell and here are the relevant exports:
export CPPFLAGS="-arch x86_64"
export CXXFLAGS="-arch x86_64"
export CFLAGS="-arch x86_64"
export CC=/usr/bin/gcc
./configure --prefix=/Users/Shared/Toolkits/hdf5 --enable-cxx
--enable-shared --enable-static --enable-hl --enable-filters=no
the last part of the configure output is the following:
CFLAGS: -arch x86_64 -std=c99 -Wno-long-long -O -fomit-frame-pointer
-finline-functions
CPPFLAGS: -UH5_DEBUG_API -DNDEBUG x86_64 -arch
which will obviously cause compiler errors. It would seem like there
is some sort of parsing of the CPPFLAGS going on instead of using them
verbatim from the command line environment.
Mike Jackson
On Thu, Jun 11, 2009 at 10:39 PM, Binh-Minh Ribler<bmribler at hdfgroup.org> wrote:
> It seemed that the correct compiler is not specified. I don't know anything
> about the system you're using. You might need to "setenv CXX" to the
> correct compiler. Also, did you try removing the "==yes" from all the other
> options? I'm not aware that you need the "==yes."
>
> Sorry if I can't be more help!
>
> -----Original Message-----
> From: Mike Jackson [mailto:mike.jackson at bluequartz.net]
> Sent: Thursday, June 11, 2009 10:21 PM
> To: Binh-Minh Ribler
> Subject: Re: [hdf-forum] Compiling C++ library under OS X 10.5 (version
> 1.6.9)
>
> Now that gives the following:
> '
> checking for g++... g++
> checking for C++ compiler default output file name...
> configure: error: C++ compiler cannot create executables
> See `config.log' for more details.
> configure: error: ./configure failed for c++
>
> Looking through the config.log doesn't really reveal much.
>
> Mike
>
> On Thu, Jun 11, 2009 at 10:04 PM, Binh-Minh Ribler<bmribler at hdfgroup.org>
> wrote:
>> Hi Mike,
>>
>> Did you try just --enable-cxx, not --enable-cxx==yes?
>>
>> Just a thought...
>> Binh-Minh
>>
>> -----Original Message-----
>> From: Mike Jackson [mailto:mike.jackson at bluequartz.net]
>> Sent: Thursday, June 11, 2009 10:00 PM
>> To: hdf-forum
>> Subject: [hdf-forum] Compiling C++ library under OS X 10.5 (version 1.6.9)
>>
>> I just downloaded the 1.6.9 sources and I have been trying to compile
>> the C++ library in addition to the regular libraries. This is the
>> configure line that I am using:
>>
>> ./configure --prefix=/Users/Shared/Toolkits/hdf5 --enable-cxx==yes
>> --enable-shared=yes --enable-static=yes --enable-hl=yes
>> --enable-filters=no
>>
>> and then make, make install. But the C++ library is not getting built.
>> Is anyone else having this problem? I was also trying to build a 64
>> bit version of the library by exporting CPPFLAGS="-arch x86_64" but
>> when I start that compiling I get the following error:
>>
>> 587:[mjackson at Shepard:hdf5-169]$ make
>> make lib
>> rm -f .libs/H5.lo
>> gcc -arch x86_64 -std=c99 -Wno-long-long -O -fomit-frame-pointer
>> -finline-functions -I. -I. -UH5_DEBUG_API -DNDEBUG x86_64 -arch -c
>> H5.c -fno-common -DPIC -o .libs/H5.lo
>> gcc-4.0: Invalid arch name : -c
>> i686-apple-darwin9-gcc-4.0.1: make[2]: *** [H5.lo] Error 1
>> x86_64: No such file or directory
>> make[1]: *** [lib] Error 1
>> make: *** [all] Error 2
>>
>>
>> This is the output at the end of the configure stage:
>>
>> Compilation Mode: Production
>> C Compiler: gcc
>> CFLAGS: -arch x86_64 -std=c99
>> -Wno-long-long -O -fomit-frame-pointer -finline-functions
>> CPPFLAGS: -UH5_DEBUG_API -DNDEBUG x86_64 -arch
>> LDFLAGS:
>> Debug Mode: None
>> Shared Libraries: Yes
>> Static Libraries: Yes
>> Statically Linked Executables: No
>> Tracing: No
>> Optimization Instrumentation: No
>>
>>
>>
>> I exported the following before configuring:
>>
>> export CFLAGS="-arch x86_64"
>> export CPPFLAGS="-arch x86_64"
>>
>> Note the reversal of the CPPFLAGS in the configure output?
>>
>> Any help on this would be greatly appreciated.
>>
>> Mike Jackson
>>
>> ----------------------------------------------------------------------
>> This mailing list is for HDF software users discussion.
>> To subscribe to this list, send a message to
>> hdf-forum-subscribe at hdfgroup.org.
>> To unsubscribe, send a message to hdf-forum-unsubscribe at hdfgroup.org.
>>
>>
>>
>>
>> --
>> Internal Virus Database is out-of-date.
>> Checked by AVG.
>> Version: 7.5.549 / Virus Database: 270.9.0/1778 - Release Date: 11/9/2008
>> 2:14 PM
>>
>>
>>
>
>
>
> --
> Internal Virus Database is out-of-date.
> Checked by AVG.
> Version: 7.5.549 / Virus Database: 270.9.0/1778 - Release Date: 11/9/2008
> 2:14 PM
>
>
>
----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe at hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe at hdfgroup.org.
More information about the Hdf-forum
mailing list