Thread: [Log4cplus-devel] Failed to compile using cmake android toolchain
Logging Framework for C++
Brought to you by:
wilx
From: Vladimir \Equidamoid\ S. <equ...@gm...> - 2013-08-12 17:13:48
|
Hello, I'm trying to build log4cplus for android using cmake (added 'add_subdirectory(path/to/the/source)' to my main CMakeLists.txt). The build crashes with the following error: [ 48%] Building CXX object jni/lib/log4cplus-1.1.1/src/CMakeFiles/log4cplus.dir/global-init.cxx.o jni/lib/log4cplus-1.1.1/src/global-init.cxx:268:46: error: log4cplus::internal::__emutls_t._ZN9log4cplus8internal3ptdE causes a section type conflict with log4cplus::internal::ptd jni/lib/log4cplus-1.1.1/src/global-init.cxx:268:46: note: 'log4cplus::internal::ptd' was declared here Is this a bug or I'm doing something wrong? Best regards, Vladimir |
From: Václav Z. <vha...@gm...> - 2013-08-13 17:36:10
Attachments:
signature.asc
|
On 08/12/2013 07:13 PM, Vladimir "Equidamoid" Shapranov wrote: > Hello, > > I'm trying to build log4cplus for android using cmake (added > 'add_subdirectory(path/to/the/source)' to my main CMakeLists.txt). > The build crashes with the following error: > [ 48%] Building CXX object > jni/lib/log4cplus-1.1.1/src/CMakeFiles/log4cplus.dir/global-init.cxx.o > jni/lib/log4cplus-1.1.1/src/global-init.cxx:268:46: error: > log4cplus::internal::__emutls_t._ZN9log4cplus8internal3ptdE causes a > section type conflict with log4cplus::internal::ptd > jni/lib/log4cplus-1.1.1/src/global-init.cxx:268:46: note: > 'log4cplus::internal::ptd' was declared here > > Is this a bug or I'm doing something wrong? This looks like a deficiency in the Android tool chain. The only problem with log4cplus is probably that its CMake scripts do not detect that the tool chain is lacking this feature. I am adding Nikita Manovich to CC because he is the one who has contributed the Android port patches. -- VZ |
From: Vladimir \Equidamoid\ S. <equ...@gm...> - 2013-08-14 09:58:13
|
It seems that the error is caused by -fdata-sections flag set by android.toolchain.cmake (line 930). I don't actually understand why that flag is needed there but addng if (ANDROID) add_definitions(-fno-data-sections) endif(ANDROID) to log4cplus/src/CMakeLists.txt fixes the issue. 13.08.2013 21:35 , Václav Zeman ?????: > On 08/12/2013 07:13 PM, Vladimir "Equidamoid" Shapranov wrote: >> Hello, >> >> I'm trying to build log4cplus for android using cmake (added >> 'add_subdirectory(path/to/the/source)' to my main CMakeLists.txt). >> The build crashes with the following error: >> [ 48%] Building CXX object >> jni/lib/log4cplus-1.1.1/src/CMakeFiles/log4cplus.dir/global-init.cxx.o >> jni/lib/log4cplus-1.1.1/src/global-init.cxx:268:46: error: >> log4cplus::internal::__emutls_t._ZN9log4cplus8internal3ptdE causes a >> section type conflict with log4cplus::internal::ptd >> jni/lib/log4cplus-1.1.1/src/global-init.cxx:268:46: note: >> 'log4cplus::internal::ptd' was declared here >> >> Is this a bug or I'm doing something wrong? > This looks like a deficiency in the Android tool chain. The only problem > with log4cplus is probably that its CMake scripts do not detect that the > tool chain is lacking this feature. > > I am adding Nikita Manovich to CC because he is the one who has > contributed the Android port patches. > > > > ------------------------------------------------------------------------------ > Get 100% visibility into Java/.NET code with AppDynamics Lite! > It's a free troubleshooting tool designed for production. > Get down to code-level detail for bottlenecks, with <2% overhead. > Download for free and get started troubleshooting in minutes. > http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk > > > _______________________________________________ > Log4cplus-devel mailing list > Log...@li... > https://lists.sourceforge.net/lists/listinfo/log4cplus-devel -- Best regards, Vladimir |
From: Václav Z. <vha...@gm...> - 2013-08-14 11:17:08
|
On 14 August 2013 11:58, Vladimir "Equidamoid" Shapranov wrote: > It seems that the error is caused by -fdata-sections flag set by > android.toolchain.cmake (line 930). > I don't actually understand why that flag is needed there but addng > > if (ANDROID) > > add_definitions(-fno-data-sections) > > endif(ANDROID) > > > to log4cplus/src/CMakeLists.txt fixes the issue. I am glad that you found a work around for this issue. I have updated the android.toolchain.cmake file from the OpenCV repository at <http://code.opencv.org/projects/opencv/repository/revisions/master/changes/platforms/android/android.toolchain.cmake>. However the updated file still contains the offending -fdata-sections flag. I think that we (I actually mean you :) should do two things: 1. document the issue and your workaround in README; 2. complain to Google (fill a bug report) that their NDK compiler/toolchain does not properly support thread local storage. > > 13.08.2013 21:35 , Václav Zeman пишет: > > On 08/12/2013 07:13 PM, Vladimir "Equidamoid" Shapranov wrote: > > Hello, > > I'm trying to build log4cplus for android using cmake (added > 'add_subdirectory(path/to/the/source)' to my main CMakeLists.txt). > The build crashes with the following error: > [ 48%] Building CXX object > jni/lib/log4cplus-1.1.1/src/CMakeFiles/log4cplus.dir/global-init.cxx.o > jni/lib/log4cplus-1.1.1/src/global-init.cxx:268:46: error: > log4cplus::internal::__emutls_t._ZN9log4cplus8internal3ptdE causes a > section type conflict with log4cplus::internal::ptd > jni/lib/log4cplus-1.1.1/src/global-init.cxx:268:46: note: > 'log4cplus::internal::ptd' was declared here > > Is this a bug or I'm doing something wrong? > > This looks like a deficiency in the Android tool chain. The only problem > with log4cplus is probably that its CMake scripts do not detect that the > tool chain is lacking this feature. > > I am adding Nikita Manovich to CC because he is the one who has > contributed the Android port patches. -- VZ |
From: Nikita M. <nik...@gm...> - 2013-08-15 05:09:31
|
Hi, I will look at the problem this week. Probably I will find a solution and send a patch if it is necessary. 2013/8/14 Václav Zeman <vha...@gm...> > On 14 August 2013 11:58, Vladimir "Equidamoid" Shapranov wrote: > > It seems that the error is caused by -fdata-sections flag set by > > android.toolchain.cmake (line 930). > > I don't actually understand why that flag is needed there but addng > > > > if (ANDROID) > > > > add_definitions(-fno-data-sections) > > > > endif(ANDROID) > > > > > > to log4cplus/src/CMakeLists.txt fixes the issue. > I am glad that you found a work around for this issue. > > I have updated the android.toolchain.cmake file from the OpenCV > repository at < > http://code.opencv.org/projects/opencv/repository/revisions/master/changes/platforms/android/android.toolchain.cmake > >. > However the updated file still contains the offending -fdata-sections > flag. I think that we (I actually mean you :) should do two things: > > 1. document the issue and your workaround in README; > 2. complain to Google (fill a bug report) that their NDK > compiler/toolchain does not properly support thread local storage. > > > > > 13.08.2013 21:35 , Václav Zeman пишет: > > > > On 08/12/2013 07:13 PM, Vladimir "Equidamoid" Shapranov wrote: > > > > Hello, > > > > I'm trying to build log4cplus for android using cmake (added > > 'add_subdirectory(path/to/the/source)' to my main CMakeLists.txt). > > The build crashes with the following error: > > [ 48%] Building CXX object > > jni/lib/log4cplus-1.1.1/src/CMakeFiles/log4cplus.dir/global-init.cxx.o > > jni/lib/log4cplus-1.1.1/src/global-init.cxx:268:46: error: > > log4cplus::internal::__emutls_t._ZN9log4cplus8internal3ptdE causes a > > section type conflict with log4cplus::internal::ptd > > jni/lib/log4cplus-1.1.1/src/global-init.cxx:268:46: note: > > 'log4cplus::internal::ptd' was declared here > > > > Is this a bug or I'm doing something wrong? > > > > This looks like a deficiency in the Android tool chain. The only problem > > with log4cplus is probably that its CMake scripts do not detect that the > > tool chain is lacking this feature. > > > > I am adding Nikita Manovich to CC because he is the one who has > > contributed the Android port patches. > > -- > VZ > > > ------------------------------------------------------------------------------ > Get 100% visibility into Java/.NET code with AppDynamics Lite! > It's a free troubleshooting tool designed for production. > Get down to code-level detail for bottlenecks, with <2% overhead. > Download for free and get started troubleshooting in minutes. > http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk > _______________________________________________ > Log4cplus-devel mailing list > Log...@li... > https://lists.sourceforge.net/lists/listinfo/log4cplus-devel > -- Best regards, Nikita Manovich. |
From: Václav Z. <vha...@gm...> - 2014-05-04 06:11:09
Attachments:
signature.asc
|
On 15.8.2013 07:09, Nikita Manovich wrote: > Hi, > > I will look at the problem this week. Probably I will find a solution > and send a patch if it is necessary. Ping. :) This has cropped up again. This time on G+: https://plus.google.com/106712358057058222185/posts/6juUApU1fGa > > > 2013/8/14 Václav Zeman <vha...@gm... <mailto:vha...@gm...>> > > On 14 August 2013 11:58, Vladimir "Equidamoid" Shapranov wrote: > > It seems that the error is caused by -fdata-sections flag set by > > android.toolchain.cmake (line 930). > > I don't actually understand why that flag is needed there but addng > > > > if (ANDROID) > > > > add_definitions(-fno-data-sections) > > > > endif(ANDROID) > > > > > > to log4cplus/src/CMakeLists.txt fixes the issue. > I am glad that you found a work around for this issue. > > I have updated the android.toolchain.cmake file from the OpenCV > repository at > <http://code.opencv.org/projects/opencv/repository/revisions/master/changes/platforms/android/android.toolchain.cmake>. > However the updated file still contains the offending -fdata-sections > flag. I think that we (I actually mean you :) should do two things: > > 1. document the issue and your workaround in README; > 2. complain to Google (fill a bug report) that their NDK > compiler/toolchain does not properly support thread local storage. > > > > > 13.08.2013 21:35 , Václav Zeman пишет: > > > > On 08/12/2013 07:13 PM, Vladimir "Equidamoid" Shapranov wrote: > > > > Hello, > > > > I'm trying to build log4cplus for android using cmake (added > > 'add_subdirectory(path/to/the/source)' to my main CMakeLists.txt). > > The build crashes with the following error: > > [ 48%] Building CXX object > > jni/lib/log4cplus-1.1.1/src/CMakeFiles/log4cplus.dir/global-init.cxx.o > > jni/lib/log4cplus-1.1.1/src/global-init.cxx:268:46: error: > > log4cplus::internal::__emutls_t._ZN9log4cplus8internal3ptdE causes a > > section type conflict with log4cplus::internal::ptd > > jni/lib/log4cplus-1.1.1/src/global-init.cxx:268:46: note: > > 'log4cplus::internal::ptd' was declared here > > > > Is this a bug or I'm doing something wrong? > > > > This looks like a deficiency in the Android tool chain. The only > problem > > with log4cplus is probably that its CMake scripts do not detect > that the > > tool chain is lacking this feature. > > > > I am adding Nikita Manovich to CC because he is the one who has > > contributed the Android port patches. |