[GRASS5] Problems compiling grass51/57 on cygwin

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

I need just a basic grass51/57 on cygwin (since I do actualy work on
linux, but for a simulation I need it running on Windows), so I tried to
build from my cvs snapshot from the weekend that built fine with all
options on my linux boxes, but I still ran into problems.

Firstly, it seems 'make mix' has problems on Cygwin (due to problems
with symbolic links it sees).

Secondly, I got the common cygwin error "undefined reference to
WinMain@16". Googling for this seemed to indicate that the "-shared"
option needs to be passed for linking, so I added this in
include/Make/Shlib.make (I guess there should be a better solution).

The build then at least procedes further and links some libraries, but I
then get a whole bunch of errors in lib/gis/env.c (starting with
G_GISRC_MODE_FILE undeclared), which I haven't as yet been able to resolve.

Is anyone else seeing these issues (or do I need to update my Cygwin
installation - it was running the binary dist of 5.0.0 quite well though)?

It would help if the documentation (ie INSTALL) mentioned at least the
first issue (if it's not irrelevant).

Finally, I would also be interested in a binary Cygwin build (I
essentially just need to be able to compile something similar to
v.net.path ...) if anyone has one.

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/ebNIrJK6UGDSBKcRAkZSAJ9XboZmuAigNIrssfyYlVnm93vZywCffpf/
QGjQopRA2TwzgSl0MYgBcfE=
=am6Y
-----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.
*****************************************************************

Buchan Milne wrote:

The build then at least procedes further and links some libraries, but I
then get a whole bunch of errors in lib/gis/env.c (starting with
G_GISRC_MODE_FILE undeclared), which I haven't as yet been able to resolve.

G_GISRC_MODE_FILE is defined in gis.h. Do you have another copy of
gis.h in any of the directories in the compiler's search path (i.e.
those specified by -I switches, plus default directories such as
/usr/include)?

--
Glynn Clements <glynn.clements@virgin.net>

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

Glynn Clements wrote:

Buchan Milne wrote:

The build then at least procedes further and links some libraries, but I
then get a whole bunch of errors in lib/gis/env.c (starting with
G_GISRC_MODE_FILE undeclared), which I haven't as yet been able to

resolve.

G_GISRC_MODE_FILE is defined in gis.h. Do you have another copy of
gis.h in any of the directories in the compiler's search path (i.e.
those specified by -I switches, plus default directories such as
/usr/include)?

gis.h was truncated for some reason (possibly due to trying 'make mix').

There seem to be a number of other problems, especially when trying to
do a minimal compile ...

I had to add $(GISLIB) to EXTRA_LIBS for most of the stuff in lib/db,
and it seems to not be possible to compile without fftw (even if using
- --with-fftw=no in configure).

Oh, and shared libraries were being created without extension too ...

And configure seems to not check (or I missed it) for a working bison
and flex.

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/evZirJK6UGDSBKcRAs/cAJ9bezPGcKUMp/Vi7j7tv7SJ0Y4l7gCgtIqP
acNzg9MaDkoyD7kZ29s4n08=
=D2fZ
-----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.
*****************************************************************

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

Buchan Milne wrote:

There seem to be a number of other problems, especially when trying to
do a minimal compile ...

I had to add $(GISLIB) to EXTRA_LIBS for most of the stuff in lib/db,
and it seems to not be possible to compile without fftw (even if using
--with-fftw=no in configure).

lib/gmath/del2g.c needs a wrapping:
#if defined(HAVE_FFTW_H) || defined(HAVE_DFFTW_H)

since it uses a function which is wrapped by this ...

And even though I configured without tcltk, lib/form/open.c is wanting
to include the X headers inherited from tk.h, and wanting to link to tcl
libs.

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/ev66rJK6UGDSBKcRAtdxAKDG/hzncG3pI3cC5UYHozhYYBmY4wCggIm6
Z/YRs4UvUmOalOaD8WrSvWM=
=qK5N
-----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.
*****************************************************************

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

Buchan Milne wrote:

Buchan Milne wrote:

There seem to be a number of other problems, especially when trying to
do a minimal compile ...

I had to add $(GISLIB) to EXTRA_LIBS for most of the stuff in lib/db,
and it seems to not be possible to compile without fftw (even if using
--with-fftw=no in configure).

lib/gmath/del2g.c needs a wrapping:
#if defined(HAVE_FFTW_H) || defined(HAVE_DFFTW_H)

since it uses a function which is wrapped by this ...

And even though I configured without tcltk, lib/form/open.c is wanting
to include the X headers inherited from tk.h, and wanting to link to tcl
libs.

