commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 1983-01...@gmx.net
Subject [Daemon] CPPFLAGS ignored on HP-UX
Date Thu, 20 Oct 2011 11:08:29 GMT
Hi folks,

I'm trying to build JSVC on HP-UX and the JDK has its header files in a non-standard location.
I have exported the CPPFLAGS env var but the configure script does not pick it up.

My system is as following:
bash $ uname -a
HP-UX blnn721x B.11.23 U ia64 1431159426 unlimited-user license
bash $ /opt/java6/bin/java -version
java version "1.6.0.10"
Java(TM) SE Runtime Environment (build 1.6.0.10-jinteg_11_mar_2011_09_19-b00)
Java HotSpot(TM) Server VM (build 19.1-b02-jinteg:2011mar11-07:33, mixed mode)

The output of the compilation process is as following:

smartld@blnn721x - ~/apache-tomcat-7.0.22/bin/commons-daemon-1.0.7-native-src/unix
bash $ export CPPFLAGS="-I/opt/java6/include/hp-ux"

smartld@blnn721x - ~/apache-tomcat-7.0.22/bin/commons-daemon-1.0.7-native-src/unix
bash $ echo $CPPFLAGS
-I/opt/java6/include/hp-ux

smartld@blnn721x - ~/apache-tomcat-7.0.22/bin/commons-daemon-1.0.7-native-src/unix
bash $ ./configure
*** Current host ***
checking build system type... ia64-hp-hpux11.23
checking host system type... ia64-hp-hpux11.23
checking cached host system type... ok
*** C-Language compilation tools ***
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for ranlib... ranlib
checking for strip... strip
*** Host support ***
checking C flags dependant on host system type... ok
*** Java compilation tools ***
checking for sablevm... NONE
checking for kaffe... NONE
checking for javac... /opt/java6/bin/javac
/opt/java6/bin/javac
checking wether the Java compiler (/opt/java6/bin/javac) works... yes
checking for jar... /opt/java6/bin/jar
gcc flags added
*** Writing output files ***
configure: creating ./config.status
config.status: creating Makefile
config.status: creating Makedefs
config.status: creating native/Makefile
*** All done ***
Now you can issue "make"

smartld@blnn721x - ~/apache-tomcat-7.0.22/bin/commons-daemon-1.0.7-native-src/unix
bash $ make
        (cd native; make  all)
        gcc -g -O2 -pthread -DOS_HPUX -DDSO_DLFCN -DCPU=\"ia64\" -Wall -Wstrict-prototypes
 -I/opt/java6/include -I/opt/java6/include/ia64 -c jsvc-unix.c -o jsvc-unix.o
        gcc -g -O2 -pthread -DOS_HPUX -DDSO_DLFCN -DCPU=\"ia64\" -Wall -Wstrict-prototypes
 -I/opt/java6/include -I/opt/java6/include/ia64 -c arguments.c -o arguments.o
        gcc -g -O2 -pthread -DOS_HPUX -DDSO_DLFCN -DCPU=\"ia64\" -Wall -Wstrict-prototypes
 -I/opt/java6/include -I/opt/java6/include/ia64 -c debug.c -o debug.o
        gcc -g -O2 -pthread -DOS_HPUX -DDSO_DLFCN -DCPU=\"ia64\" -Wall -Wstrict-prototypes
 -I/opt/java6/include -I/opt/java6/include/ia64 -c dso-dlfcn.c -o dso-dlfcn.o
        gcc -g -O2 -pthread -DOS_HPUX -DDSO_DLFCN -DCPU=\"ia64\" -Wall -Wstrict-prototypes
 -I/opt/java6/include -I/opt/java6/include/ia64 -c dso-dyld.c -o dso-dyld.o
        gcc -g -O2 -pthread -DOS_HPUX -DDSO_DLFCN -DCPU=\"ia64\" -Wall -Wstrict-prototypes
 -I/opt/java6/include -I/opt/java6/include/ia64 -c help.c -o help.o
        gcc -g -O2 -pthread -DOS_HPUX -DDSO_DLFCN -DCPU=\"ia64\" -Wall -Wstrict-prototypes
 -I/opt/java6/include -I/opt/java6/include/ia64 -c home.c -o home.o
        gcc -g -O2 -pthread -DOS_HPUX -DDSO_DLFCN -DCPU=\"ia64\" -Wall -Wstrict-prototypes
 -I/opt/java6/include -I/opt/java6/include/ia64 -c java.c -o java.o
