Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
268 views
in Technique[技术] by (71.8m points)

c++ - How to build boost 1.69.0 for Android with NDK r18b using dec1/Boost-for-Android?

I tried to use https://github.com/dec1/Boost-for-Android to compile boost for Android. It reports 1.69.0 is supported for NDK r18b. I'm under Windows 7.

Even if this is reported as working, I encounter many problems when trying to run the provided script:

  • Downloaded boost 1.69.0
  • Downloaded sources
  • Modified BOOST_SRC_DIR to point to folder containing "1.69.0" boost folder
  • Modified ANDROID_NDK_ROOT to point to ndk folder
  • Modified ABIS="armeabi-v7a,x86"
  • Modified LINKAGE="static"
  • Added Cygwin to my path (as this is a .sh file I need to run)
  • Ran doIt.sh Got non blocking errors:
  -nLe fichier sp?cifi? est introuvable.
  ERROR: Unsupported HOST_TAG: windows-x86_64
  • Then I got final error
## COMMAND: mkdir /tmp/ndk-/tmp/build-11600/build-boost/armeabi-v7a/llvm/host-bin
## COMMAND: ./bootstrap.sh --with-toolset=cc  Building Boost.Build engine
with toolset cc...    Failed to build Boost.Build build engine    Consult
'bootstrap.log' for more details  ERROR: Could not bootstrap Boost build
'bootstrap.log'reports gcc: not found
  • Added MinGW to my PATH (to have gcc be found), then retried:

    Now I get in 'bootstrap.log':

cc -o bootstrap/jam0 command.c compile.c constants.c debug.c execcmd.c frames.c function.c glob.c hash.c hdrmacro.c headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c object.c option.c output.c parse.c pathsys.c regexp.c rules.c scan.c search.c subst.c timestamp.c variable.c modules.c strings.c filesys.c builtins.c class.c cwd.c native.c md5.c w32_getreg.c modules/set.c modules/path.c modules/regex.c modules/property-set.c modules/sequence.c modules/order.c execunix.c fileunix.c pathunix.c

command.c:1:0: sorry, unimplemented: 64-bit mode not compiled in

There is no 'cc' available in my PATH, dunno where this is supposed to be found

Any idea what I may be doing wrong?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Sorry, only building on linux is officially supported. Mac and Windows should work fine too but details of setting up the relevant environments (eg cgwin or homebrew) is beyond the scope of what this project tries to do.

If you want to use windows as a host you have two easiest options are:

  1. Use virtual machines eg. VirtualBox or and create a linux virtual machine where you do the building.

  2. You can also simply download and use the precompiled binaries I have made available

No matter what os you use to build under, the resulting binaries can then be copied to windows and used from then on as if you had built on windows to start with (theyre cross compiled for android).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...