[GRASS5] Re: GRASS 5.3 with shared libs
Paul Kelly
paul-grass at stjohnspoint.co.uk
Wed Jan 7 10:49:15 EST 2004
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)
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. 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).
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)?
In general I thought with the alternate build system it must be run from a
separate build directory. 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).
Moritz: did you do it this way?
Paul
More information about the grass-dev
mailing list