building JWS1.1.3 Major Problems.

building JWS1.1.3 Major Problems.

Post by Matt » Thu, 22 Jul 1999 04:00:00



Hi,

I am having some major problems compiling and lniking the
javawebserver 1.1.3 in linux SuSE6.1 (glib2.0.7)

All seems to be going well however when the libserver.so
file is being created the 'make' fails.

Does anyone know why and how I can correct it please ?

Many thanks

Matt

bash-2.02# cc -v
Reading specs from /usr/lib/gcc-lib/i486-linux/2.7.2.3/specs
gcc version 2.7.2.3

make -fd jws_inst.mk install

[snip]....

     Finished dependencies of target file
`genunix/unknown/com_sun_server_realm_unix_UNIXUserEnumeration.o'.
     Dependency
`genunix/com_sun_server_realm_unix_UNIXUserEnumeration.c' is older than
dependent
`genunix/unknown/com_sun_server_realm_unix_UNIXUserEnumeration.o'.
    No need to remake target
`genunix/unknown/com_sun_server_realm_unix_UNIXUserEnumeration.o'.
   Finished dependencies of target file `genunix/unknown/libserver.so'.
  Must remake target `genunix/unknown/libserver.so'.
cc -shared -fPIC -Igenunix -I/usr/lib/jdk1.1.7/include
-I/usr/lib/jdk1.1.7/include/genunix   -o genunix/unknown/libserver.so
genunix/unknown/server.o genunix/unknown/UNIXUser.o
genunix/unknown/UNIXUserEnumeration.o
genunix/unknown/com_sun_server_ServerProcess.o
genunix/unknown/com_sun_server_realm_unix_UNIXUser.o
genunix/unknown/com_sun_server_realm_unix_UNIXUserEnumeration.o
Putting child 0x0806f210 PID 00857 on the chain.
Live child 0x0806f210 PID 857
genunix/unknown/com_sun_server_realm_unix_UNIXUser.o: In function
`com_sun_server_realm_unix_UNIXUser_loadFromPasswd':
genunix/unknown/com_sun_server_realm_unix_UNIXUser.o(.text+0x0):
multiple definition of
`com_sun_server_realm_unix_UNIXUser_loadFromPasswd'
genunix/unknown/UNIXUser.o(.text+0x0): first defined here
genunix/unknown/com_sun_server_realm_unix_UNIXUser.o: In function
`com_sun_server_realm_unix_UNIXUser_checkCrypt':
genunix/unknown/com_sun_server_realm_unix_UNIXUser.o(.text+0xd0):
multiple definition of `com_sun_server_realm_unix_UNIXUser_checkCrypt'
genunix/unknown/UNIXUser.o(.text+0xd0): first defined here
genunix/unknown/com_sun_server_realm_unix_UNIXUserEnumeration.o: In
function `com_sun_server_realm_unix_UNIXUserEnumeration_setpwent':
genunix/unknown/com_sun_server_realm_unix_UNIXUserEnumeration.o(.text+0x0):
multiple definition of
`com_sun_server_realm_unix_UNIXUserEnumeration_setpwent'
genunix/unknown/UNIXUserEnumeration.o(.text+0x0): first defined here
genunix/unknown/com_sun_server_realm_unix_UNIXUserEnumeration.o: In
function
`com_sun_server_realm_unix_UNIXUserEnumeration_getNextUserName':
genunix/unknown/com_sun_server_realm_unix_UNIXUserEnumeration.o(.text+0x20):
multiple definition of
`com_sun_server_realm_unix_UNIXUserEnumeration_getNextUserName'
genunix/unknown/UNIXUserEnumeration.o(.text+0x20): first defined here
Got a SIGCHLD; 1 unreaped children.
Reaping losing child 0x0806f210 PID 857
make: *** [genunix/unknown/libserver.so] Error 1
Removing child 0x0806f210 PID 857 from chain.

My make file..

###################################################

#
# Solaris-specific makefile for building optional native library
support.
# Use this as a starting point for porting to other UNIX platforms.
#
# Path to top of Java Web Server distribution tree
TOP = ..

# Name of the library we're making (given to System.loadLibrary)
LIBNAME = server

# Location of Java Developer's Kit (and runtime)
JAVA_HOME=/usr/lib/jdk1.1.7

# Java runtime flags
JAVAH=$(JAVA_HOME)/bin/javah
CLASSPATH=$(TOP)/classes:$(TOP)/lib/classes.zip:$(JAVA_HOME)/classes:$(JAVA_HOME)/lib/classes.zip

