[Developers] Serious bug in ADMB 11.1 for Windows (GCC)

Arni Magnusson arnima at hafro.is
Tue Jun 25 08:25:09 PDT 2013


The official ADMB release for Windows (GCC) 
http://admb-project.googlecode.com/files/admb-11.1-windows-mingw-32bit.zip 
has a serious bug. The most basic test fails spectacularly. Not only does

   tpl2cpp simple
   adcomp simple
   adlink simple

fail to build an executable, but it even removes a system library 
'libcontribo.a' from the hard drive. Hold on, this new feature could be 
good for our download statistics...

As you can see below, the adlink.bat script produces a bad command that 
asks GCC to compile nothing and then write the output to libcontribo.a. 
Overwriting the file with a null, it dutifully shreds the library.

Ignore the misleading error message from adlink below, but focus on the 
g++ command that is missing the important elements 'simple' and 
'simple.obj':

C:\simple>tpl2cpp simple
xxglobal.tmp
xxhtop.tmp
header.tmp
xxalloc.tmp
xxtopm.tmp
         1 file(s) copied.

C:\simple>adcomp simple
g++ -c  -O3 -D__GNUDOS__  -Dlinux -DOPT_LIB -DUSE_LAPLACE -fpermissive -I. 
-I"c:\admb\include" -I"c:\admb\contrib\include" -o simple.obj simple.cpp

C:\simple>adlink simple
g++ -s  -static  -o   "c:\admb\contrib\lib\libcontribo.a" 
"c:\admb\lib\libadmbo.a"
c:/gnu/gcc/bin/../lib/gcc/mingw32/4.7.2/../../..\libmingw32.a(main.o):main.c:(.text.startup+0xa7): 
undefined reference to `WinMain at 16'
collect2.exe: error: ld returned 1 exit status

---

This will probably not be very hard to fix, but it means two things:

1. We should release 11.2 that passes the tpl2cpp->adcomp->adlink test.

2. We should add the test above as a Buildbot test, probably with more 
variations of script calls.

Arni


More information about the Developers mailing list