ericmckean / naclports

Automatically exported from code.google.com/p/naclports
0 stars 0 forks source link

OpenSSL port doesn't build on a Mac #115

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

in a terminal:
$ ./make_all.sh openssl

Expected:

libssl.a and libcrypto.a should be output for each architecture.

Occurred:

Here's the output:
+ set -e
+ TARGETS=openssl
+ TARGETS=openssl
+ export BUILD_FLAGS=--ignore-disabled
+ BUILD_FLAGS=--ignore-disabled
+ export NACL_ARCH=x86_64
+ NACL_ARCH=x86_64
+ export NACL_GLIBC=1
+ NACL_GLIBC=1
+ make openssl
build_tools/naclports.py build ports/openssl --ignore-disabled
glibc-compat-0.1: cannot be built with glibc.
naclports: openssl-1.0.1e: can only be built on linux.
+ unset NACL_GLIBC
+ make openssl
build_tools/naclports.py build ports/openssl --ignore-disabled
naclports: openssl-1.0.1e: can only be built on linux.
+ export NACL_ARCH=i686
+ NACL_ARCH=i686
+ export NACL_GLIBC=1
+ NACL_GLIBC=1
+ make openssl
build_tools/naclports.py build ports/openssl --ignore-disabled
glibc-compat-0.1: cannot be built with glibc.
naclports: openssl-1.0.1e: can only be built on linux.
+ unset NACL_GLIBC
+ make openssl
build_tools/naclports.py build ports/openssl --ignore-disabled
naclports: openssl-1.0.1e: can only be built on linux.
+ export NACL_ARCH=arm
+ NACL_ARCH=arm
+ make openssl
build_tools/naclports.py build ports/openssl --ignore-disabled
naclports: openssl-1.0.1e: can only be built on linux.
+ export NACL_ARCH=pnacl
+ NACL_ARCH=pnacl
+ make openssl
build_tools/naclports.py build ports/openssl --ignore-disabled
naclports: openssl-1.0.1e: can only be built on linux.

openssl is not built.

Original issue reported on code.google.com by d...@google.com on 1 Apr 2014 at 10:33

GoogleCodeExporter commented 9 years ago
This was has been explicitly disabled for building on OS X in its pkg_info file.

Try removing the BUILD_OS=linux line from the pkg_info file and try building 
against (just 'make openssl', which just builds a single arch would be a good 
start).  There is probably some subtle build issue that needs to be fixed.

If you find it please update this bug.  If you want to fix it that even better!

Original comment by sbc@google.com on 1 Apr 2014 at 10:50

GoogleCodeExporter commented 9 years ago
Here's some additional logs when I removed BUILD_OS=linux:
https://gist.github.com/dinhviethoa/8ef05fbdff0c09df6e6d

"-arch i386" looks like some invalid flag.

It looks like the generated Makefile includes it:
CFLAG= -DOPENSSL_THREADS -D_REENTRANT 
-I/Users/dvh/nacl_sdk/pepper_33/toolchain/mac_x86_newlib/i686-nacl/usr/include/g
libc-compat -D_GNU_SOURCE -arch i386 -O3 -fomit-frame-pointer -DL_ENDIAN

Original comment by d...@google.com on 1 Apr 2014 at 11:05

GoogleCodeExporter commented 9 years ago
Fix here: https://codereview.chromium.org/549393002

Original comment by sbc@google.com on 29 Sep 2014 at 11:04