Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id ED5422009C6 for ; Sun, 1 May 2016 20:15:14 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id EBDD21609AD; Sun, 1 May 2016 20:15:14 +0200 (CEST) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 4114B16098E for ; Sun, 1 May 2016 20:15:14 +0200 (CEST) Received: (qmail 64489 invoked by uid 500); 1 May 2016 18:15:13 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 64475 invoked by uid 99); 1 May 2016 18:15:13 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 May 2016 18:15:13 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id E88BE2C0451 for ; Sun, 1 May 2016 18:15:12 +0000 (UTC) Date: Sun, 1 May 2016 18:15:12 +0000 (UTC) From: "Benedikt Ritter (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CRYPTO-45) Document how to build Commons Crypto MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sun, 01 May 2016 18:15:15 -0000 [ https://issues.apache.org/jira/browse/CRYPTO-45?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15265861#comment-15265861 ] Benedikt Ritter commented on CRYPTO-45: --------------------------------------- Using this changes in the Makefile, I was finally able to run the native build: {code} diff --git a/Makefile b/Makefile index 9759b06..9624365 100644 --- a/Makefile +++ b/Makefile @@ -49,14 +49,14 @@ $(TARGET)/jni-classes/org/apache/commons/crypto/random/OpensslCryptoRandomNative $(COMMONS_CRYPTO_OUT)/OpensslNative.o : $(SRC_NATIVE)/org/apache/commons/crypto/cipher/OpensslNative.c $(TARGET)/jni-classes/org/apache/commons/crypto/cipher/OpensslNative.h @mkdir -p $(@D) - $(CC) $(CFLAGS) -c $< -o $@ + $(CC) $(CFLAGS) -I/usr/local/opt/openssl/include -c $< -o $@ $(COMMONS_CRYPTO_OUT)/OpensslCryptoRandom.o : $(SRC_NATIVE)/org/apache/commons/crypto/random/OpensslCryptoRandomNative.c $(TARGET)/jni-classes/org/apache/commons/crypto/random/OpensslCryptoRandomNative.h @mkdir -p $(@D) - $(CC) $(CFLAGS) -c $< -o $@ + $(CC) $(CFLAGS) -I/usr/local/opt/openssl/include -c $< -o $@ $(COMMONS_CRYPTO_OUT)/$(LIBNAME): $(COMMONS_CRYPTO_OBJ) - $(CXX) $(CXXFLAGS) -o $@ $+ $(LINKFLAGS) + $(CXX) $(CXXFLAGS) -o $@ $+ $(LINKFLAGS) -L/usr/local/opt/openssl/lib $(STRIP) $@ clean: {code} How ever, I got several failing tests when building with Java 8. Further more the site build failed because of malformed JavaDoc. So I switched to Java 6. Using Java 6, the native builds started failing again, this time with: {code} [INFO] --- maven-antrun-plugin:1.7:run (make) @ commons-crypto --- [INFO] Executing tasks make: [exec] compiling OSInfo.java [exec] "$JAVA_HOME/bin/javac" -source 1.6 -target 1.6 -d target/jni-classes -sourcepath src/main/java src/main/java/org/apache/commons/crypto/random/OpensslCryptoRandomNative.java [exec] "$JAVA_HOME/bin/javah" -force -classpath target/jni-classes -o target/jni-classes/org/apache/commons/crypto/random/OpensslCryptoRandomNative.h org.apache.commons.crypto.random.OpensslCryptoRandomNative [exec] gcc -arch x86_64 -Ilib/inc_mac -I/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/include -O2 -fPIC -mmacosx-version-miIn file included from src/main/native/org/apache/commons/crypto/random/OpensslCryptoRandomNative.c:19: [exec] In file included from src/main/native/org/apache/commons/crypto/random/org_apache_commons_crypto_random.h:22: [exec] src/main/native/org/apache/commons/crypto/on=10.5 -fvisibility=hidden -Ilib/include -I/usr/include -I"src/main/native/org/apache/commons/crypto/" -I/usr/local/opt/openssl/rg_apache_commons_crypto.h:67:10: fatal error: 'jni.h' file not found [exec] #include [exec] ^ [exec] include -c src/main/native/org/apache/commons/crypto/random/OpensslCryptoRandomNative.c -o target/commons-crypto-1.0.0-SNAPSHOT-Mac-x86_64/OpensslCryptoRandom.o [exec] 1 error generated. [exec] make: *** [target/commons-crypto-1.0.0-SNAPSHOT-Mac-x86_64/OpensslCryptoRandom.o] Error 1 {code} > Document how to build Commons Crypto > ------------------------------------ > > Key: CRYPTO-45 > URL: https://issues.apache.org/jira/browse/CRYPTO-45 > Project: Commons Crypto > Issue Type: Bug > Components: Document > Reporter: Benedikt Ritter > > While trying to deploy the website I run into this problem: > {code} > [INFO] --- maven-antrun-plugin:1.7:run (make) @ commons-crypto --- > [INFO] Executing tasks > make: > [exec] compiling OSInfo.java > [exec] "$JAVA_HOME/bin/javac" -source 1.6 -target 1.6 -d target/jni-classes -sourcepath src/main/java src/main/java/org/apache/commons/crypto/random/OpensslCryptoRandomNative.java > [exec] warning: [options] bootstrap class path not set in conjunction with -source 1.6 > [exec] 1 warning > [exec] "$JAVA_HOME/bin/javah" -force -classpath target/jni-classes -o target/jni-classes/org/apache/commons/crypto/random/OpensslCryptoRandomNative.h org.apache.commons.crypto.random.OpensslCryptoRandomNative > [exec] gcc -arch x86_64 -Ilib/inc_mac -I/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/include -O2 -fPIC -mmacosx-version-min=10.5 -fvisibility=hidden -Ilib/include -I/usr/include -I"src/main/native/org/apache/commons/crypto/" -I"/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/include/darwin" -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-SNAPSHOT-Mac-x86_64/OpensslCryptoRandom.o > [exec] In file included from src/main/native/org/apache/commons/crypto/random/OpensslCryptoRandomNative.c:19: > [exec] In file included from src/main/native/org/apache/commons/crypto/random/org_apache_commons_crypto_random.h:22: > [exec] src/main/native/org/apache/commons/crypto/org_apache_commons_crypto.h:196:10: fatal error: 'openssl/aes.h' file not found > [exec] #include > [exec] ^ > [exec] 1 error generated. > [exec] make: *** [target/commons-crypto-1.0.0-SNAPSHOT-Mac-x86_64/OpensslCryptoRandom.o] Error 1 > {code} > I'm pretty lost, since I don't know c programming. Would be good to have some documentation on how to set up the development environment (on Linux/Mac OS/Windows) for building crypto. -- This message was sent by Atlassian JIRA (v6.3.4#6332)