Skip to content

compile bebop_driver failed  #172

@tc17339

Description

@tc17339

Hi everyone

There was a problem I cannot fixed them.

When I used 'catkin built' as the last step to build bebop_autonomy, it gives me this error:

/usr/bin/ld: /usr/local/lib/libavcodec.a(mqc.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libavcodec.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make[2]: *** [/home/taochen/bebop_ws/devel/.private/bebop_driver/lib/libbebop.so] Error 1
make[1]: *** [CMakeFiles/bebop.dir/all] Error 2
make: *** [all] Error 2
cd /home/taochen/bebop_ws/build/bebop_driver; catkin build --get-env bebop_driver | catkin env -si /usr/bin/make --jobserver-fds=6,7 -j; cd -
...............................................................................
Failed << bebop_driver:make [ Exited with code 2 ]
Failed <<< bebop_driver [ 30.5 seconds ]
Abandoned <<< bebop_tools [ Unrelated job failed ]
[build] Summary: 2 of 4 packages succeeded.
[build] Ignored: 1 packages were skipped or are blacklisted.
[build] Warnings: None.
[build] Abandoned: 1 packages were abandoned.
[build] Failed: 1 packages failed.
[build] Runtime: 33.0 seconds total.

It still no works when I add the 'set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC" )' in the CMakeList.txt file which was located in the bebop_dirver folder.
I also have tried command 'set(Boost_USE_STATIC_LIBS OFF) set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)'. but still get the same error.
Anyone know how to fix the error?

Many thanks
Tao

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions