0

I am attempting to install libzdb on my macbook however I see the following error message when running the configure: configure:13334: error: setjmp is required

the setjmp.h file resides within /usr/include and is specified within my "$PATH" as

/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/include

Can someone please advise as to how i can rectify this issue?

thanks in advance

godzilla
  • 3,005
  • 7
  • 44
  • 60

2 Answers2

0

I've stumbled across this error while building one of my own programs when I wanted to use setjmp() and longjmp(). For some reason, the toolchain that resides in / on OS X is flawed, and the <setjmp.h> header file is missing the declarations and data types.

To fix it, I had to download Xcode (damn!) and tell the compiler to look for the headers in the freshly installed MacOSX10.7.sdk (or 8) folder:

clang -Wall -o foo foo.c -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk
  • hi there, thanks for sharing, i have installed the latest Xcode, however if i run the following: ./configure CPPFLAGS=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk, i see an error much early on complaining that it was unable to produce an executable – godzilla Aug 22 '13 at 15:59
  • @godzilla Because you haven't read my answer carefully enough. –  Aug 22 '13 at 16:00
0

ok finally figured it out. For those who have seen messages like this be warned that the configure logs can be misleading. It turned out the binary built fine, however it was failing during runtime because a few mysql libraries could not be found. using the following command *export DYLD_LIBRARY_PATH=/usr/local/mysql/lib/* would fix the problem

godzilla
  • 3,005
  • 7
  • 44
  • 60