compiling bsf4rexx.cc for ooRexx 4 - what to include ?




Hi,

BSF4rexx doesn't compile.
When making it, error messages look as if some header files weren't there;
details below.
I am very inexperienced with gcc and java, so the problem could be basic.
Any suggestions are welcome.

-- uli

(email U.Zinngrebe instead of No.Spam at inter.NL.net)


What I did:

1. Get latest ooRexx4 (4843) from sourceforge, compile according to
instructions, success:

ulmo:~/Desktop/bsf4rexx # uname -a
Linux ulmo 2.6.27.23-0.1-default #1 SMP 2009-05-26 17:02:05 -0400 x86_64
x86_64 x86_64 GNU/Linux

ulmo:~/Desktop/bsf4rexx # rexx -v
Open Object Rexx Version 4.0.0
Build date: Jun 24 2009
Addressing Mode: 64

2. Get latest bsf4rexx (20090614_b4r4beta) from the Vienna website,
unzip & install, failure:

ulmo:~/Desktop/bsf4rexx # rexxj.sh infoBSF-oo.rex
[BSFManager.loadScriptingEngine()] unable to load language: rexx:
java.lang.UnsatisfiedLinkError: /root/Desktop/bsf4rexx/libBSF4Rexx.so:
/root/Desktop/bsf4rexx/libBSF4Rexx.so: wrong ELF class: ELFCLASS32
(Possible cause: architecture word width mismatch)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1767)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1692)
at java.lang.Runtime.loadLibrary0(Runtime.java:840)
at java.lang.System.loadLibrary(System.java:1047)
at org.rexxla.bsf.engines.rexx.RexxAndJava.<clinit>(RexxAndJava.java:267)
at org.rexxla.bsf.engines.rexx.RexxEngine.initialize(RexxEngine.java:145)
at org.apache.bsf.BSFManager$8.run(BSFManager.java:788)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.bsf.BSFManager.loadScriptingEngine(BSFManager.java:786)
at org.rexxla.bsf.RexxDispatcher.main(RexxDispatcher.java:93)

I think "ELFCLASS32" means that the package was compiled for 32bit,
so I stopped there.

