2016-07-17 12 views
-1

Ich versuche, einige Boost-Bibliotheken für Android, unter Windows, mit Cygwin und/oder Cmd zu kompilieren.Boost Kompilieren für Android schlägt unter Windows fehl

Ich folgte den Anweisungen hier gezeigt: http://www.boost.org/doc/libs/1_61_0/more/getting_started/windows.html

Nachdem ich die notwendigen Umgebungsvariablen:

//At first I tried with cmd 
set NDK_ROOT=C:\android-ndk-r12b 
set TOOLCHAIN_PATH=C:\android-ndk-r12b\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64 
set PATH=%PATH%;C:\boost_build\bin;%TOOLCHAIN_PATH%\bin 
set NO_BZIP2=1 

//I also tried with cygwin 
TOOLCHAIN_PATH=/cygdrive/c/android-ndk-r12b/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/ 
NDK_ROOT=/cygdrive/c/android-ndk-r12b/ 
PATH=$PATH:/cygdrive/c/boost_build/bin:/cygdrive/c/android-ndk-r12b/:$TOOLCHAIN_PATH/bin 
NO_BZIP2=1 

Und jetzt mit diesen Parametern ich starten b2:

b2 --build-dir=C:\boost_builded toolset=gcc link=static threading=multi --with-system --with-date_time --with-random stage 

Und Ich bekomme folgende Fehler:

//The errors are the same both in cmd and in cygwin 
...patience... 
...found 1014 targets... 
...updating 18 targets... 
gcc.archive C:\boost_builded\boost\bin.v2\libs\date_time\build\gcc-5.4.0\debug\link-static\threading-multi\libboost_date_time-gcc54-mt-d-1_61.a 
The system cannot find the path specified. 
The system cannot find the path specified. 

    "\usr\i686-pc-cygwin\bin\ar.exe" rc "C:\boost_builded\boost\bin.v2\libs\date_time\build\gcc-5.4.0\debug\link-static\threading-multi\libboost_date_time-gcc54-mt-d-1_61.a" "C:\boost_builded\boost\b 
in.v2\libs\date_time\build\gcc-5.4.0\debug\link-static\threading-multi\gregorian\greg_month.o" "C:\boost_builded\boost\bin.v2\libs\date_time\build\gcc-5.4.0\debug\link-static\threading-multi\gregorian 
\greg_weekday.o" "C:\boost_builded\boost\bin.v2\libs\date_time\build\gcc-5.4.0\debug\link-static\threading-multi\gregorian\date_generators.o" 
    "\usr\i686-pc-cygwin\bin\ranlib.exe" "C:\boost_builded\boost\bin.v2\libs\date_time\build\gcc-5.4.0\debug\link-static\threading-multi\libboost_date_time-gcc54-mt-d-1_61.a" 

...failed gcc.archive C:\boost_builded\boost\bin.v2\libs\date_time\build\gcc-5.4.0\debug\link-static\threading-multi\libboost_date_time-gcc54-mt-d-1_61.a... 
...skipped <pstage\lib>libboost_date_time-gcc54-mt-d-1_61.a for lack of <pC:\boost_builded\boost\bin.v2\libs\date_time\build\gcc-5.4.0\debug\link-static\threading-multi>libboost_date_time-gcc54-mt-d-1 
_61.a... 
gcc.archive C:\boost_builded\boost\bin.v2\libs\system\build\gcc-5.4.0\debug\link-static\threading-multi\libboost_system-gcc54-mt-d-1_61.a 
The system cannot find the path specified. 
The system cannot find the path specified. 

    "\usr\i686-pc-cygwin\bin\ar.exe" rc "C:\boost_builded\boost\bin.v2\libs\system\build\gcc-5.4.0\debug\link-static\threading-multi\libboost_system-gcc54-mt-d-1_61.a" "C:\boost_builded\boost\bin.v2\ 
