[ADMB Users] ADMB with gcc, mingw, and/or msys
Arni Magnusson
arnima at hafro.is
Wed Nov 13 15:37:03 PST 2013
Hi Jon,
Before releasing ADMB-IDE, we try to make sure that all components work
smoothly together. The lag between the last IDE release and more recent
versions of ADMB is mainly due to a new generation of user compilation
scripts (where safe compilation will be the default) that are taking shape
just now.
Like you, we have seen strange error messages with some GCC distributions.
Based on extensive tests last summer, our conclusion is the same as yours:
to make life easier for everyone, we intend to release the next ADMB-IDE
with the GCC compiler that comes with Rtools, and recommend that for
building ADMB from sources.
Building ADMB from sources on Windows has always been a challenge and
continues to be so. As you point out, it's a complex interplay between
installing programs like GCC and make, disabling PATH directories that
might interfere (sometimes sh.exe must be excluded), testing what works to
build ADMB, and finally updating the documentation (in several places,
sounds like).
It's a topic almost worth its own mailing list, but
developers at admb-project.org is probably better than users at . Anyone can
subscribe to developers@ and the discussion is readable and searchable on
the web.
Lately, this aspect of ADMB development has mainly involved Johnoel
Ancheta making changes to the makefile tree, while Chris Grandin and I try
building with different setups. This process can be time-consuming and
give strange results, so if you can lend a hand and test whether Rtools
can build ADMB that would be excellent.
All the best,
Arni
On mið, nóvember 13, 2013 20:01, Jon Schnute wrote:
> Thanks to Arni for his work on the ADMB IDE. I note, however, that
> the files available at
> http://code.google.com/p/admb-project/downloads/list?&q=admb-ide
> apply to the earlier version 10.1 of ADMB, not the more recent
> version 11.1 or the current version available from the SVN server
> http://www.admb-project.org/svn/trunk.
>
> Despite this limitation, Arni's .zip files include two ADMB image
> directories (32- and 64-bit) and two gcc directories that allow you
> install ADMB without the IDE. I've included these in the R package
> PBSadmb at
> http://code.google.com/p/pbs-admb/source/browse/trunk/Downloads/. If
> you use R and PBSadmb, you can install ADMB in a manner that doesn't
> prejudice any other installation on your system.
>
> I want to make PBSadmb work in Windows with the most recent versions
> of ADMB, so I've been experimenting with "official" versions of msys
> and mingw available at http://sourceforge.net/projects/mingw/files/.
> Without going into details (which I can make available in a separate
> file), I downloaded a 32 bit version mingw (C++ compiler, currently
> 4.8.1) and msys (unix make, plus others) and "successfully" built
> ADMB 11.1. However, when I used this ADMB binary library with an
> actual example, the .tpl transformed to .cpp and the .cpp
> transformed to .o, but the link step failed with the message:
>
> g++ -s -static -o
> "D:/ADMbuild/admb111/build/dist\contrib\lib\libcontrib.a"
> "D:/ADMbuild/admb111/build/dist\lib\libadmb.a"
>
> c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/lib\libmingw32.a
> (main.o): In function `main':
>
> e:\p\giaw\src\pkg\mingwrt-4.0.3-1-mingw32-src\bld/../mingwrt-4.0.3-1-mingw32
> -src/src/libcrt/crt/main.c:91: undefined reference to `WinMain at 16'
>
> collect2.exe: error: ld returned 1 exit status
>
> I have several questions:
>
> 1. Does anyone know about the strange reference to WinMain at 16? This
> appears to be part of mingw, not ADMB. Internet searches suggest
> that this problem occurs with other applications of mingw. Maybe
> something is needed to tell gcc that this is a console application,
> not one that requires the full Windows subsystem.
>
> 2. What versions of mingw and msys (both 32 and 64 bit) will work
> with ADMB 11.1 and the current SVN release? For example, maybe I
> should use Arni's gcc version 4.52 with a current version of msys
> "make".
>
> 3. The ADMB site http://www.admb-project.org/tools/gcc includes
> other choices, including combined 32 and 64 bit compilers. Should we
> use one of these? Also, I don't understand the comment: "Use the
> -m64 compiler option to build 64-bit applications when working with
> a combined 32- and 64-bit compiler (gcc*-win3264.zip)." If an option
> like that is needed, wouldn't the ADMB makefiles and batch files
> have to include it?
>
> 4. Could we somehow use R tools
> (http://cran.r-project.org/bin/windows/Rtools/) as the standard
> compiler and "make" utility? Arni says that he has sometimes
> obtained his compilers from this source, so couldn't we use them
> straight from an Rtools installation?
>
> 5. Why has the ADMB project dropped the "configure" script used in
> earlier versions of ADMB? Should the current version include some
> argument to "make" that selects options like 32 or 64 bit?
>
> I realize that this message is a bit long and complicated. Maybe it
> should go only to the ADMB developers, but perhaps members of the
> larger community can contribute. The recent comments from Cliff Rice
> show that this is an important issue. If we can resolve it in a
> manner that works now and in the future, I volunteer to play a role
> in developing suitable documentation. Also, the ADMB web site needs
> a bit of reorganization to avoid the problems of conflicting
> instructions that Cliff identified. (Thanks, Cliff!) Similarly, it
> should point unambiguously to the recommended current versions of
> mingw and msys.
>
> Thanks in advance for your help. Best wishes to all,
>
> Jon Schnute
>
More information about the Users
mailing list