Compile Ruby Enterprise Edition on Mac OS X - ruby

Hi
when trying to compile Ruby Enterprise Edition 2010.02
readline.c: In function ‘username_completion_proc_call’:
readline.c:734: error: ‘username_completion_function’ undeclared (first use in this function)
readline.c:734: error: (Each undeclared identifier is reported only once
readline.c:734: error: for each function it appears in.)
make[1]: *** [readline.o] Error 1
make: *** [all] Error 1
I tried also specifying the option -c '--with-readline-path=/usr/local' (where I installed the readline libs), but I have the same issue.
I tried to install readline with port and delete my manual compile, but the problem still there.
I never had troubles under Linux (the system I'm used to), having ldconfig, etc...
HELP! :)
Thanks

Have you tried using RVM (Ruby Version Manager)?

Ok, I resolved in this way:
I compiled readline 5.2 following this guide
http://techdebug.com/blog/2009/01/03/compiling-readline-on-an-osx-105-intel-x86_64/
readline 6.1 does not work with ree.
Doing the installation with the following:
./installer -c '--with-readline-dir=PATH'
works fine

Related

Where is the intel sgx psw and making intel sgx work with ubunut 18.04

I've tried following the intel instructions to install sgx, but it requires the sgx_linux_x64_psw_.bin file, which i cannot find anywhere. I've got the driver installer (sgx_linux_x64_driver_1.35.bin) and the sdk installer(sgx_linux_x64_sdk_2.10.100.2.bin), intel seems not to have a psw for linux? If so, how do i properly work with sgx? I tried simply executing the driver and sdk .bin files, but the sample code in the sdk would not compile (after make SGX_MODE=SIM), even after setting the sgxsdk directory to /opt/intel/sgxsdk. I'd get the following compile error:
/usr/bin/ld: warning: libsgx_uae_service_sim.so, needed by /opt/intel/sgxsdk/lib64/libsgx_urts_sim.so, not found (try using -rpath or -rpath-link)
/opt/intel/sgxsdk/lib64/libsgx_urts_sim.so: undefined reference to `get_launch_token'
collect2: error: ld returned 1 exit status
Makefile:235: recipe for target 'app' failed
make[1]: * [app] Error 1
make[1]: Leaving directory '/opt/intel/sgxsdk/SampleCode/SampleEnclave'
Makefile:180: recipe for target 'all' failed
make: * [all] Error 2
Any help with either issue would be much appreciated!
So at least in my case, it seems the issue was that I was A, using a virtual machine, which can ONLY run in simulation mode, so getting a fully working version of sgx is impossible. Secondly, I was using an outdated installation guide, for anyone else trying to use this stuff, make sure to get the installation guide from the intel download page along with the version you are downloading.
download source code from https://github.com/intel/linux-sgx, compile according to the instructions and then install psw.

Openssl support for ruby not found in passenger installation on redhat 6

I have openssl 1.0.1e-42.el6 already installed. Also tried to compile openssl from ext/openssl directory which failed with below error
ossl_pkey_ec.c:815: error: ‘EC_GROUP_new_curve_GF2m’ undeclared (first use in this function)
ossl_pkey_ec.c:815: error: (Each undeclared identifier is reported only once
ossl_pkey_ec.c:815: error: for each function it appears in.)
make: *** [ossl_pkey_ec.o] Error 1
Is there any workaround for this problem ? or is this a compatibility problem with ruby 1.8.7-p358 and openssl 1.0.1e-42.el6. Due to this I am unable to install phusion passenger
Fixed the above issue by applying the patch.
Refer link https://bugs.ruby-lang.org/issues/8384
You have to download the out.patch file to ruby source ext/openssl folder and run patch < out.patch command. Then compile openssl

Cannot install Ruby 1.9.3-p194 via RBEnv due SSL_OP_MSIE_SSLV2_RSA_PADDING undeclared

I try to install Ruby on a clean server.
Server was a Debian 6.0.9 which I upgraded to Debian 7.5
I've installed RBEnv with build-support via apt-get install.
When I try to install Ruby 1.9.3-p194 (summed in the list via ruby-build --definitions), I got an error the installation failed.
When I check the error in the log file, I got next error:
make[2]: Entering directory `/tmp/ruby-build.20140610073619.8858/ruby-1.9.3-p194/ext/openssl'
compiling ossl_pkey_rsa.c
compiling ossl_asn1.c
compiling callback-4.c
compiling ossl_x509.c
compiling ossl_pkcs5.c
compiling ossl_x509crl.c
compiling ossl_rand.c
compiling ossl_pkey_dsa.c
compiling ossl_x509cert.c
compiling ossl_ssl_session.c
compiling ossl_config.c
compiling callback-5.c
compiling ossl_engine.c
compiling ossl_pkey_ec.c
compiling ossl_bn.c
compiling ossl_x509name.c
compiling ossl_ssl.c
ossl_ssl.c: In function 'Init_ossl_ssl':
ossl_ssl.c:1982:5: error: 'SSL_OP_MSIE_SSLV2_RSA_PADDING' undeclared (first use in this function)
ossl_ssl.c:1982:5: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [ossl_ssl.o] Error 1
make[2]: Leaving directory `/tmp/ruby-build.20140610073619.8858/ruby-1.9.3-p194/ext/openssl'
make[1]: *** [ext/openssl/all] Error 2
make[1]: *** Waiting for unfinished jobs....
compiling callback-6.c
compiling callback-7.c
compiling callback-8.c
linking shared-object dl/callback.so
make[2]: Leaving directory `/tmp/ruby-build.20140610073619.8858/ruby-1.9.3-p194/ext/dl/callback'
make[1]: Leaving directory `/tmp/ruby-build.20140610073619.8858/ruby-1.9.3-p194'
make: *** [build-ext] Error 2
I've installed/updated the openSSL version (OpenSSL 1.0.1e 11 Feb 2013) and installed libssl-dev, but the error stays.
Anyone an idea what I'm missing to have SSL_OP_MSIE_SSLV2_RSA_PADDING declared?
Is this an error in the Ruby-installation, or do I have a setup issue somewhere else?
All advice is welcome :)
(I already spend some time googling this, search on lot of sites, I guess I'm looking for the wrong solutions..)
-- Edit:
I found Ruby 2.1 fails to install due to OpenSSL error where it said the macro is removed in latest OPEN_SSL, does this mean I cannot use Ruby 1.9.x anymore? When I list ruby versions available via rbenv, no stable ruby 2 is listed + I prefer to keep using Ruby 1.9. Should I downgrade open_ssl (not wise idea) or ?
It looks like the define was dropped sometime after 1.0.1e-2+deb7u6, certainly is not present in 1.0.1e-2+deb7u10.
I worked around this by adding
#define SSL_OP_MSIE_SSLV2_RSA_PADDING 0x00000040L /* no effect since 0.9.7h and 0.9.8b */
back to /usr/include/openssl/ssl.h. (Picked from 1.0.1e-2+deb7u6)
Do at your own risk, I have not investigated what will happen if that value is passed.

Ruby gem version_sorter on OS X 10.9

I've tried to make update for Gitlab Installation guide for OS X (https://github.com/CiTroNaK/Installation-guide-for-GitLab-on-OS-X) for the newest version of Gitlab 6.7.
I use OS X 10.9 with xcode command lines tools and I ended with this error for version_sorter gem:
Building native extensions. This could take a while...
ERROR: Error installing version_sorter:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for pcre_compile() in -lpcre... yes
creating Makefile
make "DESTDIR="
compiling rb_version_sorter.c
compiling version_sorter.c
version_sorter.c:49:16: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
while (cur = vsi->head) {
~~~~^~~~~~~~~~~
version_sorter.c:49:16: note: place parentheses around the assignment to silence this warning
while (cur = vsi->head) {
^
( )
version_sorter.c:49:16: note: use '==' to turn this assignment into an equality comparison
while (cur = vsi->head) {
^
==
1 warning generated.
linking shared-object version_sorter.bundle
clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
make: *** [version_sorter.bundle] Error 1
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/version_sorter-1.1.0 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/version_sorter-1.1.0/ext/version_sorter/gem_make.out
Unfortunately I do not have enough knowledge to fix it. Could someone help me please?
A recent XCode update broke quite a bit of native code compilation, try this:
Add ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future to whatever you were running above. It looks like the Gitlab instructions are installing it using the system Ruby, so try this:
sudo ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future gem install version_sorter

Error installing OpenCV: Error 1, 2

I am attempting to install OpenCv on my Mac Pro (and I have already succesfully installed it on my Macbook), however I am getting an error message when doing
sudo make install
in the directory I am striving to install it in. I am running Snow Leopard (10.6.8) and have Xcode (as well as MacPorts) installed. My question is similar to this one (which is unanswered as of today): Trying to install opencv using homebrew. ERROR: modules/highgui/CMakeFiles/opencv_highgui.dir/all Error 2
The following is the error message:
[ 67%] Building CXX object modules/ocl/CMakeFiles/opencv_ocl.dir/src/error.cpp.o
/Users/maxweissenbacher/Documents/OpenCV/opencv-2.4.5/modules/ocl/src/error.cpp:
In function ‘const char* cv::ocl::getOpenCLErrorString(int)’:
/Users/maxweissenbacher/Documents/OpenCV/opencv-2.4.5/modules/ocl/src/error.cpp:82:
error: ‘CL_MISALIGNED_SUB_BUFFER_OFFSET’ was not declared in this scope
/Users/maxweissenbacher/Documents/OpenCV/opencv-2.4.5/modules/ocl/src/error.cpp:84:
error: ‘CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST’ was not declared in this scope
make[2]: *** [modules/ocl/CMakeFiles/opencv_ocl.dir/src/error.cpp.o] Error 1
make[1]: *** [modules/ocl/CMakeFiles/opencv_ocl.dir/all] Error 2
make: *** [all] Error 2
I appreciate any help.
Thanks in advance,
Max.
Looks like you can't install it on Snow Leopard, at least without some additional manipulations with sources.The reason is OpenCL version.
Take a look at this thread for additional info

Resources