2017-06-08 21 views
1

クロスコンパイル対象:アンドロイド7
ホストOS:Linuxの
NDK:Crystax 10.3.2(b912)
OpenDDS:3.11ACEとAndroidの競合する宣言(CPU_SET_T)を解決するにはどうすればよいですか?

コンパイルOpenDDSが失敗し、C++のマクロの宣言を矛盾する報告。 ACE config-android.hファイルには、これが定義されています。

# define ACE_HAS_CPU_SET_T 

...私はコメントしましたが、無駄です。

これをどのように回避するかについての考えはありますか?ここでは、いくつかのx86_64ビルドの直後にカットしたエラーメッセージと、アームビルドの開始場所を示します。

.... (snip) 
make: Leaving directory '/home/dev/dds-test/OpenDDS-3.11/build/x86_64/dds/idl' 
Searching /home/dev/dds-test/ACE_wrappers for files... 
Found 25764 files and directories in 0 seconds. 
Creating /home/dev/dds-test/ACE_wrappers/build/arm 
Finished in /home/dev/dds-test/ACE_wrappers/build/arm 
Total time: 1 seconds. 
Searching /home/dev/dds-test/OpenDDS-3.11 for files... 
Found 5220 files and directories in 0 seconds. 
Creating /home/dev/dds-test/OpenDDS-3.11/build/arm 
Finished in /home/dev/dds-test/OpenDDS-3.11/build/arm 
Total time: 0 seconds. 
MPC_ROOT was set to /home/dev/dds-test/ACE_wrappers/build/arm/MPC. 
Using .../dds-test/ACE_wrappers/bin/MakeProjectCreator/config/MPC.cfg 
CIAO_ROOT was used in the configuration file, but was not defined. 
DANCE_ROOT was used in the configuration file, but was not defined. 
Generating 'gnuace' output using TAO_ACE.mwc 
Skipping SSL_FOR_TAO (ssl_for_tao.mpc); it requires ace_for_tao. 
Skipping QoS (qos.mpc); it requires qos. 
Skipping ACE_FOR_TAO (ace_for_tao.mpc); it requires ace_for_tao. 
Skipping ACE_XML_Utils (XML.mpc); it requires xerces. 
Skipping ACE_FoxReactor (ace_foxreactor.mpc); it requires fox. 
Skipping ace_svcconf_gen (svcconfgen.mpc); it requires ace_svcconf_gen. 
Skipping TAO_FoxResource (FoxResource.mpc); it requires fox. 
Skipping Bzip2Compressor (Bzip2Compressor.mpc); it requires bzip2. 
Skipping ZlibCompressor (ZlibCompressor.mpc); it requires zlib. 
Skipping LzoCompressor (LzoCompressor.mpc); it requires lzo1. 
Skipping TAO_IDL_GEN (tao_idl_fe.mpc); it requires tao_idl_fe_gen. 
Skipping NamingViewer (NamingViewer.mpc); it requires mfc. 
Skipping wxNamingViewer (wxNamingViewer.mpc); it requires wxWindows. 
Generation Time: 49s 
MPC_ROOT was set to /home/dev/dds-test/ACE_wrappers/build/arm/MPC. 
Using .../dds-test/ACE_wrappers/bin/MakeProjectCreator/config/MPC.cfg 
CIAO_ROOT was used in the configuration file, but was not defined. 
DANCE_ROOT was used in the configuration file, but was not defined. 
Generating 'gnuace' output using DDS.mwc 
Skipping ishapes (ishapes.mpc); it requires boost. 
Skipping DDS_Inconsistent_Qos_Inconsistent_Qos (Inconsistent_Qos.mpc); it requires xerces. 
Skipping qos_dump (qos_dump.mpc); it requires xerces. 
Skipping FaceUnitTests_SafetyProfilePool (FaceUnitTests.mpc); it avoids no_opendds_safety_profile. 
Skipping OpenDDS_XML_QOS_XSC_Generation (qos_xml_handler.mpc); it requires xsc. 
Skipping OpenDDS_QOS_XML_XSC_Handler (qos_xml_handler.mpc); it requires xerces. 
Skipping OpenDDS_Corba (OpenDDS_Corba.mpc); it avoids no_opendds_safety_profile. 
Skipping OpenDDS_CorbaSeq (CorbaSeq.mpc); it avoids no_opendds_safety_profile. 
Skipping tao_java (tao_java.mpc); it requires java. 
Skipping builtintopics_test (builtintopics_test.mpc); it requires java. 
Skipping two_idl (two_idl.mpc); it requires java. 
Skipping zerocopy_java_test (zerocopy.mpc); it requires java. 
Skipping multirepo_test (multirepo_test.mpc); it requires java. 
Skipping hello_java_client (hello_java_client.mpc); it requires java. 
Skipping transport_config (transport_config.mpc); it requires java. 
Skipping complex_idl_test (complex_idl_test.mpc); it requires java. 
Skipping publisher_idl_test (publisher_idl_test.mpc); it requires java. 
Skipping java_both_test (java_both_test.mpc); it requires java. 
Skipping messenger_idl_test (messenger_idl_test.mpc); it requires java. 
Skipping subscriber_idl_test (subscriber_idl_test.mpc); it requires java. 
Skipping dcps_java (dcps_java.mpc); it requires java. 
Skipping idl2jni_test_simple (idl2jni_test_simple.mpc); it requires java. 
Skipping idl2jni_runtime (idl2jni_runtime.mpc); it requires java. 
Skipping idl2jni_compact (idl2jni_compact.mpc); it requires java. 
Skipping idl2jni_codegen (idl2jni_codegen.mpc); it requires java. 
Skipping dissector (dissector.mpc); it requires wireshark. 
Generation Time: 31s 
calling make -C ace 
make: Entering directory '/home/dev/dds-test/ACE_wrappers/build/arm/ace' 
make[1]: Entering directory '/home/dev/dds-test/ACE_wrappers/build/arm/ace' 
touch .depend.ACE 
GNUmakefile: /home/dev/dds-test/ACE_wrappers/build/arm/ace/GNUmakefile.ACE MAKEFLAGS=w 

