Git Product home page Git Product logo

netty-tcnative-alpine's People

Contributors

agafox avatar dimitarg avatar pires avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

netty-tcnative-alpine's Issues

command in readme not working?

I don't really understand why, but running

docker run -v `pwd`/binaries pires/netty-tcnative-alpine

left that directory empty after the container was run.
Im running ubuntu 16.04 with docker 1.11.1

What worked for me was

docker run -v `pwd`/binaries:/output pires/netty-tcnative-alpine

Builds fail on latest jeanblanchard/java:8 image

Looks like upstream alpine was changed from 3.7 to 3.8 and this causes the build to fail. Workaround is to downgrade to 8u171 as the builder base image which is based on Alpine 3.7.

[INFO] checking if '/opt/jdk' is a JDK... yes
[INFO] checking for APR... yes
[INFO] checking for OpenSSL library... using openssl from /usr/lib and /usr/include
[INFO] checking OpenSSL library version... not compatible
[INFO] checking for OpenSSL DSA support... yes
[INFO]   setting TCNATIVE_PRIV_INCLUDES to ""
[INFO]   setting TCNATIVE_LDFLAGS to "-lssl -lcrypto"
[INFO]   adding "-DHAVE_OPENSSL" to CFLAGS
[INFO] checking whether build environment is sane... yes
[INFO] checking for a thread-safe mkdir -p... autotools/install-sh -c -d
[INFO] checking whether make sets $(MAKE)... yes
[INFO] checking whether make supports nested variables... yes
[INFO] checking that generated files are newer than configure... done
[INFO] configure: creating ./config.status
[INFO] configure: WARNING: unrecognized options: --disable-ccache
[INFO]
[INFO]   (@PROJECT_NAME@) version @VERSION@
[INFO]   Prefix.........: /netty-tcnative/openssl-dynamic/target/native-build/target
[INFO]   C Compiler.....: gcc -O3 -Werror -fno-omit-frame-pointer -Wunused-variable -DHAVE_OPENSSL   -I/usr/include/apr-1  -D_LARGEFILE64_SOURCE -I/opt/jdk/include -I/opt/jdk/include/linux
[INFO]   Linker.........: /usr/x86_64-alpine-linux-musl/bin/ld -m elf_x86_64  -lssl -lcrypto  -L/usr/lib -R/usr/lib -lapr-1 -luuid -lpthread  -release @VERSION@
[INFO]
[INFO]  /bin/bash ./config.status
[INFO] config.status: creating Makefile
[INFO] config.status: creating src/config.h
[INFO] config.status: src/config.h is unchanged
[INFO] config.status: executing libtool commands
[INFO] /bin/bash ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I./src     -O3 -Werror -fno-omit-frame-pointer -Wunused-variable -DHAVE_OPENSSL   -I/usr/include/apr-1  -D_LARGEFILE64_SOURCE -I/opt/jdk/include -I/opt/jdk/include/linux -c -o src/jnilib.lo src/jnilib.c
[INFO] libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I./src -O3 -Werror -fno-omit-frame-pointer -Wunused-variable -DHAVE_OPENSSL -I/usr/include/apr-1 -D_LARGEFILE64_SOURCE -I/opt/jdk/include -I/opt/jdk/include/linux -c src/jnilib.c  -fPIC -DPIC -o src/.libs/jnilib.o
[INFO] /bin/bash ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I./src     -O3 -Werror -fno-omit-frame-pointer -Wunused-variable -DHAVE_OPENSSL   -I/usr/include/apr-1  -D_LARGEFILE64_SOURCE -I/opt/jdk/include -I/opt/jdk/include/linux -c -o src/native_constants.lo src/native_constants.c
[INFO] libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I./src -O3 -Werror -fno-omit-frame-pointer -Wunused-variable -DHAVE_OPENSSL -I/usr/include/apr-1 -D_LARGEFILE64_SOURCE -I/opt/jdk/include -I/opt/jdk/include/linux -c src/native_constants.c  -fPIC -DPIC -o src/.libs/native_constants.o
[INFO] In file included from src/native_constants.c:18:0:
[INFO] src/ssl_private.h:138:0: error: "OPENSSL_VERSION" redefined [-Werror]
[INFO]  #define OPENSSL_VERSION SSLEAY_VERSION
[INFO]
[INFO] In file included from /usr/include/openssl/bio.h:69:0,
[INFO]                  from /usr/include/openssl/evp.h:67,
[INFO]                  from /usr/include/openssl/hmac.h:67,
[INFO]                  from /usr/include/openssl/ssl.h:149,
[INFO]                  from src/ssl_private.h:57,
[INFO]                  from src/native_constants.c:18:
[INFO] /usr/include/openssl/crypto.h:334:0: note: this is the location of the previous definition
[INFO]  #define OPENSSL_VERSION  0
[INFO]
[INFO] cc1: all warnings being treated as errors
[INFO] make: *** [Makefile:508: src/native_constants.lo] Error 1
[INFO] rc: 2
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Netty/TomcatNative [Parent] ........................ SUCCESS [ 30.857 s]
[INFO] Netty/TomcatNative [OpenSSL - Dynamic] ............. FAILURE [ 24.860 s]
[INFO] Netty/TomcatNative [OpenSSL - Static] .............. SKIPPED
[INFO] Netty/TomcatNative [BoringSSL - Static] ............ SKIPPED
[INFO] Netty/TomcatNative [LibreSSL - Static] ............. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE

Upstream netty-tcnative-boringssl-static works on Alpine

This is just FYI, but I did some recent testing on Alpine and I discovered that netty-tcnative-boringssl-static works without issue on standard Alpine.

For openjdk:8-jre-alpine, I ran apk update && apk add libc6-compat while generating the docker image.

For alpine:latest, I ran apk update && apk add openjdk8-jre-base libc6-compat.

adoptopenjdk/openjdk8:alpine-slim and adoptopenjdk/openjdk11:alpine-slim worked out-of-the-box.

libressl-static doesn't build.

[exec] make[1]: Leaving directory '/netty-tcnative/libressl-static/target/libressl-2.4.5/crypto'
     [exec] compat/getentropy_linux.c:31:26: fatal error: linux/sysctl.h: No such file or directory
     [exec]  #include <linux/sysctl.h>
     [exec]                           ^
     [exec] compilation terminated.
     [exec] make[1]: *** [Makefile:3615: compat/getentropy_linux.lo] Error 1
     [exec] make: *** [Makefile:451: all-recursive] Error 1

maven build failed

Maven build failed on both Final 2.0.0 or master.

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project netty-tcnative: Compilation failure -> [Help 1]

Is it because jdk version changed?

openssl source package not found

Openssl 1.0.2h is downloaded to openssl-static/target/old/1.0.2/ directory, but the ant build file looks for the file under openssl-static/target/. Because of this, building the openssl-static module fails. The easy fix would be to upgrade openssl to 1.0.2k. A better solution would be to make sure that the file is downloaded to the right location.

Publish artifacts to maven

Thanks for your work! Now that these files can be easily generated, it would be nice to also upload those built binaries ๐Ÿ˜„ Travis-CI already supports running docker builds so would be nice to add a .travis.yml that does a docker build and maven publish. What do you think?

OpenSSL - Static Build fails

The file openssl-1.0.2l.tar.gz cannot be found:

main:
      [ftp] getting files
      [ftp] transferring old/1.0.2/openssl-1.0.2l.tar.gz to /netty-tcnative/openssl-static/target/old/1.0.2/openssl-1.0.2l.tar.gz
      [ftp] 1 files retrieved
     [exec] tar: can't open 'openssl-1.0.2l.tar.gz': No such file or directory
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] Netty/TomcatNative [Parent] ........................ SUCCESS [ 37.537 s]
[INFO] Netty/TomcatNative [OpenSSL - Dynamic] ............. SUCCESS [ 24.060 s]
[INFO] Netty/TomcatNative [OpenSSL - Static] .............. FAILURE [ 46.304 s]
[INFO] Netty/TomcatNative [BoringSSL - Static] ............ SKIPPED
[INFO] Netty/TomcatNative [LibreSSL - Static] ............. SKIPPED

OpenSSL has arrived at 1.0.2.m, for which there is no tag in netty-tcnative yet. However, checking out the master works:

$ docker build --build-arg NETTY_TCNATIVE_TAG=master -t pires/netty-tcnative-alpine:master .
$ mkdir binaries
$ docker run -v `pwd`/binaries:/output pires/netty-tcnative-alpine:master

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.