[GRASS5] Error building 5.1 CVS head on Solaris 8 sparc

I'm getting the following error during "make" in the latest 5.1 CVS head:

make: *** No rule to make target `OBJ.sparc-sun-solaris2.8/area.o', needed
by `/usr3/grass51/dist.sparc-sun-solaris2.8/lib/libvect.a'. Stop.

On Thursday 13 March 2003 08:41 am, you wrote:

I'm getting the following error during "make" in the latest 5.1 CVS head:

make: *** No rule to make target `OBJ.sparc-sun-solaris2.8/area.o', needed
by `/usr3/grass51/dist.sparc-sun-solaris2.8/lib/libvect.a'. Stop.

I get this error if I try to compile vectlib (Vlib) as first
in clean tree. Some other libraries must be compiled first:
gislib (lib/gis)
shapelib (lib/external/shapelib)
diglib (lib/vector/diglib)
dglib (lib/vector/dglib)
rtreelib (lib/vector/rtree)

Radim

----- Original Message -----
From: "Radim Blazek" <blazek@itc.it>
To: <cheg01@attbi.com>
Cc: "grass5 developers list" <grass5@grass.itc.it>
Sent: Thursday, March 13, 2003 12:32 AM
Subject: Re: [GRASS5] Error building 5.1 CVS head on Solaris 8 sparc

On Thursday 13 March 2003 08:41 am, you wrote:
> I'm getting the following error during "make" in the latest 5.1 CVS

head:

>
> make: *** No rule to make target `OBJ.sparc-sun-solaris2.8/area.o',

needed

> by `/usr3/grass51/dist.sparc-sun-solaris2.8/lib/libvect.a'. Stop.

I get this error if I try to compile vectlib (Vlib) as first
in clean tree. Some other libraries must be compiled first:
gislib (lib/gis)
shapelib (lib/external/shapelib)
diglib (lib/vector/diglib)
dglib (lib/vector/dglib)
rtreelib (lib/vector/rtree)

Radim

All of those libraries are already made in the tree. Vlib is the last entry
in the last directory under /lib.

----- Original Message -----
From: <cheg01@attbi.com>
To: "Radim Blazek" <blazek@itc.it>
Cc: "grass5 developers list" <grass5@grass.itc.it>
Sent: Thursday, March 13, 2003 6:13 AM
Subject: Re: [GRASS5] Error building 5.1 CVS head on Solaris 8 sparc

----- Original Message -----
From: "Radim Blazek" <blazek@itc.it>
To: <cheg01@attbi.com>
Cc: "grass5 developers list" <grass5@grass.itc.it>
Sent: Thursday, March 13, 2003 12:32 AM
Subject: Re: [GRASS5] Error building 5.1 CVS head on Solaris 8 sparc

> On Thursday 13 March 2003 08:41 am, you wrote:
> > I'm getting the following error during "make" in the latest 5.1 CVS
head:
> >
> > make: *** No rule to make target `OBJ.sparc-sun-solaris2.8/area.o',
needed
> > by `/usr3/grass51/dist.sparc-sun-solaris2.8/lib/libvect.a'. Stop.
>
> I get this error if I try to compile vectlib (Vlib) as first
> in clean tree. Some other libraries must be compiled first:
> gislib (lib/gis)
> shapelib (lib/external/shapelib)
> diglib (lib/vector/diglib)
> dglib (lib/vector/dglib)
> rtreelib (lib/vector/rtree)
>
> Radim

All of those libraries are already made in the tree. Vlib is the last

entry

in the last directory under /lib.

_______________________________________________
grass5 mailing list
grass5@grass.itc.it
http://grass.itc.it/mailman/listinfo/grass5