libs\system\build\gcc-5.4.0\debug\link-static\threading-multi\error_code.o" 
    "\usr\i686-pc-cygwin\bin\ranlib.exe" "C:\boost_builded\boost\bin.v2\libs\system\build\gcc-5.4.0\debug\link-static\threading-multi\libboost_system-gcc54-mt-d-1_61.a" 

...failed gcc.archive C:\boost_builded\boost\bin.v2\libs\system\build\gcc-5.4.0\debug\link-static\threading-multi\libboost_system-gcc54-mt-d-1_61.a... 
...skipped <pstage\lib>libboost_system-gcc54-mt-d-1_61.a for lack of <pC:\boost_builded\boost\bin.v2\libs\system\build\gcc-5.4.0\debug\link-static\threading-multi>libboost_system-gcc54-mt-d-1_61.a... 
gcc.archive C:\boost_builded\boost\bin.v2\libs\random\build\gcc-5.4.0\debug\link-static\threading-multi\libboost_random-gcc54-mt-d-1_61.a 
The system cannot find the path specified. 
The system cannot find the path specified. 

    "\usr\i686-pc-cygwin\bin\ar.exe" rc "C:\boost_builded\boost\bin.v2\libs\random\build\gcc-5.4.0\debug\link-static\threading-multi\libboost_random-gcc54-mt-d-1_61.a" "C:\boost_builded\boost\bin.v2\ 
libs\random\build\gcc-5.4.0\debug\link-static\threading-multi\random_device.o" 
    "\usr\i686-pc-cygwin\bin\ranlib.exe" "C:\boost_builded\boost\bin.v2\libs\random\build\gcc-5.4.0\debug\link-static\threading-multi\libboost_random-gcc54-mt-d-1_61.a" 

...failed gcc.archive C:\boost_builded\boost\bin.v2\libs\random\build\gcc-5.4.0\debug\link-static\threading-multi\libboost_random-gcc54-mt-d-1_61.a... 
...skipped <pstage\lib>libboost_random-gcc54-mt-d-1_61.a for lack of <pC:\boost_builded\boost\bin.v2\libs\random\build\gcc-5.4.0\debug\link-static\threading-multi>libboost_random-gcc54-mt-d-1_61.a... 
gcc.archive C:\boost_builded\boost\bin.v2\libs\date_time\build\gcc-5.4.0\release\link-static\threading-multi\libboost_date_time-gcc54-mt-1_61.a 
The system cannot find the path specified. 
The system cannot find the path specified. 

    "\usr\i686-pc-cygwin\bin\ar.exe" rc "C:\boost_builded\boost\bin.v2\libs\date_time\build\gcc-5.4.0\release\link-static\threading-multi\libboost_date_time-gcc54-mt-1_61.a" "C:\boost_builded\boost\b 
in.v2\libs\date_time\build\gcc-5.4.0\release\link-static\threading-multi\gregorian\greg_month.o" "C:\boost_builded\boost\bin.v2\libs\date_time\build\gcc-5.4.0\release\link-static\threading-multi\grego 
rian\greg_weekday.o" "C:\boost_builded\boost\bin.v2\libs\date_time\build\gcc-5.4.0\release\link-static\threading-multi\gregorian\date_generators.o" 
    "\usr\i686-pc-cygwin\bin\ranlib.exe" "C:\boost_builded\boost\bin.v2\libs\date_time\build\gcc-5.4.0\release\link-static\threading-multi\libboost_date_time-gcc54-mt-1_61.a" 

...failed gcc.archive C:\boost_builded\boost\bin.v2\libs\date_time\build\gcc-5.4.0\release\link-static\threading-multi\libboost_date_time-gcc54-mt-1_61.a... 
...skipped <pstage\lib>libboost_date_time-gcc54-mt-1_61.a for lack of <pC:\boost_builded\boost\bin.v2\libs\date_time\build\gcc-5.4.0\release\link-static\threading-multi>libboost_date_time-gcc54-mt-1_6 
1.a... 
gcc.archive C:\boost_builded\boost\bin.v2\libs\system\build\gcc-5.4.0\release\link-static\threading-multi\libboost_system-gcc54-mt-1_61.a 
The system cannot find the path specified. 
The system cannot find the path specified. 

    "\usr\i686-pc-cygwin\bin\ar.exe" rc "C:\boost_builded\boost\bin.v2\libs\system\build\gcc-5.4.0\release\link-static\threading-multi\libboost_system-gcc54-mt-1_61.a" "C:\boost_builded\boost\bin.v2\ 
