MantisBT - Open CASCADE
View Issue Details
0031606Open CASCADE[OCCT] OCCT:Configurationpublic2020-06-10 19:502020-12-02 17:13
kgv 
bugmaster 
normalminor 
closedfixed 
[OCCT] 7.0.0 
[OCCT] 7.5.0[OCCT] 7.5.0 
Not required
0031606: Configuration, CMake - build fails with Android NDK + CLang compiler + MinGW Makefiles
Building with Android NDK 21c on Windows leads to the following error:
clang++: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
c:\android-ndk-r21c\toolchains\llvm\prebuilt\windows-x86_64\bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin\ld: 
unrecognized option '--export-all-symbols'
c:\android-ndk-r21c\toolchains\llvm\prebuilt\windows-x86_64\bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin\ld: 
use the --help option for usage information
clang++: error: linker command failed with exit code 1 (use -v to see invocation)


Apparently, this happens due to "if(MINGW)" checks in CMake scripts intended only for GCC compiler and Windows target platform introduces by 0027197.
  cmake -G "MinGW Makefiles" ^
 -D CMAKE_SYSTEM_NAME:STRING="Android" ^
 -D CMAKE_ANDROID_NDK="c:/android-ndk-r21c" ^
 -D CMAKE_BUILD_TYPE:STRING="Release" ^
 -D CMAKE_ANDROID_ARCH_ABI:STRING="arm64-v8a" ^
 -D CMAKE_SYSTEM_VERSION:STRING="21" ^
 -D CMAKE_ANDROID_STL_TYPE="c++_shared" ^
 -D BUILD_LIBRARY_TYPE:STRING="Shared" ...
No tags attached.
parent of 0031614assigned bugmaster Configuration, CMake - eliminate CLang -Wl,-s deprecated warning 
child of 0028135closed apn Configuration - adopt building script for using built-in Android cross-compiling support in CMake 3.7 
child of 0027197closed abv Configuration - fix compilation issues when using mingw 
child of 0026911closed bugmaster Configuration, CMake - strips symbol information from the binary in release configuration if the compiler is a variant of gcc 
Not all the children of this issue are yet resolved or closed.
Issue History
2020-06-10 19:50kgvNew Issue
2020-06-10 19:50kgvAssigned To => kgv
2020-06-10 20:05gitNote Added: 0092537
2020-06-10 22:00gitNote Added: 0092538
2020-06-11 08:24kgvNote Added: 0092541
2020-06-11 08:24kgvAssigned Tokgv => bugmaster
2020-06-11 08:24kgvStatusnew => resolved
2020-06-11 08:24kgvStatusresolved => reviewed
2020-06-11 08:30kgvRelationship addedchild of 0028135
2020-06-11 08:35kgvProduct Version7.4.0 => 7.2.0
2020-06-11 08:35kgvRelationship addedchild of 0027197
2020-06-11 08:36kgvRelationship addedchild of 0026911
2020-06-11 08:38kgvProduct Version7.2.0 => 7.0.0
2020-06-11 08:38kgvDescription Updatedbug_revision_view_page.php?rev_id=23023#r23023
2020-06-14 10:52bugmasterChangeset attached => occt master 32b723d5
2020-06-14 10:52bugmasterStatusreviewed => verified
2020-06-14 10:52bugmasterResolutionopen => fixed
2020-06-14 10:53bugmasterTest case number => Not required
2020-06-17 13:45kgvRelationship addedparent of 0031614
2020-06-20 13:42gitNote Added: 0092609
2020-12-02 16:43emoFixed in Version => 7.5.0
2020-12-02 17:13emoStatusverified => closed

Notes
(0092537)
git   
2020-06-10 20:05   
Branch CR31606 has been created by kgv.

SHA-1: bf1fbc76b4c8be2e4fd72ec94d7fc082a45bcec5


Detailed log of new commits:

Author: kgv
Date: Wed Jun 10 20:07:12 2020 +0300

    0031606: Configuration, CMake - build fails with Android NDK + CLang compiler + MinGW Makefiles
    
    CLang is now checked before MINGW within occt_defs_flags.cmake.
    Added "-Wl,-s" linker flag when using CLang for stripping symbols consistently to GCC builds.
(0092538)
git   
2020-06-10 22:00   
Branch CR31606 has been updated forcibly by kgv.

SHA-1: 0fd2e6440efa01e1e0228cdd77ebb170c9062726
(0092541)
kgv   
2020-06-11 08:24   
Please raise the patch.

http://jenkins-test-12.nnov.opencascade.com/view/CR31606-CR31606-KGV/ [^]
(0092609)
git   
2020-06-20 13:42   
Branch CR31606 has been deleted by inv.

SHA-1: 0fd2e6440efa01e1e0228cdd77ebb170c9062726