I still can't figure this out. I tried the folowing steps:
Removed all trace of Grass 5.1: rm -rf ./grass51
logged in to CVS server
entered grass 5.0.2 source directory: cd /usr3/grass5.0.2
ran "cvs -z3 update -d -P"
entered directory above grass5.0.2: cd /usr3
ran "cvs -z3 checkout grass51"
entered grass51 directory
ran :
CFLAGS="-g -Wall"
./configure --with-grass50=/usr3/grass5.0.2 --without-fftw --without-odbc -
-with-postgres-libs=/usr/local/pgsql/lib --with-postgres-includes=/usr/loca
l/pgsql/include

ran: make mix
ran: make

failed with error:

Vlib
make[3]: Entering directory `/usr3/grass51/lib/vector/Vlib'
make[3]: *** No rule to make target `OBJ.sparc-sun-solaris2.8/area.o',
needed by `/usr3/grass51/dist.sparc-sun-solaris2.8/lib/libvect.a'. Stop.
make[3]: Leaving directory `/usr3/grass51/lib/vector/Vlib'
make[2]: *** [subdirs] Error 1
make[2]: Leaving directory `/usr3/grass51/lib/vector'
make[1]: *** [subdirs] Error 1
make[1]: Leaving directory `/usr3/grass51/lib'
make: *** [default] Error 1

The following libraries are successfully built before the make error:

./dist.sparc-sun-solaris2.8/lib/libbitmap.a
./dist.sparc-sun-solaris2.8/lib/libbtree.a
./dist.sparc-sun-solaris2.8/lib/libD.a
./dist.sparc-sun-solaris2.8/lib/libdatetime.a
./dist.sparc-sun-solaris2.8/lib/libdbmi.a
./dist.sparc-sun-solaris2.8/lib/libsqlp.a
./dist.sparc-sun-solaris2.8/lib/libdbstubs.a
./dist.sparc-sun-solaris2.8/lib/libdisplay.a
./dist.sparc-sun-solaris2.8/lib/libedit.a
./dist.sparc-sun-solaris2.8/lib/libshape.a
./dist.sparc-sun-solaris2.8/lib/libgis.a
./dist.sparc-sun-solaris2.8/lib/libform.a
./dist.sparc-sun-solaris2.8/lib/libimage.a
./dist.sparc-sun-solaris2.8/lib/libI.a
./dist.sparc-sun-solaris2.8/lib/liblinkm.a
./dist.sparc-sun-solaris2.8/lib/libproj.a
./dist.sparc-sun-solaris2.8/lib/libraster.a
./dist.sparc-sun-solaris2.8/lib/librowio.a
./dist.sparc-sun-solaris2.8/lib/libsegment.a
./dist.sparc-sun-solaris2.8/lib/libvask.a
./dist.sparc-sun-solaris2.8/lib/librtree.a
./dist.sparc-sun-solaris2.8/lib/libdgl.a
./dist.sparc-sun-solaris2.8/lib/libdig2.a

On Friday 14 March 2003 06:46 am, cheg01@attbi.com wrote:

I still can't figure this out. I tried the folowing steps:
Removed all trace of Grass 5.1: rm -rf ./grass51
logged in to CVS server
entered grass 5.0.2 source directory: cd /usr3/grass5.0.2
ran "cvs -z3 update -d -P"
entered directory above grass5.0.2: cd /usr3
ran "cvs -z3 checkout grass51"
entered grass51 directory
ran :
CFLAGS="-g -Wall"
./configure --with-grass50=/usr3/grass5.0.2 --without-fftw --without-odbc -
-with-postgres-libs=/usr/local/pgsql/lib --with-postgres-includes=/usr/loca
l/pgsql/include

ran: make mix
ran: make

failed with error:

Vlib
make[3]: Entering directory `/usr3/grass51/lib/vector/Vlib'
make[3]: *** No rule to make target `OBJ.sparc-sun-solaris2.8/area.o',
needed by `/usr3/grass51/dist.sparc-sun-solaris2.8/lib/libvect.a'. Stop.
make[3]: Leaving directory `/usr3/grass51/lib/vector/Vlib'
make[2]: *** [subdirs] Error 1
make[2]: Leaving directory `/usr3/grass51/lib/vector'
make[1]: *** [subdirs] Error 1
make[1]: Leaving directory `/usr3/grass51/lib'
make: *** [default] Error 1

