[GRASS5] Re: 57 compile error

Kirk,
(cc 'grass5')

On Thu, Dec 11, 2003 at 08:25:07AM -0600, Kirk R. Wythers wrote:

Markus,

I'm working on the 57 build. The configure options I'm using are:

./configure --with-grass50=/Users/kirkw/tmp/grass53_exp_2003_12_06/ \
    --enable-shared \
    --with-includes="/usr/X11R6/include /sw/include" --with-libs=/sw/lib
\
    --with-tiff-includes=/sw/include --with-tiff-libs=/sw/lib \
    --with-tcltk-includes=/sw/include --with-tcltk-libs=/sw/lib/tcl8.4 \
    --with-opengl-libs=/usr/X11R6/lib
--with-opengl-includes=/usr/X11R6/include \
    --with-fftw-includes=/sw/include \
    --with-gdal=/usr/local/bin/gdal-config \
    --with-postgres-includes=/sw/include/postgresql \
    --with-postgres-libs=/sw/lib/postgresql \
    --with-odbc \
    --with-motif \
    --with-glw \
    --with-readline \
    --with-freetype

Then I do a make mix,
then make. Here is the make error:

0.0/execute.o OBJ.powerpc-apple-darwin7.0.0/fetch.o
OBJ.powerpc-apple-darwin7.0.0/listdb.o
OBJ.powerpc-apple-darwin7.0.0/listtab.o
OBJ.powerpc-apple-darwin7.0.0/main.o
OBJ.powerpc-apple-darwin7.0.0/parse.o
OBJ.powerpc-apple-darwin7.0.0/select.o -L/sw/lib/postgresql
-lgrass_dbmidriver -lgrass_dbmibase -lgrass_sqlp -lgrass_dbstubs
-lgrass_dbdialog -lgrass_gis -lgrass_datetime -lintl -lgrass_datetime
-lpq -lcrypt -L/sw/lib/tcl8.4 -ltk -ltcl \
          -lz
ld: can't locate file for: -lcrypt
make[3]: ***
[/Users/kirkw/tmp/grass57_exp_2003_12_06/dist.powerpc-apple-
darwin7.0.0/driver/db/pg] Error 1
make[2]: *** [subdirs] Error 1
make[1]: *** [subdirs] Error 1
make: *** [default] Error 1

Your problem looks like a configure issue.

In ./db/drivers/postgres/Makefile
CRYPTLIB = -lcrypt
is hardcoded. Maybe this should go elsewhere into Platform.make
?

Markus

I have been working with different configure combinations for a 57 build (see below) and now I am struggling with a nad2bin issue.

The make error is:
   OBJ.powerpc-apple-darwin7.0.0/get_proj.o OBJ.powerpc-apple-darwin7.0.0/do_proj.o OBJ.powerpc-apple-darwin7.0.0/convert.o OBJ.powerpc-apple-darwin7.0.0/datum.o OBJ.powerpc-apple-darwin7.0.0/ellipse.o -lgrass_gis -lgrass_datetime -lintl -lproj -L/usr/local/lib -lgdal -o /Users/kirkw/tmp/grass57_exp_2003_12_06/dist.powerpc-apple-darwin7.0.0/lib/libgrass_gproj.dylib
for i in FL.lla MD.lla TN.lla WI.lla WO.lla alaska.lla conus.lla hawaii.lla prvi.lla stgeorge.lla stlrnc.lla stpaul.lla ; do nad2bin < $i /Users/kirkw/tmp/grass57_exp_2003_12_06/dist.powerpc-apple-darwin7.0.0/etc/nad/`echo $i | sed 's/.lla//'`; done
/bin/sh: line 1: nad2bin: command not found
make[2]: *** [/Users/kirkw/tmp/grass57_exp_2003_12_06/dist.powerpc-apple-darwin7.0.0/etc/nad] Error 127
make[1]: *** [subdirs] Error 1
make: *** [default] Error 1

