Forums » Development »
[Abandoned] How to compile with openssl at custom path
Added by surjitsidhu over 7 years ago
My goal is to compile with openssl installed at custom path /opt/openssl
scons -j 4 build_static=1 build_dynamic=0 \
with_openssl=1 \
with-openssl-includes=/opt/openssl/include \
with-openssl-libs=/opt/openssl/lib \
prefix=/usr install
above not working
Replies (2)
RE: How to compile with openssl at custom path - Added by surjitsidhu over 7 years ago
I modified
SConstruct
#if env['with_openssl']:
#if autoconf.CheckLibWithHeader('ssl', 'openssl/ssl.h', 'C'):
#autoconf.env.Append(CPPFLAGS = [ '-DHAVE_OPENSSL_SSL_H', '-DHAVE_LIBSSL'] , LIBS = [ 'ssl', 'crypto' ])
env.Append(CPPPATH=['/opt/openssl/include'])
env.Append(LIBPATH=['/opt/openssl/lib'])
autoconf.env.Append(CPPFLAGS = [ '-DHAVE_OPENSSL_SSL_H', '-DHAVE_LIBSSL'] , LIBS = [ 'ssl', 'crypto' ])
Now getting errors
/opt/openssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_globallookup':
dso_dlfcn.c:(.text+0x11): undefined reference to `dlopen'
dso_dlfcn.c:(.text+0x24): undefined reference to `dlsym'
dso_dlfcn.c:(.text+0x2f): undefined reference to `dlclose'
/opt/openssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_func':
dso_dlfcn.c:(.text+0x344): undefined reference to `dlsym'
dso_dlfcn.c:(.text+0x402): undefined reference to `dlerror'
/opt/openssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_var':
dso_dlfcn.c:(.text+0x474): undefined reference to `dlsym'
dso_dlfcn.c:(.text+0x532): undefined reference to `dlerror'
/opt/openssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_load':
dso_dlfcn.c:(.text+0x599): undefined reference to `dlopen'
dso_dlfcn.c:(.text+0x5fd): undefined reference to `dlclose'
dso_dlfcn.c:(.text+0x635): undefined reference to `dlerror'
/opt/openssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_pathbyaddr':
dso_dlfcn.c:(.text+0x6d1): undefined reference to `dladdr'
dso_dlfcn.c:(.text+0x739): undefined reference to `dlerror'
/opt/openssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_unload':
dso_dlfcn.c:(.text+0x792): undefined reference to `dlclose'
collect2: error: ld returned 1 exit status
scons: *** [sconsbuild/static/build/zeslesrv] Error 1
scons: building terminated because of errors.
RE: How to compile with openssl at custom path - Added by gstrauss over 7 years ago
Did you compile openssl to be built statically? (I have not tried with current versions and you may need to compile openssl as dynamic libs, even if you compile the rest of lighttpd statically)