[GRASS5] Re: GRASS 5.3 with shared libs

Markus Neteler neteler at itc.it
Wed Jan 7 11:00:16 EST 2004


Hello Paul

On Wed, Jan 07, 2004 at 03:49:15PM +0000, Paul Kelly wrote:
> Hello Markus
> 
> On Tue, 6 Jan 2004, Markus Neteler wrote:
> 
> > Hello Paul,
> >
> > I found and fixed the problem with 'documents':
> > The problem was the identical directory name in the main dir,
> > I renamed the target in mk/Makefile.in, now it works
> > perfectly.
> >
> > Markus
> >
> > On Tue, Jan 06, 2004 at 12:06:40PM +0100, Markus Neteler wrote:
> > > > >
> > > > > Note that I was launching 'make' in the main source directory which
> > > > > worked perfectly. Or should it be
> > > >
> > > > I don't understand how you got that to work as when I try that it builds
> > > > using the old gmake5 system.
> > >
> > > Strange - not for me.
> > >
> > > I ran:
> > >
> > >  [first elimination of all .o files, LIB* OBJ* ]
> > >
> > > rm Makefile
> > > rm -rf dist.i686-pc-linux-gnu bin.i686-pc-linux-gnu/
> > >
> > > CFLAGS="-O3 -Wall" ./configure --with-proj --without-freetype \
> > >    --with-postgres-includes=/usr/include/pgsql \
> > >    --with-cxx \
> > >    --enable-gmake=no
> > >
> > > [creates all makefiles etc. One error:
> 
> I made a fresh checkout of the CVS on a RedHat 7.3 system and tried that
> exact configure line from the top-level source directory and got this
> error:
> 
> [...]
> checking for source directory... /home/paulk/src/grass
> checking for build directory... /home/paulk/src/grass
> checking for Build Mechanism to be used... Alternate
> configure: error: ***  Build directory should not be the same as source
> directory for the alternate build mechanism. Create a separate build
> directory and run again, e.g. mkdir grass-build; cd grass-build;
> ../configure (see mk/README)

Have never seen this message :-)
 
> which is what I intended to happen as while it might be possible to run
> the alternate build system from the top-level source directory it got very
> messy with all the source directories filled up with .o files that weren't
> easily removed.

Well, I easily remove them with a 'find' command on all '*.o' files.

> Also the 'old' Makefile got overwritten so you couldn't do
> make bindist or make srcdist (I didn't bother copying these targets into
> mk/Makefile.in yet).

In fact I didn't try make bindist or make srcdist as I use GRASS
directly from the ./dist.$ARCH directory. At time I am away from
that Mandrake box.

But those targets could be added, right?

> The way I checked for the directory configure was being run from was like:
> 
> if test "$BUILD_MECH" = Alternate ; then
>   if test "$SRCDIR" = "$DSTDIR" ; then
>     AC_MSG_ERROR([***  Build directory should not be the same as source \
> directory for the alternate build mechanism. Create a separate build \
> directory and run again, e.g. mkdir grass-build; cd grass-build; ../configure \
> (see mk/README)]);
>   else
>     SC_ENABLE_SHARED
>   fi
> fi
> 
> in configure.in.
> Perhaps there is something wrong with the second line above (not
> portable)?

Mhh, no idea right now.

> In general I thought with the alternate build system it must be run from a
> separate build directory.

As I don't know how to do that, I happily launched it from the
main directory (which should be IMHO allowed).

> That was also why I copied the error.log file
> back to the top level source directory as the POST_INSTALL.sh script
> looked for it there. Again, the contents of POST_INSTALL.sh could be
> duplicated in mk/Makefile.in but I didn't want to change more things than
> I had to to make it work.
> Perhaps it would be nice if the alternate build system could create its
> own build directory automatically if it detects it is being run from the
> top-level of the source. I thought about this but decided that was being
> too clever.
> 
> It is worth tidying it up though but I was under the impression that with
> the alternate build system we really should use a separate build
> directory (and that is how I tested it).

I still don't see the advantage to be forced to use a separate build 
directory - please explain again.

> Moritz: did you do it this way?
> 
> Paul
> 

Markus




More information about the grass-dev mailing list