[Olsr-dev] cannot compile on ARM Arch Linux
Saverio Proto
(spam-protected)
Thu Jul 25 16:12:48 CEST 2013
This is my gcc detail
[(spam-protected) olsrd]# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/armv7l-unknown-linux-gnueabihf/4.7.2/lto-wrapper
Target: armv7l-unknown-linux-gnueabihf
Configured with: /build/src/gcc-4.7.2/configure --prefix=/usr
--libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/
--enable-languages=c,c++,fortran,lto,objc,obj-c++ --enable-shared
--enable-threads=posix --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-clocale=gnu
--disable-libstdcxx-pch --enable-libstdcxx-time
--enable-gnu-unique-object --enable-linker-build-id --with-ppl
--enable-cloog-backend=isl --disable-ppl-version-check
--disable-cloog-version-check --enable-lto --enable-gold
--enable-ld=default --enable-plugin --with-plugin-ld=ld.gold
--with-linker-hash-style=gnu --disable-multilib --disable-libssp
--disable-build-with-cxx --disable-build-poststage1-with-cxx
--enable-checking=release --host=armv7l-unknown-linux-gnueabihf
--build=armv7l-unknown-linux-gnueabihf --with-arch=armv7-a
--with-float=hard --with-fpu=vfpv3-d16
Thread model: posix
gcc version 4.7.2 (GCC)
[(spam-protected) olsrd]#
2013/7/25 Ferry Huberts <(spam-protected)>:
> 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
>>
>
> --
> Ferry Huberts
More information about the Olsr-dev
mailing list