[Gdal-dev] Java and the build environment

Andrea Aime aaime at openplans.org
Wed Apr 25 11:02:29 EDT 2007


Ari Jolma ha scritto:
> Andrea Aime kirjoitti:
>>
>> On mingw I cannot even make gdal compile, I guess I need a "gdal+mingw 
>> for dummies" guide to try this road.
> 
> Get MinGW-5.1.3 exe, MSYS-1.0.10.exe, w32api-3.8.tar.gz, 
> binutils-2.17.50-20060824-1.tar.gz and install them (this may not be 
> comprehensive list but start with MinGW and execute the install package 
> and try to add gcc etc. - the tar packages you just unpack to c:\mingw). 
> Then open MSYS prompt, go to the dir where you unpacked GDAL, and issue 
> commands:
> 
> ./configure
> make
> make install
> 
> And you should have libgdal-1.dll in your c:\msys\1.0\local\bin and 
> libgdal-1.dll.a in c:\msys\1.0\local\lib.
> 
> Easy :)

Hi,
thanks for the heads up. In fact, the mingw installer downloaded and 
installed w32api and binutils for me once I asked for the g++ compiler
in the installer selection list, so I ended up installing only mingw
and msys.

Now, configure goes fine, make breaks during linking with the following
error message:

libtool: link: rm -fr  .libs/libgdal.la.lnkscript
libtool: link: creating GNU ld script: .libs/libgdal.la.lnkscript
libtool: link: g++ -shared -nostdlib /mingw/lib/dllcrt2.o 
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/crtbegin.o 
.libs/libgdal.la.lnkscript  -Lc:/MinGW/bin/../lib/gcc/mingw32/3.4.2 
-Lc:/MinGW/bin/../lib/gcc -L/mingw/lib/gcc/mingw32/3.4.2 
-Lc:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../mingw32/lib 
-L/mingw/lib/gcc/mingw32/3.4.2/../../../../mingw32/lib -L/mingw/lib 
-Lc:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../.. 
-L/mingw/lib/gcc/mingw32/3.4.2/../../.. -lstdc++ -lmingw32 -lgcc 
-lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 
-lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt 
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/crtend.o  -o .libs/libgdal-1.dll 
-Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker 
.libs/libgdal.dll.a
c:\MinGW\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe: 
cannot find /c/progetti/gdal/gdalMing/frmts/o/.libs/EnvisatFile.o
collect2: ld returned 1 exit status
make[1]: *** [libgdal.la] Error 1
make[1]: Leaving directory `/c/progetti/gdal/gdalMing'
make: *** [check-lib] Error 2

The funny thing is that I checked, and that EnvisatFile.o is there
were it's looking for it.

At first I suspected env variables, so I cleaned up PATH and
LIB so that the first was minimal and the second was empty.
Then I suspected binutils, and noticed that binutils was not
the one you suggested to install, so I downloaded the tar.gz and 
overwritten the one installed along with MinGW.
Both attempt failed, the error is still the same. Any ideas about
what I did wrong?

Oh, btw, I'm building trunk, not 1.4.x.

Cheers
Andrea




More information about the Gdal-dev mailing list