[OS] Mods to fix ASL & socket library specs

Lou Hafer lou at cs.sfu.ca
Mon Sep 17 18:14:23 EDT 2007


Kipp, Jun, Bob, Andreas,

	Andreas, you're geting this by virtue of changes to build files in
ThirdParty/ASL and Data/Samples. Since ASL is used many places, I wanted to
give an opportunity for more testing before committing changes there.

	I think I've managed to work out the configuration issues on Windows,
for the Msys/cl, Mingw (no-cygwin), and Cygwin environments. Attached is a tar
file with the modified files --- you'll need to run BuildTools/run_autotools
after installing them. They apply to the current head of OS/trunk.

	Data/Samples is trivial. It needs to call COIN_PROG_CC in order to
get CPPFLAGS correct under -mno-cygwin. Otherwise it incorrectly concludes
that gzlib is useable. The hazard only shows when configuring with cache
(-C) and Data/Samples is configured before any other project that checks
this --- once cached, the result persists.

	ThirdParty/ASL now passes the compilation flags determined by
COIN_PROG_CC as a command line parameter to the nmake call. This overrides the
setting in makefile.vc, which is what we want. The call to compile_MS_ASL now
works from the makefile (a bit of Googling turned up the reason this didn't
work; see note in compile_MS_ASL). Andreas, you might want to convert the code
for the unix case into a shell script in the same manner. Easier than wedging
it into the makefile case.

	Kipp, Jun, Bob, I've done some violence to your configuration files,
so you'll want to test this carefully. The changes involve autodetecting the
correct way to handle sockets. I've written a macro (now in OS/m4) to do
this. It prefers Winsock when available; this matches the behaviour of the OS
code. A complication here is that Cygwin can swing both ways, while OS
currently forces Winsock under Cygwin. Once the macro sees which headers are
available, it tries various combinations of library specifications. Basically,
the various fake Unix environs need -lwsock32, Msys/cl wants wsock32.lib,
Solaris wants -lsocket -lnsl, and Linux (GCC in general?) doesn't need
anything. The library spec now goes into ADDLIBS and thus into os_addlibs.txt,
the standard COIN places.

	In the process, I did radical surgery on OS/configure.ac and a bunch
of Makefile.am's. OS/configure.ac is now much closer to the canonical COIN
order of actions. I tried to chop WINSOCKLIBS from the Makefile.am's, but may
have missed a few. To confuse the issue, I covered my bets by setting it in
the AC_COIN_OS_SOCKET_LIBS macro and then set ADDLIBS in OS/configure.ac. Some
grooming might be in order, but I figure better you than me, as you are more
familiar with OS and can test more thoroughly.

	Tested in these environments, debug build only so far:

  * Msys / cl (i.e., Msys with --enable-doscompile=msvc)
  * Mingw (i.e., Cygwin with --enable-doscompile=mingw, the dread -mno-cygwin)
  * Cygwin
  * Solaris 10 / Studio
  * Fedora 7 / GCC

Mac OSX is notably absent; I leave that to you. The only build that includes
Ipopt is the Fedora build, and it dies with this message:

Exception of type: LAPACK_NOT_INCLUDED in file
"/devel/Coin-Trunk/Coin-OS/Ipopt/src/LinAlg/IpLapack.cpp" at line 65:
 Exception message: Ipopt has been compiled without LAPACK routine DPOTRF, but
 options are chosen that require this dependency.  Abort.

 EXIT: Some uncaught Ipopt exception encountered.
 Finish Ipopt Optimize

which is not surprising since I built Ipopt without Lapack. Might want to
change the OS test to allow for this.

						Lou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/octet-stream
Size: 12344 bytes
Desc: os_mods.tar.gz
Url : http://list.coin-or.org/pipermail/os/attachments/20070917/64b1d0cb/attachment.obj


More information about the OS mailing list