Version: ejp-r2_2b1-unix-common.tar
OS: Debian lenny
$ uname -a
Linux agape 2.6.24-1-686 #1 SMP Thu May 8 02:16:39 UTC 2008 i686 GNU/Linux
$ echo $JAVA_HOME
/usr/lib/j2sdk1.5-sun
$ make -f x86-linux.mk
mkdir -p ../lib
g++ -g -Wall -Werror -pedantic -pedantic-errors -Wno-long-long -O3 -shared \
-I../src/native -I- -I/usr/lib/j2sdk1.5-sun/include -I/usr/lib/j2sdk1.5-sun/include/linux \
../src/native/ClassloaderOutputFile.cpp ../src/native/Filter.cpp ../src/native/Globals.cpp ../src/native/EjpException.cpp ../src/native/InputFile.cpp ../src/native/MonitorGuard.cpp ../src/native/OutputFile.cpp ../src/native/ShutdownGuard.cpp ../src/native/ThreadEventsOutputFile.cpp ../src/native/Tracer.cpp \
\
-o ../lib/libtracer.so
cc1plus: note: obsolete option -I- used, please use -iquote instead
cc1plus: note: obsolete option -I- used, please use -iquote instead
cc1plus: note: obsolete option -I- used, please use -iquote instead
../src/native/Globals.cpp: In static member function ‘static bool Globals::startsWith(JNIEnv*, const char*, const char*)’:
../src/native/Globals.cpp:185: error: ‘strlen’ was not declared in this scope
cc1plus: note: obsolete option -I- used, please use -iquote instead
cc1plus: note: obsolete option -I- used, please use -iquote instead
cc1plus: note: obsolete option -I- used, please use -iquote instead
cc1plus: note: obsolete option -I- used, please use -iquote instead
../src/native/OutputFile.cpp: In member function ‘void OutputFile::printStr(const char*, bool)’:
../src/native/OutputFile.cpp:291: error: ‘strlen’ was not declared in this scope
../src/native/OutputFile.cpp: In member function ‘void OutputFile::addData(void*, int)’:
../src/native/OutputFile.cpp:382: error: ‘memcpy’ was not declared in this scope
cc1plus: note: obsolete option -I- used, please use -iquote instead
cc1plus: note: obsolete option -I- used, please use -iquote instead
cc1plus: note: obsolete option -I- used, please use -iquote instead
../src/native/Tracer.cpp: In function ‘jint JVM_OnLoad(JavaVM*, char*, void*)’:
../src/native/Tracer.cpp:862: error: ‘strcasecmp’ was not declared in this scope
cc1plus: warnings being treated as errors
../src/native/Tracer.cpp:880: error: deprecated conversion from string constant to ‘char*’
../src/native/Tracer.cpp:884: error: deprecated conversion from string constant to ‘char*’
../src/native/Tracer.cpp:889: error: deprecated conversion from string constant to ‘char*’
../src/native/Tracer.cpp:894: error: deprecated conversion from string constant to ‘char*’
../src/native/Tracer.cpp:918: error: deprecated conversion from string constant to ‘char*’
../src/native/Tracer.cpp:922: error: deprecated conversion from string constant to ‘char*’
../src/native/Tracer.cpp:926: error: deprecated conversion from string constant to ‘char*’
make: *** [../lib/libtracer.so] Error 1
I added
#include <string.h>
to Globals.hpp and that fixed a few problems. I then removed -Werror and got it to build.