[Developers] How to build admb source with mingw 64 - finally!

Jon Schnute schnutej-dfo at shaw.ca
Wed Dec 11 23:27:28 PST 2013


Johnoel - The build from Rtools worked for me too. I also noticed that you
included the parameter "-m64" in the script "admb.cmd", so that the 64 bit
version of g++ gets invoked in the compile and link steps of when making
*.exe from *.tpl.

 

Would "make CXXFLAGS=-m32 LDFLAGS=-m32" produce 32 bit  code for users with
an older version of Windows? Please reply to this question.

 

Chris, I don't consider our experiments with msys and mingw to be a waste of
time. We actually did get everything working. Also, I note the "make"
command in Rtools doesn't work for building ADMB. (I tried it.) Instead,
Johnoel uses the "utilities\make" function embedded in the ADMB package.
This has unknown origin (to me at least) and lacks modern support.

 

What if R someday changes its approach to Rtools? What if the historical
"utilities\make" fails in some newer environment?

 

Arni, thanks for your recent comments. I'm really glad you joined the
discussion. At some point, I'll pull together some pros and cons associated
with the original MinGW, Rtools, and MinGW-w64. I think the third route
might be safest in the long run. It serves a generic purpose (not just R),
and it has the most dedicated support. 

 

Jon

 

From: Grandin, Chris [mailto:Chris.Grandin at dfo-mpo.gc.ca] 
Sent: December-11-13 8:06 AM
To: Johnoel Ancheta
Cc: Cooper, Wade; Arni Magnusson; Jon Schnute; John Sibert;
developers at admb-project.org; Haigh, Rowan
Subject: RE: How to build admb source with mingw 64 - finally!

 

Johnoel, the rtools 64 build works for me for both release and debug makes.
gdb works for the debug version just fine. Wish I knew it was this easy - I
sure wasted my time messing around with msys and mingw. Never again
Chris



-----Original Message-----
From: Johnoel Ancheta [mailto:johnoel at hawaii.edu]
Sent: Tue 12/10/2013 4:05 PM
To: Grandin, Chris
Cc: Cooper, Wade; Arni Magnusson; Jon Schnute; John Sibert;
developers at admb-project.org; Haigh, Rowan
Subject: Re: How to build admb source with mingw 64 - finally!

For Rtools and 64bit

C:\admb\> utilitites\make CXXFLAGS=-m64 LDFLAGS=-m64

Please svn update


On Tue, Dec 10, 2013 at 7:19 AM, Grandin, Chris <Chris.Grandin at dfo-mpo.gc.ca
<mailto:Chris.Grandin at dfo-mpo.gc.ca%0b> 
> wrote:

>  Thanks Wade,
>   I also wanted to add that the method Wade and I have been using there
> are no further changes to the building procedure required, Johnoel has
> worked hard at getting it stable and I think if we avoid needing flags for
> building in 64 bit and just rely on the build chain in place on each
> persons' machine it would be much simpler. Does rtools work like this or
> does its compiler need 64-bit build flags?
>
>
> Cheers
> Chris
>
>
> -----Original Message-----
> From: Cooper, Wade [mailto:Wade.Cooper at MyFWC.com <Wade.Cooper at MyFWC.com>]
> Sent: Tue 12/10/2013 9:15 AM
> To: Arni Magnusson; Grandin, Chris
> Cc: Jon Schnute; John Sibert; Johnoel Ancheta;
developers at admb-project.org;
> Haigh, Rowan
> Subject: RE: How to build admb source with mingw 64 - finally!
>
> Hi Arni,
>
> I've never used Rtools for building so can't comment on pros/cons.  It
> sounds like you've worked this out in an easier fashion so I'd be
> interested in experimenting if you could send a brief overview of how one
> would build the ADMB source using Rtools.
>
> I work in Eclipse and remember having issues getting the Eclipse CDT
> working with the Rtools GCC a few years back.  Hence I switched to my
> current configuration (TDM, msys) mainly because it was the only way I
> could get 64bit Eclipse playing well on 64bit XP, and it worked for ADMB
> too.  Everything may work fine now since 64bit support in Windows is
> progressing a bit since XP.
>
> Wade
>
>
> -----Original Message-----
> From: Arni Magnusson [mailto:arnima at hafro.is <arnima at hafro.is>]
> Sent: Tuesday, December 10, 2013 12:04 PM
> To: Chris Grandin
> Cc: Jon Schnute; Cooper, Wade; John Sibert; Johnoel Ancheta;
> developers at admb-project.org; Rowan Haigh
> Subject: Re: How to build admb source with mingw 64 - finally!
>
> Hi all,
>
> Good to hear that the Windows build is working smoothly now. Your efforts
> are appreciated by everyone, including me.
>
> In July, I built both 32 and 64 bit ADMB using the GCC compiler that comes
> with Rtools. At that point I suggested we use whatever GCC is in the most
> current Rtools distribution as our main compiler. This suggestion was
based
> on (1) successful compilation, (2) letting the R people [Murdoch, Ripley]
> do the hard work of finding the best GCC compiler for Windows, (3) R will
> be around for many more years, and (4) many people already have Rtools
> installed and in their PATH. The Rtools GCC also comes with gdb and some
> other useful tools.
>
> Rtools is considerably smaller and feels more native than MSYS. If I
> remember correctly, MSYS comes with some medium-size programs, such as a
> Perl interpreter.
>
> Can someone summarize the main pros and cons of Rtools vs. MSYS for
> building ADMB?
>
> I appreciate the usefulness of MSYS for developers, but isn't it a bit too
> large to fit inside the ADMB-IDE installer?
>
> Arni
>
>
>
> On Tue, 10 Dec 2013, Grandin, Chris wrote:
>
> > The 64-bit debug build also works perfectly. The 64-bit gdb.exe
> > debugger is included with mingw64 and works with the emacs IDE.
> > Whichever file we use for msys 64 is fine with me as long as it works!
> >
> > Arni had a problem with us using MSYS, I'm not sure what we can do
> > about that but I think it is more important to evolve the software to
> > 64-bit than to shelter some people from this.
> >
> > Jon - I have always used the shell because it ensures your commands
> > are the msys/mingw ones. For example windows has a find.exe command,
> > and you don't want your build to use this, you want it to use the
> > mingw find.exe. The source may build how it currently stands in DOS
> > but remember that some future changes could break this.
> >
> > If you want to try making the debug build, just do 'make debug'
> > instead of 'make' in the instructions I sent out.
> >
> > Cheers
> > Chris
> >
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.admb-project.org/pipermail/developers/attachments/20131211/0dd923d3/attachment.html>


More information about the Developers mailing list