[Olsr-dev] cannot compile on ARM Arch Linux

Felix Fietkau (spam-protected)
Thu Jul 25 20:36:04 CEST 2013


By the way, any code that is meant to be linked into a shared library
should be built with -fPIC. It's just that some architectures (or maybe
even some toolchains) are more forgiving than others.

- Felix

On 2013-07-25 4:10 PM, Ferry Huberts wrote:
> BTW, it's strange that you have this problem because our Android build
> is just fine. It's been building fine for over 6 months now on our Jenkins.
> 
> We build it this way:
>> make NDK_BASE="/opt/android-ndk-r8d" OS="android" DESTDIR="$(pwd)/dist/debug" DEBUG=1 MAKEBIN=1 cfgparser_install cfgparser_clean
>> make NDK_BASE="/opt/android-ndk-r8d" OS="android" DESTDIR="$(pwd)/dist/debug" DEBUG=1 build_all install_all
>> make uberclean
>> make NDK_BASE="/opt/android-ndk-r8d" OS="android" DESTDIR="$(pwd)/dist/release" DEBUG=0 MAKEBIN=1 cfgparser_install cfgparser_clean
>> make NDK_BASE="/opt/android-ndk-r8d" OS="android" DESTDIR="$(pwd)/dist/release" DEBUG=0 build_all install_all
> 
> 
> 
> On 25/07/13 16:06, Ferry Huberts wrote:
>> 
>> 
>> On 25/07/13 16:00, Saverio Proto wrote:
>>> The most strange thing.
>>>
>>> Calling:
>>>
>>> make httpinfo
>>>
>>> compiles just fine.
>>>
>>> the problem is when I compile calling
>>>
>>> make libs
>>>
>>> Ferry I can give you ssh access over IPv6 if you want.
>> 
>> No need, I've not yet enabled IPv6 on my network
>> 
>> Try fiddling a bit more with the makefiles.
>> make sure to do a clean before building with an adjusted makefile ;-)
>> 
>>>
>>>
>>> Saverio
>>>
>>> 2013/7/25 Saverio Proto <(spam-protected)>:
>>>> No it does not work
>>>>
>>>> make[1]: Entering directory `/usr/src/olsrd/lib/httpinfo'
>>>> make[1]: Leaving directory `/usr/src/olsrd/lib/httpinfo'
>>>> make[1]: Entering directory `/usr/src/olsrd/lib/httpinfo'
>>>> [CC] src/olsrd_plugin.c
>>>> [CC] src/olsrd_httpinfo.c
>>>> [CC] src/admin_interface.c
>>>> [LD] olsrd_httpinfo.so.0.1
>>>> /usr/bin/ld: ../../src/cfgparser/cfgfile_gen.o: relocation
>>>> R_ARM_MOVW_ABS_NC against `a local symbol' can not be used when making
>>>> a shared object; recompile with -fPIC
>>>> ../../src/cfgparser/cfgfile_gen.o: could not read symbols: Bad value
>>>> collect2: error: ld returned 1 exit status
>>>> make[1]: *** [olsrd_httpinfo.so.0.1] Error 1
>>>> make[1]: Leaving directory `/usr/src/olsrd/lib/httpinfo'
>>>> make: *** [libs] Error 2
>>>> [(spam-protected) olsrd]# git diff
>>>> diff --git a/src/cfgparser/Makefile b/src/cfgparser/Makefile
>>>> index d318410..6ddae61 100644
>>>> --- a/src/cfgparser/Makefile
>>>> +++ b/src/cfgparser/Makefile
>>>> @@ -61,7 +61,7 @@ endif
>>>>
>>>>  ifdef MAKEBIN
>>>>
>>>> -CPPFLAGS +=    -DMAKEBIN
>>>> +CPPFLAGS +=    -DMAKEBIN -fPIC
>>>>  NAME =         $(BINNAME)
>>>>
>>>>  else
>>>> [(spam-protected) olsrd]#
>>>>
>>>>
>>>> Saverio
>>>>
>>>> 2013/7/25 Ferry Huberts <(spam-protected)>:
>>>>> try adding -fPIC to line 66 of src/cfgparser and see if that works.
>>>>> if so, pls tell me and I'll try it on all our builds
>>>>>
>>>>> On 25/07/13 15:36, Saverio Proto wrote:
>>>>>> Hello,
>>>>>>
>>>>>> I wanted to compile olsrd for my cubieboard. I am compiling directly
>>>>>> on the ARM board. Compiling the core is fine. When I go for make libs
>>>>>> I get the following problem:
>>>>>>
>>>>>> ake[1]: Entering directory `/usr/src/olsrd/lib/httpinfo'
>>>>>> make[1]: Leaving directory `/usr/src/olsrd/lib/httpinfo'
>>>>>> make[1]: Entering directory `/usr/src/olsrd/lib/httpinfo'
>>>>>> [CC] src/olsrd_plugin.c
>>>>>> [CC] src/olsrd_httpinfo.c
>>>>>> [CC] src/admin_interface.c
>>>>>> [LD] olsrd_httpinfo.so.0.1
>>>>>> /usr/bin/ld: ../../src/cfgparser/cfgfile_gen.o: relocation
>>>>>> R_ARM_MOVW_ABS_NC against `a local symbol' can not be used when making
>>>>>> a shared object; recompile with -fPIC
>>>>>> ../../src/cfgparser/cfgfile_gen.o: could not read symbols: Bad value
>>>>>> collect2: error: ld returned 1 exit status
>>>>>> make[1]: *** [olsrd_httpinfo.so.0.1] Error 1
>>>>>> make[1]: Leaving directory `/usr/src/olsrd/lib/httpinfo'
>>>>>> make: *** [libs] Error 2
>>>>>>
>>>>>> any hint how to fix the Makefile ?
>>>>>>
>>>>>> Saverio
>>>>>>
>>>>>
>>>>> --
>>>>> Ferry Huberts
>> 
> 





More information about the Olsr-dev mailing list