libs\system\build\gcc-5.4.0\release\link-static\threading-multi\error_code.o" 
    "\usr\i686-pc-cygwin\bin\ranlib.exe" "C:\boost_builded\boost\bin.v2\libs\system\build\gcc-5.4.0\release\link-static\threading-multi\libboost_system-gcc54-mt-1_61.a" 

...failed gcc.archive C:\boost_builded\boost\bin.v2\libs\system\build\gcc-5.4.0\release\link-static\threading-multi\libboost_system-gcc54-mt-1_61.a... 
...skipped <pstage\lib>libboost_system-gcc54-mt-1_61.a for lack of <pC:\boost_builded\boost\bin.v2\libs\system\build\gcc-5.4.0\release\link-static\threading-multi>libboost_system-gcc54-mt-1_61.a... 
gcc.archive C:\boost_builded\boost\bin.v2\libs\random\build\gcc-5.4.0\release\link-static\threading-multi\libboost_random-gcc54-mt-1_61.a 
The system cannot find the path specified. 
The system cannot find the path specified. 

    "\usr\i686-pc-cygwin\bin\ar.exe" rc "C:\boost_builded\boost\bin.v2\libs\random\build\gcc-5.4.0\release\link-static\threading-multi\libboost_random-gcc54-mt-1_61.a" "C:\boost_builded\boost\bin.v2\ 
libs\random\build\gcc-5.4.0\release\link-static\threading-multi\random_device.o" 
    "\usr\i686-pc-cygwin\bin\ranlib.exe" "C:\boost_builded\boost\bin.v2\libs\random\build\gcc-5.4.0\release\link-static\threading-multi\libboost_random-gcc54-mt-1_61.a" 

...failed gcc.archive C:\boost_builded\boost\bin.v2\libs\random\build\gcc-5.4.0\release\link-static\threading-multi\libboost_random-gcc54-mt-1_61.a... 
...skipped <pstage\lib>libboost_random-gcc54-mt-1_61.a for lack of <pC:\boost_builded\boost\bin.v2\libs\random\build\gcc-5.4.0\release\link-static\threading-multi>libboost_random-gcc54-mt-1_61.a... 
...failed updating 6 targets... 
...skipped 6 targets... 
...updated 6 targets... 

Ich bin nicht einmal sicher, welchen Weg er nicht findet. Ich denke, dass es nach "\ usr \ i686-pc-cygwin \ bin \ ar.exe" sucht, weil die anderen Pfade korrekt und vorhanden scheinen; aber ich denke, es sucht nach "\", als ob es die Wurzel eines Linux-Systems wäre, anstatt im Unterverzeichnis von Cygwin.

Wie kann ich korrigieren?

+0

Cygwin hat ein eigenes Stammverzeichnis. Sie können 'ls' auf einem Pfad verwenden und sehen, was da ist. – stark

Antwort

0

.... wie immer, ist die Veröffentlichung in StackOverflow für mich kathartisch. Nachdem ich stundenlang den Kopf an die Wand geschlagen habe, poste ich das Problem hier und dann finde ich die Lösung in 5 Minuten.

Ich lasse die Lösung hier für den Fall, dass es für jemand anderen in der Zukunft nützlich sein könnte.

Meine Vermutung war richtig. Er suchte nach \usr\i686-pc-cygwin\bin\ar.exe an der falschen Stelle. Also kopierte ich buchstäblich den Ordner von Cygwin-Wurzel C:\cygwin\usr\i686-pc-cygwin\ in der Wurzel, C:\usr\i686-pc-cygwin. Es funktionierte.

Wahrscheinlich ein b2 Bug, ich werde versuchen, das zu signalisieren.

Verwandte Themen