Here are the config switches I used:
./configure --with-grass50=/Users/kirkw/tmp/grass53_exp_2003_12_06/ \
    --enable-shared \
    --with-includes=/sw/include \
    --with-libs=/sw/lib \
    --with-tiff-includes=/sw/include \
    --with-tiff-libs=/sw/lib \
    --with-tcltk-includes=/sw/include \
    --with-tcltk-libs=/sw/lib/tcl8.4 \
    --with-opengl-libs=/usr/X11R6/lib \
    --with-opengl-includes=/usr/X11R6/include \
    --with-fftw-includes=/sw/include/ \
    --with-gdal=/usr/local/bin/gdal-config \
    --with-postgres-includes=/sw/include/postgresql \
    --with-postgres-libs=/sw/lib/postgresql \
    --with-odbc \
    --with-motif \
    --with-glw \
    --with-readline

Ever seen this one before?

Kirk

On Dec 11, 2003, at 8:56 AM, Markus Neteler wrote:

Your problem looks like a configure issue.

In ./db/drivers/postgres/Makefile
CRYPTLIB = -lcrypt
is hardcoded. Maybe this should go elsewhere into Platform.make
?

Markus

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

On Thu, 11 Dec 2003, Kirk R. Wythers wrote:

I have been working with different configure combinations for a 57
build (see below) and now I am struggling with a nad2bin issue.

The make error is:
   OBJ.powerpc-apple-darwin7.0.0/get_proj.o
OBJ.powerpc-apple-darwin7.0.0/do_proj.o
OBJ.powerpc-apple-darwin7.0.0/convert.o
OBJ.powerpc-apple-darwin7.0.0/datum.o
OBJ.powerpc-apple-darwin7.0.0/ellipse.o -lgrass_gis -lgrass_datetime
-lintl -lproj -L/usr/local/lib -lgdal -o
/Users/kirkw/tmp/grass57_exp_2003_12_06/dist.powerpc-apple-darwin7.0.0/
lib/libgrass_gproj.dylib
for i in FL.lla MD.lla TN.lla WI.lla WO.lla alaska.lla conus.lla
hawaii.lla prvi.lla stgeorge.lla stlrnc.lla stpaul.lla ; do nad2bin <
$i
/Users/kirkw/tmp/grass57_exp_2003_12_06/dist.powerpc-apple-darwin7.0.0/
etc/nad/`echo $i | sed 's/.lla//'`; done
/bin/sh: line 1: nad2bin: command not found
/bin/sh: line 1: nad2bin: command not found
/bin/sh: line 1: nad2bin: command not found
/bin/sh: line 1: nad2bin: command not found
/bin/sh: line 1: nad2bin: command not found
/bin/sh: line 1: nad2bin: command not found
/bin/sh: line 1: nad2bin: command not found
/bin/sh: line 1: nad2bin: command not found
/bin/sh: line 1: nad2bin: command not found
/bin/sh: line 1: nad2bin: command not found
/bin/sh: line 1: nad2bin: command not found
/bin/sh: line 1: nad2bin: command not found
make[2]: ***
[/Users/kirkw/tmp/grass57_exp_2003_12_06/dist.powerpc-apple-
darwin7.0.0/etc/nad] Error 127
make[1]: *** [subdirs] Error 1
make: *** [default] Error 1

Make sure you have PROJ installed properly. nad2bin comes with it and
should be installed in a directory somewhere in your path, e.g.
/usr/local/bin

Just to note some redundancies

Here are the config switches I used:
./configure --with-grass50=/Users/kirkw/tmp/grass53_exp_2003_12_06/ \
    --enable-shared \

    --with-includes=/sw/include \
    --with-libs=/sw/lib \

the above two lines

    --with-tiff-includes=/sw/include \
    --with-tiff-libs=/sw/lib \
    --with-tcltk-includes=/sw/include \
    --with-tcltk-libs=/sw/lib/tcl8.4 \

