janericlenssen/deepracin

Building examples fails

BjoernLange opened this issue · 3 comments

I pulled the most recent version an now get the following error when building the examples:

[bjoern@bjoern-pc build]$ cmake .. -DINSTALL_PYTHON_INTERFACE=ON -DCOMPILE_EXAMPLES=ON
-- OPENCL_INCLUDE_DIRS: /usr/include
-- FindOpenCL searching for 64-bit libraries
-- FindOpenCL /lib/libOpenCL.so, /usr/include
No OpenCL CPP bindings found
Glib include dir: /usr/include/glib-2.0/usr/lib/glib-2.0/include
-- Configuring done
-- Generating done
-- Build files have been written to: /home/bjoern/Schreibtisch/deepRacin/deepracin/build
[bjoern@bjoern-pc build]$ sudo make install
[ 72%] Built target deepracin
[ 83%] Built target squeezenet_example
[ 88%] Linking C executable vgg16_example
/usr/bin/ld: CMakeFiles/vgg16_example.dir/vgg16/vgg_deployed.c.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: Fehler: ld gab 1 als Ende-Status zurück
make[2]: *** [examples/CMakeFiles/vgg16_example.dir/build.make:99: examples/vgg16_example] Fehler 1
make[1]: *** [CMakeFiles/Makefile2:162: examples/CMakeFiles/vgg16_example.dir/all] Fehler 2
make: *** [Makefile:130: all] Fehler 2

Using -DCOMPILE_EXAMPLES=OFF works fine.

Hm... i did not touch the examples for one month. You had the same version of it running.
Also, everything runs fine on my ubuntu.
Did you update some of the dependencies or maybe gcc? I found this error in conjunction with some gcc version problems.

I found a similar problem here:
iovisor/bcc#782
Added the same patch in a commit. It is a long shot and changes nothing for me but maybe it does work now for you. I would appreciate it if you could test it.

It works fine now, seems like my distro updated the compiler packages.