compilation note for OS X 10.6

Darren,

  Sorry to threadjack slightly, but could you describe how you got a 64 bit build on Snow Leopard? I'm trying to build from source, so I can then build PyTables. I'm trying:

export FC=/usr/local/bin/gfortran
export F77=/usr/local/bin/gfortran
export F90=/usr/local/bin/gfortran
export FFLAGS="-arch x86_64"
export CFLAGS="-arch x86_64"
export CC="gcc"
export ARCHFLAGS="-arch x86_64"
export MACOSX_DEPLOYMENT_TARGET="10.6"
export LDFLAGS="-arch x86_64"

and

  ./configure --prefix=/usr/local/Cellar/hdf5/1.8.3 --enable-cxx --enable-fortran --disable-debug --disable-dependency-tracking --with-zlib=yes --with-szlib=yes --enable-filters=all --enable-hl

I'm not certain I need --enable-fortran for PyTables, but I think I do. For some reason I can't get shared libraries built, and the last make I tried failed when trying to build h5ls.o

I don't need a 32 bit version, just x86_64. Sounds like you got that working pretty quickly.

thanks,
-robert

···

On Dec 1, 2009, at 6:26 AM, Darren Dale wrote:

On Tue, Dec 1, 2009 at 8:22 AM, Michael Jackson > <mike.jackson@bluequartz.net> wrote:

On Dec 1, 2009, at 7:50 AM, Darren Dale wrote:

On Tue, Dec 1, 2009 at 7:44 AM, Darren Dale <dsdale24@gmail.com> >>> wrote:

On Tue, Dec 1, 2009 at 12:15 AM, Elena Pourmal <epourmal@hdfgroup.org >>>> > >>>> wrote:

Hi Darren,

On Nov 24, 2009, at 8:48 AM, Darren Dale wrote:

On Mon, Oct 19, 2009 at 2:02 PM, Elena Pourmal <epourmal@hdfgroup.org >>>>>> > >>>>>> wrote:

Hi Darren,

My machine is OS X 10.5.8 (will be upgraded soon), but I successfully
use
compiler -arch x86_64 to build HDF5 libraries (1.8 and trunk). I also
use
Intel 10.0 compiler to build 32 and 64-bit versions of the libraries.
Our
pre-built binaries for 1.8.3 are 32-bit (I learned about the flag
after the
HDF5 1.8.3 release ;-).

I will build both 32 and 64-bit binaries for 1.8.4 (coming in mid
November).

I just installed hdf5-1.8.4 on snow leopard. The default configuration
is still for 32 bit, was it not possible to add support for 64 bit it
the apple configuration files?

Hmmm.. Which binary did you install?

I installed from source.

I installed from source and was only able to yield a 64-bit binary
after setting environment variables. Like I said earlier in this
thread, I think the configuration tools look at the output of uname,
which is i386 (probably because the kernel is 32 bit, the rest of the
environment is 64 bit), and conclude that snow leopard is 32 bit.

did you try setting the proper flags for the ./configure to pass -arch
x86_64 to the compiler?

Please strike "only" from my first sentence, it was misleading. No, I
didn't try what you suggest, as I was able to build after setting
environment variables.

All I did was set the following environment variables in ~/.profile
for the duration of the hdf5 build and install:

export CFLAGS="-arch x86_64"
export LDFLAGS="-arch x86_64"
export FFLAGS="-arch x86_64"

Then I ran "./configure --prefix=/usr/local", the configuration
summary is below. I haven't installed pytables, but I am using h5py,
so I expect pytables would work as well.

      SUMMARY OF THE HDF5 CONFIGURATION

···

On Wed, Dec 2, 2009 at 9:23 AM, Robert Ferrell <ferrell@diablotech.com> wrote:

On Dec 1, 2009, at 6:26 AM, Darren Dale wrote:

On Tue, Dec 1, 2009 at 8:22 AM, Michael Jackson >> <mike.jackson@bluequartz.net> wrote:

On Dec 1, 2009, at 7:50 AM, Darren Dale wrote:

On Tue, Dec 1, 2009 at 7:44 AM, Darren Dale <dsdale24@gmail.com> wrote:

On Tue, Dec 1, 2009 at 12:15 AM, Elena Pourmal <epourmal@hdfgroup.org> >>>>> wrote:

Hi Darren,

On Nov 24, 2009, at 8:48 AM, Darren Dale wrote:

On Mon, Oct 19, 2009 at 2:02 PM, Elena Pourmal >>>>>>> <epourmal@hdfgroup.org> >>>>>>> wrote:

Hi Darren,

My machine is OS X 10.5.8 (will be upgraded soon), but I
successfully
use
compiler -arch x86_64 to build HDF5 libraries (1.8 and trunk). I
also
use
Intel 10.0 compiler to build 32 and 64-bit versions of the
libraries.
Our
pre-built binaries for 1.8.3 are 32-bit (I learned about the flag
after the
HDF5 1.8.3 release ;-).

I will build both 32 and 64-bit binaries for 1.8.4 (coming in mid
November).

I just installed hdf5-1.8.4 on snow leopard. The default
configuration
is still for 32 bit, was it not possible to add support for 64 bit it
the apple configuration files?

Hmmm.. Which binary did you install?

I installed from source.

I installed from source and was only able to yield a 64-bit binary
after setting environment variables. Like I said earlier in this
thread, I think the configuration tools look at the output of uname,
which is i386 (probably because the kernel is 32 bit, the rest of the
environment is 64 bit), and conclude that snow leopard is 32 bit.

did you try setting the proper flags for the ./configure to pass -arch
x86_64 to the compiler?

Please strike "only" from my first sentence, it was misleading. No, I
didn't try what you suggest, as I was able to build after setting
environment variables.

Darren,

   Sorry to threadjack slightly, but could you describe how you got a 64

bit build on Snow Leopard? I'm trying to build from source, so I can then
build PyTables. I'm trying:

export FC=/usr/local/bin/gfortran
export F77=/usr/local/bin/gfortran
export F90=/usr/local/bin/gfortran
export FFLAGS="-arch x86_64"
export CFLAGS="-arch x86_64"
export CC="gcc"
export ARCHFLAGS="-arch x86_64"
export MACOSX_DEPLOYMENT_TARGET="10.6"
export LDFLAGS="-arch x86_64"

and

./configure --prefix=/usr/local/Cellar/hdf5/1.8.3 --enable-cxx
--enable-fortran --disable-debug --disable-dependency-tracking
--with-zlib=yes --with-szlib=yes --enable-filters=all --enable-hl

I'm not certain I need --enable-fortran for PyTables, but I think I do. For
some reason I can't get shared libraries built, and the last make I tried
failed when trying to build h5ls.o

I don't need a 32 bit version, just x86_64. Sounds like you got that
working pretty quickly.

      =================================

General Information:
-------------------
       HDF5 Version: 1.8.4
      Configured on: Wed Dec 2 09:42:26 EST 2009
      Configured by: darren@minerva.chess.cornell.edu
     Configure mode: production
        Host system: i386-apple-darwin10.2.0
        Uname information: Darwin minerva.chess.cornell.edu 10.2.0
Darwin Kernel Version 10.2.0: Tue Nov 3 10:37:10 PST 2009;
root:xnu-1486.2.11~1/RELEASE_I386 i386
           Byte sex: little-endian
          Libraries:
       Installation point: /usr/local

Compiling Options:
------------------
               Compilation Mode: production
                     C Compiler: /usr/bin/gcc (gcc-4.2.1)
                         CFLAGS: -arch x86_64
                      H5_CFLAGS: -std=c99 -pedantic -Wall -Wextra
-Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual
-Wcast-align -Wwrite-strings -Wconversion -Waggregate-return
-Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations
-Wredundant-decls -Wnested-externs -Winline -Wno-long-long
-Wfloat-equal -Wmissing-format-attribute -Wmissing-noreturn -Wpacked
-Wdisabled-optimization -Wformat=2 -Wunreachable-code -Wendif-labels
-Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch
-Wvariadic-macros -Wnonnull -Winit-self -Wmissing-include-dirs
-Wswitch-default -Wswitch-enum -Wunused-macros
-Wunsafe-loop-optimizations -Wc++-compat -Wvolatile-register-var
-Wstrict-overflow -O -fomit-frame-pointer -finline-functions
                      AM_CFLAGS:
                       CPPFLAGS:
                    H5_CPPFLAGS: -DNDEBUG -UH5_DEBUG_API
                    AM_CPPFLAGS:
               Shared Libraries: yes
               Static Libraries: yes
  Statically Linked Executables: no
                        LDFLAGS: -arch x86_64
                     AM_LDFLAGS:
      Extra libraries: -lz -lm
            Archiver: ar
         Ranlib: ranlib
         Debugged Packages:
        API Tracing: no