In file included from java.c:24:
/opt/java6/include/jni.h:31:20: error: jni_md.h: No such file or directory
In file included from java.c:24:
/opt/java6/include/jni.h:54: error: expected '=', ',', ';', 'asm' or '__attribute__' before
'jsize'
/opt/java6/include/jni.h:113: error: expected specifier-qualifier-list before 'jbyte'
/opt/java6/include/jni.h:211: error: expected specifier-qualifier-list before 'jint'
/opt/java6/include/jni.h:1860: error: expected specifier-qualifier-list before 'jint'
/opt/java6/include/jni.h:1868: error: expected specifier-qualifier-list before 'jint'
/opt/java6/include/jni.h:1886: error: expected specifier-qualifier-list before 'jint'
/opt/java6/include/jni.h:1925: error: expected '=', ',', ';', 'asm' or '__attribute__' before
'jint'
/opt/java6/include/jni.h:1928: error: expected '=', ',', ';', 'asm' or '__attribute__' before
'jint'
/opt/java6/include/jni.h:1931: error: expected '=', ',', ';', 'asm' or '__attribute__' before
'jint'
/opt/java6/include/jni.h:1935: error: expected '=', ',', ';', 'asm' or '__attribute__' before
'jint'
/opt/java6/include/jni.h:1938: error: expected '=', ',', ';', 'asm' or '__attribute__' before
'void'
java.c: In function 'failed':
java.c:56: error: 'const struct JNINativeInterface_' has no member named 'GetStringUTFChars'
java.c:59: error: 'const struct JNINativeInterface_' has no member named 'ReleaseStringUTFChars'
java.c: At top level:
java.c:106: error: expected declaration specifiers or '...' before '*' token
java.c:106: warning: type defaults to 'int' in declaration of 'jint'
java.c:106: error: 'jint' declared as function returning a function
java.c:106: warning: function declaration isn't a prototype
java.c: In function 'java_signal':
java.c:117: error: 'const struct JNINativeInterface_' has no member named 'GetStaticMethodID'
java.c:119: error: 'const struct JNINativeInterface_' has no member named 'ExceptionClear'
java.c:124: error: 'const struct JNINativeInterface_' has no member named 'CallStaticBooleanMethod'
java.c:128: error: 'const struct JNINativeInterface_' has no member named 'ExceptionClear'
java.c: In function 'java_init':
java.c:141: error: 'jvm_create_t' undeclared (first use in this function)
java.c:141: error: (Each undeclared identifier is reported only once
java.c:141: error: for each function it appears in.)
java.c:141: error: expected ';' before 'symb'
java.c:217: error: 'symb' undeclared (first use in this function)
java.c:217: error: expected ';' before 'dso_symbol'
java.c:239: error: 'JavaVMInitArgs' has no member named 'version'
java.c:255: error: 'JavaVMInitArgs' has no member named 'ignoreUnrecognized'
java.c:256: error: 'JavaVMInitArgs' has no member named 'nOptions'
java.c:257: error: 'JavaVMInitArgs' has no member named 'nOptions'
java.c:282: error: 'JavaVMInitArgs' has no member named 'options'
java.c:287: error: 'JavaVMInitArgs' has no member named 'version'
java.c:289: error: 'JavaVMInitArgs' has no member named 'ignoreUnrecognized'
java.c:299: error: 'JavaVMInitArgs' has no member named 'nOptions'
java.c:301: error: 'JavaVMInitArgs' has no member named 'nOptions'
java.c:323: error: 'const struct JNINativeInterface_' has no member named 'FindClass'
java.c:345: error: 'const struct JNINativeInterface_' has no member named 'RegisterNatives'
java.c: In function 'JVM_destroy':
java.c:365: error: 'const struct JNINativeInterface_' has no member named 'FindClass'
java.c:374: error: 'const struct JNINativeInterface_' has no member named 'GetStaticMethodID'
java.c:381: error: 'const struct JNINativeInterface_' has no member named 'CallStaticVoidMethod'
java.c:381: error: cast specifies function type
java.c:385: error: 'const struct JNIInvokeInterface_' has no member named 'DestroyJavaVM'
java.c: In function 'java_load':
java.c:406: error: 'const struct JNINativeInterface_' has no member named 'NewStringUTF'
java.c:414: error: 'const struct JNINativeInterface_' has no member named 'FindClass'
java.c:420: error: 'const struct JNINativeInterface_' has no member named 'NewObjectArray'
java.c:428: error: 'const struct JNINativeInterface_' has no member named 'NewStringUTF'
java.c:434: error: 'const struct JNINativeInterface_' has no member named 'SetObjectArrayElement'
java.c:439: error: 'const struct JNINativeInterface_' has no member named 'GetStaticMethodID'
java.c:446: error: 'const struct JNINativeInterface_' has no member named 'CallStaticBooleanMethod'
java.c: In function 'java_start':
java.c:467: error: 'const struct JNINativeInterface_' has no member named 'GetStaticMethodID'
java.c:473: error: 'const struct JNINativeInterface_' has no member named 'CallStaticBooleanMethod'
java.c: In function 'java_sleep':
java.c:498: error: 'const struct JNINativeInterface_' has no member named 'FindClass'
java.c:503: error: 'const struct JNINativeInterface_' has no member named 'GetStaticMethodID'
java.c:509: error: 'const struct JNINativeInterface_' has no member named 'CallStaticVoidMethod'
java.c:509: error: 'jlong' undeclared (first use in this function)
java.c:509: error: expected ')' before 'wait'
java.c: In function 'java_stop':
java.c:522: error: 'const struct JNINativeInterface_' has no member named 'GetStaticMethodID'
java.c:528: error: 'const struct JNINativeInterface_' has no member named 'CallStaticBooleanMethod'
java.c: In function 'java_version':
java.c:547: error: 'const struct JNINativeInterface_' has no member named 'GetStaticMethodID'
java.c:553: error: 'const struct JNINativeInterface_' has no member named 'CallStaticVoidMethod'
java.c: In function 'java_check':
java.c:569: error: 'const struct JNINativeInterface_' has no member named 'NewStringUTF'
java.c:578: error: 'const struct JNINativeInterface_' has no member named 'GetStaticMethodID'
java.c:584: error: 'const struct JNINativeInterface_' has no member named 'CallStaticBooleanMethod'
java.c: In function 'java_destroy':
java.c:604: error: 'const struct JNINativeInterface_' has no member named 'GetStaticMethodID'
java.c:610: error: 'const struct JNINativeInterface_' has no member named 'CallStaticBooleanMethod'
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.


