我正在使用WSO2 CPP來開發在ARM處理器上運行的應用程序。當我在編譯時遇到錯誤時,我試圖在基於Linux的PC計算機上交叉編譯庫。我已經配置WSO2爲:錯誤交叉編譯wsO2 CPP
export CXXFLAGS="-O2 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -ftree-vectorize -ffast-math -mfloat-abi=softfp"
export CXXFLAGS=${CXXFLAGS}" -I/home/logic/Logic_BSPs/Linux_3.0/1021559_LogicPD_Linux_BSP_2.0-5p1/rootfs/usr/include"
export LDFLAGS=" -L/home/logic/Logic_BSPs/Linux_3.0/1021559_LogicPD_Linux_BSP_2.0-5p1/rootfs/usr/lib"
INSTALL_DIR=/home/logic/Logic_BSPs/Linux_3.0/1021559_LogicPD_Linux_BSP_2.0-5p1/rootfs/usr
CC=/opt/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi-gcc \
CXX=/opt/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi-g++ \
AR=/opt/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi-ar \
RANLIB=/opt/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi-ranlib \
./configure --prefix=${INSTALL_DIR} \
--build=i686-linux --host=arm-none-linux-gnueabi \
--target=arm-none-linux-gnueabi --with-apache2=no
在編譯時,報告的錯誤是:
/opt/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../../../.. -I../../../../../include -I../../../../../src/core/transport -I../../../../../src/core/transport/http -I../../../../../src/core/transport/http/sender/libcurl -I../../../../../src/core/description -I../../../../../src/core/context -I../../../../../src/core/phaseresolver -I../../../../../src/core/engine -I../../../../../src/core/deployment -I../../../../../util/include -I../../../../../axiom/include -g -O2 -D_LARGEFILE64_SOURCE -ansi -Wall -Wno-implicit-function-declaration -g -D_GNU_SOURCE -DAXIS2_SVR_MULTI_THREADED -DAXIS2_SSL_ENABLED -MT ssl_stream.lo -MD -MP -MF .deps/ssl_stream.Tpo -c ssl/ssl_stream.c -fPIC -DPIC -o .libs/ssl_stream.o In file included from http_client.c:32: ssl/ssl_stream.h:26:25: error: openssl/ssl.h: No such file or directory make[11]: *** [http_client.lo] Error 1 make[11]: *** Waiting for unfinished jobs.... In file included from ssl/ssl_stream.c:21: ssl/ssl_stream.h:26:25: error: openssl/ssl.h: No such file or directory In file included from ssl/ssl_stream.c:22: ssl/ssl_utils.h:33: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token ssl/ssl_utils.h:40: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token ssl/ssl_utils.h:49: error: expected declaration specifiers or '...' before 'SSL_CTX' ssl/ssl_utils.h:50: error: expected declaration specifiers or '...' before 'SSL' [...]
它看起來喜歡與錯誤的庫尚未配置了CXXFLAGS變量:你可以請參閱編譯命令中不包含/ home/logic/logic。
你能解決這個問題嗎?
感謝和問候, 若阿金·杜蘭
我同意你的看法,但找到openssl/ssl.h所需的include路徑是使用CXXFLAGs和CFLAGS變量指定的,表示爲'configure'命令,但編譯命令中沒有include路徑已經指定。看起來,主'configure'不會將CXXFLAGS和CFLAGS正確地傳播到庫的'configure'文件。 – user1410383
@ user1410383,這聽起來像是什麼問題。查看配置幫助輸出,通常有用於指定某些軟件包安裝位置的cmd-line選項,希望openssl有一個選項。 – Brady
對不起,但沒有指定openssl包含路徑的選項。感謝您的建議。 – user1410383