[GRASS5] grass51: value of $(GDALLIBS) in a Makefile

Hi,

I noticed this when compilation got to v.out.ogr, it compained about
unresolved OGR* symbols. This is due to wrong definition of GDALLIBS in
Platform.make -- here's what it has:

gdal
GDALLIBS = -ldl

After fixing it to:
GDALLIBS = -lgdal

everything worked ok. Unfortunately I don't know enough about Makefile.in
stuff to see how this was generated

Aleksey
--
Aleksey Naumov
GIS Analyst
Center for Health and Social Research
Buffalo State College

On Sat, 14 Jun 2003, Aleksey Naumov wrote:

Hi,

I noticed this when compilation got to v.out.ogr, it compained about
unresolved OGR* symbols. This is due to wrong definition of GDALLIBS in
Platform.make -- here's what it has:

You need to use the --with-gdal option with the configure script. I will
look at making this the default for 5.1

Paul

Hi,

I am having the similar problem in v.in.ogr (even with -with-gdal option):

make[2]: Entering directory `/home/grass/grass51_exp_2003_06_07/vector/v.in.ogr'
...
    main.c: In function `main':
    main.c:142: `wkbLinearRing' undeclared (first use in this function)
    main.c:142: (Each undeclared identifier is reported only once
    main.c:142: for each function it appears in.)
    main.c:52: warning: `Ogr_layer' might be used uninitialized in this function
    main.c: At top level:
    /home/grass/grass51_exp_2003_06_07/include/gis.h:36: warning: `GRASS_copyright' defined but not used
    make[2]: *** [OBJ.i686-pc-linux-gnu/main.o] Error 1
    make[2]: Leaving directory `/home/grass/grass51_exp_2003_06_07/vector/v.in.ogr'
    make[1]: *** [subdirs] Error 1
    make[1]: Leaving directory `/home/grass/grass51_exp_2003_06_07/vector'
    make: *** [default] Error 1

Moreover, v.out.ogr compiled OK but it doesn't work:

GRASS 5.1.0-cvs:~ > v.out.ogr
v.out.ogr: error while loading shared libraries: libgdal.1.1.so: cannot open shared object file: No such file or directory

Jaro

Paul Kelly wrote:

On Sat, 14 Jun 2003, Aleksey Naumov wrote:

Hi,

I noticed this when compilation got to v.out.ogr, it compained about
unresolved OGR* symbols. This is due to wrong definition of GDALLIBS in
Platform.make -- here's what it has:

You need to use the --with-gdal option with the configure script. I will
look at making this the default for 5.1

Paul

_______________________________________________
grass5 mailing list
grass5@grass.itc.it
http://grass.itc.it/mailman/listinfo/grass5

Yaro,

Is your libgdal.1.1.so in the library search path (in $LD_LIBRARY_PATH or
directory where it is listed in /etc/ld.so.conf (then you also have to do
/sbin/ldconfig))? I also had to add a link to my libgdal.1.1.so:
libgdal.so -> libgdal.1.1.so, in order for the -lgdal linking flag to work.

Aleksey

On Sunday 15 June 2003 03:02 pm, Jaro Hofierka wrote:

Hi,

I am having the similar problem in v.in.ogr (even with -with-gdal option):

make[2]: Entering directory
`/home/grass/grass51_exp_2003_06_07/vector/v.in.ogr'
...
    main.c: In function `main':
    main.c:142: `wkbLinearRing' undeclared (first use in this function)
    main.c:142: (Each undeclared identifier is reported only once
    main.c:142: for each function it appears in.)
    main.c:52: warning: `Ogr_layer' might be used uninitialized in this
function
    main.c: At top level:
    /home/grass/grass51_exp_2003_06_07/include/gis.h:36: warning:
`GRASS_copyright' defined but not used
    make[2]: *** [OBJ.i686-pc-linux-gnu/main.o] Error 1
    make[2]: Leaving directory
`/home/grass/grass51_exp_2003_06_07/vector/v.in.ogr'
    make[1]: *** [subdirs] Error 1
    make[1]: Leaving directory `/home/grass/grass51_exp_2003_06_07/vector'
    make: *** [default] Error 1

