[GRASS-dev] Linking gdal 1.5.1 in mingw

Hi all,

I've struggled with this for most of today, so thought see if anyone
here had any clues to my troubles.

I'm following the below guide to compile GRASS and related libraries
from scratch on Windows using MinGW:

http://www.webalice.it/marco.pasetti/grass/BuildFromSource.html

I've gotten up to compiling GDAL, but it doesn't link... saying:

----

libtool: link: g++ -shared -nostdlib
C:/msys/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../dllcrt2.o
C:/msys/mingw/bin/../lib/gcc/mingw32/3.4.5/crtbegin.o
.libs/libgdal.la.lnkscript -L/usr/local/lib
/usr/local/lib/libgeos_c.dll.a /usr/local/lib/libgeos.dll.a
-L/usr/local/sqlite/lib /usr/local/sqlite/lib/libsqlite3.dll.a
-LC:/msys/local/pgsql/lib -lpq
-LC:/msys/mingw/bin/../lib/gcc/mingw32/3.4.5
-LC:/msys/mingw/bin/../lib/gcc
-LC:/msys/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../mingw32/lib
-LC:/msys/mingw/bin/../lib/gcc/mingw32/3.4.5/../../.. -lstdc++
-lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32
-ladvapi32 -lshell32 -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt
C:/msys/mingw/bin/../lib/gcc/mingw32/3.4.5/crtend.o -o
.libs/libgdal-1.dll -Wl,--enable-auto-image-base -Xlinker --out-implib
-Xlinker .libs/libgdal.dll.a
C:\msys\mingw\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe:
cannot find /usr/local/src/gdal-1.5.1/ogr/ogrsf_frmts/o/.libs/arraylist.o
collect2: ld returned 1 exit status
make[1]: *** [libgdal.la] Error 1
make[1]: Leaving directory `/usr/local/src/gdal-1.5.1'
make: *** [check-lib] Error 2

----

When I check for the missing file,
/usr/local/src/gdal-1.5.1/ogr/ogrsf_frmts/o/.libs/arraylist.o seems to
be sitting there with appropriate permissions and all.

Looking around, alot of the GDAL compilation guides say to configure
using "--without-libtool" but that just results in lots of undefined
references.

Has any one successfully compiled GDAL 1.5.1 using the above guide?

Thanks in advance for any help,

J

Hi Joel,

Has any one successfully compiled GDAL 1.5.1 using the above guide?

yes, sure, I never publish anything if I don’t check it’s actually working :wink:
did you hacked gdal-1.5.1\GNUmakefile?

Marco Pasetti


Da: grass-dev-bounces@lists.osgeo.org per conto di Joel Pitt
Inviato: mar 22/04/2008 10.54
A: Grass Developers List
Oggetto: [GRASS-dev] Linking gdal 1.5.1 in mingw

Hi all,

I’ve struggled with this for most of today, so thought see if anyone
here had any clues to my troubles.

I’m following the below guide to compile GRASS and related libraries
from scratch on Windows using MinGW:

http://www.webalice.it/marco.pasetti/grass/BuildFromSource.html

I’ve gotten up to compiling GDAL, but it doesn’t link… saying:


libtool: link: g++ -shared -nostdlib
C:/msys/mingw/bin/…/lib/gcc/mingw32/3.4.5/…/…/…/dllcrt2.o
C:/msys/mingw/bin/…/lib/gcc/mingw32/3.4.5/crtbegin.o
.libs/libgdal.la.lnkscript -L/usr/local/lib
/usr/local/lib/libgeos_c.dll.a /usr/local/lib/libgeos.dll.a
-L/usr/local/sqlite/lib /usr/local/sqlite/lib/libsqlite3.dll.a
-LC:/msys/local/pgsql/lib -lpq
-LC:/msys/mingw/bin/…/lib/gcc/mingw32/3.4.5
-LC:/msys/mingw/bin/…/lib/gcc
-LC:/msys/mingw/bin/…/lib/gcc/mingw32/3.4.5/…/…/…/…/mingw32/lib
-LC:/msys/mingw/bin/…/lib/gcc/mingw32/3.4.5/…/…/… -lstdc++
-lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32
-ladvapi32 -lshell32 -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt
C:/msys/mingw/bin/…/lib/gcc/mingw32/3.4.5/crtend.o -o
.libs/libgdal-1.dll -Wl,–enable-auto-image-base -Xlinker --out-implib
-Xlinker .libs/libgdal.dll.a
C:\msys\mingw\bin..\lib\gcc\mingw32\3.4.5........\mingw32\bin\ld.exe:
cannot find /usr/local/src/gdal-1.5.1/ogr/ogrsf_frmts/o/.libs/arraylist.o
collect2: ld returned 1 exit status
make[1]: *** [libgdal.la] Error 1
make[1]: Leaving directory `/usr/local/src/gdal-1.5.1’
make: *** [check-lib] Error 2