# OS and machine type
OS =    genunix
ARCH =  unknown
OBJ =   $(OS)/$(ARCH)

# Preprocessor, compiler, linker, and related flags
CC =            cc
CFLAGS =        -shared -fPIC
CPPFLAGS =      -I$(OS) -I$(JAVA_HOME)/include
-I$(JAVA_HOME)/include/$(OS)
LDFLAGS =       #-G -h $(LIBNAME)
INSTALL =       /usr/bin/install

LIBDIR =        $(TOP)/lib/$(OBJ)

LIBRARY =       $(OBJ)/lib$(LIBNAME).so
OBJS =          $(OBJ)/server.o \
                $(OBJ)/UNIXUser.o \
                $(OBJ)/UNIXUserEnumeration.o \
                $(OBJ)/com_sun_server_ServerProcess.o \
                $(OBJ)/com_sun_server_realm_unix_UNIXUser.o \
                $(OBJ)/com_sun_server_realm_unix_UNIXUserEnumeration.o

default all: $(LIBRARY)

$(LIBRARY): $(OBJS)

$(OBJ)/server.o: server.c $(OS)/com_sun_server_ServerProcess.h

$(OBJ)/UNIXUser.o: UNIXUser.c $(OS)/com_sun_server_realm_unix_UNIXUser.h

$(OBJ)/UNIXUserEnumeration.o: UNIXUserEnumeration.c \
                $(OS)/com_sun_server_realm_unix_UNIXUserEnumeration.h

$(OBJ)/com_sun_server_ServerProcess.o:
$(OS)/com_sun_server_ServerProcess.c

$(OS)/com_sun_server_ServerProcess.c:
        $(JAVAH) -d $(OS) -classpath $(CLASSPATH) -stubs
com.sun.server.ServerProcess

$(OS)/com_sun_server_ServerProcess.h:
        $(JAVAH) -d $(OS) -classpath $(CLASSPATH)
com.sun.server.ServerProcess

$(OBJ)/com_sun_server_realm_unix_UNIXUser.o:
$(OS)/com_sun_server_realm_unix_UNIXUser.c

$(OS)/com_sun_server_realm_unix_UNIXUser.c:
        $(JAVAH) -d $(OS) -classpath $(CLASSPATH) \
                -stubs com.sun.server.realm.unix.UNIXUser
$(OS)/com_sun_server_realm_unix_UNIXUser.h:
        $(JAVAH) -d $(OS) -classpath $(CLASSPATH)
com.sun.server.realm.unix.UNIXUser

$(OBJ)/com_sun_server_realm_unix_UNIXUserEnumeration.o: \
                $(OS)/com_sun_server_realm_unix_UNIXUserEnumeration.c

$(OS)/com_sun_server_realm_unix_UNIXUserEnumeration.c
$(OS)/com_sun_server_realm_unix_UNIXUserEnumeration.c:
        $(JAVAH) -d $(OS) -classpath $(CLASSPATH) \
                -stubs com.sun.server.realm.unix.UNIXUserEnumeration
$(OS)/com_sun_server_realm_unix_UNIXUserEnumeration.h:
        $(JAVAH) -d $(OS) -classpath $(CLASSPATH) \
                com.sun.server.realm.unix.UNIXUserEnumeration

install: $(LIBRARY)
        $(INSTALL) -d $(LIBDIR)
        $(INSTALL) -c $(LIBRARY) $(LIBDIR)

clean:
        rm -rf $(OS)

.INIT:

.KEEP_STATE:

 
 
 

building JWS1.1.3 Major Problems.

Post by Matt » Sat, 24 Jul 1999 04:00:00


Fixed the fault

The major problem was UNIXUserEnumeration.c and
UNIXUser.c were identical in the genunix/unknown dir
to the ones in the ../native dir.

Also as Greg pointed out..

#ifdef
#else
#endif

Was a primary cause. But I re-applied the fixes on the
patch and re-checked...

All works now.

Many thanks

Matt


> Hi,

> I am having some major problems compiling and lniking the
> javawebserver 1.1.3 in linux SuSE6.1 (glib2.0.7)

> All seems to be going well however when the libserver.so
> file is being created the 'make' fails.

> Does anyone know why and how I can correct it please ?

> Many thanks

> Matt

