compiling grass-jni-0.7.0 on Linux

Hello,
I'm trying to compile grass-jni-0.7.0 on a Linux Box (Redhat 5.1) and
I have some troubles when compiling libgis.so (same problems when
trying to compiling libvect.so)
I know that this 'library' is only tested with SunOS 5.5.1, and my
problem's are more Linux (and java Linux) related than due to Grass,
but I don't know a better group to post my questions.

(In the GNUMakefile I replace (JDK_HOME)/include/solaris by
(JDK_HOME)/include/genunix)

this one :
GRASS_FILE.c: In function `FILE_ptr':
GRASS_FILE.c:38: warning: cast to pointer from integer of different
size -------------------------------------------------
----
(repeated a lot [I think it's a problems with declaration in
(JDK_HOME)/include/genunix/jni_md.h] ):

and this one :
gcc -g -O2 -I/usr/local/jdk1.1.6/include
-I/usr/local/jdk1.1.6/include/genunix
-I/usr/local/grass42/src421/src/include
-I/usr/local/grass42/src421/src/mapdev/Vlib
-I/usr/local/grass42/src421/src/mapdev/diglib
-I/usr/local/grass42/src421/src/include -DUSE_TERMIO -c jmalloc.c -o
jmalloc.o gcc -g -I/usr/local/jdk1.1.6/include
-I/usr/local/jdk1.1.6/include/genunix
-I/usr/local/grass42/src421/src/include
-I/usr/local/grass42/src421/src/mapdev/Vlib
-I/usr/local/grass42/src421/src/mapdev/diglib -Wl,-s -o libgis.so \
        GRASS_libgis.o GRASS_CELL.o GRASS_Cellhead.o GRASS_Colors.o
GRASS_FD.o GRASS_Range.o GRASS_Cellstats.o GRASS_Categories.o
GRASS_FILE.o jmalloc.o -L/usr/local/grass42/src421/src/libes/LIB.linux
-lgis
/usr/local/grass42/src421/src/libes/LIB.linux/libgis.a(gets.o): In
function `G_gets': gets.o(.text+0x5f): the `gets' function is
dangerous and should not be used.
/usr/lib/crt1.o(.text+0x36):
undefined reference to `main' make: *** [libgis.so] Error 1
------------------------------

Is it a problems whith a missing library for the linkage?

If someone had compiling and use grass-jni-0.7.0 on Linux, I d like to
read the tips ( I want to use java servlet to use Grass on an HTTP
server for Rabies surveillance , who is nearly totaly based on java
classes and for now i can't use Grasslinks)

also I notice the warning about the use of gets in a great number of
file when i'm compilling Grass (V 4.2.16) Is it due to the use of
glibc (aka libc.so.6) ???

Thank you.

--
Hervé Dréau Interne en Médecine
hdreau@worldnet.fr dreau@hbroussais.fr
Médecine Linux Java

<Subject> Trouble to compile grass-jni-0.7.0 on Linux

gcc -g -O2 -I/usr/local/jdk1.1.6/include

... -------

/usr/local/grass42/src421/src/libes/LIB.linux/libgis.a(gets.o): In
function `G_gets': gets.o(.text+0x5f): the `gets' function is
dangerous and should not be used.
/usr/lib/crt1.o(.text+0x36):
undefined reference to `main' make: *** [libgis.so] Error 1
------------------------------

Thank to Alexandre Sorokine <sorokin@vtt.co.jp>, I can now compile
grass-jni-0.7.0, the major problem was due to my bad knowledge of gcc
: i missed to use the -shared flag to build the shared library (in the
place of the -G flag for sun, i remove it but don't replace it :frowning: ).

Excuse me for the noise.

--
Hervé Dréau Interne en Médecine
hdreau@worldnet.fr dreau@hbroussais.fr
Médecine Linux Java

Hi Herve!

Can you summarize changes that you've done to compile grass-jni on Linux?
Then I will post an updated version this week.

--
Alexandre Sorokine, GIS specialist
Regional Science Institute 4-13 Kita-24 Nishi-2, Kita-ku
                                          Sapporo 001-0024 JAPAN
mailto:sorokin@vtt.co.jp Tel +81-11-717-6660
http://www.vtt.co.jp/staff/sorokin Fax +81-11-757-3610