When I check for the missing file,
/usr/local/src/gdal-1.5.1/ogr/ogrsf_frmts/o/.libs/arraylist.o seems to
be sitting there with appropriate permissions and all.

Looking around, alot of the GDAL compilation guides say to configure
using “–without-libtool” but that just results in lots of undefined
references.

Has any one successfully compiled GDAL 1.5.1 using the above guide?

Thanks in advance for any help,

J


grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

<marco.pasetti <at> alice.it> writes:

Hi Joel,

>Has any one successfully compiled GDAL 1.5.1 using the above guide?

yes, sure, I never publish anything if I don't check it's actually working
did you hacked gdal-1.5.1\GNUmakefile?

Not the makefile, I think: see below.

Marco Pasetti

Da: grass-dev-bounces <at> lists.osgeo.org per conto di Joel PittInviato:

mar 22/04/2008 10.54A: Grass Developers ListOggetto: [GRASS-dev] Linking
gdal 1.5.1 in mingw

Hi all,I've struggled with this for most of today, so thought see if

anyonehere had any clues to my troubles.I'm following the below guide to
compile GRASS and related librariesfrom scratch on Windows using
MinGW:http://www.webalice.it/marco.pasetti/grass/BuildFromSource.htmlI’ve
gotten up to compiling GDAL, but it doesn't link... saying:-

-----------------

The specific problem is that the libtools builder file is broken in 1.5.*,
and at line 5658 or thereabouts in ltmain.sh, you see an

$ECHO "$obj" >> $output

which needs an inserted

$ECHO "$obj" | ${SED} -e 's/^.*gdal-[0-9].[0-9].[0-9]/\./' >> $output

to edit out the unneeded path name. This was found by inspecting the
$output file (it is deleted quickly, so you have to grab it while it
is there), but I'm open to alternative fixes.

Roger

----------------

When I check for the missing
file,/usr/local/src/gdal-1.5.1/ogr/ogrsf_frmts/o/.libs/arraylist.o seems
tobe sitting there with appropriate permissions and all.Looking around,
alot of the GDAL compilation guides say to configureusing
"--without-libtool" but that just results in lots of undefinedreferences.
Has any one successfully compiled GDAL 1.5.1 using the above guide?Thanks
in advance for any help,J

Hi Roger,

since I compiled it just yesterday, I don’t see how could that be, if he followed my guide in every instruction.
Libtool fails because he needs to work with different paths as set by default in the makefile; that’s why it’s necessaty to modify it.

Marco


Da: grass-dev-bounces@lists.osgeo.org per conto di Roger Bivand
Inviato: mar 22/04/2008 11.26
A: grass-dev@lists.osgeo.org
Oggetto: [GRASS-dev] Re: R: Linking gdal 1.5.1 in mingw

<marco.pasetti alice.it> writes:

Hi Joel,

Has any one successfully compiled GDAL 1.5.1 using the above guide?

yes, sure, I never publish anything if I don’t check it’s actually working
did you hacked gdal-1.5.1\GNUmakefile?

Not the makefile, I think: see below.

Marco Pasetti

Da: grass-dev-bounces lists.osgeo.org per conto di Joel PittInviato:
mar 22/04/2008 10.54A: Grass Developers ListOggetto: [GRASS-dev] Linking
gdal 1.5.1 in mingw

Hi all,I’ve struggled with this for most of today, so thought see if
anyonehere had any clues to my troubles.I’m following the below guide to
compile GRASS and related librariesfrom scratch on Windows using
MinGW:http://www.webalice.it/marco.pasetti/grass/BuildFromSource.htmlI’ve
gotten up to compiling GDAL, but it doesn’t link… saying:-


The specific problem is that the libtools builder file is broken in 1.5.*,
and at line 5658 or thereabouts in ltmain.sh, you see an

$ECHO “$obj” >> $output

which needs an inserted

$ECHO “$obj” | ${SED} -e ‘s/^.*gdal-[0-9].[0-9].[0-9]/./’ >> $output

to edit out the unneeded path name. This was found by inspecting the
$output file (it is deleted quickly, so you have to grab it while it
is there), but I’m open to alternative fixes.

Roger


When I check for the missing
file,/usr/local/src/gdal-1.5.1/ogr/ogrsf_frmts/o/.libs/arraylist.o seems
tobe sitting there with appropriate permissions and all.Looking around,
alot of the GDAL compilation guides say to configureusing
“–without-libtool” but that just results in lots of undefinedreferences.
Has any one successfully compiled GDAL 1.5.1 using the above guide?Thanks
in advance for any help,J


grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

On Tue, 22 Apr 2008, marco.pasetti@alice.it wrote:

Hi Roger,

since I compiled it just yesterday, I don't see how could that be, if he followed my guide in every instruction. Libtool fails because he needs to work with different paths as set by default in the makefile; that's why it's necessaty to modify it.

OK, I accept that you could edit the GNUMakefile instead of ltmain.sh, really it is the same problem that since 1.5, GDAL and MSYS are not friends.

Roger

Marco

________________________________

Da: grass-dev-bounces@lists.osgeo.org per conto di Roger Bivand
Inviato: mar 22/04/2008 11.26
A: grass-dev@lists.osgeo.org
Oggetto: [GRASS-dev] Re: R: Linking gdal 1.5.1 in mingw

<marco.pasetti <at> alice.it> writes:

Hi Joel,

Has any one successfully compiled GDAL 1.5.1 using the above guide?

yes, sure, I never publish anything if I don't check it's actually working
did you hacked gdal-1.5.1\GNUmakefile?

Not the makefile, I think: see below.

Marco Pasetti

Da: grass-dev-bounces <at> lists.osgeo.org per conto di Joel PittInviato:

mar 22/04/2008 10.54A: Grass Developers ListOggetto: [GRASS-dev] Linking
gdal 1.5.1 in mingw

Hi all,I've struggled with this for most of today, so thought see if

anyonehere had any clues to my troubles.I'm following the below guide to
compile GRASS and related librariesfrom scratch on Windows using
MinGW:http://www.webalice.it/marco.pasetti/grass/BuildFromSource.htmlI’ve
gotten up to compiling GDAL, but it doesn't link... saying:-

-----------------

The specific problem is that the libtools builder file is broken in 1.5.*,
and at line 5658 or thereabouts in ltmain.sh, you see an

$ECHO "$obj" >> $output

which needs an inserted

$ECHO "$obj" | ${SED} -e 's/^.*gdal-[0-9].[0-9].[0-9]/\./' >> $output

to edit out the unneeded path name. This was found by inspecting the
$output file (it is deleted quickly, so you have to grab it while it
is there), but I'm open to alternative fixes.

Roger

----------------

When I check for the missing
file,/usr/local/src/gdal-1.5.1/ogr/ogrsf_frmts/o/.libs/arraylist.o seems
tobe sitting there with appropriate permissions and all.Looking around,
alot of the GDAL compilation guides say to configureusing
"--without-libtool" but that just results in lots of undefinedreferences.
Has any one successfully compiled GDAL 1.5.1 using the above guide?Thanks
in advance for any help,J

_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

--
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand@nhh.no

On Wed, Apr 23, 2008 at 12:40 AM, Roger Bivand <Roger.Bivand@nhh.no> wrote:

On Tue, 22 Apr 2008, marco.pasetti@alice.it wrote:
> since I compiled it just yesterday, I don't see how could that be, if he
followed my guide in every instruction. Libtool fails because he needs to
work with different paths as set by default in the makefile; that's why it's
necessaty to modify it.
>

OK, I accept that you could edit the GNUMakefile instead of ltmain.sh,
really it is the same problem that since 1.5, GDAL and MSYS are not friends.

Thanks for the help guys!

I had actually made a mistake with not editing the GNUMakefile... but
I went back and changed it, did a make clean, reconfigured and started
from scratch but obviously that wasn't sufficient...

Cheers,
J