[Ipopt-tickets] [Ipopt] #254: Problems compiling jipopt on Windows 64bit

Ipopt coin-trac at coin-or.org
Fri Jan 9 05:21:38 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
Resolution:            |   Keywords:  jipopt 64
-----------------------+------------------------

Comment (by stefan):

 Replying to [ticket:254 RotateMe]:
 > 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.

 I had committed a fix to jipopt.cpp in r2513 3 weeks ago and now merged it
 to stable/3.11. Is this the one you refer to? Otherwise, please be more
 specific about the "line where a jint* is initialized as an int*".

 > - 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.

 Sounds like a bug in the JNI headers to me. They should include the
 headers needed.

 > 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.

 I don't think that replacing the typedef for ''jint'' is a good idea.
 If the warnings are only in code that isn't executed anyway (i.e., in a
 ''if (sizeof(jint)==sizeof(int))'' block, then better ignore these
 warnings.


 > 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.

 The log doesn't tell me much.
 Try without modifying the typedef of jint.


 > 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.

 Will do.

--
Ticket URL: <https://projects.coin-or.org/Ipopt/ticket/254#comment:1>
Ipopt <http://projects.coin-or.org/Ipopt>
Interior-point optimizer for nonlinear programs.



More information about the Ipopt-tickets mailing list