Code Monkey home page Code Monkey logo

Comments (4)

A-I-Ivanov avatar A-I-Ivanov commented on June 7, 2024 1

from ifopt.

awinkler avatar awinkler commented on June 7, 2024

Hi alex,

Thanks for raising this issue. Can you please try to use
add_compile_options(-std=c++11 -fPIC)
here:

add_compile_options(-std=c++11)

and removing the STATIC keywords you added below in the file.

Please let me know if this works.
Best
Alex

from ifopt.

A-I-Ivanov avatar A-I-Ivanov commented on June 7, 2024

I attempted that fix, but the problem persists. Here is the output:

'''
Linking CXX shared library /home/alex/gitprojects/untrusted_maps_planner/catkin_ws/devel/lib/libifopt_snopt.so
/usr/bin/ld: /home/alex/software/snopt_lib/lib/libsnopt7_cpp.a(snoptProblem.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/home/alex/software/snopt_lib/lib/libsnopt7_cpp.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make[2]: *** [/home/alex/gitprojects/untrusted_maps_planner/catkin_ws/devel/lib/libifopt_snopt.so] Error 1
make[1]: *** [ifopt/ifopt_snopt/CMakeFiles/ifopt_snopt.dir/all] Error 2
make: *** [all] Error 2
*** Failure: Exit code 2 ***

'''

The relevant CMakeLists look like this:

cmake_minimum_required(VERSION 2.8.3)
project(ifopt_snopt)

add_compile_options(-std=c++11 -fPIC)

find_package(catkin REQUIRED)
find_package(ifopt_core REQUIRED)
....
...

if(${SNOPT76})
 add_library(${PROJECT_NAME} src/snopt76_adapter.cc)
else()
 add_library(${PROJECT_NAME} src/snopt_adapter.cc)
endif()

from ifopt.

awinkler avatar awinkler commented on June 7, 2024

Hi @A-I-Ivanov
I just added quite some improvements (see #17) and would be curious if this fixes your issue. If you find time, could you kindly let me know? Thanks :)

from ifopt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.