Languages:
----------
                        Fortran: no
                            C++: no

Features:
---------
                  Parallel HDF5: no
             High Level library: yes
                   Threadsafety: no
            Default API Mapping: v18
With Deprecated Public Symbols: yes
         I/O filters (external): deflate(zlib)
         I/O filters (internal): shuffle,fletcher32,nbit,scaleoffset
                            MPE: no
                     Direct VFD: no
                        dmalloc: no
Clear file buffers before write: yes
           Using memory checker: no
         Function Stack Tracing: no
                           GPFS: no
      Strict File Format Checks: no
   Optimization Instrumentation: no
Linux Large File Support (LFS): no

Darren,

Thanks for the help. That worked for me, tests pass, and PyTables built and seems to be working, too.

(Apologies for top-posting, but I thought I'd bring the good info to the top of this post for the next person looking for help on Snow Leopard.)

thanks,
-robert

···

On Dec 2, 2009, at 7:45 AM, Darren Dale wrote:

All I did was set the following environment variables in ~/.profile
for the duration of the hdf5 build and install:

export CFLAGS="-arch x86_64"
export LDFLAGS="-arch x86_64"
export FFLAGS="-arch x86_64"

Then I ran "./configure --prefix=/usr/local", the configuration
summary is below. I haven't installed pytables, but I am using h5py,
so I expect pytables would work as well.

      SUMMARY OF THE HDF5 CONFIGURATION
      =================================

General Information:
-------------------
       HDF5 Version: 1.8.4
      Configured on: Wed Dec 2 09:42:26 EST 2009
      Configured by: darren@minerva.chess.cornell.edu
     Configure mode: production
        Host system: i386-apple-darwin10.2.0
        Uname information: Darwin minerva.chess.cornell.edu 10.2.0
Darwin Kernel Version 10.2.0: Tue Nov 3 10:37:10 PST 2009;
root:xnu-1486.2.11~1/RELEASE_I386 i386
           Byte sex: little-endian
          Libraries:
       Installation point: /usr/local

Compiling Options:
------------------
              Compilation Mode: production
                    C Compiler: /usr/bin/gcc (gcc-4.2.1)
                        CFLAGS: -arch x86_64
                     H5_CFLAGS: -std=c99 -pedantic -Wall -Wextra
-Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual
-Wcast-align -Wwrite-strings -Wconversion -Waggregate-return
-Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations
-Wredundant-decls -Wnested-externs -Winline -Wno-long-long
-Wfloat-equal -Wmissing-format-attribute -Wmissing-noreturn -Wpacked
-Wdisabled-optimization -Wformat=2 -Wunreachable-code -Wendif-labels
-Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch
-Wvariadic-macros -Wnonnull -Winit-self -Wmissing-include-dirs
-Wswitch-default -Wswitch-enum -Wunused-macros
-Wunsafe-loop-optimizations -Wc++-compat -Wvolatile-register-var
-Wstrict-overflow -O -fomit-frame-pointer -finline-functions
                     AM_CFLAGS:
                      CPPFLAGS:
                   H5_CPPFLAGS: -DNDEBUG -UH5_DEBUG_API
                   AM_CPPFLAGS:
              Shared Libraries: yes
              Static Libraries: yes
Statically Linked Executables: no
                       LDFLAGS: -arch x86_64
                    AM_LDFLAGS:
     Extra libraries: -lz -lm
           Archiver: ar
        Ranlib: ranlib
        Debugged Packages:
        API Tracing: no

Languages:
----------
                       Fortran: no
                           C++: no

Features:
---------
                 Parallel HDF5: no
            High Level library: yes
                  Threadsafety: no
           Default API Mapping: v18
With Deprecated Public Symbols: yes
        I/O filters (external): deflate(zlib)
        I/O filters (internal): shuffle,fletcher32,nbit,scaleoffset
                           MPE: no
                    Direct VFD: no
                       dmalloc: no
Clear file buffers before write: yes
          Using memory checker: no
        Function Stack Tracing: no
                          GPFS: no
     Strict File Format Checks: no
  Optimization Instrumentation: no
Linux Large File Support (LFS): no

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@hdfgroup.org
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org