--with-grass50= should be path to HEAD branch not realease branch
(/usr3/grass5.0.2 seems to be release branch)

I have got similar error (in lib/gis) with old 5.0 release branch.

Radim

----- Original Message -----
From: "Radim Blazek" <blazek@itc.it>
To: <cheg01@attbi.com>
Cc: "grass5 developers list" <grass5@grass.itc.it>
Sent: Thursday, March 13, 2003 12:32 AM
Subject: Re: [GRASS5] Error building 5.1 CVS head on Solaris 8 sparc

> On Thursday 13 March 2003 08:41 am, you wrote:

I'm getting the following error during "make" in the latest 5.1 CVS head:

make: *** No rule to make target `OBJ.sparc-sun-solaris2.8/area.o',

needed

by `/usr3/grass51/dist.sparc-sun-solaris2.8/lib/libvect.a'. Stop.

I get this error if I try to compile vectlib (Vlib) as first
in clean tree. Some other libraries must be compiled first:
gislib (lib/gis)
shapelib (lib/external/shapelib)
diglib (lib/vector/diglib)
dglib (lib/vector/dglib)
rtreelib (lib/vector/rtree)

Radim

In order to complete a build of grass51 CVS head on Solaris 8 Sparc I had
to make the following changes:

1) Remove "$(SOCKLIB) $(INTLLIB)" from the definition of GISLIB in
Grass.make.in. This was causing the "No rulle to make target" errors.

2) Change "test-e" to "test -x" in 2 places in /vector/v.ascii/Makefile.

3) Change the definition of "PQLIB" in Platform.make from "-lpq" to
"-lresolv".
I also had to add the full path to libpq.a since it is not in a default
library path in my systme. I added it to PQLIB because I did not know how
else to do it. I am running configure with the "--with-postgres-includes="
and "--with-postgres-libs=" options but the path to the library does not
show up in the make files for some reason.

On Monday 17 March 2003 06:58 am, you wrote:

In order to complete a build of grass51 CVS head on Solaris 8 Sparc I had
to make the following changes:

1) Remove "$(SOCKLIB) $(INTLLIB)" from the definition of GISLIB in
Grass.make.in. This was causing the "No rulle to make target" errors.

We should probably remove $(SOCKLIB) from GISLIB and use it only in
Makefiles of modules using this library.

$(INTLLIB) - I don't know where is the right place for this,
Makefile of each module?

Real problem causing above error is that GISLIB is used somewhere
in Makefile as dependency, can you tell us where it is?

2) Change "test-e" to "test -x" in 2 places in /vector/v.ascii/Makefile.

OK, fixed.

3) Change the definition of "PQLIB" in Platform.make from "-lpq" to
"-lresolv".
I also had to add the full path to libpq.a since it is not in a default
library path in my systme. I added it to PQLIB because I did not know how
else to do it. I am running configure with the "--with-postgres-includes="
and "--with-postgres-libs=" options but the path to the library does not
show up in the make files for some reason.

PQLIBPATH is not defined in Platform.make after
./configure --with-postgres-libs=.... ?

Another problem is that PQLIBPATH is missing in Makefiles
and I am not sure if it should be added to VECTLIB or to define
new VECTLIBPATH and add that to each vector Makefile
or to put it in some other place.

Radim

Radim Blazek wrote:

> In order to complete a build of grass51 CVS head on Solaris 8 Sparc I had
> to make the following changes:
>
> 1) Remove "$(SOCKLIB) $(INTLLIB)" from the definition of GISLIB in
> Grass.make.in. This was causing the "No rulle to make target" errors.

We should probably remove $(SOCKLIB) from GISLIB and use it only in
Makefiles of modules using this library.

libgis itself uses socket functions (unix_socks.c). If libgis is built
as a shared library, any program which requires libgis requires
$(SOCKLIB); if libgis is built as a static library, only those
programs or libraries which use the socket functions (e.g. libraster,
all d.* programs, display drivers) will need $(SOCKLIB).