Similar problems with lib/ogsf/gvd.c and OpenGL ...

Maybe someone should try compiling with none of the optional
requirements, and see if they are still optional. I wanted to avoid
installing a whole bunch of software on my cygwin installation (which is
short on disk space), and was prepared to lose all the features, but it
seems I would have been better off repartitioning my system to make more
space ...

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/ewm1rJK6UGDSBKcRAoLcAKCs7YeHunmeTV0Z4xLRvP/0L6dAMACgwfbj
lTgYu5vus42MZa9RS+XBKHk=
=86tp
-----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.
*****************************************************************

On Wednesday 01 October 2003 17:44, Buchan Milne wrote:

There seem to be a number of other problems, especially when trying to
do a minimal compile ...

I had to add $(GISLIB) to EXTRA_LIBS for most of the stuff in lib/db,

I have added $(GISLIB) to dbmi_client, dbmi_driver, stubs, any other?
If you see obvious bug, please fix it directly in CVS, if possible.

and it seems to not be possible to compile without fftw (even if using
--with-fftw=no in configure).

lib/gmath/del2g.c needs a wrapping:
#if defined(HAVE_FFTW_H) || defined(HAVE_DFFTW_H)

OK, done.

Oh, and shared libraries were being created without extension too ...

SHLIB_SUFFIX in include/Make/Platform.make is not defined? configure should
do that, I think.

And even though I configured without tcltk, lib/form/open.c is wanting
to include the X headers inherited from tk.h, and wanting to link to tcl
libs.

Tcltk is more or less requirement (v.digit, d.what.vect, db drivers),
but I agree that libes and modules using that should be compiled
conditionaly (for non interactive enviroments).

Similar problems with lib/ogsf/gvd.c and OpenGL ...

Maybe someone should try compiling with none of the optional
requirements, and see if they are still optional.

But you have already tried, no?

I wanted to avoid
installing a whole bunch of software on my cygwin installation (which is
short on disk space), and was prepared to lose all the features, but it
seems I would have been better off repartitioning my system to make more
space ...

I would prefer, if you could add conditions to source and Makefiles, if possible.

Radim

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

Radim Blazek wrote:

On Wednesday 01 October 2003 17:44, Buchan Milne wrote:

There seem to be a number of other problems, especially when trying to
do a minimal compile ...

I had to add $(GISLIB) to EXTRA_LIBS for most of the stuff in lib/db,

I have added $(GISLIB) to dbmi_client, dbmi_driver, stubs, any other?

I have it in dbmi_base and sqlp also, and display/drivers/lib

Additionally, it seems necessary to add the path to GISLIB to db/base

If you see obvious bug, please fix it directly in CVS, if possible.

I could maybe send patches ... but I don't have cvs access from work
(only from home over dialup) which makes it a bit more difficult.

Oh, and shared libraries were being created without extension too ...

SHLIB_SUFFIX in include/Make/Platform.make is not defined? configure

should

do that, I think.

No, it's empty, even though "Cygwin environment" is found.

And even though I configured without tcltk, lib/form/open.c is wanting
to include the X headers inherited from tk.h, and wanting to link to tcl
libs.

Tcltk is more or less requirement (v.digit, d.what.vect, db drivers),
but I agree that libes and modules using that should be compiled
conditionaly (for non interactive enviroments).

That would be nice, I really only need enough for v.net.path and r.what
and a few similar tools.

Similar problems with lib/ogsf/gvd.c and OpenGL ...

Maybe someone should try compiling with none of the optional
requirements, and see if they are still optional.

But you have already tried, no?

I have X11 and tcltk enabled at present ...

I wanted to avoid
installing a whole bunch of software on my cygwin installation (which is
short on disk space), and was prepared to lose all the features, but it
seems I would have been better off repartitioning my system to make more
space ...

I would prefer, if you could add conditions to source and Makefiles,

if possible.

OK, I will try ...

The first problem is there is no USE_OPENGL in include/config.h.in, and
with it, configure doesn't do anything useful (#define USE_OPENGL for
instance) with it. I don't have a working autoconf, so haven't been able
to fix configure.in.

So far, only lib/ogsf needs this, I'll probably find some more when I
get back from lunch ...

Finally, I don't know if there are problems with LD_LIBRARY_PATH on
Cygwin, but I needed to add $GISBASE/lib to $PATH in order for the html
doc extraction to work.

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/fCGJrJK6UGDSBKcRAlMFAJ9BSa3/JrDuqmyy1nizhV06zWYSaACeM8UA
txSUfRwAx05H+SCIK94taFQ=
=0dpV
-----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.
*****************************************************************

On Tue, 30 Sep 2003, Buchan Milne wrote:

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

