Skip to content
This repository has been archived by the owner on Apr 12, 2019. It is now read-only.

build conflict with node and openssl #116

Open
springmeyer opened this issue Jan 25, 2014 · 0 comments
Open

build conflict with node and openssl #116

springmeyer opened this issue Jan 25, 2014 · 0 comments

Comments

@springmeyer
Copy link
Member

Node bundles its own openssl. Never had this be a problem in the past, however after starting to build against the OS X 10.8 SDK I now see:

../deps/openssl/openssl/ssl/d1_both.c:1436:30: error: use of undeclared identifier 'BIO_CTRL_DGRAM_SCTP_SAVE_SHUTDOWN'
                        BIO_ctrl(SSL_get_wbio(s), BIO_CTRL_DGRAM_SCTP_SAVE_SHUTDOWN, 1, NULL);
                                                  ^
../deps/openssl/openssl/ssl/d1_both.c:1441:28: error: use of undeclared identifier 'BIO_CTRL_DGRAM_SCTP_SAVE_SHUTDOWN'
        BIO_ctrl(SSL_get_wbio(s), BIO_CTRL_DGRAM_SCTP_SAVE_SHUTDOWN, 0, NULL);
                                  ^
11 warnings and 2 errors generated.

So while I'm pretty sure that this flag used to work:

-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk

This now breaks node compilation:

-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk

The SDK headers seem to match what is in /usr/include:

diff -u /usr/include/openssl/ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.pl
atform/Developer/SDKs/MacOSX10.8.sdk/usr/include/openssl/

So it makes sense that -isysroot /usr/ also breaks the compile. Here is the line I'm testing with:

clang '-D_DARWIN_USE_64_BIT_INODE=1' '-DL_ENDIAN' '-DPURIFY' '-D_REENTRANT' '-DOPENSSL_NO_HEARTBEATS' '-DAES_ASM' '-DBF_ASM' '-DBNCO_ASM' '-DBN_ASM' '-DCPUID_ASM' '-DDES_ASM' '-DLIB_BN_ASM' '-DOPENSSL_BN_ASM' '-DOPENSSL_CPUID_OBJ' '-DRIP_ASM' '-DWHIRLPOOL_ASM' '-DWP_ASM' '-DENGINESDIR="/dev/null"' '-DOPENSSLDIR="/etc/ssl"' '-DTERMIOS' -I/usr/include -I../deps/openssl -I../deps/openssl/openssl -I../deps/openssl/openssl/crypto -I../deps/openssl/openssl/crypto/asn1 -I../deps/openssl/openssl/crypto/evp -I../deps/openssl/openssl/crypto/md2 -I../deps/openssl/openssl/crypto/modes -I../deps/openssl/openssl/crypto/store -I../deps/openssl/openssl/include  -Os -gdwarf-2 -mmacosx-version-min=10.5 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-strict-aliasing -MMD -MF /Users/dane/projects/mapnik-packaging/osx/out/packages/node-v0.10.25/out/Release/.deps//Users/dane/projects/mapnik-packaging/osx/out/packages/node-v0.10.25/out/Release/obj.target/openssl/deps/openssl/openssl/ssl/d1_both.o.d.raw -I/Users/dane/projects/mapnik-packaging/osx/out/build-cpp03-libstdcpp-x86_64/include -DNDEBUG  -Wno-invalid-source-encoding -Wno-unused-parameter -Wno-cast-align -Wno-extended-offsetof -Wno-long-long -Wno-unused-variable -Wno-redundant-decls -Wno-uninitialized -Wno-unused-result -Wno-format -c -o /Users/dane/projects/mapnik-packaging/osx/out/packages/node-v0.10.25/out/Release/obj.target/openssl/deps/openssl/openssl/ssl/d1_both.o ../deps/openssl/openssl/ssl/d1_both.c -isysroot /usr/

Very curiously removing the -I/usr/include and keeping the -isysroot also solved the problem:

clang '-D_DARWIN_USE_64_BIT_INODE=1' '-DL_ENDIAN' '-DPURIFY' '-D_REENTRANT' '-DOPENSSL_NO_HEARTBEATS' '-DAES_ASM' '-DBF_ASM' '-DBNCO_ASM' '-DBN_ASM' '-DCPUID_ASM' '-DDES_ASM' '-DLIB_BN_ASM' '-DOPENSSL_BN_ASM' '-DOPENSSL_CPUID_OBJ' '-DRIP_ASM' '-DWHIRLPOOL_ASM' '-DWP_ASM' '-DENGINESDIR="/dev/null"' '-DOPENSSLDIR="/etc/ssl"' '-DTERMIOS' -I../deps/openssl -I../deps/openssl/openssl -I../deps/openssl/openssl/crypto -I../deps/openssl/openssl/crypto/asn1 -I../deps/openssl/openssl/crypto/evp -I../deps/openssl/openssl/crypto/md2 -I../deps/openssl/openssl/crypto/modes -I../deps/openssl/openssl/crypto/store -I../deps/openssl/openssl/include  -Os -gdwarf-2 -mmacosx-version-min=10.5 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-strict-aliasing -MMD -MF /Users/dane/projects/mapnik-packaging/osx/out/packages/node-v0.10.25/out/Release/.deps//Users/dane/projects/mapnik-packaging/osx/out/packages/node-v0.10.25/out/Release/obj.target/openssl/deps/openssl/openssl/ssl/d1_both.o.d.raw -I/Users/dane/projects/mapnik-packaging/osx/out/build-cpp03-libstdcpp-x86_64/include -DNDEBUG  -Wno-invalid-source-encoding -Wno-unused-parameter -Wno-cast-align -Wno-extended-offsetof -Wno-long-long -Wno-unused-variable -Wno-redundant-decls -Wno-uninitialized -Wno-unused-result -Wno-format -c -o /Users/dane/projects/mapnik-packaging/osx/out/packages/node-v0.10.25/out/Release/obj.target/openssl/deps/openssl/openssl/ssl/d1_both.o ../deps/openssl/openssl/ssl/d1_both.c -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk
springmeyer pushed a commit that referenced this issue Jan 27, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant