[GRASS-dev] Compile errors - dllmain and fmode - releasebranch_6_4 and develbranch_6

Lots of compile errors on make on my vista machine (using mingw/msys
not osgeo4w). This is the first one, from lib/datetime:

gcc -shared -o /usr/local/src/grass-6.4_release/dist.i686-pc-mingw32/lib/libgrass_datetime.6.4.0svn.dll
-L/usr/local/src/grass-6.4_release/dist.i686-pc-mingw32/lib
-Wl,--export-dynamic,--enable-runtime-pseudo-reloc -L/usr/local/lib
-L/usr/local/pgsql/lib OBJ.i686-pc-mingw32/between.o
OBJ.i686-pc-mingw32/copy.o OBJ.i686-pc-mingw32/same.o
OBJ.i686-pc-mingw32/diff.o OBJ.i686-pc-mingw32/error.o
OBJ.i686-pc-mingw32/format.o OBJ.i686-pc-mingw32/incr1.o
OBJ.i686-pc-mingw32/incr2.o OBJ.i686-pc-mingw32/incr3.o
OBJ.i686-pc-mingw32/local.o OBJ.i686-pc-mingw32/misc.o
OBJ.i686-pc-mingw32/change.o OBJ.i686-pc-mingw32/scan.o
OBJ.i686-pc-mingw32/sign.o OBJ.i686-pc-mingw32/type.o
OBJ.i686-pc-mingw32/tz1.o OBJ.i686-pc-mingw32/tz2.o
OBJ.i686-pc-mingw32/values.o
../../lib/gis/OBJ.i686-pc-mingw32/dllmain.o && \
        (cd /usr/local/src/grass-6.4_release/dist.i686-pc-mingw32/lib;
ln -f -s libgrass_datetime.6.4.0svn.dll
/usr/local/src/grass-6.4_release/dist.i686-pc-mingw32/lib/libgrass_datetime.dll)
gcc.exe: ../../lib/gis/OBJ.i686-pc-mingw32/dllmain.o: No such file or directory
make: *** [/usr/local/src/grass-6.4_release/dist.i686-pc-mingw32/lib/libgrass_datetime.6.4.0svn.dll]
Error 1

and from lib/gis:
make: *** No rule to make target
`../../lib/gis/OBJ.i686-pc-mingw32/dllmain.o', needed by `default'.
Stop.

The errors seem to be related to the dllmain and fmode problems from
ticket #469 <http://trac.osgeo.org/grass/ticket/469&gt;, but they seem to
affect only the versions post-fix. While releasebranch_6_4 and
develbranch_6 have make errors, releasebranch_6_3 doesn't have these
errors.

Thanks,
-Colin

Colin Nielsen wrote:

Lots of compile errors on make on my vista machine (using mingw/msys
not osgeo4w). This is the first one, from lib/datetime:

gcc -shared -o /usr/local/src/grass-6.4_release/dist.i686-pc-mingw32/lib/libgrass_datetime.6.4.0svn.dll
-L/usr/local/src/grass-6.4_release/dist.i686-pc-mingw32/lib
-Wl,--export-dynamic,--enable-runtime-pseudo-reloc -L/usr/local/lib
-L/usr/local/pgsql/lib OBJ.i686-pc-mingw32/between.o
OBJ.i686-pc-mingw32/copy.o OBJ.i686-pc-mingw32/same.o
OBJ.i686-pc-mingw32/diff.o OBJ.i686-pc-mingw32/error.o
OBJ.i686-pc-mingw32/format.o OBJ.i686-pc-mingw32/incr1.o
OBJ.i686-pc-mingw32/incr2.o OBJ.i686-pc-mingw32/incr3.o
OBJ.i686-pc-mingw32/local.o OBJ.i686-pc-mingw32/misc.o
OBJ.i686-pc-mingw32/change.o OBJ.i686-pc-mingw32/scan.o
OBJ.i686-pc-mingw32/sign.o OBJ.i686-pc-mingw32/type.o
OBJ.i686-pc-mingw32/tz1.o OBJ.i686-pc-mingw32/tz2.o
OBJ.i686-pc-mingw32/values.o
../../lib/gis/OBJ.i686-pc-mingw32/dllmain.o && \
        (cd /usr/local/src/grass-6.4_release/dist.i686-pc-mingw32/lib;
ln -f -s libgrass_datetime.6.4.0svn.dll
/usr/local/src/grass-6.4_release/dist.i686-pc-mingw32/lib/libgrass_datetime.dll)
gcc.exe: ../../lib/gis/OBJ.i686-pc-mingw32/dllmain.o: No such file or directory
make: *** [/usr/local/src/grass-6.4_release/dist.i686-pc-mingw32/lib/libgrass_datetime.6.4.0svn.dll]
Error 1

and from lib/gis:
make: *** No rule to make target
`../../lib/gis/OBJ.i686-pc-mingw32/dllmain.o', needed by `default'.
Stop.

The errors seem to be related to the dllmain and fmode problems from
ticket #469 <http://trac.osgeo.org/grass/ticket/469&gt;, but they seem to
affect only the versions post-fix. While releasebranch_6_4 and
develbranch_6 have make errors, releasebranch_6_3 doesn't have these
errors.

It appears that someone committed only half of the fix with r35770.

[Probably because a complete fix doesn't exist; the change implies
that dllmain.c would be part of lib/gis, but lib/datetime is built
first.]

The easiest solution is likely to be to simply revert the change with:

  svn merge -c -35770 .

Unless someone can come up with a real fix, I'll revert r35770 in SVN.

--
Glynn Clements <glynn@gclements.plus.com>

On Tue, Mar 3, 2009 at 3:58 AM, Glynn Clements <glynn@gclements.plus.com> wrote:

Colin Nielsen wrote:

Lots of compile errors on make on my vista machine (using mingw/msys
not osgeo4w). This is the first one, from lib/datetime:

gcc -shared -o /usr/local/src/grass-6.4_release/dist.i686-pc-mingw32/lib/libgrass_datetime.6.4.0svn.dll
-L/usr/local/src/grass-6.4_release/dist.i686-pc-mingw32/lib
-Wl,--export-dynamic,--enable-runtime-pseudo-reloc -L/usr/local/lib
-L/usr/local/pgsql/lib OBJ.i686-pc-mingw32/between.o
OBJ.i686-pc-mingw32/copy.o OBJ.i686-pc-mingw32/same.o
OBJ.i686-pc-mingw32/diff.o OBJ.i686-pc-mingw32/error.o
OBJ.i686-pc-mingw32/format.o OBJ.i686-pc-mingw32/incr1.o
OBJ.i686-pc-mingw32/incr2.o OBJ.i686-pc-mingw32/incr3.o
OBJ.i686-pc-mingw32/local.o OBJ.i686-pc-mingw32/misc.o
OBJ.i686-pc-mingw32/change.o OBJ.i686-pc-mingw32/scan.o
OBJ.i686-pc-mingw32/sign.o OBJ.i686-pc-mingw32/type.o
OBJ.i686-pc-mingw32/tz1.o OBJ.i686-pc-mingw32/tz2.o
OBJ.i686-pc-mingw32/values.o
../../lib/gis/OBJ.i686-pc-mingw32/dllmain.o && \
(cd /usr/local/src/grass-6.4_release/dist.i686-pc-mingw32/lib;
ln -f -s libgrass_datetime.6.4.0svn.dll
/usr/local/src/grass-6.4_release/dist.i686-pc-mingw32/lib/libgrass_datetime.dll)
gcc.exe: ../../lib/gis/OBJ.i686-pc-mingw32/dllmain.o: No such file or directory
make: *** [/usr/local/src/grass-6.4_release/dist.i686-pc-mingw32/lib/libgrass_datetime.6.4.0svn.dll]
Error 1

and from lib/gis:
make: *** No rule to make target
`../../lib/gis/OBJ.i686-pc-mingw32/dllmain.o', needed by `default'.
Stop.

The errors seem to be related to the dllmain and fmode problems from
ticket #469 <http://trac.osgeo.org/grass/ticket/469&gt;, but they seem to
affect only the versions post-fix. While releasebranch_6_4 and
develbranch_6 have make errors, releasebranch_6_3 doesn't have these
errors.

It appears that someone committed only half of the fix with r35770.

The fixes were
- 6.4.svn (r35767, r35769)
- 6.4.0svn (r35768, r35770)

[Probably because a complete fix doesn't exist; the change implies
that dllmain.c would be part of lib/gis, but lib/datetime is built
first.]

What is exactly missing?

To my knowledge, it compiles on MingW for the OSGeo4W compiler as well
as Linux and MacOSX.

The easiest solution is likely to be to simply revert the change with:

   svn merge \-c \-35770 \.

Unless someone can come up with a real fix, I'll revert r35770 in SVN.

Wait a moment... (also note that r35768 + r35770 are belonging together).

Suggestion:
In include/Make/Shlib.make, change the

ifdef MINGW

test to something which excludes $(DATETIME_LIBNAME)?
Then it's applied only when not building libgrass_datetime.

?
Marksu

Markus Neteler wrote:

>> Lots of compile errors on make on my vista machine (using mingw/msys
>> not osgeo4w). This is the first one, from lib/datetime:
>>
>> gcc -shared -o /usr/local/src/grass-6.4_release/dist.i686-pc-mingw32/lib/libgrass_datetime.6.4.0svn.dll
>> -L/usr/local/src/grass-6.4_release/dist.i686-pc-mingw32/lib
>> -Wl,--export-dynamic,--enable-runtime-pseudo-reloc -L/usr/local/lib
>> -L/usr/local/pgsql/lib OBJ.i686-pc-mingw32/between.o
>> OBJ.i686-pc-mingw32/copy.o OBJ.i686-pc-mingw32/same.o
>> OBJ.i686-pc-mingw32/diff.o OBJ.i686-pc-mingw32/error.o
>> OBJ.i686-pc-mingw32/format.o OBJ.i686-pc-mingw32/incr1.o
>> OBJ.i686-pc-mingw32/incr2.o OBJ.i686-pc-mingw32/incr3.o
>> OBJ.i686-pc-mingw32/local.o OBJ.i686-pc-mingw32/misc.o
>> OBJ.i686-pc-mingw32/change.o OBJ.i686-pc-mingw32/scan.o
>> OBJ.i686-pc-mingw32/sign.o OBJ.i686-pc-mingw32/type.o
>> OBJ.i686-pc-mingw32/tz1.o OBJ.i686-pc-mingw32/tz2.o
>> OBJ.i686-pc-mingw32/values.o
>> ../../lib/gis/OBJ.i686-pc-mingw32/dllmain.o && \
>> (cd /usr/local/src/grass-6.4_release/dist.i686-pc-mingw32/lib;
>> ln -f -s libgrass_datetime.6.4.0svn.dll
>> /usr/local/src/grass-6.4_release/dist.i686-pc-mingw32/lib/libgrass_datetime.dll)
>> gcc.exe: ../../lib/gis/OBJ.i686-pc-mingw32/dllmain.o: No such file or directory
>> make: *** [/usr/local/src/grass-6.4_release/dist.i686-pc-mingw32/lib/libgrass_datetime.6.4.0svn.dll]
>> Error 1
>>
>> and from lib/gis:
>> make: *** No rule to make target
>> `../../lib/gis/OBJ.i686-pc-mingw32/dllmain.o', needed by `default'.
>> Stop.
>>
>> The errors seem to be related to the dllmain and fmode problems from
>> ticket #469 <http://trac.osgeo.org/grass/ticket/469&gt;, but they seem to
>> affect only the versions post-fix. While releasebranch_6_4 and
>> develbranch_6 have make errors, releasebranch_6_3 doesn't have these
>> errors.
>
> It appears that someone committed only half of the fix with r35770.

