ls: cannot access 'Boost-for-Android/build/install/libs/arm64-v8a': No such file or directory
Closed this issue · 12 comments
I am building it on Windows, i changed do.sh
to:
execute do.sh
, it throw errors:
I checked the D:\Dependency\Boost-for-Android\build\install
, found there is only a include
folder
I look into the code, find the erroe occurs at here.
I am wondering when was boost_for_android/build/install/libs/ABI_NAME
created
BTW, i see in example-app, it add specific boost module, how to all all of boost module ?
Hello
I am building it on Windows, i changed
do.sh
to:execute
do.sh
, it throw errors:I checked the
D:\Dependency\Boost-for-Android\build\install
, found there is only ainclude
folder I look into the code, find the erroe occurs at here. I am wondering when wasboost_for_android/build/install/libs/ABI_NAME
created
Building on windows is only officially supported via docker or virtual machines. But MingGW should work without much trouble too (I just havent had the time to test it).
The error message seems to indicate it just cant delete/create the dirs where it wants to put the built files. I recommend uncommenting the lines you quoted and get more info. Maybe its a user permission issue or some other problem with the path (mingw access to the windows dir) etc
BTW, i see in example-app, it add specific boost module, how to all all of boost module ?
You would need to add each (dynamic) library individually.
If you want all, it might be easier to use the static libs
I also try to build boost in virtual machine, but still encounter this issue:
I think i shoud have full permission:
As you said, i can either use the prebuilt libs, yes, i finnal choose this method, i just need to modify the code the adapt the higher version boost, but anyway at least my code can works now ~
Glad you got the prebuilt libs working.
If you want to sort out building yourself, I would suggest modifying the script so that you isolate exactly the step that causes the problem. (eg By commenting out lines starting esp at the end of __build.sh
). Also try reenabling some debug info eg by uncommenting lines like:
# echo "checking file " $Del_File
You could also look in the ${BUILD_DIR}/build.log).
is the file version_ndk.hpp
getting written correctly ?
does install/libs
exist?
Its either trying to write to a dir that isnt there or create one that it doesnt have permission to write into. You just have to figure out which and why.
I think. I see where the root cause might be:
In do.sh
you have left"LINKAGES
" empty. You need to specify here whether you want static, dynamic or both kinds of libs
You are right ! I am careless to set LINKAGES
! After set it, rerun ./do.sh
, the build process move forward a lot, but after building a few minutes, i got another error unknown argument '-emit-pth'; did you mean '-emit-pch'?
, some of the log:
...on 200th target...
common.mkdir /home/xjsd/repo/boost_for_android/build/tmp/arm64-v8a/boost/bin.v2/libs/math/build/clang-linux-arm64v8a/release/abi-aapcs/link-static
common.mkdir /home/xjsd/repo/boost_for_android/build/tmp/arm64-v8a/boost/bin.v2/libs/math/build/clang-linux-arm64v8a/release/abi-aapcs/link-static/target-os-android
common.mkdir /home/xjsd/repo/boost_for_android/build/tmp/arm64-v8a/boost/bin.v2/libs/math/build/clang-linux-arm64v8a/release/abi-aapcs/link-static/target-os-android/threading-multi
common.mkdir /home/xjsd/repo/boost_for_android/build/tmp/arm64-v8a/boost/bin.v2/libs/math/build/clang-linux-arm64v8a/release/abi-aapcs/link-static/target-os-android/threading-multi/..
common.mkdir /home/xjsd/repo/boost_for_android/build/tmp/arm64-v8a/boost/bin.v2/libs/math/build/clang-linux-arm64v8a/release/abi-aapcs/link-static/target-os-android/threading-multi/../src
common.mkdir /home/xjsd/repo/boost_for_android/build/tmp/arm64-v8a/boost/bin.v2/libs/math/build/clang-linux-arm64v8a/release/abi-aapcs/link-static/target-os-android/threading-multi/../src/tr1
clang-linux.compile.c++.pch /home/xjsd/repo/boost_for_android/build/tmp/arm64-v8a/boost/bin.v2/libs/math/build/clang-linux-arm64v8a/release/abi-aapcs/link-static/target-os-android/threading-multi/../src/tr1/pch.hpp.pth
error: unknown argument '-emit-pth'; did you mean '-emit-pch'?
rm -f "/home/xjsd/repo/boost_for_android/build/tmp/arm64-v8a/boost/bin.v2/libs/math/build/clang-linux-arm64v8a/release/abi-aapcs/link-static/target-os-android/threading-multi/../src/tr1/pch.hpp.pth" && "clang++" -x c++-header -O3 -Wno-inline -Wall -DBOOST_ALL_NO_LIB=1 -DBOOST_BUILD_PCH_ENABLED -DNDEBUG -I"." -I"libs/math/src/tr1" -Xclang -emit-pth -o "/home/xjsd/repo/boost_for_android/build/tmp/arm64-v8a/boost/bin.v2/libs/math/build/clang-linux-arm64v8a/release/abi-aapcs/link-static/target-os-android/threading-multi/../src/tr1/pch.hpp.pth" "libs/math/build/../src/tr1/pch.hpp"
...failed clang-linux.compile.c++.pch /home/xjsd/repo/boost_for_android/build/tmp/arm64-v8a/boost/bin.v2/libs/math/build/clang-linux-arm64v8a/release/abi-aapcs/link-static/target-os-android/threading-multi/../src/tr1/pch.hpp.pth...
...skipped <p/home/xjsd/repo/boost_for_android/build/tmp/arm64-v8a/boost/bin.v2/libs/math/build/clang-linux-arm64v8a/release/abi-aapcs/link-static/target-os-android/threading-multi>assoc_laguerre.o for lack of <p/home/xjsd/repo/boost_for_android/build/tmp/arm64-v8a/boost/bin.v2/libs/math/build/clang-linux-arm64v8a/release/abi-aapcs/link-static/target-os-android/threading-multi>../src/tr1/pch.hpp.pth...
clang-linux.compile.c++.without-pth /home/xjsd/repo/boost_for_android/build/tmp/arm64-v8a/boost/bin.v2/libs/log/build/clang-linux-arm64v8a/release/abi-aapcs/link-static/target-os-android/threading-multi/setup/default_formatter_factory.o
...failed updating 1 target...
...skipped 1 target...
...updated 205 targets...
Error: Failed to build boost for arm64-v8a!
writing NDK version 21.3.6528147 to /home/xjsd/repo/boost_for_android/build/install/include/boost/version_ndk.hpp
built boost to /home/xjsd/repo/boost_for_android/build/install
I search emit-pth
in this repo, found base_clang++ has emit-pth
, i change it to emit-pch
, rerun ./do.sh
,but still got the same error
Seems you are using ndk version 21?
This could be a problem with boost (build) itself calling the clang in this ndk with a parameter it doesnt understand.
Please try the boost (1.79.0) and ndk (25) combination as in my latest release
I see you upload ndk_21_boost_1.72.0, so i try to build boost 1.72.0 with ndk 21 on my computer, it turns out success, so the version of ndk and boost matters
Yes, each boost and ndk version may have their own bugs and quirks. In general its not possible to combine arbitrary versions (without manual intervention). Some boost versions eg 1.71.0 need code adaptations before they build properly.
I try to support the latest ndk with the latest boost, in regular intervals.
Were you able to build with MinGW?