I need just a basic grass51/57 on cygwin (since I do actualy work on
linux, but for a simulation I need it running on Windows), so I tried to
build from my cvs snapshot from the weekend that built fine with all
options on my linux boxes, but I still ran into problems.

Firstly, it seems 'make mix' has problems on Cygwin (due to problems
with symbolic links it sees).

Has always been OK for me...are you sure you are using an NTFS partition?

Secondly, I got the common cygwin error "undefined reference to
WinMain@16". Googling for this seemed to indicate that the "-shared"
option needs to be passed for linking, so I added this in
include/Make/Shlib.make (I guess there should be a better solution).

You can't compile GRASS with shared libraries on Cygwin and you must use
the --enable-shared=no configure option (not using this probably causes
most of the following errors)

The build then at least procedes further and links some libraries, but I
then get a whole bunch of errors in lib/gis/env.c (starting with
G_GISRC_MODE_FILE undeclared), which I haven't as yet been able to resolve.

Is anyone else seeing these issues (or do I need to update my Cygwin
installation - it was running the binary dist of 5.0.0 quite well though)?

It would help if the documentation (ie INSTALL) mentioned at least the
first issue (if it's not irrelevant).

I'm sure I read somewhere that you must use NTFS or else GRASS will not
work but maybe there's another problem...

In general 5.7 has recently had some support added for optionally building
components and it looks like we are going to go along the model of setting
a variable USE_XXX=1 in the configure script and then in the top-level
Makefiles for types of modules (vector, raster etc.) using a sequence of
ifneq(USE_XXX,)
SUBDIRS += moduledependentonXXX1 moduledependentonXXX2
endif
etc.
(Look at the vector Makefile for v.in.ogr etc. to see how it is done and
then you can submit patches for other modules e.g. to make
--without-tcltk and other options to work)

Paul

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

Paul Kelly wrote:

On Tue, 30 Sep 2003, Buchan Milne wrote:

I need just a basic grass51/57 on cygwin (since I do actualy work on
linux, but for a simulation I need it running on Windows), so I tried to
build from my cvs snapshot from the weekend that built fine with all
options on my linux boxes, but I still ran into problems.

Firstly, it seems 'make mix' has problems on Cygwin (due to problems
with symbolic links it sees).

Has always been OK for me...are you sure you are using an NTFS partition?

I don't think this is mentioned as a necessity ... and I don't have
space on my NTFS partition on the machine I am using to compile grass
there (so I am compiling on fat32). However, I did test this on NTFS on
another machine, and got the same error ( could not stat file xxx.h etc
on linked files).

Secondly, I got the common cygwin error "undefined reference to
WinMain@16". Googling for this seemed to indicate that the "-shared"
option needs to be passed for linking, so I added this in
include/Make/Shlib.make (I guess there should be a better solution).

You can't compile GRASS with shared libraries on Cygwin and you must use
the --enable-shared=no configure option (not using this probably causes
most of the following errors)

Well, it seems to work for almost all parts of grass, only a few small
pieces are broken. But, again, this isn't mentioned anywhere (and I
think it is the default?).

The build then at least procedes further and links some libraries, but I
then get a whole bunch of errors in lib/gis/env.c (starting with
G_GISRC_MODE_FILE undeclared), which I haven't as yet been able to

resolve.

Is anyone else seeing these issues (or do I need to update my Cygwin
installation - it was running the binary dist of 5.0.0 quite well though)?

It would help if the documentation (ie INSTALL) mentioned at least the
first issue (if it's not irrelevant).

I'm sure I read somewhere that you must use NTFS or else GRASS will not
work but maybe there's another problem...

I don't think that's it, but if it were, this isn't mentioned anywhere.

In general 5.7 has recently had some support added for optionally building
components and it looks like we are going to go along the model of setting
a variable USE_XXX=1 in the configure script and then in the top-level
Makefiles for types of modules (vector, raster etc.) using a sequence of
ifneq(USE_XXX,)
SUBDIRS += moduledependentonXXX1 moduledependentonXXX2
endif
etc.
(Look at the vector Makefile for v.in.ogr etc. to see how it is done and
then you can submit patches for other modules e.g. to make
--without-tcltk and other options to work)

I am a bit short on time at present, so I am using the binary build
Richard Greedwood posted, and compiling my own modules against my own
build (which seems to work fine).

If I manage to find the time to do this, I will ...

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/gtUjrJK6UGDSBKcRAgCoAJwLVCU3HneypsvzqrOI9lFElblP9ACgjWoZ
n2hkGsB5ko1INLXZnVZ99+A=
=hiPm
-----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.
*****************************************************************