Now, if I modify the Makedefs file manually, the compilation succeeds perfectly:
INCLUDES =  -I/opt/java6/include -I/opt/java6/include/ia64 -I/opt/java6/include/hp-ux

smartld@blnn721x - ~/apache-tomcat-7.0.22/bin/commons-daemon-1.0.7-native-src/unix
bash $ make
        (cd native; make  all)
        gcc -g -O2 -pthread -DOS_HPUX -DDSO_DLFCN -DCPU=\"ia64\" -Wall -Wstrict-prototypes
 -I/opt/java6/include -I/opt/java6/include/ia64 -I/opt/java6/include/hp-ux -c jsvc-unix.c
-o jsvc-unix.o
        gcc -g -O2 -pthread -DOS_HPUX -DDSO_DLFCN -DCPU=\"ia64\" -Wall -Wstrict-prototypes
 -I/opt/java6/include -I/opt/java6/include/ia64 -I/opt/java6/include/hp-ux -c arguments.c
-o arguments.o
        gcc -g -O2 -pthread -DOS_HPUX -DDSO_DLFCN -DCPU=\"ia64\" -Wall -Wstrict-prototypes
 -I/opt/java6/include -I/opt/java6/include/ia64 -I/opt/java6/include/hp-ux -c debug.c -o debug.o
        gcc -g -O2 -pthread -DOS_HPUX -DDSO_DLFCN -DCPU=\"ia64\" -Wall -Wstrict-prototypes
 -I/opt/java6/include -I/opt/java6/include/ia64 -I/opt/java6/include/hp-ux -c dso-dlfcn.c
