Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAC m1 上LAC的Java调用方式make失败 #268

Open
wdm101 opened this issue Feb 10, 2023 · 0 comments
Open

MAC m1 上LAC的Java调用方式make失败 #268

wdm101 opened this issue Feb 10, 2023 · 0 comments

Comments

@wdm101
Copy link

wdm101 commented Feb 10, 2023

  1. OS环境:mac m1 13.2
  2. Paddle的预测库下载的是m1 版的C++预测库
  3. Java是openjdk11
  4. cmake 3.25.2

编译JNI,执行make install后出现错误:
make[2]: *** No rule to make target /Users/wang/Downloads/paddle_inference/paddle/lib/libpaddle_fluid.a', needed by liblacjni.dylib'. Stop.
make[1]: *** [CMakeFiles/lacjni.dir/all] Error 2
make: *** [all] Error 2

cmake log

cmake -DPADDLE_ROOT=$PADDLE_ROOT
-DJAVA_HOME=$JAVA_HOME
-DWITH_JNILIB=ON
-DWITH_DEMO=OFF
CMake Warning:
No source or binary directory provided. Both will be assumed to be the
same as the current working directory, but note that this warning will
become a fatal error in future CMake releases.

-- CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++, version: AppleClang 14.0.0.14000029
-- C compiler: /Library/Developer/CommandLineTools/usr/bin/cc, version: AppleClang 14.0.0.14000029
-- paddle include: /Users/wang/Downloads/paddle_inference/paddle/include
-- paddle lib: /Users/wang/Downloads/paddle_inference/paddle/lib
-- MKLDNN lib not found.
-- MKLML lib not found.
-- openblas lib found.
-- '/Users/wang/Desktop/test/lacbaidu/lac' output dir
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/wang/Desktop/test/lacbaidu/lac

make install log

make install
[ 9%] Building CXX object CMakeFiles/lac.dir/c++/src/ahocorasick.cpp.o
[ 18%] Building CXX object CMakeFiles/lac.dir/c++/src/lac.cpp.o
[ 27%] Building CXX object CMakeFiles/lac.dir/c++/src/lac_custom.cpp.o
[ 36%] Building CXX object CMakeFiles/lac.dir/c++/src/lac_util.cpp.o
[ 45%] Linking CXX static library liblac.a
[ 45%] Built target lac
[ 54%] Building CXX object CMakeFiles/lacjni.dir/c++/src/ahocorasick.cpp.o
[ 63%] Building CXX object CMakeFiles/lacjni.dir/c++/src/lac.cpp.o
[ 72%] Building CXX object CMakeFiles/lacjni.dir/c++/src/lac_custom.cpp.o
[ 81%] Building CXX object CMakeFiles/lacjni.dir/c++/src/lac_util.cpp.o
[ 90%] Building CXX object CMakeFiles/lacjni.dir/java/cpp/lac_jni.cpp.o
make[2]: *** No rule to make target /Users/wang/Downloads/paddle_inference/paddle/lib/libpaddle_fluid.a', needed by liblacjni.dylib'. Stop.
make[1]: *** [CMakeFiles/lacjni.dir/all] Error 2
make: *** [all] Error 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant