Re: [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-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
|