> bash-2.02# cc -v
> Reading specs from /usr/lib/gcc-lib/i486-linux/2.7.2.3/specs
> gcc version 2.7.2.3

> make -fd jws_inst.mk install

> [snip]....

>      Finished dependencies of target file
> `genunix/unknown/com_sun_server_realm_unix_UNIXUserEnumeration.o'.
>      Dependency
> `genunix/com_sun_server_realm_unix_UNIXUserEnumeration.c' is older than
> dependent
> `genunix/unknown/com_sun_server_realm_unix_UNIXUserEnumeration.o'.
>     No need to remake target
> `genunix/unknown/com_sun_server_realm_unix_UNIXUserEnumeration.o'.
>    Finished dependencies of target file `genunix/unknown/libserver.so'.
>   Must remake target `genunix/unknown/libserver.so'.
> cc -shared -fPIC -Igenunix -I/usr/lib/jdk1.1.7/include
> -I/usr/lib/jdk1.1.7/include/genunix   -o genunix/unknown/libserver.so
> genunix/unknown/server.o genunix/unknown/UNIXUser.o
> genunix/unknown/UNIXUserEnumeration.o
> genunix/unknown/com_sun_server_ServerProcess.o
> genunix/unknown/com_sun_server_realm_unix_UNIXUser.o
> genunix/unknown/com_sun_server_realm_unix_UNIXUserEnumeration.o
> Putting child 0x0806f210 PID 00857 on the chain.
> Live child 0x0806f210 PID 857
> genunix/unknown/com_sun_server_realm_unix_UNIXUser.o: In function
> `com_sun_server_realm_unix_UNIXUser_loadFromPasswd':
> genunix/unknown/com_sun_server_realm_unix_UNIXUser.o(.text+0x0):
> multiple definition of
> `com_sun_server_realm_unix_UNIXUser_loadFromPasswd'
> genunix/unknown/UNIXUser.o(.text+0x0): first defined here
> genunix/unknown/com_sun_server_realm_unix_UNIXUser.o: In function
> `com_sun_server_realm_unix_UNIXUser_checkCrypt':
> genunix/unknown/com_sun_server_realm_unix_UNIXUser.o(.text+0xd0):
> multiple definition of `com_sun_server_realm_unix_UNIXUser_checkCrypt'
> genunix/unknown/UNIXUser.o(.text+0xd0): first defined here
> genunix/unknown/com_sun_server_realm_unix_UNIXUserEnumeration.o: In
> function `com_sun_server_realm_unix_UNIXUserEnumeration_setpwent':
> genunix/unknown/com_sun_server_realm_unix_UNIXUserEnumeration.o(.text+0x0):
> multiple definition of
> `com_sun_server_realm_unix_UNIXUserEnumeration_setpwent'
> genunix/unknown/UNIXUserEnumeration.o(.text+0x0): first defined here
> genunix/unknown/com_sun_server_realm_unix_UNIXUserEnumeration.o: In
> function
> `com_sun_server_realm_unix_UNIXUserEnumeration_getNextUserName':
> genunix/unknown/com_sun_server_realm_unix_UNIXUserEnumeration.o(.text+0x20):
> multiple definition of
> `com_sun_server_realm_unix_UNIXUserEnumeration_getNextUserName'
> genunix/unknown/UNIXUserEnumeration.o(.text+0x20): first defined here
> Got a SIGCHLD; 1 unreaped children.
> Reaping losing child 0x0806f210 PID 857
> make: *** [genunix/unknown/libserver.so] Error 1
> Removing child 0x0806f210 PID 857 from chain.

> My make file..

> ###################################################

> #
> # Solaris-specific makefile for building optional native library
> support.
> # Use this as a starting point for porting to other UNIX platforms.
> #
> # Path to top of Java Web Server distribution tree
> TOP = ..

> # Name of the library we're making (given to System.loadLibrary)
> LIBNAME = server

> # Location of Java Developer's Kit (and runtime)
> JAVA_HOME=/usr/lib/jdk1.1.7

> # Java runtime flags
> JAVAH=$(JAVA_HOME)/bin/javah
> CLASSPATH=$(TOP)/classes:$(TOP)/lib/classes.zip:$(JAVA_HOME)/classes:$(JAVA_HOME)/lib/classes.zip

> # OS and machine type
> OS =    genunix
> ARCH =  unknown
> OBJ =   $(OS)/$(ARCH)

