OS X Mavericks

6789
15
10-31-2013 02:15 PM
JohnTull
New Contributor II
It appears that the available binary API is not compatible with the new OS X 10.9 Mavericks. Can anyone else confirm or deny this? I am unable to build gdal support for FileGDB, and I suspect it is due to changes in the available libs in 10.9 versus older OS versions.
15 Replies
SimonNorris
New Contributor
ah, I see the problem. I just copied and pasted the install_name_tool commands. My fgdb files weren't in quite the right spot.

thanks again for posting the workaround @jctull !
0 Kudos
SimonNorris
New Contributor
Actually, after fixing the paths in the install_name_tool commands I'm still having problems.
I'm not sure how to debug this.

I'm using this method to get fgdb support in gdal:
http://blog.burhum.com/post/34851795066/installing-gdal-ogr-with-filegdb-support-on-osx-with

I copy the api lib and include files to /usr/local/lib /usr/local/include and install gdal no problem, the FileGDB format is recognized by ogrinfo. And it looks like the install_name_tool commands successfully change the gcc reference:

$ install_name_tool -change /usr/lib/libstdc++.6.dylib /usr/local/Cellar/gcc49/4.9-20131103/lib/gcc/x86_64-apple-darwin13.0.0/4.9.0/libstdc++.dylib /usr/local/lib/libFileGDBAPI.dylib

$ install_name_tool -change /usr/lib/libstdc++.6.dylib /usr/local/Cellar/gcc49/4.9-20131103/lib/gcc/x86_64-apple-darwin13.0.0/4.9.0/libstdc++.dylib /usr/local/lib/libfgdbunixrtl.dylib

$ otool -L libFileGDBAPI.dylib
libFileGDBAPI.dylib:
 @rpath/libFileGDBAPI.dylib (compatibility version 0.0.0, current version 0.0.0)
 @rpath/libfgdbunixrtl.dylib (compatibility version 0.0.0, current version 0.0.0)
 /usr/local/Cellar/gcc49/4.9-20131103/lib/gcc/x86_64-apple-darwin13.0.0/4.9.0/libstdc++.dylib (compatibility version 7.0.0, current version 52.0.0)
 /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0)

$ otool -L libfgdbunixrtl.dylib
libfgdbunixrtl.dylib:
 @rpath/libfgdbunixrtl.dylib (compatibility version 0.0.0, current version 0.0.0)
 /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0)
 /usr/local/Cellar/gcc49/4.9-20131103/lib/gcc/x86_64-apple-darwin13.0.0/4.9.0/libstdc++.dylib (compatibility version 7.0.0, current version 52.0.0)


but still no luck using the api:
$ ogrinfo Misc.gdb
ogrinfo(81745,0x7fff797e2310) malloc: *** error for object 0x10d219de0: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Abort trap: 6
0 Kudos
SimonNorris
New Contributor
For my purposes (just using the api with a homebrewed ogr/gdal for data conversions) @dakcarto's gdal-filegdb formula works fine without dealing with compiler issues. Installing the api as a plugin seems to be the key.

https://github.com/dakcarto/homebrew-osgeo4mac/issues/8


# Place FileGDB_API_1_3-64.zip archive in GDAL_THIRD_PARTY directory 
export GDAL_THIRD_PARTY=  #/path/to/gdb-api-zipfile
brew install gdal --enable-unsupported --with-postgresql
brew tap dakcarto/osgeo4mac
brew install gdal-filegdb
export GDAL_DRIVER_PATH=  #{HOMEBREW_PREFIX}/lib/gdalplugins
0 Kudos
Celeste_SuliinBurris
New Contributor III
I can't build GDAL with the File GDB API. I'm leary of installing Homebrew, because all my stuff was built by hand, and goodness knows what it would break. ESRI - Please fix!
0 Kudos
PaulAustin
Occasional Contributor
On Mavericks you can use clang++ instead of g++ with the following options for compiling and linking. That way you don't need to change the library locations using libtool.

-stdlib=libstdc++ -mmacosx-version-min=10.6

I got this from the following page.

https://support.enthought.com/entries/26184115-GCC-Clang-and-Cython-in-OS-X-10-9-Mavericks
0 Kudos
ChristinaGutierrez
New Contributor
For my purposes (just using the api with a homebrewed ogr/gdal for data conversions) @dakcarto's gdal-filegdb formula works fine without dealing with compiler issues. Installing the api as a plugin seems to be the key.

https://github.com/dakcarto/homebrew-osgeo4mac/issues/8


# Place FileGDB_API_1_3-64.zip archive in GDAL_THIRD_PARTY directory 
export GDAL_THIRD_PARTY=  #/path/to/gdb-api-zipfile
brew install gdal --enable-unsupported --with-postgresql
brew tap dakcarto/osgeo4mac
brew install gdal-filegdb
export GDAL_DRIVER_PATH=  #{HOMEBREW_PREFIX}/lib/gdalplugins


This worked perfectly for me with homebrewed gdal & gdal-filegdb installs -- thanks. Was the only thing that did.
$ ogrinfo --formats
Supported Formats:
  -> "FileGDB" (read/write)
...
0 Kudos