[Ipopt] compiling JIPOPT

Stefan Vigerske stefan at math.hu-berlin.de
Sun Mar 31 08:19:48 EDT 2013


Hi,

you can try running configure with the option --with-pic.

Stefan

On 03/31/2013 12:29 PM, Joris Kinable wrote:
> Dear,
>
> I'm trying to obtain a shared object for JIPOPT under linux (as is
> explained here: https://projects.coin-or.org/Ipopt/wiki/JavaInterface) ,
> but I get the following error:
>
> ========================
> /opt/ipopt/build/Ipopt/contrib/JavaInterface$ make
> g++ `echo -O3 -pipe -DNDEBUG -pedantic-errors -Wparentheses -Wreturn-type
> -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings -Wconversion
> -Wno-unknown-pragmas -Wno-long-long   -DIPOPT_BUILD | sed -e
> s'|-pedantic-errors||'`  -Wl,--rpath -Wl,/opt/ipopt/build/lib -shared -o
> lib/libjipopt.so jipopt.o
> `PKG_CONFIG_PATH=/opt/ipopt/build/lib64/pkgconfig:/opt/ipopt/build/lib/pkgconfig:/opt/ipopt/build/share/pkgconfig:
> /usr/bin/pkg-config --libs ipopt`
> /usr/bin/ld: jipopt.o: relocation R_X86_64_32S against `vtable for Jipopt'
> can not be used when making a shared object; recompile with -fPIC
> jipopt.o: could not read symbols: Bad value
> collect2: ld returned 1 exit status
> make: *** [lib/libjipopt.so] Error 1
> =========================
>
> This is what I've done:
>
> 1. set my JAVA_HOME variable
> 2. Downloaded the latest Ipopt from: https://projects.coin-or.org/**
> svn/Ipopt/trunk <https://projects.coin-or.org/svn/Ipopt/trunk>
> 3. Downloaded the necessary third party packages, including HSL for Ipopt.
> 4. created a build directory inside the ipopt dir, and consecutively ran:
> ../configure, make, make test, make install. Both ../configure and make
> test returned that they were successful.
> 5. Next I went inside the folder
> /opt/ipopt/build/Ipopt/contrib/JavaInterface where I ran make. The latter
> results in the above error.
>
> Any suggestions on how to resolve this error?
>
> br,
>
> Joris
>
>
>
> First I've
>
>
>
> _______________________________________________
> Ipopt mailing list
> Ipopt at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/ipopt
>



More information about the Ipopt mailing list