I’ve searched everywhere and can’t find how to solve this compile problem on my Mac:
C preprocessor "/lib/cpp" fails sanity check
Update: I'm trying to compile psqlodbc with ./configure I get the following:
configure: error: C preprocessor "/lib/cpp" fails sanity check
Would someone be so kind as to tell me what to check to begin sorting out what could be wrong? I have read that the problem is usually caused by multiple versions of the compiler and XCode. But, I have no idea how to even begin. Thanks!
Here is my output:
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... config/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking -Wall is a valid compile option... yes
./configure: line 4392: /usr/local/iODBC: is a directory
./configure: line 4395: /usr/local/iODBC: is a directory
configure: using
checking last argument to SQLColAttribute is SQLLEN *... no
checking for pg_config... no
checking for prove... prove
checking build system type... x86_64-apple-darwin17.5.0
checking host system type... x86_64-apple-darwin17.5.0
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 196608
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-apple-darwin17.5.0 file names to x86_64-apple-darwin17.5.0 format... func_convert_file_noop
checking how to convert x86_64-apple-darwin17.5.0 file names to toolchain format... func_convert_file_noop
checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... dlltool
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... no
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... failed
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... no
checking for -exported_symbols_list linker flag... yes
checking for -force_load linker flag... no
checking how to run the C preprocessor... /lib/cpp
configure: error: in `/Users/tedhtl/Downloads/psqlodbc-10.01.0000':
configure: error: C preprocessor "/lib/cpp" fails sanity check
go to http://developer.apple.com/xcode and click on the blue "Download" button in the upper right corner. After you log into the website, scroll to the bottom of the page and you'll see a "See More Downloads" link.
Look for "Command Line Tools" in the list of dmg files. It should look like this:
Get that DMG and then double click on the installer. It installs tools (like /usr/bin/cpp
) that you can access from your command line (or Terminal.app).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With