fusesource/leveldbjni

build failed on max os, cannot find headers for leveldb/db.h

Closed this issue · 1 comments

I have done exactly as the readme.

two problems:

  1. [INFO] configure: WARNING: unrecognized options: --disable-ccache

[INFO] checking leveldb/db.h usability... no
[INFO] checking leveldb/db.h presence... no
[INFO] checking for leveldb/db.h... no
[INFO] configure: error: cannot find headers for leveldb

These are the output of the command:
mvn clean install -P download -P osx

[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.fusesource.leveldbjni:leveldbjni:jar:99-master-SNAPSHOT
[WARNING] 'build.plugins.plugin.(groupId:artifactId)' must be unique but found duplicate declaration of plugin org.apache.maven.plugins:maven-jar-plugin @ line 168, column 15
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] leveldbjni-project
[INFO] leveldbjni
[INFO] leveldbjni-osx
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building leveldbjni-project 99-master-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ leveldbjni-project ---
[INFO]
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ leveldbjni-project ---
[INFO] Installing /Users/zhuhaidong/projects/leveldb-jni/pom.xml to /Users/zhuhaidong/.m2/repository/org/fusesource/leveldbjni/leveldbjni-project/99-master-SNAPSHOT/leveldbjni-project-99-master-SNAPSHOT.pom
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building leveldbjni 99-master-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ leveldbjni ---
[INFO] Deleting file set: /Users/zhuhaidong/projects/leveldb-jni/leveldbjni/target (included: [**], excluded: [])
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ leveldbjni ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ leveldbjni ---
[INFO] Compiling 23 source files to /Users/zhuhaidong/projects/leveldb-jni/leveldbjni/target/classes
[INFO]
[INFO] --- maven-hawtjni-plugin:1.9:generate (default) @ leveldbjni ---
[INFO] Analyzing classes...
[INFO] Generating...
[INFO] Wrote: /Users/zhuhaidong/projects/leveldb-jni/leveldbjni/target/generated-sources/hawtjni/native-src/leveldbjni.cpp
[INFO] Wrote: /Users/zhuhaidong/projects/leveldb-jni/leveldbjni/target/generated-sources/hawtjni/native-src/leveldbjni_stats.h
[INFO] Wrote: /Users/zhuhaidong/projects/leveldb-jni/leveldbjni/target/generated-sources/hawtjni/native-src/leveldbjni_stats.cpp
[INFO] Wrote: /Users/zhuhaidong/projects/leveldb-jni/leveldbjni/target/generated-sources/hawtjni/native-src/leveldbjni_structs.h
[INFO] Wrote: /Users/zhuhaidong/projects/leveldb-jni/leveldbjni/target/generated-sources/hawtjni/native-src/leveldbjni_structs.cpp
[INFO] Wrote: /Users/zhuhaidong/projects/leveldb-jni/leveldbjni/target/generated-sources/hawtjni/native-src/hawtjni.h
[INFO] Wrote: /Users/zhuhaidong/projects/leveldb-jni/leveldbjni/target/generated-sources/hawtjni/native-src/hawtjni.c
[INFO] Wrote: /Users/zhuhaidong/projects/leveldb-jni/leveldbjni/target/generated-sources/hawtjni/native-src/windows/stdint.h
[INFO] Done.
[INFO]
[INFO] --- maven-bundle-plugin:2.0.1:manifest (bundle-manifest) @ leveldbjni ---
[WARNING] Warning in manifest for org.fusesource.leveldbjni:leveldbjni:jar:99-master-SNAPSHOT : Superfluous export-package instructions: [org.fusesource, org]
[INFO]
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ leveldbjni ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/zhuhaidong/projects/leveldb-jni/leveldbjni/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ leveldbjni ---
[INFO] Compiling 1 source file to /Users/zhuhaidong/projects/leveldb-jni/leveldbjni/target/test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.4.3:test (default-test) @ leveldbjni ---
[INFO] Surefire report directory: /Users/zhuhaidong/projects/leveldb-jni/leveldbjni/target/surefire-reports


T E S T S

There are no tests to run.

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

