[ADMB Users] ADMB with gcc, mingw, and/or msys - Please fix the bug identified by Dave

Johnoel Ancheta johnoel at hawaii.edu
Mon Nov 18 16:35:52 PST 2013


Thank you all for testing and providing feedback.  I was able to duplicate
and resolve the issue.
The problem was user system PATH having sh.exe or bash.exe in it.  This
caused the build files
to use Unix commands like cp or rm instead of copy or del for Windows.  The
fixes have been
committed to version control.  Please update your copy and test the
procedures in

http://www.admb-project.org/buildbot/documentation/

As always, thank you for providing feedback.

Cheers,
Johnoel


On Sat, Nov 16, 2013 at 8:03 AM, dave fournier <davef at otter-rsch.com> wrote:

> On 13-11-15 11:49 PM, Jon Schnute wrote:
>
> As far as I can tell we are using the same code from source forge and
> installing the same way.
>
> I moved to a non re example.  To simplify I also set the environment
> string ADMB_HOME
>
> ADMB_HOME=H:\oldave\admb\build\dist
>
> However
>
> H:\oldave\admb\examples\admb\catage>admb.bat catage
>
> produces
>
> Error: tpls.tpl not found
>
> I can do the job with
>
> tpl2cpp catage
>
> followed by
>
> H:\oldave\admb\examples\admb\catage>adcomp.bat catage
>
> which produces
>
> g++ -c  -O3 -D__GNUDOS__  -Dlinux -DOPT_LIB -DUSE_LAPLACE -fpermissive -I.
> -I"H:\oldave\admb\build\dist\include" -I"H:\oldave\admb\build\dist\contrib\include"
> -o catage.obj catage.cpp
>
> and creates catage.exe which runs fine.
>
> I suspect you are finding the wrong library somewhere.  You could edit the
> adcomp.bat file to add a -v
>
> g++ -c  -v -O3 -D__GNUDOS__  -Dlinux -DOPT_LIB -DUSE_LAPLACE -fpermissive
> -I. -I"H:\oldave\admb\build\dist\include" -I"H:\oldave\admb\build\dist\contrib\include"
> -o catage.obj catage.cpp
>
> and see where it finds all the libraries.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>  Very interesting! You're obviously a better picker of Gnu software than I
>> am. Can you please give me the precise link you used to download the Gnu
>> software? Also, were you working with source code from ADMB 11.1 or the
>> more
>> current version from the SVN repository?
>>
>> Incidentally, I used the Gnu installer 'mingw-get-setup.exe' available at:
>>
>> http://sourceforge.net/projects/mingw/files/Installer/
>>
>> I then used this to install the three packages mingw32-base,
>> mingw32-gcc-g++, and msys-base. The fact that you and I get different
>> results shows that it matters which software is used. (By the way, I used
>> an
>> example without random effects, but surely that shouldn't be relevant.)
>>
>> I have another question for the ADMB community. The ADMB Downloads site
>>
>> http://code.google.com/p/admb-project/downloads/list
>>
>> has the file 'admb-11.1-windows-mingw-32bit.zip'. Can anyone tell me
>> precisely which Gnu software was used to build this binary image? Someone
>> must know because someone must have built it.
>>
>> Thanks. I think we're getting close.
>>
>> Jon
>>
>> -----Original Message-----
>> From: dave fournier [mailto:davef at otter-rsch.com]
>> Sent: November-15-13 2:58 PM
>> To: Jon Schnute; users at admb-project.org
>> Subject: Re: [ADMB Users] ADMB with gcc, mingw, and/or msys - Please fix
>> the
>> bug identified by Dave
>>
>> On 13-11-15 01:54 PM, Jon Schnute wrote:
>>
>> No it compiled fine. It was the tpl2rem step that failed.
>> Since I was interested in the link step with g++ I used a different
>> version
>> if ADMB to produce the polio.cpp and polio.htp files.
>> The compile and link using these files ran fine.  So I guess I have no
>> idea
>> why you got the winmain problem.
>>
>>
>>
>>  Thanks Dave! That's very helpful and it replicates my own experience,
>>> although you don't say precisely how the attempt to build the 'polio'
>>> example failed. (I wonder if it involved a mysterious reference to
>>> 'WinMain at 16' at the link step.)
>>>
>>> Please note that my request has nothing to do with R. All I want is a
>>> well
>>> defined procedure for building ADMB on Windows with msys/gcc. Your
>>> example
>>> and my own experience confirm that it is possible to build the ADMB
>>> binary
>>> library successfully by that route. And I'm really pleased to learn that
>>> this library actually is OK. However, you've demonstrated that the
>>> current
>>> version of ADMB has a bug in its batch scripts in the \bin directory. As
>>>
>> you
>>
>>> say, the command
>>>
>>> admb -r polio
>>>
>>> failed, yet you used manual scripts to make it work.
>>>
>>> Can someone please fix this bug? I'm not sure how this would work, but
>>> perhaps you need to send the detailed scripts that actually worked for
>>> you
>>> to the right person (Johnoel?).
>>>
>>> Incidentally, I suggested Rtools only as a possibly reliable source for
>>> mingw/gcc, given that Arni has used it in the past. I realize that many
>>>
>> ADMB
>>
>>> users have probably abandoned the Windows OS, but you still have a
>>>
>> sizeable
>>
>>> user community that uses that platform. All I'm asking is that Windows
>>>
>> users
>>
>>> should be able to download ADMB source, build it, and use it like
>>> everyone
>>> else. Unfortunately, because Windows is a crippled OS, we need to take
>>> seriously the source for Unix tools on that platform. From your
>>>
>> experience,
>>
>>> it sounds as if that shouldn't be a big deal, although the batch scripts
>>> need to be fixed.
>>>
>>> I'm trying to be helpful. Once I have a procedure that actually works,
>>>
>> I'll
>>
>>> be glad to document it if people are interested. Please note that we need
>>>
>> to
>>
>>> consider both 32- and 64- bit versions of the software. I've noticed that
>>> several msys sources are available on the Internet, so the documentation
>>> would need to be explicit about that.
>>>
>>> Best wishes,
>>>
>>> Jon
>>>
>>> -----Original Message-----
>>> From: users-bounces at admb-project.org
>>>
>> [mailto:users-bounces at admb-project.org]
>>
>>> On Behalf Of dave fournier
>>> Sent: November-14-13 3:53 PM
>>> To: users at admb-project.org
>>> Subject: Re: [ADMB Users] ADMB with gcc, mingw, and/or msys
>>>
>>>
>>> I was curious to see how hard this is.
>>>
>>> I downloaded the current mingw compiler and msys tools from source forge.
>>> I modifed my path to include the three directores for gcc msys tools and
>>> admb as below.
>>>
>>> PATH=H:\oldave\admb\build\dist\bin;c:\MinGW\msys\1.0\bin\;c:\MinGW\bin;
>>>
>>> I changed to the admb directory and typed make.  ADMB was built
>>> successfully.
>>>
>>> then I tried to compile the polio example
>>>
>>> The command
>>>
>>>                admb -r polio
>>>
>>> did not work for me.  Since I was really interested in whether the
>>> library
>>> is correct and don't like those overly complicated scripts anyway I built
>>> the cpp and htp by hand and then compiled
>>> it with   mygccs.bat where mygccs.bat contained
>>>
>>> g++.exe -Dlinux -DUSE_LAPLACE polio.cpp -o polio.exe -I.
>>> -Ih:/oldave/admb/build/dist/include -Lh:/oldave/admb/build/dist/lib
>>> -ladmb
>>>
>>>
>>> This built the polio.exe which ran successfully.
>>>
>>> I can't imagine  the average R user getting anywhere with this.
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users at admb-project.org
>>> http://lists.admb-project.org/mailman/listinfo/users
>>>
>>>
>>>
>>>
>>
>>
>>
> _______________________________________________
> Users mailing list
> Users at admb-project.org
> http://lists.admb-project.org/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.admb-project.org/pipermail/users/attachments/20131118/e90a4828/attachment.html>


More information about the Users mailing list