The fixes were
- 6.4.svn (r35767, r35769)
- 6.4.0svn (r35768, r35770)

> [Probably because a complete fix doesn't exist; the change implies
> that dllmain.c would be part of lib/gis, but lib/datetime is built
> first.]

What is exactly missing?

dllmain.c.

But hang on: DLLMAIN_OBJ doesn't appear to be defined anywhere in
develbranch_6.

Never mind. Someone who actually has the relevant versions checked out
will need to look into this. I think I'm just going to stick to 7.x
from now on.

--
Glynn Clements <glynn@gclements.plus.com>

On Wed, Mar 4, 2009 at 3:25 AM, Glynn Clements <glynn@gclements.plus.com> wrote:

Markus Neteler wrote:

>> Lots of compile errors on make on my vista machine (using mingw/msys
>> not osgeo4w). This is the first one, from lib/datetime:
>>
>> gcc -shared -o /usr/local/src/grass-6.4_release/dist.i686-pc-mingw32/lib/libgrass_datetime.6.4.0svn.dll
>> -L/usr/local/src/grass-6.4_release/dist.i686-pc-mingw32/lib
>> -Wl,--export-dynamic,--enable-runtime-pseudo-reloc -L/usr/local/lib
>> -L/usr/local/pgsql/lib OBJ.i686-pc-mingw32/between.o
>> OBJ.i686-pc-mingw32/copy.o OBJ.i686-pc-mingw32/same.o
>> OBJ.i686-pc-mingw32/diff.o OBJ.i686-pc-mingw32/error.o
>> OBJ.i686-pc-mingw32/format.o OBJ.i686-pc-mingw32/incr1.o
>> OBJ.i686-pc-mingw32/incr2.o OBJ.i686-pc-mingw32/incr3.o
>> OBJ.i686-pc-mingw32/local.o OBJ.i686-pc-mingw32/misc.o
>> OBJ.i686-pc-mingw32/change.o OBJ.i686-pc-mingw32/scan.o
>> OBJ.i686-pc-mingw32/sign.o OBJ.i686-pc-mingw32/type.o
>> OBJ.i686-pc-mingw32/tz1.o OBJ.i686-pc-mingw32/tz2.o
>> OBJ.i686-pc-mingw32/values.o
>> ../../lib/gis/OBJ.i686-pc-mingw32/dllmain.o && \
>> (cd /usr/local/src/grass-6.4_release/dist.i686-pc-mingw32/lib;
>> ln -f -s libgrass_datetime.6.4.0svn.dll
>> /usr/local/src/grass-6.4_release/dist.i686-pc-mingw32/lib/libgrass_datetime.dll)
>> gcc.exe: ../../lib/gis/OBJ.i686-pc-mingw32/dllmain.o: No such file or directory
>> make: *** [/usr/local/src/grass-6.4_release/dist.i686-pc-mingw32/lib/libgrass_datetime.6.4.0svn.dll]
>> Error 1
>>
>> and from lib/gis:
>> make: *** No rule to make target
>> `../../lib/gis/OBJ.i686-pc-mingw32/dllmain.o', needed by `default'.
>> Stop.
>>
>> The errors seem to be related to the dllmain and fmode problems from
>> ticket #469 <http://trac.osgeo.org/grass/ticket/469&gt;, but they seem to
>> affect only the versions post-fix. While releasebranch_6_4 and
>> develbranch_6 have make errors, releasebranch_6_3 doesn't have these
>> errors.
>
> It appears that someone committed only half of the fix with r35770.

The fixes were
- 6.4.svn (r35767, r35769)
- 6.4.0svn (r35768, r35770)

> [Probably because a complete fix doesn't exist; the change implies
> that dllmain.c would be part of lib/gis, but lib/datetime is built
> first.]

What is exactly missing?

dllmain.c.

But hang on: DLLMAIN_OBJ doesn't appear to be defined anywhere in
develbranch_6.

I seem to have a different version:

[neteler@localhost grass64]$ grep DLLMAIN_OBJ include/Make/* lib/gis/Makefile
include/Make/Shlib.make: DLLMAIN_OBJ =
$(MODULE_TOPDIR)/lib/gis/$(OBJDIR)/dllmain.o
include/Make/Shlib.make: $(SHLIB_LD) -o $@ $(LDFLAGS) $^
$(EXTRA_LIBS) $(DLLMAIN_OBJ) && \
lib/gis/Makefile:default: $(DLLMAIN_OBJ) lib $(FMODE_OBJ) $(DATAFILES)
$(COLORFILES) $(ETC)/colors.desc $(ETC)/element_list

Also 6.4.0svn:
[neteler@localhost grass64_release]$ grep DLLMAIN_OBJ include/Make/*
lib/gis/Makefile
include/Make/Shlib.make: DLLMAIN_OBJ =
$(MODULE_TOPDIR)/lib/gis/$(OBJDIR)/dllmain.o
include/Make/Shlib.make: $(SHLIB_LD) -o $@ $(LDFLAGS) $^
$(EXTRA_LIBS) $(DLLMAIN_OBJ) && \
lib/gis/Makefile:default: $(DLLMAIN_OBJ) lib $(FMODE_OBJ) $(DATAFILES)
$(COLORFILES) $(ETC)/colors.desc $(ETC)/element_list

Can anyone else confirm?

Never mind. Someone who actually has the relevant versions checked out
will need to look into this. I think I'm just going to stick to 7.x
from now on.

Markus

Markus Neteler wrote:

>> The fixes were
>> - 6.4.svn (r35767, r35769)
>> - 6.4.0svn (r35768, r35770)
>>
>> > [Probably because a complete fix doesn't exist; the change implies
>> > that dllmain.c would be part of lib/gis, but lib/datetime is built
>> > first.]
>>
>> What is exactly missing?
>
> dllmain.c.
>
> But hang on: DLLMAIN_OBJ doesn't appear to be defined anywhere in
> develbranch_6.

I seem to have a different version:

Er, right; my Shlib.make was modified to remove the DLLMAIN_OBJ stuff
(probably to get it to compile).

--
Glynn Clements <glynn@gclements.plus.com>

On Wed, Mar 4, 2009 at 12:07 PM, Glynn Clements
<glynn@gclements.plus.com> wrote:

Markus Neteler wrote:

>> The fixes were
>> - 6.4.svn (r35767, r35769)
>> - 6.4.0svn (r35768, r35770)
>>
>> > [Probably because a complete fix doesn't exist; the change implies
>> > that dllmain.c would be part of lib/gis, but lib/datetime is built
>> > first.]
>>
>> What is exactly missing?
>
> dllmain.c.
>
> But hang on: DLLMAIN_OBJ doesn't appear to be defined anywhere in
> develbranch_6.

I seem to have a different version:

Er, right; my Shlib.make was modified to remove the DLLMAIN_OBJ stuff
(probably to get it to compile).

On which platform did it fail?

Markus

Markus Neteler wrote:

>> >> The fixes were
>> >> - 6.4.svn (r35767, r35769)
>> >> - 6.4.0svn (r35768, r35770)
>> >>
>> >> > [Probably because a complete fix doesn't exist; the change implies
>> >> > that dllmain.c would be part of lib/gis, but lib/datetime is built
>> >> > first.]
>> >>
>> >> What is exactly missing?
>> >
>> > dllmain.c.
>> >
>> > But hang on: DLLMAIN_OBJ doesn't appear to be defined anywhere in
>> > develbranch_6.
>>
>> I seem to have a different version:
>
> Er, right; my Shlib.make was modified to remove the DLLMAIN_OBJ stuff
> (probably to get it to compile).

Actually, that's probably not it. But for whatever reason, I have a
modified version without the changes.

On which platform did it fail?

It will fail on MinGW, as the changes add dllmain.o to the link
command but don't provide any way for that file to be created.

--
Glynn Clements <glynn@gclements.plus.com>

On Wed, Mar 4, 2009 at 5:47 PM, Glynn Clements <glynn@gclements.plus.com> wrote:

Markus Neteler wrote:

>> >> The fixes were
>> >> - 6.4.svn (r35767, r35769)
>> >> - 6.4.0svn (r35768, r35770)
>> >>
>> >> > [Probably because a complete fix doesn't exist; the change implies
>> >> > that dllmain.c would be part of lib/gis, but lib/datetime is built
>> >> > first.]
>> >>
>> >> What is exactly missing?
>> >
>> > dllmain.c.
>> >
>> > But hang on: DLLMAIN_OBJ doesn't appear to be defined anywhere in
>> > develbranch_6.
>>
>> I seem to have a different version:
>
> Er, right; my Shlib.make was modified to remove the DLLMAIN_OBJ stuff
> (probably to get it to compile).

Actually, that's probably not it. But for whatever reason, I have a
modified version without the changes.

Here is what's in SVN:
http://trac.osgeo.org/grass/browser/grass/branches/develbranch_6/include/Make/Shlib.make
http://trac.osgeo.org/grass/browser/grass/branches/develbranch_6/lib/gis/Makefile

Ha!
No trace of dllmain.c in
http://trac.osgeo.org/grass/browser/grass/branches/develbranch_6/lib/gis/

I'm confused. Perhaps our radio-bridge based internet connection in the
office failed silently. Submitted (again) in r36196 for devel_branch6.

In 6.4.0svn it was already present.

On which platform did it fail?

It will fail on MinGW, as the changes add dllmain.o to the link
command but don't provide any way for that file to be created.

Please give the compilation another try.
Colin, too...

The entire change is yet missing in grass 7 as I don't know
how to modify the Makefiles appropriately. The patches of
the trac ticket won't work.

Markus

Still not working, sorry. I'm still a bit new at this so I'll give you
my steps to make sure I didn't miss anything
1) svn up
2) make clean
3) config.status --recheck
4) make
Result:

$ make > /dev/null
gcc.exe: ../../lib/gis/OBJ.i686-pc-mingw32/dllmain.o: No such file or directory
make[3]: *** [/usr/local/src/grass6_devel/dist.i686-pc-mingw32/lib/libgrass_datetime.6.5.svn.dll]
Error 1
make[3]: *** No rule to make target
`../../lib/gis/OBJ.i686-pc-mingw32/dllmain.o', needed by `default'.
Stop.
gcc.exe: ../../lib/gis/OBJ.i686-pc-mingw32/dllmain.o: No such file or directory
make[3]: *** [/usr/local/src/grass6_devel/dist.i686-pc-mingw32/lib/libgrass_gmath.6.5.svn.dll]
Error 1
gcc.exe: ../../lib/gis/OBJ.i686-pc-mingw32/dllmain.o: No such file or directory
make[3]: *** [/usr/local/src/grass6_devel/dist.i686-pc-mingw32/lib/libgrass_linkm.6.5.svn.dll]
Error 1
gcc.exe: ../../lib/gis/OBJ.i686-pc-mingw32/dllmain.o: No such file or directory
make[3]: *** [/usr/local/src/grass6_devel/dist.i686-pc-mingw32/lib/libgrass_driver.6.5.svn.dll]
Error 1
gcc.exe: ../../lib/gis/OBJ.i686-pc-mingw32/dllmain.o: No such file or directory
make[3]: *** [/usr/local/src/grass6_devel/dist.i686-pc-mingw32/lib/libgrass_pngdriver.6.5.svn.dll]
Error 1
gcc.exe: ../../lib/gis/OBJ.i686-pc-mingw32/dllmain.o: No such file or directory

There were many more errors in lib, db, display, vector, raster, etc.

I'll keep being the mingw/msys test bed if you propose other possible
solutions.

-Colin

On Wed, Mar 4, 2009 at 4:57 PM, Markus Neteler <neteler@osgeo.org> wrote:

On Wed, Mar 4, 2009 at 5:47 PM, Glynn Clements <glynn@gclements.plus.com> wrote:

Markus Neteler wrote:

>> >> The fixes were
>> >> - 6.4.svn (r35767, r35769)
>> >> - 6.4.0svn (r35768, r35770)
>> >>
>> >> > [Probably because a complete fix doesn't exist; the change implies
>> >> > that dllmain.c would be part of lib/gis, but lib/datetime is built
>> >> > first.]
>> >>
>> >> What is exactly missing?
>> >
>> > dllmain.c.
>> >
>> > But hang on: DLLMAIN_OBJ doesn't appear to be defined anywhere in
>> > develbranch_6.
>>
>> I seem to have a different version:
>
> Er, right; my Shlib.make was modified to remove the DLLMAIN_OBJ stuff
> (probably to get it to compile).

Actually, that's probably not it. But for whatever reason, I have a
modified version without the changes.

Here is what's in SVN:
http://trac.osgeo.org/grass/browser/grass/branches/develbranch_6/include/Make/Shlib.make
http://trac.osgeo.org/grass/browser/grass/branches/develbranch_6/lib/gis/Makefile

Ha!
No trace of dllmain.c in
http://trac.osgeo.org/grass/browser/grass/branches/develbranch_6/lib/gis/

I'm confused. Perhaps our radio-bridge based internet connection in the
office failed silently. Submitted (again) in r36196 for devel_branch6.

In 6.4.0svn it was already present.

On which platform did it fail?

It will fail on MinGW, as the changes add dllmain.o to the link
command but don't provide any way for that file to be created.

Please give the compilation another try.
Colin, too...

The entire change is yet missing in grass 7 as I don't know
how to modify the Makefiles appropriately. The patches of
the trac ticket won't work.

Markus

Devs,

Colin tried attached patch and with that DATETIME builds
but then the problem continues for the other libraries.

I am no good at reading Makefiles, help needed.

Markus

On Thu, Mar 5, 2009 at 5:24 PM, Colin Nielsen <colin.nielsen@gmail.com> wrote:

Still not working, sorry. I'm still a bit new at this so I'll give you
my steps to make sure I didn't miss anything
1) svn up
2) make clean
3) config.status --recheck
4) make
Result:

$ make > /dev/null
gcc.exe: ../../lib/gis/OBJ.i686-pc-mingw32/dllmain.o: No such file or directory
make[3]: *** [/usr/local/src/grass6_devel/dist.i686-pc-mingw32/lib/libgrass_datetime.6.5.svn.dll]
Error 1
make[3]: *** No rule to make target
`../../lib/gis/OBJ.i686-pc-mingw32/dllmain.o', needed by `default'.
Stop.
gcc.exe: ../../lib/gis/OBJ.i686-pc-mingw32/dllmain.o: No such file or directory
make[3]: *** [/usr/local/src/grass6_devel/dist.i686-pc-mingw32/lib/libgrass_gmath.6.5.svn.dll]
Error 1
gcc.exe: ../../lib/gis/OBJ.i686-pc-mingw32/dllmain.o: No such file or directory
make[3]: *** [/usr/local/src/grass6_devel/dist.i686-pc-mingw32/lib/libgrass_linkm.6.5.svn.dll]
Error 1
gcc.exe: ../../lib/gis/OBJ.i686-pc-mingw32/dllmain.o: No such file or directory
make[3]: *** [/usr/local/src/grass6_devel/dist.i686-pc-mingw32/lib/libgrass_driver.6.5.svn.dll]
Error 1
gcc.exe: ../../lib/gis/OBJ.i686-pc-mingw32/dllmain.o: No such file or directory
make[3]: *** [/usr/local/src/grass6_devel/dist.i686-pc-mingw32/lib/libgrass_pngdriver.6.5.svn.dll]
Error 1
gcc.exe: ../../lib/gis/OBJ.i686-pc-mingw32/dllmain.o: No such file or directory

There were many more errors in lib, db, display, vector, raster, etc.

I'll keep being the mingw/msys test bed if you propose other possible
solutions.

-Colin

On Wed, Mar 4, 2009 at 4:57 PM, Markus Neteler <neteler@osgeo.org> wrote:

On Wed, Mar 4, 2009 at 5:47 PM, Glynn Clements <glynn@gclements.plus.com> wrote:

Markus Neteler wrote:

>> >> The fixes were
>> >> - 6.4.svn (r35767, r35769)
>> >> - 6.4.0svn (r35768, r35770)
>> >>
>> >> > [Probably because a complete fix doesn't exist; the change implies
>> >> > that dllmain.c would be part of lib/gis, but lib/datetime is built
>> >> > first.]
>> >>
>> >> What is exactly missing?
>> >
>> > dllmain.c.
>> >
>> > But hang on: DLLMAIN_OBJ doesn't appear to be defined anywhere in
>> > develbranch_6.
>>
>> I seem to have a different version:
>
> Er, right; my Shlib.make was modified to remove the DLLMAIN_OBJ stuff
> (probably to get it to compile).

Actually, that's probably not it. But for whatever reason, I have a
modified version without the changes.

Here is what's in SVN:
http://trac.osgeo.org/grass/browser/grass/branches/develbranch_6/include/Make/Shlib.make
http://trac.osgeo.org/grass/browser/grass/branches/develbranch_6/lib/gis/Makefile

Ha!
No trace of dllmain.c in
http://trac.osgeo.org/grass/browser/grass/branches/develbranch_6/lib/gis/

I'm confused. Perhaps our radio-bridge based internet connection in the
office failed silently. Submitted (again) in r36196 for devel_branch6.

In 6.4.0svn it was already present.

On which platform did it fail?

It will fail on MinGW, as the changes add dllmain.o to the link
command but don't provide any way for that file to be created.

Please give the compilation another try.
Colin, too...

The entire change is yet missing in grass 7 as I don't know
how to modify the Makefiles appropriately. The patches of
the trac ticket won't work.

Markus

(attachments)

mingw.diff (588 Bytes)

Colin Nielsen wrote:

Still not working, sorry. I'm still a bit new at this so I'll give you
my steps to make sure I didn't miss anything
1) svn up
2) make clean
3) config.status --recheck
4) make
Result:

$ make > /dev/null
gcc.exe: ../../lib/gis/OBJ.i686-pc-mingw32/dllmain.o: No such file or directory
make[3]: *** [/usr/local/src/grass6_devel/dist.i686-pc-mingw32/lib/libgrass_datetime.6.5.svn.dll]
Error 1
make[3]: *** No rule to make target
`../../lib/gis/OBJ.i686-pc-mingw32/dllmain.o', needed by `default'.

AFAICT, this is because the rule in lib/gis/Makefile uses a path based
upon MODULE_TOPDIR, but the compilation rules require a path relative
to the current directory. The first attached patch should fix this part.

The second patch should fix the issue with lib/datetime being built
before lib/gis. If it doesn't, just try running "make" a second time
without an intervening "make clean".

Stop.
gcc.exe: ../../lib/gis/OBJ.i686-pc-mingw32/dllmain.o: No such file or directory
make[3]: *** [/usr/local/src/grass6_devel/dist.i686-pc-mingw32/lib/libgrass_gmath.6.5.svn.dll]
Error 1
gcc.exe: ../../lib/gis/OBJ.i686-pc-mingw32/dllmain.o: No such file or directory
make[3]: *** [/usr/local/src/grass6_devel/dist.i686-pc-mingw32/lib/libgrass_linkm.6.5.svn.dll]
Error 1
gcc.exe: ../../lib/gis/OBJ.i686-pc-mingw32/dllmain.o: No such file or directory
make[3]: *** [/usr/local/src/grass6_devel/dist.i686-pc-mingw32/lib/libgrass_driver.6.5.svn.dll]
Error 1
gcc.exe: ../../lib/gis/OBJ.i686-pc-mingw32/dllmain.o: No such file or directory
make[3]: *** [/usr/local/src/grass6_devel/dist.i686-pc-mingw32/lib/libgrass_pngdriver.6.5.svn.dll]
Error 1
gcc.exe: ../../lib/gis/OBJ.i686-pc-mingw32/dllmain.o: No such file or directory

There were many more errors in lib, db, display, vector, raster, etc.

I'll keep being the mingw/msys test bed if you propose other possible
solutions.

--
Glynn Clements <glynn@gclements.plus.com>

(attachments)

dllmain.patch (700 Bytes)
dllmain2.patch (496 Bytes)

1) I reverted markus's patch and the jef_mingw patch as well.
2) make distclean
3) ./configure etc etc etc
4) make
5) as Glynn suggested, make again

Seems to still be a lot of errors, so far the jef_mingw patch worked
the best, it fixed dllmain but not fmode.

-Colin

On 3/6/09, Glynn Clements <glynn@gclements.plus.com> wrote:

Colin Nielsen wrote:

Still not working, sorry. I'm still a bit new at this so I'll give you
my steps to make sure I didn't miss anything
1) svn up
2) make clean
3) config.status --recheck
4) make
Result:

$ make > /dev/null
gcc.exe: ../../lib/gis/OBJ.i686-pc-mingw32/dllmain.o: No such file or
directory
make[3]: ***
[/usr/local/src/grass6_devel/dist.i686-pc-mingw32/lib/libgrass_datetime.6.5.svn.dll]
Error 1
make[3]: *** No rule to make target
`../../lib/gis/OBJ.i686-pc-mingw32/dllmain.o', needed by `default'.

AFAICT, this is because the rule in lib/gis/Makefile uses a path based
upon MODULE_TOPDIR, but the compilation rules require a path relative
to the current directory. The first attached patch should fix this part.

The second patch should fix the issue with lib/datetime being built
before lib/gis. If it doesn't, just try running "make" a second time
without an intervening "make clean".

Stop.
gcc.exe: ../../lib/gis/OBJ.i686-pc-mingw32/dllmain.o: No such file or
directory
make[3]: ***
[/usr/local/src/grass6_devel/dist.i686-pc-mingw32/lib/libgrass_gmath.6.5.svn.dll]
Error 1
gcc.exe: ../../lib/gis/OBJ.i686-pc-mingw32/dllmain.o: No such file or
directory
make[3]: ***
[/usr/local/src/grass6_devel/dist.i686-pc-mingw32/lib/libgrass_linkm.6.5.svn.dll]
Error 1
gcc.exe: ../../lib/gis/OBJ.i686-pc-mingw32/dllmain.o: No such file or
directory
make[3]: ***
[/usr/local/src/grass6_devel/dist.i686-pc-mingw32/lib/libgrass_driver.6.5.svn.dll]
Error 1
gcc.exe: ../../lib/gis/OBJ.i686-pc-mingw32/dllmain.o: No such file or
directory
make[3]: ***
[/usr/local/src/grass6_devel/dist.i686-pc-mingw32/lib/libgrass_pngdriver.6.5.svn.dll]
Error 1
gcc.exe: ../../lib/gis/OBJ.i686-pc-mingw32/dllmain.o: No such file or
directory

There were many more errors in lib, db, display, vector, raster, etc.

I'll keep being the mingw/msys test bed if you propose other possible
solutions.

--
Glynn Clements <glynn@gclements.plus.com>

(attachments)

make2.log (74.7 KB)

On Fri, Mar 6, 2009 at 11:52 AM, Glynn Clements
<glynn@gclements.plus.com> wrote:

Colin Nielsen wrote:

...

Error 1
make[3]: *** No rule to make target
`../../lib/gis/OBJ.i686-pc-mingw32/dllmain.o', needed by `default'.

AFAICT, this is because the rule in lib/gis/Makefile uses a path based
upon MODULE_TOPDIR, but the compilation rules require a path relative
to the current directory. The first attached patch should fix this part.

The second patch should fix the issue with lib/datetime being built
before lib/gis. If it doesn't, just try running "make" a second time
without an intervening "make clean".

I have merged that into a revised patch in
http://trac.osgeo.org/grass/ticket/519

Colin, could you please try that?

Further doubts in the ticket.

Markus

I applied the patches and recompiled. Still lots of errors I'm afraid.
I've attached the make errors.

The first major error is with lib/gis

-Colin

On 3/6/09, Markus Neteler <neteler@osgeo.org> wrote:

On Fri, Mar 6, 2009 at 11:52 AM, Glynn Clements
<glynn@gclements.plus.com> wrote:

Colin Nielsen wrote:

...

Error 1
make[3]: *** No rule to make target
`../../lib/gis/OBJ.i686-pc-mingw32/dllmain.o', needed by `default'.

AFAICT, this is because the rule in lib/gis/Makefile uses a path based
upon MODULE_TOPDIR, but the compilation rules require a path relative
to the current directory. The first attached patch should fix this part.

The second patch should fix the issue with lib/datetime being built
before lib/gis. If it doesn't, just try running "make" a second time
without an intervening "make clean".

I have merged that into a revised patch in
http://trac.osgeo.org/grass/ticket/519

Colin, could you please try that?

Further doubts in the ticket.

Markus

(attachments)

make.log (107 KB)

Colin Nielsen wrote:

1) I reverted markus's patch and the jef_mingw patch as well.
2) make distclean
3) ./configure etc etc etc
4) make
5) as Glynn suggested, make again

Seems to still be a lot of errors, so far the jef_mingw patch worked
the best, it fixed dllmain but not fmode.

fmode.c seems to have disappeared at some point.

Eventually, I managed to get it to compile with the attached patch.

--
Glynn Clements <glynn@gclements.plus.com>

(attachments)

dllmain.patch (1.66 KB)

On Sun, Mar 8, 2009 at 9:07 AM, Glynn Clements <glynn@gclements.plus.com> wrote:

Colin Nielsen wrote:

1) I reverted markus's patch and the jef_mingw patch as well.
2) make distclean
3) ./configure etc etc etc
4) make
5) as Glynn suggested, make again

Seems to still be a lot of errors, so far the jef_mingw patch worked
the best, it fixed dllmain but not fmode.

fmode.c seems to have disappeared at some point.

(mysterious, in 6.4.0svn it was present).

Eventually, I managed to get it to compile with the attached patch.

submitted to both 6.4.0svn and 6.5.svn.

Markus

if you have time: does 6.5.svn compile now?

I am happy to report that 6.5.svn compiles now, straight off of the
svn. (As usual with mingw, only the lidar modules fail.)
Congratulations. However, I think something is missing from 6.4.0svn
because there is still an fmode error in lib/gis. Or maybe you just
haven't backported the fixes yet.

$ make
gcc -I/usr/local/src/grass-6.4_release/dist.i686-pc-mingw32/include
-I/usr/local/include -g -O2 -I/usr/local/include
-DPACKAGE=\""grasslibs"\" -D_FILE_OFFSET_BITS=64 -DGDAL_LINK=1
-DGDAL_DYNAMIC=1 -DPACKAGE=\""grasslibs"\" -I/usr/local/include
-I/usr/local/include
-I/usr/local/src/grass-6.4_release/dist.i686-pc-mingw32/include -o
OBJ.i686-pc-mingw32/fmode.o -c fmode.c
fmode.c:8: error: redefinition of '_fmode'
fmode.c:4: error: previous definition of '_fmode' was here
make: *** [OBJ.i686-pc-mingw32/fmode.o] Error 1

thanks for not giving up,
Markus

No problem.

-Colin

On Sun, Mar 8, 2009 at 11:27 PM, Colin Nielsen <colin.nielsen@gmail.com> wrote:

if you have time: does 6.5.svn compile now?

I am happy to report that 6.5.svn compiles now, straight off of the
svn.

finally! great.

(As usual with mingw, only the lidar modules fail.)

please send the error(s).

Congratulations. However, I think something is missing from 6.4.0svn
because there is still an fmode error in lib/gis. Or maybe you just
haven't backported the fixes yet.

$ make
gcc -I/usr/local/src/grass-6.4_release/dist.i686-pc-mingw32/include
-I/usr/local/include -g -O2 -I/usr/local/include
-DPACKAGE=\""grasslibs"\" -D_FILE_OFFSET_BITS=64 -DGDAL_LINK=1
-DGDAL_DYNAMIC=1 -DPACKAGE=\""grasslibs"\" -I/usr/local/include
-I/usr/local/include
-I/usr/local/src/grass-6.4_release/dist.i686-pc-mingw32/include -o
OBJ.i686-pc-mingw32/fmode.o -c fmode.c
fmode.c:8: error: redefinition of '_fmode'
fmode.c:4: error: previous definition of '_fmode' was here
make: *** [OBJ.i686-pc-mingw32/fmode.o] Error 1

Fixed in 6.4.0svn: I have made a full diff of include/ and lib/gis/ and
found a difference in fmode.c. now they are back in sync.

The entire stuff needs to be merged in GRASS 7 later (since the Makefile
system is different, I leave that to someone else).

Please check if the remaining 4-5 patches in
http://trac.osgeo.org/grass/ticket/519
are necessary.

Markus

(As usual with mingw, only the lidar modules fail.)

The lidar module problems have been around for a while now
(http://grass.osgeo.org/wiki/WinGRASS_Current_Status).
I've attached the errors for the r.li dir.

Please check if the remaining 4-5 patches in
http://trac.osgeo.org/grass/ticket/519
are necessary.

I could be wrong, but it looks like the lidar part of the patch has
caused two attempts to make r.li. Each module in r.li.* has two
entries in error.log.
I'm not sure what the gdal patch does, but I did have some problems
getting gdal working in the past (I can't remember exactly what the
problem was), so perhaps this has fixed that. And likewise, xdr has
apparently been a problem under mingw as well
(http://lists.osgeo.org/pipermail/grass-windows/2008-December/001611.html).
spawn and g3d I have no idea, but from my make.log

C:/MinGW/msys/local/src/grass-6.4_release/dist.i686-pc-mingw32/include/grass/gis.h:48:1:
warning: this is the location of the previous definition
spawn.c: In function `G_spawn':
spawn.c:84: warning: passing arg 3 of `_spawnv' from incompatible pointer type
spawn.c: In function `do_spawn':
spawn.c:234: warning: passing arg 3 of `spawnvpe' from incompatible pointer type
spawn.c:234: warning: passing arg 4 of `spawnvpe' from incompatible pointer type

I think that's all I can offer at this point. I'm sure jef can clear
up the last details.

-Colin

(attachments)

lidar.log (4 KB)