$(INTLLIB) - I don't know where is the right place for this,
Makefile of each module?

Now that libgis itself has been internationalised, any program which
uses libgis (i.e. everything) needs $(INTLLIB).

Real problem causing above error is that GISLIB is used somewhere
in Makefile as dependency, can you tell us where it is?

The real problem is that the 5.1 build system uses a single set of
library variables (e.g. $(GISLIB)) for two separate purposes:

1. As the path to the library file itself, either as a target or as a
dependency.

2. As the command line arguments which are required for linking
programs which use the library.

The 5.0 build system has two separate variables for each library,
e.g.:

  DEPGISLIB = $(LIBDIR)/libgis.a
  GISLIB = -lgis $(SOCKLIB) $(INTLLIB)

  ...

The DEP*LIB forms are suitable for use as both targets, e.g.:

  $(DEPGISLIB): $(LIBOBJS)

and as dependencies, e.g.:

  $(BIN_CMD)/$(PGM): $(OBJS) $(DEPGISLIB)

The *LIB forms are suitable for use as linker switches, e.g.:

  $(CC) $(LDFLAGS) -o $@ $(OBJS) $(GISLIB)

This distinction is necessary for two reasons:

1. So that you can have a single variable which provides all of the
necessary flags for linking against a library (including the library's
dependencies as well as the library itself). If you don't do this,
every Makefile which uses the library has to include all of the
libraries dependencies; if a library acquires a new dependency, you
have to change all of the individual Makefiles.

2. So that shared libraries can be used correctly. To correctly link
against a shared library, you have to use "-lfoo"; a pathname won't
work correctly (e.g. it will result in an executable which depends
upon the library's build-time pathname, which probably won't be where
the library ends up).

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

----- Original Message -----
From: "Radim Blazek" <blazek@itc.it>
To: <cheg01@attbi.com>
Cc: "grass5 developers list" <grass5@grass.itc.it>
Sent: Monday, March 17, 2003 1:37 AM
Subject: Re: [GRASS5] Error building 5.1 CVS head on Solaris 8 sparc
<solved>

On Monday 17 March 2003 06:58 am, you wrote:
> In order to complete a build of grass51 CVS head on Solaris 8 Sparc I

had

> to make the following changes:
>
> 1) Remove "$(SOCKLIB) $(INTLLIB)" from the definition of GISLIB in
> Grass.make.in. This was causing the "No rulle to make target" errors.

We should probably remove $(SOCKLIB) from GISLIB and use it only in
Makefiles of modules using this library.

$(INTLLIB) - I don't know where is the right place for this,
Makefile of each module?

I don't know. INTLLIB is empty in my installation.

Real problem causing above error is that GISLIB is used somewhere
in Makefile as dependency, can you tell us where it is?

$(GISLIB) is part of GISDEP in Grass.make so it is used in over 50
Makefiles.

> 2) Change "test-e" to "test -x" in 2 places in

/vector/v.ascii/Makefile.

OK, fixed.

> 3) Change the definition of "PQLIB" in Platform.make from "-lpq" to
> "-lresolv".
> I also had to add the full path to libpq.a since it is not in a default
> library path in my systme. I added it to PQLIB because I did not know

how

> else to do it. I am running configure with the

"--with-postgres-includes="

> and "--with-postgres-libs=" options but the path to the library does

not

> show up in the make files for some reason.

PQLIBPATH is not defined in Platform.make after
./configure --with-postgres-libs=.... ?

It is correctly defined in Platform.make but is not used in the Makefiles
Somewhere should be:

PQ_LIBNAME = pq
PQLIB = $(PQLIBPATH)/$(LIB_PREFIX)$(PQ_LIBNAME).$(LIB_SUFFIX)

Another problem is that PQLIBPATH is missing in Makefiles
and I am not sure if it should be added to VECTLIB or to define
new VECTLIBPATH and add that to each vector Makefile
or to put it in some other place.

Radim