[GRASSLIST:1349] cygwin 5.7

I still have not successfully compiled 5.7 under cygwin, but I appreciate the answers I've been getting (thanks Glynn & Greg). Now make stops in i.ortho with unresolved references to:
         _G_get_ask_return_msg
         _G_gets
         _G_squeeze
         _I_fopen_group_file_new
         _I_fopen_group_file_old

As always, I appreciate your help.

Thanks,
Rich

Richard W. Greenwood, PLS
Greenwood Mapping, Inc.
Rich <at> GreenwoodMap <dot> com
(307) 733-0203
http://www.GreenwoodMap.com

On Wed, Sep 24, 2003 at 09:36:02PM -0600, Richard Greenwood wrote:

I still have not successfully compiled 5.7 under cygwin, but I appreciate
the answers I've been getting (thanks Glynn & Greg). Now make stops in
i.ortho with unresolved references to:
         _G_get_ask_return_msg
         _G_gets
         _G_squeeze
         _I_fopen_group_file_new
         _I_fopen_group_file_old

As always, I appreciate your help.

Rich,

could you try to update from CVS? I have made some changes for
Mac OSX which may be also helpful for you (e.g. Makefile of
above module updated).

Markus

Markus Neteler wrote:

On Wed, Sep 24, 2003 at 09:36:02PM -0600, Richard Greenwood wrote:

I still have not successfully compiled 5.7 under cygwin, but I appreciate the answers I've been getting (thanks Glynn & Greg). Now make stops in i.ortho with unresolved references to:
        _G_get_ask_return_msg
        _G_gets
        _G_squeeze
        _I_fopen_group_file_new
        _I_fopen_group_file_old

As always, I appreciate your help.

Rich,

could you try to update from CVS? I have made some changes for
Mac OSX which may be also helpful for you (e.g. Makefile of
above module updated).

Markus

Thanks Markus, I updated from CVS and now get the error:
    multiple definition of `_db_driver_execute_immediate'
Sorry for all my simple questions, I do appreciate all your help.

Rich

On Fri, Sep 26, 2003 at 09:14:26PM -0600, Richard Greenwood wrote:

Markus Neteler wrote:
> On Wed, Sep 24, 2003 at 09:36:02PM -0600, Richard Greenwood wrote:
>
>>I still have not successfully compiled 5.7 under cygwin, but I appreciate
>>the answers I've been getting (thanks Glynn & Greg). Now make stops in
>>i.ortho with unresolved references to:
>> _G_get_ask_return_msg
>> _G_gets
>> _G_squeeze
>> _I_fopen_group_file_new
>> _I_fopen_group_file_old
>>
>>As always, I appreciate your help.
>
>
> Rich,
>
> could you try to update from CVS? I have made some changes for
> Mac OSX which may be also helpful for you (e.g. Makefile of
> above module updated).
>
> Markus
>

Thanks Markus, I updated from CVS and now get the error:
    multiple definition of `_db_driver_execute_immediate'

Exactly this (only) error I get when compiling on Mac OSX statically.
Dirty solution:

go to lib/db/stubs/execute.c and rename the function to something else.
Then it compiles.

Clean solution:
find it! Why does only this function cause problems but no others
in stubs?

Sorry for all my simple questions, I do appreciate all your help.

You are welcome. Whenever you get it complete, maybe
you could package it for the rest of the world?

Markus

Markus Neteler wrote:

> Thanks Markus, I updated from CVS and now get the error:
> multiple definition of `_db_driver_execute_immediate'

Exactly this (only) error I get when compiling on Mac OSX statically.
Dirty solution:

go to lib/db/stubs/execute.c and rename the function to something else.
Then it compiles.

Clean solution:
find it! Why does only this function cause problems but no others
in stubs?

My guess is that the problem occurs when a driver provides its own
version of db_driver_execute_immediate(), but doesn't provide either
db_driver_begin_transaction() or db_driver_commit_transaction() (i.e.
the other two functions in lib/db/stubs/execute.c).

If I'm correct (you don't specify exactly which directories are
failing to compile), the DBF, MySQL and ODBC drivers will fail, while
the PostgreSQL driver should succeed.

A static library (.a) is just an "archive" of object (.o) files,
similar to a .zip or .tar file. When linking against a .a file, the
linker only uses the .o files which are actually needed (i.e. that
export one or more symbols which would otherwise be undefined).

If a driver provides its own version of all three of the functions
from lib/db/stubs/execute.c, the linker won't need to the execute.o
file from libgrass_dbstubs.a, so it won't include it in the link.

Similarly, if a driver provided none of the three functions, the
linker would include the execute.o file from libgrass_dbstubs.a, but
there wouldn't be any conflicts.

OTOH, if the driver provides db_driver_execute_immediate() but not the
other two, the linker will include the execute.o file from
libgrass_dbstubs.a, resulting in two conflicting versions of
db_driver_execute_immediate().

The simplest solutions would be to either:

1. Split lib/db/stubs/execute.c into two separate files, moving the
transaction functions into a separate file (presumably these functions
will always form a matched pair, i.e. a driver will either implement
both or implement neither).

2. Remove the stubs library altogether, and make each driver have its
own copy of any stub functions.

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

Markus Neteler wrote:

Thanks Markus, I updated from CVS and now get the error:
   multiple definition of `_db_driver_execute_immediate'

Exactly this (only) error I get when compiling on Mac OSX statically.
Dirty solution:

go to lib/db/stubs/execute.c and rename the function to something else.
Then it compiles.

Clean solution:
find it! Why does only this function cause problems but no others
in stubs?

Sorry for all my simple questions, I do appreciate all your help.

You are welcome. Whenever you get it complete, maybe
you could package it for the rest of the world?

For now, I have taken the "Dirty solution" and I am very happy to say that I beleive I sucessfully built 5.7, although I have not tested it much. Thank you Markus, Glynn, and Greg for your assistance and patience in helping me to get this far!

I would be more than happy to package what I have thus far if it would be useful. I beleive a 'make bindist' is what would be required? I have built without nviz (seems that I read that nviz does not work propery under cygwin, but if I am mistaken I will add it to my build) and with the following options:

--enable-shared=no \
--with-gd=no \
--with-tcltk=yes \
--with-opengl=no \
--with-fftw=no \
--with-gdal=no \
--with-postgres=yes \
--with-blas=no \
--with-lapack=no \
--with-freetype=no \
--with-odbc=no \
--with-motif=no \
--with-png=no

Best regards,
Rich

On Sunday 28 September 2003 04:16, Glynn Clements wrote:

1. Split lib/db/stubs/execute.c into two separate files, moving the
transaction functions into a separate file (presumably these functions
will always form a matched pair, i.e. a driver will either implement
both or implement neither).

Thanks, I have done that.

Radim