[INFO]
[INFO] --- maven-jar-plugin:2.3.1:jar (default-jar) @ leveldbjni ---
[INFO] Building jar: /Users/zhuhaidong/projects/leveldb-jni/leveldbjni/target/leveldbjni-99-master-SNAPSHOT.jar
[INFO]
[INFO] --- maven-jar-plugin:2.3.1:test-jar (default) @ leveldbjni ---
[INFO] Building jar: /Users/zhuhaidong/projects/leveldb-jni/leveldbjni/target/leveldbjni-99-master-SNAPSHOT-tests.jar
[INFO]
[INFO] --- maven-hawtjni-plugin:1.9:package-source (default) @ leveldbjni ---
[INFO] Building zip: /Users/zhuhaidong/projects/leveldb-jni/leveldbjni/target/leveldbjni-99-master-SNAPSHOT-native-src.zip
[INFO]
[INFO] --- maven-source-plugin:2.2.1:jar-no-fork (attach-sources) @ leveldbjni ---
[INFO] Building jar: /Users/zhuhaidong/projects/leveldb-jni/leveldbjni/target/leveldbjni-99-master-SNAPSHOT-sources.jar
[INFO]
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ leveldbjni ---
[INFO] Installing /Users/zhuhaidong/projects/leveldb-jni/leveldbjni/target/leveldbjni-99-master-SNAPSHOT.jar to /Users/zhuhaidong/.m2/repository/org/fusesource/leveldbjni/leveldbjni/99-master-SNAPSHOT/leveldbjni-99-master-SNAPSHOT.jar
[INFO] Installing /Users/zhuhaidong/projects/leveldb-jni/leveldbjni/pom.xml to /Users/zhuhaidong/.m2/repository/org/fusesource/leveldbjni/leveldbjni/99-master-SNAPSHOT/leveldbjni-99-master-SNAPSHOT.pom
[INFO] Installing /Users/zhuhaidong/projects/leveldb-jni/leveldbjni/target/leveldbjni-99-master-SNAPSHOT-tests.jar to /Users/zhuhaidong/.m2/repository/org/fusesource/leveldbjni/leveldbjni/99-master-SNAPSHOT/leveldbjni-99-master-SNAPSHOT-tests.jar
[INFO] Installing /Users/zhuhaidong/projects/leveldb-jni/leveldbjni/target/leveldbjni-99-master-SNAPSHOT-native-src.zip to /Users/zhuhaidong/.m2/repository/org/fusesource/leveldbjni/leveldbjni/99-master-SNAPSHOT/leveldbjni-99-master-SNAPSHOT-native-src.zip
[INFO] Installing /Users/zhuhaidong/projects/leveldb-jni/leveldbjni/target/leveldbjni-99-master-SNAPSHOT-sources.jar to /Users/zhuhaidong/.m2/repository/org/fusesource/leveldbjni/leveldbjni/99-master-SNAPSHOT/leveldbjni-99-master-SNAPSHOT-sources.jar
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building leveldbjni-osx 99-master-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ leveldbjni-osx ---
[INFO] Deleting file set: /Users/zhuhaidong/projects/leveldb-jni/leveldbjni-osx/target (included: [**], excluded: [])
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ leveldbjni-osx ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/zhuhaidong/projects/leveldb-jni/leveldbjni-osx/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ leveldbjni-osx ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-hawtjni-plugin:1.9:build (default) @ leveldbjni-osx ---
[INFO] Extracting /Users/zhuhaidong/projects/leveldb-jni/leveldbjni/target/leveldbjni-99-master-SNAPSHOT-native-src.zip to /Users/zhuhaidong/projects/leveldb-jni/leveldbjni-osx/target/native-build-extracted
[INFO] executing: /bin/sh -c ./configure --disable-ccache --prefix=/Users/zhuhaidong/projects/leveldb-jni/leveldbjni-osx/target/native-build/target --with-leveldb=/Users/zhuhaidong/project/leveldb --with-snappy=/Users/zhuhaidong/project/snappy-1.0.5 --with-universal
[INFO] configure: WARNING: unrecognized options: --disable-ccache
[INFO] checking build system type... x86_64-apple-darwin12.5.0
[INFO] checking host system type... x86_64-apple-darwin12.5.0
[INFO] checking target system type... x86_64-apple-darwin12.5.0
[INFO] checking for g++... g++
[INFO] checking whether the C++ compiler works... yes
[INFO] checking for C++ compiler default output file name... a.out
[INFO] checking for suffix of executables...
[INFO] checking whether we are cross compiling... no
[INFO] checking for suffix of object files... o
[INFO] checking whether we are using the GNU C++ compiler... yes
[INFO] checking whether g++ accepts -g... yes
[INFO] checking for a BSD-compatible install... /usr/bin/install -c
[INFO] checking how to print strings... printf
[INFO] checking for gcc... gcc
[INFO] checking whether we are using the GNU C compiler... yes
[INFO] checking whether gcc accepts -g... yes
[INFO] checking for gcc option to accept ISO C89... none needed
[INFO] checking for a sed that does not truncate output... /usr/bin/sed
[INFO] checking for grep that handles long lines and -e... /usr/bin/grep
[INFO] checking for egrep... /usr/bin/grep -E
[INFO] checking for fgrep... /usr/bin/grep -F
[INFO] checking for ld used by gcc... /usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld
[INFO] checking if the linker (/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld) is GNU ld... no
[INFO] checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm
[INFO] checking the name lister (/usr/bin/nm) interface... BSD nm
[INFO] checking whether ln -s works... yes
[INFO] checking the maximum length of command line arguments... 196608
[INFO] checking whether the shell understands some XSI constructs... yes
[INFO] checking whether the shell understands "+="... yes
[INFO] checking how to convert x86_64-apple-darwin12.5.0 file names to x86_64-apple-darwin12.5.0 format... func_convert_file_noop
[INFO] checking how to convert x86_64-apple-darwin12.5.0 file names to toolchain format... func_convert_file_noop
[INFO] checking for /usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld option to reload object files... -r
[INFO] checking for objdump... no
[INFO] checking how to recognize dependent libraries... pass_all
[INFO] checking for dlltool... no
[INFO] checking how to associate runtime and link libraries... printf %s\n
[INFO] checking for ar... ar
[INFO] checking for archiver @file support... no
[INFO] checking for strip... strip
[INFO] checking for ranlib... ranlib
[INFO] checking for gawk... no
[INFO] checking for mawk... no
[INFO] checking for nawk... no
[INFO] checking for awk... awk
[INFO] checking command to parse /usr/bin/nm output from gcc object... ok
[INFO] checking for sysroot... no
[INFO] checking for mt... no
[INFO] checking if : is a manifest tool... no
[INFO] checking for dsymutil... dsymutil
[INFO] checking for nmedit... nmedit
[INFO] checking for lipo... lipo
[INFO] checking for otool... otool
[INFO] checking for otool64... no
[INFO] checking for -single_module linker flag... yes
[INFO] checking for -exported_symbols_list linker flag... yes
[INFO] checking for -force_load linker flag... yes
[INFO] checking how to run the C preprocessor... gcc -E
[INFO] checking for ANSI C header files... yes
[INFO] checking for sys/types.h... yes
[INFO] checking for sys/stat.h... yes
[INFO] checking for stdlib.h... yes
[INFO] checking for string.h... yes
[INFO] checking for memory.h... yes
[INFO] checking for strings.h... yes
[INFO] checking for inttypes.h... yes
[INFO] checking for stdint.h... yes
[INFO] checking for unistd.h... yes
[INFO] checking for dlfcn.h... yes
[INFO] checking for objdir... .libs
[INFO] checking if gcc supports -fno-rtti -fno-exceptions... no
[INFO] checking for gcc option to produce PIC... -fno-common -DPIC
[INFO] checking if gcc PIC flag -fno-common -DPIC works... yes
[INFO] checking if gcc static flag -static works... no
[INFO] checking if gcc supports -c -o file.o... yes
[INFO] checking if gcc supports -c -o file.o... (cached) yes
[INFO] checking whether the gcc linker (/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld) supports shared libraries... yes
[INFO] checking dynamic linker characteristics... darwin12.5.0 dyld
[INFO] checking how to hardcode library paths into programs... immediate
[INFO] checking whether stripping libraries is possible... yes
[INFO] checking if libtool supports shared libraries... yes
[INFO] checking whether to build shared libraries... yes
[INFO] checking whether to build static libraries... no
[INFO] checking how to run the C++ preprocessor... g++ -E
[INFO] checking for ld used by g++... /usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld
[INFO] checking if the linker (/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld) is GNU ld... no
[INFO] checking whether the g++ linker (/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld) supports shared libraries... yes
[INFO] checking for g++ option to produce PIC... -fno-common -DPIC
[INFO] checking if g++ PIC flag -fno-common -DPIC works... yes
[INFO] checking if g++ static flag -static works... no
[INFO] checking if g++ supports -c -o file.o... yes
[INFO] checking if g++ supports -c -o file.o... (cached) yes
[INFO] checking whether the g++ linker (/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld) supports shared libraries... yes
[INFO] checking dynamic linker characteristics... darwin12.5.0 dyld
[INFO] checking how to hardcode library paths into programs... immediate
[INFO] checking the archiver (ar) interface... ar
[INFO] configure: JAVA_HOME was set, checking to see if it's a JDK we can use...
[INFO] checking if '/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home' is a JDK... no
[INFO] configure: javac was on your path, checking to see if it's part of a JDK we can use...
[INFO] checking if '/System/Library/Frameworks/JavaVM.framework/Versions/Current' is a JDK... yes
[INFO] checking pthread.h usability... yes
[INFO] checking pthread.h presence... yes
[INFO] checking for pthread.h... yes
[INFO] checking leveldb/db.h usability... no
[INFO] checking leveldb/db.h presence... no
[INFO] checking for leveldb/db.h... no
[INFO] configure: error: cannot find headers for leveldb
[INFO] rc: 1
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] leveldbjni-project ................................ SUCCESS [0.358s]
[INFO] leveldbjni ........................................ SUCCESS [10.958s]
[INFO] leveldbjni-osx .................................... FAILURE [4.637s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16.401s
[INFO] Finished at: Wed Sep 25 18:07:59 CST 2013
[INFO] Final Memory: 13M/255M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.fusesource.hawtjni:maven-hawtjni-plugin:1.9:build (default) on project leveldbjni-osx: build failed: org.apache.maven.plugin.MojoExecutionException: ./configure failed with exit code: 1 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :leveldbjni-osx

Used wrong leveldb version
Should use this:
git clone git://github.com/chirino/leveldb.git