[OS] A bit more on ASL and Msys

Jun Ma maj at northwestern.edu
Fri Aug 24 22:18:47 EDT 2007


Lou,
First, I haven't removed the mingw/include directory. The previous error you 
motioned may then be due to some other reasons.
There is a slight chance that it may also be due to that we have for the 
past week making structural changes.
Kipp is able to build in Msys/cl ( and I am able to build in Msys/gcc on 
windows xp), both with the ASL library.

There are two errors you motioned below.

For the first one (the -MT issue), it crashes on Cbc; Cbc builds before OS 
so I assume we don't know whether it crashes on OS yet.
But after you manually fixed the make.vc for AMPL, obviously it worked both 
on Cbc and OS.

For the second one with the duplicate symbol defined (_matherr), I am 
puzzled why the Cbc solver doesn't crash first, as it also links against the 
AMPL library.
Are you aware of anything that Cbc does but OS doesn't, especially in the 
make file configuration?

Jun

----- Original Message ----- 
From: "Kipp Martin" <kipp.martin at chicagogsb.edu>
To: "Lou Hafer" <lou at cs.sfu.ca>
Cc: <os at list.coin-or.org>
Sent: Friday, August 24, 2007 8:30 PM
Subject: Re: [OS] A bit more on ASL and Msys


>
> Hi Lou:
>
> I am able to build and run OS on MSys/cl using ASL with no problem, but
> I am building with just
>
> ./configure
>
> I want to try to duplicate exactly what you are doing. What is your
> command line when you run configure?
>
> Thanks
>>
>> I took time on Wednesday to play with building OS/trunk under Msys, with
>> ASL in the mix.  It looks like you've removed the use of the 
>> /mingw/include, and
>> I had no problems there.  I still have difficulty with linking when ASL 
>> is
>> present.  A few bits of information to think about:
>>
>> Library incompatibility seems to be the base issue.  When ASL is built
>> with the compile_MS_ASL script, the script copies source files from 
>> ASL/solver
>> into a build directory and then calls nmake with solvers/makefile.vc as 
>> the
>> makefile.  Makefile.vc forces a set of C flags:
>>
>>   CFLAGS = -nologo -Ot1 -MT
>>
>> When I build in debug mode, this causes an immediate link problem for
>> cbc, because the standard Coin debug build specifies -MTd. An optimised 
>> build
>> has no trouble at this point, because Coin specifies -MT for the 
>> optimised
>> build.
>>
>> Changing makefile.vc to specify -MTd / -MT as appropriate gets past cbc,
>> but ultimately both debug and optimised builds founder on
>> OS/src/OSSolverService.exe, with the message
>>
>>   amplsolv.lib(fpinitmt.obj) : error LNK2005: __matherr already defined 
>> in
>>     LIBCMT.lib(matherr.obj)
>>   Creating library OSSolverService.lib and object OSSolverService.exp
>>   OSSolverService.exe : fatal error LNK1169: one or more multiply defined
>>     symbols found
>>
>> Looking in ASL/solvers/fpinitmt.c, down toward the end of the file
>> there's the code below, which defines a matherr subroutine.  When I added 
>> the
>> #if 0 ...  endif guard to suppress this code, the build and link works 
>> just
>> dandy.  OS claims it passes all its unit tests, but my guess is that this 
>> is not
>> a conclusive test.  Unfortunately, I'm not an AMPL user and I don't have 
>> a good
>> idea of how and where this function would be used.
>>
>>
>> #ifdef __MINGW32__
>> #define matherr _matherr
>> #endifLou
>>
>> #if 0
>>  matherr_rettype
>> matherr( struct _exception *e )
>> {
>> switch(e->type) {
>>   case _DOMAIN:
>>   case _SING:
>> errno = set_errno(EDOM);
>> break;
>>   case _TLOSS:
>>   case _OVERFLOW:
>> errno = set_errno(ERANGE);
>>   }
>> return 0;
>> }
>> #endif
>>
>> Presumably, at some point in the evolution of Msys and/or MSVS, this
>> definition was required. Perhaps it's no longer needed? I'm pretty sure 
>> I'm
>> up-to-date for MSVS / Platform SDK / Msys --- all acquired within the 
>> last
>> month, due to upgrading my home system.
>>
>> What do you folks see?
>>
>> Lou
>>
>> _______________________________________________
>> OS mailing list
>> OS at list.coin-or.org
>> http://list.coin-or.org/mailman/listinfo/os
>
>
> -- 
> Kipp Martin
> Professor of Operations Research
> and Computing Technology
> University of Chicago
> Graduate School of Business
> 5807 South Woodlawn Avenue
> Chicago IL 60637
> 773-702-7456
> http://gsbkip.chicagogsb.edu
> http://www.coin-or.org/
> _______________________________________________
> OS mailing list
> OS at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/os
>
> > 



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Optimization Services (OS)" group.
To post to this group, send email to optimizationservices at googlegroups.com
To unsubscribe from this group, send email to optimizationservices-unsubscribe at googlegroups.com
For more options, visit this group at http://groups.google.com/group/optimizationservices?hl=en
-~----------~----~----~----~------~----~------~--~---



More information about the OS mailing list