make these four redundant

    --with-opengl-libs=/usr/X11R6/lib \
    --with-opengl-includes=/usr/X11R6/include \

    --with-fftw-includes=/sw/include/ \

and this one too

    --with-gdal=/usr/local/bin/gdal-config \

this can just be --with-gdal if it is in /usr/local

    --with-postgres-includes=/sw/include/postgresql \
    --with-postgres-libs=/sw/lib/postgresql \

also redundant?

    --with-odbc \
    --with-motif \
    --with-glw \
    --with-readline

regards,
Hamish

Hamish wrote:

Just to note some redundancies

> Here are the config switches I used:
> ./configure --with-grass50=/Users/kirkw/tmp/grass53_exp_2003_12_06/ \
> --enable-shared \

> --with-includes=/sw/include \
> --with-libs=/sw/lib \

the above two lines

> --with-tiff-includes=/sw/include \
> --with-tiff-libs=/sw/lib \
> --with-tcltk-includes=/sw/include \
> --with-tcltk-libs=/sw/lib/tcl8.4 \

make these four redundant

Are you sure about the last one?

> --with-postgres-includes=/sw/include/postgresql \
> --with-postgres-libs=/sw/lib/postgresql \

also redundant?

Probably not.

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

> > --with-includes=/sw/include \
> > --with-libs=/sw/lib \
>
> the above two lines

make this one redundant:

> > --with-tcltk-libs=/sw/lib/tcl8.4 \

Are you sure about the last one?

well, on OSX 10.3 with the fink tcltk package, this:

CFLAGS="-Wall" LDFLAGS="-s" ./configure \
  --enable-shared \
  --with-includes="/usr/X11R6/include /sw/include" \
  --with-libs="/usr/X11R6/lib /sw/lib" \
  --without-gd --without-proj --without-postgres \
  --with-gdal --with-readline --with-glw \
  --with-motif --with-cxx --with-odbc --with-freetype \
  --with-freetype-includes=/usr/X11R6/include/freetype2

gives this:

checking whether to use Tcl/Tk... yes
checking for location of Tcl/Tk includes...
checking for tcl.h... yes
checking for tk.h... yes
checking Tcl version... 8.4
checking Tk version... 8.4
checking for location of Tcl/Tk library...
checking for Tcl_Init in -ltcl... yes
checking for Tk_MainWindow in -ltk... yes

and it works... so yes, I guess so.

Hamish

On Dec 11, 2003, at 8:58 PM, Hamish wrote:

CFLAGS="-Wall" LDFLAGS="-s" ./configure \
  --enable-shared \
  --with-includes="/usr/X11R6/include /sw/include" \
  --with-libs="/usr/X11R6/lib /sw/lib" \
  --without-gd --without-proj --without-postgres \
  --with-gdal --with-readline --with-glw \
  --with-motif --with-cxx --with-odbc --with-freetype \
  --with-freetype-includes=/usr/X11R6/include/freetype2

How did you install freetype? I am having trouble getting freetype to compile and I am wondering if it the fact that I have both freetype and freetype2 installed (from fink).

gives this:

checking whether to use Tcl/Tk... yes
checking for location of Tcl/Tk includes...
checking for tcl.h... yes
checking for tk.h... yes
checking Tcl version... 8.4
checking Tk version... 8.4
checking for location of Tcl/Tk library...
checking for Tcl_Init in -ltcl... yes
checking for Tk_MainWindow in -ltk... yes

------------------------------------------------------------------------
Kirk R. Wythers tel: 612.625.2261
Dept. of Forest Resources fax: 612.625.5212
University of Minnesota email: kwythers@umn.edu
------------------------------------------------------------------------

Hamish wrote:

> > > --with-includes=/sw/include \
> > > --with-libs=/sw/lib \
> >
> > the above two lines
make this one redundant:

> > > --with-tcltk-libs=/sw/lib/tcl8.4 \

>
> Are you sure about the last one?

well, on OSX 10.3 with the fink tcltk package, this:

