Mac link error: ld: unknown option: --version-script
Created by: JiayiFeng
Line 16 of the paddle/fluid/inference/CMakeLists.txt
:
https://github.com/PaddlePaddle/Paddle/blob/898e0ffa210551149cc411a3be366e8d36aeb67b/paddle/fluid/inference/CMakeLists.txt#L16
However, ld
of MacOS doesn't support --version-script
, so this line will lead to a link error on Mac:
ld: unknown option: --version-script
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [paddle/fluid/inference/libpaddle_fluid.dylib] Error 1
make[1]: *** [paddle/fluid/inference/CMakeFiles/paddle_fluid_shared.dir/all] Error 2
make: *** [all] Error 2