Moreover, v.out.ogr compiled OK but it doesn't work:

GRASS 5.1.0-cvs:~ > v.out.ogr
v.out.ogr: error while loading shared libraries: libgdal.1.1.so: cannot
open shared object file: No such file or directory

Jaro

Paul Kelly wrote:
> On Sat, 14 Jun 2003, Aleksey Naumov wrote:
>>Hi,
>>
>>I noticed this when compilation got to v.out.ogr, it compained about
>>unresolved OGR* symbols. This is due to wrong definition of GDALLIBS in
>>Platform.make -- here's what it has:
>
> You need to use the --with-gdal option with the configure script. I will
> look at making this the default for 5.1
>
> Paul
>
> _______________________________________________
> grass5 mailing list
> grass5@grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass5

_______________________________________________
grass5 mailing list
grass5@grass.itc.it
http://grass.itc.it/mailman/listinfo/grass5

--
Aleksey Naumov
GIS Analyst
Center for Health and Social Research
Buffalo State College

Hi Aleksey,

Thanks for hints regarding ld.co.conf,ldconfig and linking libgdal.so to libgdal.1.1.so. Now the modules run with no problem.

Jaro

Aleksey Naumov wrote:

Hi,

I noticed this when compilation got to v.out.ogr, it compained about unresolved OGR* symbols. This is due to wrong definition of GDALLIBS in Platform.make -- here's what it has:

gdal
GDALLIBS = -ldl

After fixing it to:
GDALLIBS = -lgdal

everything worked ok. Unfortunately I don't know enough about Makefile.in stuff to see how this was generated

Aleksey

On Sunday 15 June 2003 21:02, Jaro Hofierka wrote:

Hi,

I am having the similar problem in v.in.ogr (even with -with-gdal option):

make[2]: Entering directory
`/home/grass/grass51_exp_2003_06_07/vector/v.in.ogr'
...
    main.c: In function `main':
    main.c:142: `wkbLinearRing' undeclared (first use in this function)
    main.c:142: (Each undeclared identifier is reported only once
    main.c:142: for each function it appears in.)
    main.c:52: warning: `Ogr_layer' might be used uninitialized in this

wkbLinearRing is 'new' in OGR, I wanted to change it to wkbLineString which
I hope could work. But I was not able to compile OGR without OGDI and I could not
get compiled OGDI, so I have not submited this yet.

Radim

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Radim Blazek wrote:

On Sunday 15 June 2003 21:02, Jaro Hofierka wrote:

Hi,

I am having the similar problem in v.in.ogr (even with -with-gdal option):

make[2]: Entering directory
`/home/grass/grass51_exp_2003_06_07/vector/v.in.ogr'
...
  main.c: In function `main':
  main.c:142: `wkbLinearRing' undeclared (first use in this function)
  main.c:142: (Each undeclared identifier is reported only once
  main.c:142: for each function it appears in.)
  main.c:52: warning: `Ogr_layer' might be used uninitialized in this

wkbLinearRing is 'new' in OGR, I wanted to change it to wkbLineString

which

I hope could work. But I was not able to compile OGR without OGDI and

I could not

get compiled OGDI, so I have not submited this yet.

BTW, this means that you need a recent cvs snapshot of gdal to build
these, it would be nice if this could be noted somewhere ...

Regards,
Buchan

- --
|--------------Another happy Mandrake Club member--------------|
Buchan Milne Mechanical Engineer, Network Manager
Cellphone * Work +27 82 472 2231 * +27 21 8828820x202
Stellenbosch Automotive Engineering http://www.cae.co.za
GPG Key http://ranger.dnsalias.com/bgmilne.asc
1024D/60D204A7 2919 E232 5610 A038 87B1 72D6 AC92 BA50 60D2 04A7
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE+7vzcrJK6UGDSBKcRAghUAJ0QpxF2N5Elgw5hi1a1z5tdUbpTVACdEa/a
EFJZzyp+TC7cKSN4QfVyTmI=
=602f
-----END PGP SIGNATURE-----

******************************************************************
Please click on http://www.cae.co.za/disclaimer.htm to read our
e-mail disclaimer or send an e-mail to info@cae.co.za for a copy.
******************************************************************