3. For making BSF4Rexx.cc I set in lin_bsf4rexx the variable JDK_BASE,
but the many error messages ('PCHAR’ does not name a type) look like
JDK_BASE is wrongly set or some other header files are not picked up.

ulmo:~/Desktop/BSF4REXXbeta/BSF4Rexx_sources/source_cc # gcc -v
Using built-in specs.
Target: x86_64-suse-linux
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info
--mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64
--enable-languages=c,c++,objc,fortran,obj-c++,java,ada
--enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.3
--enable-ssp --disable-libssp --with-bugurl=http://bugs.opensuse.org/
--with-pkgversion='SUSE Linux' --disable-libgcj --disable-libmudflap
--with-slibdir=/lib64 --with-system-zlib --enable-__cxa_atexit
--enable-libstdcxx-allocator=new --disable-libstdcxx-pch
--enable-version-specific-runtime-libs --program-suffix=-4.3
--enable-linux-futex --without-system-libunwind
--with-cpu=generic --build=x86_64-suse-linux
Thread model: posix
gcc version 4.3.2 [gcc-4_3-branch revision 141291] (SUSE Linux)

ulmo:~/Desktop/BSF4REXXbeta/BSF4Rexx_sources/source_cc # export|grep java
declare -x JAVA_BINDIR="/usr/lib64/jvm/java/bin"
declare -x JAVA_HOME="/usr/lib64/jvm/java"
declare -x JAVA_ROOT="/usr/lib64/jvm/java"
declare -x JDK_HOME="/usr/lib64/jvm/java"
declare -x JRE_HOME="/usr/lib64/jvm/java/jre"
declare -x SDK_HOME="/usr/lib64/jvm/java"

ulmo:~/Desktop/BSF4REXXbeta/BSF4Rexx_sources/source_cc # java -version
java version "1.6.0_0"
OpenJDK Runtime Environment (IcedTea6 1.4.1) (suse-28.3-x86_64)
OpenJDK 64-Bit Server VM (build 14.0-b08, mixed mode)

ulmo:~/Desktop/BSF4REXXbeta/BSF4Rexx_sources/source_cc # make -v
GNU Make 3.81

ulmo:~/Desktop/BSF4REXXbeta/BSF4Rexx_sources/source_cc # make -k
-f SUSE11_bsf4rexx.mak orexx
echo

echo Building libBSF4Rexx_OREXX.so ...
Building libBSF4Rexx_OREXX.so ...
echo

gcc -fPIC -c -O3 -fPIC -D__cplusplus -DUNIX -DLINUX -DUSE_OREXX
-o./BSF4Rexx_OREXX.o
-I.
-I/usr/local/include
-I/usr/lib64/jvm/java-1.6.0-openjdk/include
-I/usr/lib64/jvm/java-1.6.0-openjdk/include/linux
-I/usr/include
-I../source_java/apache-rexxla
-I/opt/ooRexx
-I.
-I/usr/local/include
-I/usr/lib64/jvm/java-1.6.0-openjdk/include
-I/usr/lib64/jvm/java-1.6.0-openjdk/include/linux
-I/usr/include
-I../source_java/apache-rexxla
-L.
-L/usr/local/lib
-L/usr/lib
-L/usr/local/lib/ooRexx
BSF4Rexx.cc

BSF4Rexx.cc:366: error: ‘PCHAR’ does not name a type
BSF4Rexx.cc:367: error: ‘PINT’ does not name a type
BSF4Rexx.cc:386: error: ‘PVOID’ was not declared in this scope
BSF4Rexx.cc:477: error: ‘PVOID’ does not name a type
BSF4Rexx.cc:479: error: ‘VOID’ does not name a type
BSF4Rexx.cc:480: error: ‘VOID’ does not name a type
BSF4Rexx.cc:510: error: ‘VOID’ does not name a type
BSF4Rexx.cc: In function ‘int RgfSaveTID2JRST(pthread_t)’:
BSF4Rexx.cc:716: error: ‘RgfAllocateMemory’ was not declared in this
scope
[...]
BSF4Rexx.cc: At global scope:
BSF4Rexx.cc:1934: error: expected initializer before ‘BsfInvokedBy’
BSF4Rexx.cc:4387: error: expected `}' at end of input
make: *** [libBSF4Rexx_OREXX.so] Error 1
make: Target `orexx' not remade because of errors.



.



Relevant Pages

  • UTF leading to problems?
    ... I hit a problem I'd like your opinions to: ... Since I updated from SuSE 9.0 to 9.1 I get new error messages in the shell ... If i e.g. try to compile the new version of StreamTuner ./configure already ... checking for gcc... ...
    (alt.os.linux.suse)
  • Re: UnSigned Long
    ... optional if the problem is that it won't compile or execute. ... Don't use any system-specific headers. ... If you get error messages, ...
    (comp.lang.c)
  • Was ACMSetup fixed for SP6?
    ... I got the well known Invalid Page Fault messages. ... all the help docs and got past that, but now, I get 2 error messages about ... I can compile simple programs that don't have ActiveX controls, ...
    (microsoft.public.vb.com)
  • Was ACMSetup fixed for SP6?
    ... I got the well known Invalid Page Fault messages. ... all the help docs and got past that, but now, I get 2 error messages about ... I can compile simple programs that don't have ActiveX controls, ...
    (microsoft.public.vb.general.discussion)
  • Re: javac: how to get the FULL errors/warnings list?
    ... Its biggest problem is that the source code, taken *as is* from our versioning system manager, won't compile. ... I need to see ALL the error messages at once, but I haven't been able to find the javac option to display unlimited error messages. ...
    (comp.lang.java.programmer)