[Ipopt-tickets] [Ipopt] #254: Problems compiling jipopt on Windows 64bit
Ipopt
coin-trac at coin-or.org
Thu Jan 8 08:31:00 EST 2015
#254: Problems compiling jipopt on Windows 64bit
----------------------+------------------------
Reporter: RotateMe | Owner: ipopt-team
Type: defect | Status: new
Priority: normal | Component: Ipopt
Version: 3.11 | Severity: normal
Keywords: jipopt 64 |
----------------------+------------------------
When compiling Ipopt and then the Java Interface I ran into the following
problems:
- As stated in Tickets #240 and #241 the types jint and jlong cause
problems in some enviroments (since jint is initialized as a long in the
jni_md.h of the latest windows jdks), and the file jipopt.cpp still
contains a line where a jint* is initialized as an int* which still needs
to be fixed.
- Moreover (I don't know if this is only a problem with the latest jdk
versions), the header file jni_md.h defines the type jlong as an _int64
which causes a compilation error using cygwin and gcc. This can be
circumvented by manually adding "#include <inttypes.h>" and replacing
_int64 by int64_t.
Having corrected this, the make produces no errors, but several warnings
(since longs are converted to ints). One can get rid of these by replacing
the typedef for jint by an int, however the problem below occurs in any
case.
The output produced are the correct class files and the jipopt.dll, which
was in my case named jipopt.dll.exe and I had to rename it.
However, after running "make test", I immediately get the following output
and error:
0 [main] java 3272 sig_send: error sending signal 6, pid 3272, pipe
handle 0x0, nb 0, packsize 176, Win32 error 6
The number after pid is always different and sometimes, but not always,
this error is followed by either a long pause, or a Java Runtime
Enviroment crashdump (which I will attach).
I found scarce information on errors like this related to cygwin, but
neither the latest cygwin snapshots, nor deactivating anti-virus, nor
switching machines worked.
As a minor note, maybe it would be nice to add a little reminder in the
jipopt compilation instructions that (at least in Windows) you have to
point your jdk to the path of the classes produced by the make, i.e.
"export CLASSPATH = $IPOPTDIR/build/Ipopt/contrib/JavaInterface". This
might be clear to many, but it took me some time to realize I don't have
to change the Makefile to achieve this.
--
Ticket URL: <https://projects.coin-or.org/Ipopt/ticket/254>
Ipopt <http://projects.coin-or.org/Ipopt>
Interior-point optimizer for nonlinear programs.
More information about the Ipopt-tickets
mailing list