CFLAGS="-Wall" LDFLAGS="-s" ./configure \
  --enable-shared \
  --with-includes="/usr/X11R6/include /sw/include" \
  --with-libs="/usr/X11R6/lib /sw/lib" \
  --without-gd --without-proj --without-postgres \
  --with-gdal --with-readline --with-glw \
  --with-motif --with-cxx --with-odbc --with-freetype \
  --with-freetype-includes=/usr/X11R6/include/freetype2

gives this:

checking whether to use Tcl/Tk... yes
checking for location of Tcl/Tk includes...
checking for tcl.h... yes
checking for tk.h... yes
checking Tcl version... 8.4
checking Tk version... 8.4
checking for location of Tcl/Tk library...
checking for Tcl_Init in -ltcl... yes
checking for Tk_MainWindow in -ltk... yes

and it works... so yes, I guess so.

Actually, --with-libs=/sw/lib makes --with-tcltk-libs=/sw/lib
redundant; which is fortunate, as it wasn't given.

No doubt /sw/lib/tcl8.4 is the directory which contains the Tcl files
(init.tcl etc); in which case, there's no point passing it to
configure.

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

Markus Neteler wrote:

> ld: can't locate file for: -lcrypt
> make[3]: ***
> [/Users/kirkw/tmp/grass57_exp_2003_12_06/dist.powerpc-apple-
> darwin7.0.0/driver/db/pg] Error 1
> make[2]: *** [subdirs] Error 1
> make[1]: *** [subdirs] Error 1
> make: *** [default] Error 1

Your problem looks like a configure issue.

In ./db/drivers/postgres/Makefile
CRYPTLIB = -lcrypt
is hardcoded. Maybe this should go elsewhere into Platform.make
?

AFAICT, this is already done. The configure script should add -lcrypt
or '-lssl -lcrypto' to the definition of PQLIB if they are required
(i.e. if libpq doesn't have correct dependency information):

LOC_CHECK_LIBS(pq,PQsetdbLogin,PostgreSQL,$PQLIBPATH,PQLIB,-lcrypt,-lssl -lcrypto)

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

[Compiling GRASS 5.3 on Mac OSX 10.3]

> CFLAGS="-Wall" LDFLAGS="-s" ./configure \
> --enable-shared \
> --with-includes="/usr/X11R6/include /sw/include" \
> --with-libs="/usr/X11R6/lib /sw/lib" \
> --without-gd --without-proj --without-postgres \
> --with-gdal --with-readline --with-glw \
> --with-motif --with-cxx --with-odbc --with-freetype \
> --with-freetype-includes=/usr/X11R6/include/freetype2

How did you install freetype? I am having trouble getting freetype to
compile and I am wondering if it the fact that I have both freetype
and freetype2 installed (from fink).

I installed both from Fink and whatever came with Apple's X11 + SDKs.

Note in the above config script I put /usr/X11R6/include [ie Apple's]
before /sw/include [ie Fink's] on both the global --with-includes and
--with-libs. This means that when I add --with-freetype below, it
searches for Apple's Freetype2 libraries first[??]. I still have to
specify the FT2 includes directory though. Most likely you are trying to
mix Fink's libraries with Apple's headers and getting a version
miss-match.

Couple of things to mention:
- You need freetype2, not freetype.
- Someone mentioned Fink's freetype is newer. I'm not sure about this.
Check the header (.h) files for MAJOR and MINOR versions. When I did
Apple's was newer, but this may have changed by now. Either way it
seems to work fine with the version included in Apple OSX 10.3.
- most likely Apple TrueType fonts won't work with the path= option, but
the ones included for Apple's Java install and many other 3rd party ones
will. I've had the same problem with Windows TTF's, don't know enough
about them to get 'em working.
- d.text.freetype still needs some polish (-c flag to set placement as %
of frame, match RGB colour selection to the d.vect.* way, etc).
Hopefully I'll get to this someday before the end of summer.

Hamish