2

I have been at this for quite a while now. Mainly following this tutorial. I have built the dependencies in the versions required by the instructions the 2 main parts beeing boost and caffe (which both entail a host of other dependecies). I am running the entire thing on a fresh install of Ubuntu 19.10 (setup on a VM specifically for this project). When i reach building of the armNN library (instructions part "Building the environment", step 4) it fails at linking libarmnn.so at ~45% with the following error output:

/usr/bin/ld: */path/to/boost*/boost_1_64_0/stage/lib/libboost_log.a(attribute_name.o): relocation R_X86_64_PC32 against symbol `_ZTVN5boost16exception_detail19error_info_injectorINS_3log12v2s_mt_posix16limitation_errorEEE' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make[2]: *** [libarmnn.so.19.11] Error 1
make[1]: *** [CMakeFiles/armnn.dir/all] Error 2
make: *** [all] Error 2

I have built the entire boost library with cxx and c flags -fPIC. I checked specifically for the file in question (using ar -x libboost_log.a readelf --relocs attribute_name.o | egrep 'PLT' as suggest in the answer to this question)

Any suggestions on how to deal with this error or tips on what i should look into would be very much appreciated.

Patrick

2 Answers2

1

You must have missed some dependencies. I will suggest you to just delete all thing and try to rebuild it and follow each step very carefully and when you are making armnn use make -j4 . you can replace 4 by no of cores you have. and keep opencl=0 embed_kernels=0 neon=1 so it will more easier.

Parag Jain
  • 612
  • 2
  • 14
  • 31
0

It took me a couple more attempts and another fresh VM but i finally managed to cross compile the armnn with caffe parsers support (X from ubuntu to android). If you want to do the same there are a lot of dependencies which you have to compile yourself and you have to take care to compile them all with compatible versions. Which is when you are (like i was 3 weeks ago) just aquainted with all of these libraries in passing easier said then done. Here are the most important sources I used to compile:

The most important part that I disregarded way to often is that when you are compiling a dependecy and encounter some missing sub dependencies, do NOT fix it the easy way. Installing those using apt which is usually the direct and correct way to solve a missing libraries problem. Later on you will get mismatched library problems.