> # Preprocessor, compiler, linker, and related flags
> CC =            cc
> CFLAGS =        -shared -fPIC
> CPPFLAGS =      -I$(OS) -I$(JAVA_HOME)/include
> -I$(JAVA_HOME)/include/$(OS)
> LDFLAGS =       #-G -h $(LIBNAME)
> INSTALL =       /usr/bin/install

> LIBDIR =        $(TOP)/lib/$(OBJ)

> LIBRARY =       $(OBJ)/lib$(LIBNAME).so
> OBJS =          $(OBJ)/server.o \
>                 $(OBJ)/UNIXUser.o \
>                 $(OBJ)/UNIXUserEnumeration.o \
>                 $(OBJ)/com_sun_server_ServerProcess.o \
>                 $(OBJ)/com_sun_server_realm_unix_UNIXUser.o \
>                 $(OBJ)/com_sun_server_realm_unix_UNIXUserEnumeration.o

> default all: $(LIBRARY)

> $(LIBRARY): $(OBJS)

> $(OBJ)/server.o: server.c $(OS)/com_sun_server_ServerProcess.h

> $(OBJ)/UNIXUser.o: UNIXUser.c $(OS)/com_sun_server_realm_unix_UNIXUser.h

> $(OBJ)/UNIXUserEnumeration.o: UNIXUserEnumeration.c \
>                 $(OS)/com_sun_server_realm_unix_UNIXUserEnumeration.h

> $(OBJ)/com_sun_server_ServerProcess.o:
> $(OS)/com_sun_server_ServerProcess.c

> $(OS)/com_sun_server_ServerProcess.c:
>         $(JAVAH) -d $(OS) -classpath $(CLASSPATH) -stubs
> com.sun.server.ServerProcess

> $(OS)/com_sun_server_ServerProcess.h:
>         $(JAVAH) -d $(OS) -classpath $(CLASSPATH)
> com.sun.server.ServerProcess

> $(OBJ)/com_sun_server_realm_unix_UNIXUser.o:
> $(OS)/com_sun_server_realm_unix_UNIXUser.c

> $(OS)/com_sun_server_realm_unix_UNIXUser.c:
>         $(JAVAH) -d $(OS) -classpath $(CLASSPATH) \
>                 -stubs com.sun.server.realm.unix.UNIXUser
> $(OS)/com_sun_server_realm_unix_UNIXUser.h:
>         $(JAVAH) -d $(OS) -classpath $(CLASSPATH)
> com.sun.server.realm.unix.UNIXUser

> $(OBJ)/com_sun_server_realm_unix_UNIXUserEnumeration.o: \
>                 $(OS)/com_sun_server_realm_unix_UNIXUserEnumeration.c

> $(OS)/com_sun_server_realm_unix_UNIXUserEnumeration.c
> $(OS)/com_sun_server_realm_unix_UNIXUserEnumeration.c:
>         $(JAVAH) -d $(OS) -classpath $(CLASSPATH) \
>                 -stubs com.sun.server.realm.unix.UNIXUserEnumeration
> $(OS)/com_sun_server_realm_unix_UNIXUserEnumeration.h:
>         $(JAVAH) -d $(OS) -classpath $(CLASSPATH) \
>                 com.sun.server.realm.unix.UNIXUserEnumeration

> install: $(LIBRARY)
>         $(INSTALL) -d $(LIBDIR)
>         $(INSTALL) -c $(LIBRARY) $(LIBDIR)

> clean:
>         rm -rf $(OS)

> .INIT:

> .KEEP_STATE:


 
 
 

1. Problem building tcsh-6.06 for SunOS-4.1.3

I got the extra instructions that Paul DuBois mentioned in his recent
post, and used them to re-make.  It works now.

Thanks, Paul.

tw
--
/////////////////////////////////////////////////////////////////////////
\The shadow of the bamboo sweeps the steps, but the dust does not stir. /
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

2. 2.5.49: Severe PIIX4/ATA filesystem corruption

3. upsmon-2.1.3 port doesnt build with freebsd 5.0

4. A quesion about cookie with netscape

5. dynamically linked static libs and 0 byte frame buf's in redhat

6. mod_jk 1.3 build for apache2.0 fails-help!

7. FreeBSD upgrade question

8. Building GCC as Solaris2.4 -> SunOS4.1.3 cross-compiler

9. Anyone built xgopher.1.3?

10. 1.3.1p6 fails to build

11. PPP and new 1.3.x build

12. error building 1.3