DocJon / pbs-admb

Automatically exported from code.google.com/p/pbs-admb
0 stars 0 forks source link

Failure in Windows with mingw #28

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Following the instructions in "building beta from source", I installed the 
C/C++ compilers from mingw, as well as flex from GnuWin32. I also obtained ADMB 
10.0. Finally, with paths as described in Alex's instructions, I ran the command

mingw32-make --file=mingw.mak

in the src directory of ADMB. The build seemed to work, although it failed to 
put the relevant batch files (admb.bat, adcomp.bat, adlink.bat) in the bin 
directory of the compiled ADMB binary (as it should have).

I copied the binary of ADMB from ..\dists to a suitable location. I then used 
the latest version of PBSadmb with paths set appropriately in ADopts.txt. The 
"convert" phase worked, but the "compile" phase did not produce a ".o" file, 
even though the "compile" command generated no error messages in the R console.

Questions: (1) Why don't we use the "configure" step in the ADMB documentation? 
(2) Why don't the usual batch files appear in the ADMB bin directory? (3) Why 
does PBSadmb fail with this apparently valid ADMB installation? (4) Have I 
missed something in the steps above?

Original issue reported on code.google.com by schnu...@shaw.ca on 30 Jan 2011 at 8:31

GoogleCodeExporter commented 9 years ago
1) configure is linux only

2) The makefile copies all scripts from
C:\admb_build\admb-10.0\scripts\mingw\*.bat - which does not contain admb.bat
(this occurs in mingw.mak)
There is a scripts\g++ directory which contains the bat files which is copied 
from the linux.mak file
    cp ../scripts/g++/adcomp.bat ${DISK}/bin
    cp ../scripts/g++/adlink.bat ${DISK}/bin

*this doesn't make sense to me - why would the linux version have any use for a 
.bat file?

3) PBSadmb is working for me on windows (albeit without using any of the 
missing .bat files)

4) is this a 32 or 64 bit version? It's probably best to run the compile 
command directly in a cmd window to make sure there's no missing output.

Original comment by alex_goo...@mofo.ca on 31 Jan 2011 at 7:49

GoogleCodeExporter commented 9 years ago
***** Item 1. The file ReadMe.txt included with version 10.0 has the following 
material. Please note step 4, which uses configure.

Microsoft Windows and MinGW (msys and gcc-4.5)
----------------------------------------------
1. Open MinGW Shell located in Start->MinGW->MinGW Shell.
2. Extract source distribution.
   $ unzip admb-10.0.zip
3. Change to distribution directory
   $ cd admb-10.0
4. Configure the build files for 32-bit
   $ ./configure
5. Build libraries 
   $ make
6. [Optional] Test build by running examples
   $ make verify
7. Install libraries to default location /usr/local.
   $ make install

***** Item 2. Thanks very much for your explanation. I definitely agree about 
the batch files in Linux, and indeed about everything you say in regard to 
ADMB's code distribution philosophy.

***** Item 3. I'm confused here. I thought we agreed to use the native scripts, 
rather than our commands built from ADMBcmd. If so, how did PBSadmb work for 
you without the missing .bat files?

***** Item 4. I built the 32 bit version. I suspect that I'm missing some 
critical step in building and installing ADMB. Other than putting the ADMB 
directories from the compiled version in some location and setting up PBSadmb 
via our GUI (i.e., configuring ADopts.txt), do I need to do anything else?

Original comment by schnu...@shaw.ca on 31 Jan 2011 at 8:44

GoogleCodeExporter commented 9 years ago
our internal build instructions can be found at 
http://code.google.com/p/pbs-admb/source/browse/trunk/Authors/building_admb10_in
structions.txt

Original comment by alex_goo...@mofo.ca on 6 Mar 2011 at 8:37