arm-linux-androideabi-g++ -Wno-deprecated-declarations -W -Wall -Wpointer-arith -Wno-psabi -fno-strict-aliasing -Wall -W -Wpointer-arith -pipe --sysroot=/opt/crystax-ndk/sysroot -I/opt/crystax-ndk/sysroot/usr/include -I/opt/crystax-ndk/include -D_REENTRANT -D_GNU_SOURCE -DACE_HAS_CUSTOM_EXPORT_MACROS=0 -DNDEBUG -I/home/dev/dds-test/ACE_wrappers/build/arm -DACE_NDEBUG -D__ACE_INLINE__ -I.. -DACE_AS_STATIC_LIBS -c -o .obj/Local_Name_Space.o Local_Name_Space.cpp 
In file included from /home/dev/dds-test/ACE_wrappers/build/arm/ace/OS_NS_Thread.h:32:0, 
       from /home/dev/dds-test/ACE_wrappers/build/arm/ace/Thread_Mutex.h:31, 
       from /home/dev/dds-test/ACE_wrappers/build/arm/ace/Log_Category.h:20, 
       from /home/dev/dds-test/ACE_wrappers/build/arm/ace/Malloc.h:24, 
       from /home/dev/dds-test/ACE_wrappers/build/arm/ace/Malloc_T.h:18, 
       from /home/dev/dds-test/ACE_wrappers/build/arm/ace/Local_Name_Space.h:20, 
       from Local_Name_Space.cpp:: 
/home/dev/dds-test/ACE_wrappers/build/arm/ace/os_include/os_sched.h:47:6: error: conflicting declaration 'typedef struct cpu_set_t cpu_set_t' 
    } cpu_set_t; 
    ^
In file included from /opt/crystax-ndk/sysroot/usr/include/sched.h:43:0,  
       from /opt/crystax-ndk/sysroot/usr/include/crystax/bionic/libc/include/mangled-pthread.h:33, 
       from /opt/crystax-ndk/sysroot/usr/include/pthread.h:43, 
       from /home/dev/dds-test/ACE_wrappers/build/arm/ace/os_include/os_pthread.h:54, 
       from /home/dev/dds-test/ACE_wrappers/build/arm/ace/OS_NS_Thread.h:31, 
       from /home/dev/dds-test/ACE_wrappers/build/arm/ace/Thread_Mutex.h:31, 
       from /home/dev/dds-test/ACE_wrappers/build/arm/ace/Log_Category.h:20, 
       from /home/dev/dds-test/ACE_wrappers/build/arm/ace/Malloc.h:24, 
       from /home/dev/dds-test/ACE_wrappers/build/arm/ace/Malloc_T.h:18, 
       from /home/dev/dds-test/ACE_wrappers/build/arm/ace/Local_Name_Space.h:20, 
       from Local_Name_Space.cpp:3: 
/opt/crystax-ndk/sysroot/usr/include/crystax/bionic/libc/include/mangled-sched.h:73:3:note: previous declaration as 'typedef struct cpu_set_t cpu_set_t' 
} cpu_set_t; 
^
/home/dev/dds-test/ACE_wrappers/build/arm/include/makeinclude/rules.local.GNU:188: recipe for target '.obj/Local_Name_Space.o' failed 
make[1]: *** [.obj/Local_Name_Space.o] Error 1 
make[1]: Leaving directory '/home/dev/dds-test/ACE_wrappers/build/arm/ace' 
GNUmakefile:45: recipe for target 'ACE' failed 
make: *** [ACE] Error 2 
make: Leaving directory '/home/dev/dds-test/ACE_wrappers/build/arm/ace' 
calling TAO_ROOT make 
... (snip) 

答えて

1

これは、からダウンロードできるTAO 6.4.3とACE 2.4.3を使用して解決できます。構成スクリプトの一部としてOCIバージョンをダウンロードするのではなく、独自のACE/TAOバージョンを設定する方法については、INSTALLを参照してください。 OpenDDS用にpull requestを作って、Vanderbilt UniversityからACE/TAOをダウンロードさせるための新しいオプションをconfigureスクリプトに追加しました。OpenDDS 3.12

+0

ACE + TAO 6.4.3からアップデートされたconfig-android.h大きな助けとなった。私は#define ACE_LACKS_FD_MASKを#define ACE_HAS_FD_MASKに変更してコンパイルする必要がありました。これは以前のバージョンよりも優れています(つまり、テストは現在コンパイルされています)が、FACEでは失敗します(これは必要ありません)。そして静的ではなくSOを構築する。ありがとうございました。 – Ender

+0

新しいNDKを使用している可能性があります。おそらくあなたはあなたが使用しているアンドロイドAPIレベルをチェックし、https://github.com/DOCGroup/ACE_TAOで新しいpullリクエストを作成し、config-android.hに必要な変更を加えることができます(APIレベルをチェックして、 –

+0

おそらくNDK15の統一ヘッダが原因です。https://android.googlesource.com/platform/ndk/+/ndk-r15-release/docs/UnifiedHeaders.mdを参照してください。 config-android.hはこれをサポートするために更新する必要があります –

関連する問題