RejectedSoftware Forums

Sign up

vibe.d on CentOS 6.2

Hi,

I'm trying to use vibe.d on a CentOS 6.2 machine,

I followed instructions on github page:

  • download dmd2.066.0 zip from dlang.org and unzip it
  • download dub-0.9.22 source and build it
  • download libevent-2.0.15.stable and build it
  • yum install openssl

finally I got it compiled, but linking got such error:

....
....
/opt/zpm/d/hello/../../../../root/.dub/packages/vibe-d-0.7.21-beta.4/source/vibe/stream/openssl.d:487: undefined reference to `EC_KEY_free'
/usr/local/lib/libevent_pthreads.so: undefined reference to `event_mm_malloc_'
/usr/local/lib/libevent_pthreads.so: undefined reference to `event_mm_free_'

is it because I got the wrong version of openssl?

Package openssl-1.0.0-27.el6.x86_64 already installed and latest version

Re: vibe.d on CentOS 6.2

On Mon, 29 Sep 2014 16:14:26 GMT, zhaopuming wrote:

Hi,

I'm trying to use vibe.d on a CentOS 6.2 machine,

I followed instructions on github page:

  • download dmd2.066.0 zip from dlang.org and unzip it
  • download dub-0.9.22 source and build it
  • download libevent-2.0.15.stable and build it
  • yum install openssl

finally I got it compiled, but linking got such error:

....
....
/opt/zpm/d/hello/../../../../root/.dub/packages/vibe-d-0.7.21-beta.4/source/vibe/stream/openssl.d:487: undefined reference to `EC_KEY_free'
/usr/local/lib/libevent_pthreads.so: undefined reference to `event_mm_malloc_'
/usr/local/lib/libevent_pthreads.so: undefined reference to `event_mm_free_'

is it because I got the wrong version of openssl?

Package openssl-1.0.0-27.el6.x86_64 already installed and latest version

After further looking I found that this was due to libevent 1.4 still in the system and libevent2.0 was shadowed. I removed libevent1.4 and errors in libevent_pthreads.so are gone. but there is still:

../../../../root/.dub/packages/vibe-d-0.7.21-beta.4/libvibe-d.a(openssl_3963_569.o): In function `_D4vibe6stream7openssl14OpenSSLContext12setECDHCurveMFAyaZv':
/opt/zpm/d/hello/../../../../root/.dub/packages/vibe-d-0.7.21-beta.4/source/vibe/stream/openssl.d:487: undefined reference to `EC_KEY_new_by_curve_name'
/opt/zpm/d/hello/../../../../root/.dub/packages/vibe-d-0.7.21-beta.4/source/vibe/stream/openssl.d:487: undefined reference to `EC_KEY_free'

Re: vibe.d on CentOS 6.2

On Tue, 30 Sep 2014 02:57:12 GMT, zhaopuming wrote:

On Mon, 29 Sep 2014 16:14:26 GMT, zhaopuming wrote:

Package openssl-1.0.0-27.el6.x86_64 already installed and latest version

After further looking I found that this was due to libevent 1.4 still in the system and libevent2.0 was shadowed. I removed libevent1.4 and errors in libevent_pthreads.so are gone. but there is still:

../../../../root/.dub/packages/vibe-d-0.7.21-beta.4/libvibe-d.a(openssl_3963_569.o): In function `_D4vibe6stream7openssl14OpenSSLContext12setECDHCurveMFAyaZv':
/opt/zpm/d/hello/../../../../root/.dub/packages/vibe-d-0.7.21-beta.4/source/vibe/stream/openssl.d:487: undefined reference to `EC_KEY_new_by_curve_name'
/opt/zpm/d/hello/../../../../root/.dub/packages/vibe-d-0.7.21-beta.4/source/vibe/stream/openssl.d:487: undefined reference to `EC_KEY_free'

I think these functions were only introduced in OpenSSL 1.0.1. But if you don't need to serve ECDH chipers, the easiest solution would be to just comment out that code section (the body of setECDHCurve).

Re: vibe.d on CentOS 6.2

On Tue, 30 Sep 2014 06:41:00 GMT, Sönke Ludwig wrote:

On Tue, 30 Sep 2014 02:57:12 GMT, zhaopuming wrote:

On Mon, 29 Sep 2014 16:14:26 GMT, zhaopuming wrote:

Package openssl-1.0.0-27.el6.x86_64 already installed and latest version

After further looking I found that this was due to libevent 1.4 still in the system and libevent2.0 was shadowed. I removed libevent1.4 and errors in libevent_pthreads.so are gone. but there is still:

../../../../root/.dub/packages/vibe-d-0.7.21-beta.4/libvibe-d.a(openssl_3963_569.o): In function `_D4vibe6stream7openssl14OpenSSLContext12setECDHCurveMFAyaZv':
/opt/zpm/d/hello/../../../../root/.dub/packages/vibe-d-0.7.21-beta.4/source/vibe/stream/openssl.d:487: undefined reference to `EC_KEY_new_by_curve_name'
/opt/zpm/d/hello/../../../../root/.dub/packages/vibe-d-0.7.21-beta.4/source/vibe/stream/openssl.d:487: undefined reference to `EC_KEY_free'

I think these functions were only introduced in OpenSSL 1.0.1. But if you don't need to serve ECDH chipers, the easiest solution would be to just comment out that code section (the body of setECDHCurve).

Thanks. I tried to upgrade openssl to 1.0.1 but it was not allowed on our production server in fear that other programs might crash.

It would be better if one could specify which version of openssl to use with a version tag or static if.

Re: vibe.d on CentOS 6.2

On Thu, 09 Oct 2014 03:53:18 GMT, zhaopuming wrote:

Thanks. I tried to upgrade openssl to 1.0.1 but it was not allowed on our production server in fear that other programs might crash.

It would be better if one could specify which version of openssl to use with a version tag or static if.

Good point. I've added the possibility to define a version VibeUseOldOpenSSL to disable the ECDH code: cfbae3e

Re: vibe.d on CentOS 6.2

Thanks :-)

On Thu, 09 Oct 2014 06:15:06 GMT, Sönke Ludwig wrote:

On Thu, 09 Oct 2014 03:53:18 GMT, zhaopuming wrote:

Thanks. I tried to upgrade openssl to 1.0.1 but it was not allowed on our production server in fear that other programs might crash.

It would be better if one could specify which version of openssl to use with a version tag or static if.

Good point. I've added the possibility to define a version VibeUseOldOpenSSL to disable the ECDH code: cfbae3e