commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg Schaible <joerg.schai...@gmx.de>
Subject RE: [VOTE] Release CRYPTO 1.0.0 based on RC1
Date Thu, 01 Jan 1970 00:00:00 GMT
Hi Xianda,

Ke, Xianda wrote:

> Hi Jörg,
> 
> I guess that the two warnings were caused by the permission of
> java.io.tmpdir (/tmp ). Crypto extracts *.so to java.io.tmpdir(or
> commons-crypto.tempdir). Try adding exec permission.

That's it! Running

 mvn clean package -Djava.io.tmpdir=$HOME/tmp

did the trick. Setting commons-crypto.tempdir the same way did not work.

Cheers,
Jörg

> 
> Regards,
> Xianda
> 
> -----Original Message-----
> From: Jörg Schaible [mailto:joerg.schaible@gmx.de]
> Sent: Friday, July 29, 2016 5:04 AM
> To: dev@commons.apache.org
> Subject: Re: [VOTE] Release CRYPTO 1.0.0 based on RC1
> 
> Hi,
> 
> I am building crypto with my compiler zoo on Gentoo Linux with OpenSSL
> 1.02h installed. Even compiling with Java 9 works, tests fail only because
> of a missing jce.
> 
> Running the tests I get always those two warnings:
> 
> ==================== %< ====================== Running
> org.apache.commons.crypto.NativeCodeLoaderTest ** WARN: Native (JNI) code
> was not loaded: java.lang.UnsatisfiedLinkError:
> /tmp/commons-crypto-9c688d6a-fc55-4a35-9d78-79cedd4ad842-libcommons-
> crypto.so: /tmp/commons-crypto-9c688d6a-fc55-4a35-9d78-79cedd4ad842-
> libcommons-crypto.so: failed to map segment from shared object Tests run:
> 5, Failures: 0, Errors: 0, Skipped: 3, Time elapsed: 0.008 sec - in
> org.apache.commons.crypto.NativeCodeLoaderTest Running
> org.apache.commons.crypto.jna.OpenSslNativeJnaTest ** WARN: JNA could not
> be enabled: /tmp/jna--1154654109/jna4836274946397519400.tmp:
> /tmp/jna--1154654109/jna4836274946397519400.tmp: failed to map segment
> from shared object Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time
> elapsed: 0 sec - in org.apache.commons.crypto.jna.OpenSslNativeJnaTest
> ==================== %< ======================
> 
> The build of the shared library produces additional warnings for OpenJDK 7
> (and OpenJDK 8 produces same warning): ==================== %<
> ====================== [INFO] --- maven-antrun-plugin:1.8:run (make) @
> commons-crypto --- [INFO] Executing tasks
> 
> make:
>      [exec] "/home/joehni/.gentoo/java-config-2/current-user-vm/bin/javah"
>      [- force -classpath target/classes -o target/jni-
>      [classes/org/apache/commons/crypto/random/OpenSslCryptoRandomNative.h
> org.apache.commons.crypto.random.OpenSslCryptoRandomNative
>      [exec] gcc -Ilib/inc_linux -I/home/joehni/.gentoo/java-
>      [config-2/current-user-vm/include -Ilib/inc_mac -O2 -fPIC
>      [-fvisibility=hidden
> -m64 -Ilib/include -I/usr/include -
> I"src/main/native/org/apache/commons/crypto/"
> -I"/home/joehni/.gentoo/java- config-2/current-user-vm/include/linux"
> -I"target/jni- classes/org/apache/commons/crypto/cipher" -I"target/jni-
> classes/org/apache/commons/crypto/random" -c
> 
src/main/native/org/apache/commons/crypto/random/OpenSslCryptoRandomNative.c
> -o target/commons-crypto-1.0.0-Linux-x86_64/OpenSslCryptoRandomNative.o
>      [exec] In file included from
> 
src/main/native/org/apache/commons/crypto/random/OpenSslCryptoRandomNative.c:19:0:
>      [exec]
> 
src/main/native/org/apache/commons/crypto/random/org_apache_commons_crypto_random.h:24:0:
> warning: "UNUSED" redefined
>      [exec]  #define UNUSED(x) ((void)(x))
>      [exec]  ^
>      [exec] In file included from /home/joehni/.gentoo/java-
>      [config-2/current-user-vm/include/jni.h:45:0,
>      [exec]                  from
> src/main/native/org/apache/commons/crypto/org_apache_commons_crypto.h:71,
>      [exec]                  from
> 
src/main/native/org/apache/commons/crypto/random/org_apache_commons_crypto_random.h:22,
>      [exec]                  from
> 
src/main/native/org/apache/commons/crypto/random/OpenSslCryptoRandomNative.c:19:
>      [exec] /home/joehni/.gentoo/java-config-2/current-user-
> vm/include/linux/jni_md.h:40:0: note: this is the location of the previous
> definition
>      [exec]    #define UNUSED(x) UNUSED_ ## x __attribute__((__unused__))
>      [exec]  ^
>      [exec] "/home/joehni/.gentoo/java-config-2/current-user-vm/bin/javah"
>      [- force -classpath target/classes -o target/jni-
>      [classes/org/apache/commons/crypto/cipher/OpenSslNative.h
> org.apache.commons.crypto.cipher.OpenSslNative
>      [exec] gcc -Ilib/inc_linux -I/home/joehni/.gentoo/java-
>      [config-2/current-user-vm/include -Ilib/inc_mac -O2 -fPIC
>      [-fvisibility=hidden
> -m64 -Ilib/include -I/usr/include -
> I"src/main/native/org/apache/commons/crypto/"
> -I"/home/joehni/.gentoo/java- config-2/current-user-vm/include/linux"
> -I"target/jni- classes/org/apache/commons/crypto/cipher" -I"target/jni-
> classes/org/apache/commons/crypto/random" -c
> src/main/native/org/apache/commons/crypto/cipher/OpenSslNative.c -o
> target/commons-crypto-1.0.0-Linux-x86_64/OpenSslNative.o
>      [exec] "/home/joehni/.gentoo/java-config-2/current-user-vm/bin/javah"
>      [- force -classpath target/classes -o target/jni-
>      [classes/org/apache/commons/crypto/OpenSslInfoNative.h
> org.apache.commons.crypto.OpenSslInfoNative
>      [exec] gcc -Ilib/inc_linux -I/home/joehni/.gentoo/java-
>      [config-2/current-user-vm/include -Ilib/inc_mac -O2 -fPIC
>      [-fvisibility=hidden
> -m64 -Ilib/include -I/usr/include -
> I"src/main/native/org/apache/commons/crypto/"
> -I"/home/joehni/.gentoo/java- config-2/current-user-vm/include/linux"
> -I"target/jni- classes/org/apache/commons/crypto/cipher" -I"target/jni-
> classes/org/apache/commons/crypto/random" -DVERSION='"1.0.0"' -
> DPROJECT_NAME='"Apache Commons Crypto"' -I"target/jni-
> classes/org/apache/commons/crypto" -c
> src/main/native/org/apache/commons/crypto/OpenSslInfoNative.c -o
> target/commons-crypto-1.0.0-Linux-x86_64/OpenSslInfoNative.o
>      [exec] g++ -Ilib/inc_linux -I/home/joehni/.gentoo/java-
>      [config-2/current-user-vm/include -Ilib/inc_mac -O2 -fPIC
>      [-fvisibility=hidden
> -m64 -Ilib/include  -I/usr/include -I"/home/joehni/.gentoo/java-
> config-2/current-user-vm/include/linux" -I"target/jni-
> classes/org/apache/commons/crypto/cipher" -I"target/jni-
> classes/org/apache/commons/crypto/random" -o target/commons-crypto-1.0.0-
> Linux-x86_64/libcommons-crypto.so target/commons-crypto-1.0.0-Linux-
> x86_64/OpenSslCryptoRandomNative.o target/commons-crypto-1.0.0-Linux-
> x86_64/OpenSslNative.o target/commons-crypto-1.0.0-Linux-
> x86_64/OpenSslInfoNative.o -shared -static-libgcc -static-libstdc++
>      [exec] strip target/commons-crypto-1.0.0-Linux-x86_64/libcommons-
> crypto.so
>      [exec] cp
>      [target/commons-crypto-1.0.0-Linux-x86_64/libcommons-crypto.so
> target/classes/org/apache/commons/crypto/native/Linux/x86_64/libcommons-
> crypto.so
>      [exec] cp
>      [target/commons-crypto-1.0.0-Linux-x86_64/libcommons-crypto.so
> target/classes/org/apache/commons/crypto/native/Linux/x86_64/libcommons-
> crypto.so
> ==================== %< ====================== $ java -version java
> version "1.7.0_101" OpenJDK Runtime Environment (IcedTea 2.6.6) (Gentoo
> icedtea-7.2.6.6) OpenJDK 64-Bit Server VM (build 24.95-b01, mixed mode)
> ==================== %< ======================
> 
> 
> However, the build first fails and then hangs in a unit test when building
> with IBM JDK 7: ==================== %< ====================== [...]
> -------------------------------------------------------
>  T E S T S
> -------------------------------------------------------
> Running org.apache.commons.crypto.stream.CtrCryptoStreamTest
> Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.129 sec
> - in org.apache.commons.crypto.stream.CtrCryptoStreamTest Running
> org.apache.commons.crypto.stream.CtrNoPaddingCipherStreamTest Tests run:
> 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.05 sec - in
> org.apache.commons.crypto.stream.CtrNoPaddingCipherStreamTest Running
> org.apache.commons.crypto.stream.PositionedCryptoInputStreamTest Tests
> run: 2, Failures: 0, Errors: 1, Skipped: 1, Time elapsed: 0.068 sec <<<
> FAILURE! - in
> org.apache.commons.crypto.stream.PositionedCryptoInputStreamTest
> 
doTestJCE(org.apache.commons.crypto.stream.PositionedCryptoInputStreamTest)
> Time elapsed: 0.057 sec  <<< ERROR!
> java.nio.BufferUnderflowException
>         at
> 
org.apache.commons.crypto.stream.PositionedCryptoInputStreamTest.testPositionedReadLoop(PositionedCryptoInputStreamTest.java:226)
>         at
> 
org.apache.commons.crypto.stream.PositionedCryptoInputStreamTest.doPositionedReadTests(PositionedCryptoInputStreamTest.java:154)
>         at
> 
org.apache.commons.crypto.stream.PositionedCryptoInputStreamTest.testCipher(PositionedCryptoInputStreamTest.java:107)
>         at
> 
org.apache.commons.crypto.stream.PositionedCryptoInputStreamTest.doTestJCE(PositionedCryptoInputStreamTest.java:97)
> 
> Running org.apache.commons.crypto.stream.CbcNoPaddingCipherStreamTest
> Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.115 sec
> - in org.apache.commons.crypto.stream.CbcNoPaddingCipherStreamTest Running
> org.apache.commons.crypto.stream.CbcPkcs5PaddingCipherStreamTest ^C
> ==================== %< ====================== $ java -version java
> version "1.7.0" Java(TM) SE Runtime Environment (build
> pxa6470sr5-20130619_01(SR5)) IBM J9 VM (build 2.6, JRE 1.7.0 Linux
> amd64-64 Compressed References 20130617_152572 (JIT enabled, AOT enabled)
> J9VM - R26_Java726_SR5_20130617_1436_B152572
> JIT  - r11.b04_20130528_38954ifx1
> GC   - R26_Java726_SR5_20130617_1436_B152572_CMPRSS
> J9CL - 20130617_152572)
> JCL - 20130616_01 based on Oracle 7u25-b12 ==================== %<
> ======================
> 
> Cheers,
> Jörg
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
> 
> 


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


Mime
View raw message