-o dso-dlfcn.o
        gcc -g -O2 -pthread -DOS_HPUX -DDSO_DLFCN -DCPU=\"ia64\" -Wall -Wstrict-prototypes
 -I/opt/java6/include -I/opt/java6/include/ia64 -I/opt/java6/include/hp-ux -c dso-dyld.c -o
dso-dyld.o
        gcc -g -O2 -pthread -DOS_HPUX -DDSO_DLFCN -DCPU=\"ia64\" -Wall -Wstrict-prototypes
 -I/opt/java6/include -I/opt/java6/include/ia64 -I/opt/java6/include/hp-ux -c help.c -o help.o
        gcc -g -O2 -pthread -DOS_HPUX -DDSO_DLFCN -DCPU=\"ia64\" -Wall -Wstrict-prototypes
 -I/opt/java6/include -I/opt/java6/include/ia64 -I/opt/java6/include/hp-ux -c home.c -o home.o
        gcc -g -O2 -pthread -DOS_HPUX -DDSO_DLFCN -DCPU=\"ia64\" -Wall -Wstrict-prototypes
 -I/opt/java6/include -I/opt/java6/include/ia64 -I/opt/java6/include/hp-ux -c java.c -o java.o
        gcc -g -O2 -pthread -DOS_HPUX -DDSO_DLFCN -DCPU=\"ia64\" -Wall -Wstrict-prototypes
 -I/opt/java6/include -I/opt/java6/include/ia64 -I/opt/java6/include/hp-ux -c location.c -o
location.o
        gcc -g -O2 -pthread -DOS_HPUX -DDSO_DLFCN -DCPU=\"ia64\" -Wall -Wstrict-prototypes
 -I/opt/java6/include -I/opt/java6/include/ia64 -I/opt/java6/include/hp-ux -c replace.c -o
replace.o
        gcc -g -O2 -pthread -DOS_HPUX -DDSO_DLFCN -DCPU=\"ia64\" -Wall -Wstrict-prototypes
 -I/opt/java6/include -I/opt/java6/include/ia64 -I/opt/java6/include/hp-ux -c locks.c -o locks.o
        gcc -g -O2 -pthread -DOS_HPUX -DDSO_DLFCN -DCPU=\"ia64\" -Wall -Wstrict-prototypes
 -I/opt/java6/include -I/opt/java6/include/ia64 -I/opt/java6/include/hp-ux -c signals.c -o
signals.o
        ar cr libservice.a arguments.o  debug.o  dso-dlfcn.o  dso-dyld.o  help.o  home.o 
java.o  location.o  replace.o  locks.o  signals.o
        ranlib libservice.a
        gcc -pthread  jsvc-unix.o libservice.a -lpthread -o ../jsvc


Is the configure script broken or simply my build env?
The config.log does note the CPPFLAGS var.
Compiling libtcnative works like a charm in this system with CPPFLAGS.

Thanks,

Mike
-- 
NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!		
Jetzt informieren: http://www.gmx.net/de/go/freephone

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message