Configure qemu-1.4.2 on CentOS 6.2 with --enable-sdl - compilation

I want to install qemu-1.4.2 on my CentOS 6.2. I downloaded the source code, unpacked and ran ./configure --disable-vnc --enable-sdl. Then it prompted it cannot find sdl:
ERROR
ERROR: User requested feature sdl
ERROR: configure was not able to find it
ERROR
Then I installed SDL and SDL-devel packages and ran ./configure again. It still prompted it cannot find sdl. The following output showed that I have installed SDL packages, so why it still complains? Please help, I really need qemu to work on my project.
~/D/qemu-1.4.2 ❯❯❯ rpm -qa | grep SDL
SDL-1.2.14-6.el6.x86_64
SDL-1.2.14-6.el6.i686
SDL-devel-1.2.14-6.el6.x86_64
SDL-devel-1.2.14-6.el6.i686
~/D/qemu-1.4.2 ❯❯❯ which sdl-config
/usr/bin/sdl-config
These lines in config.log should relate to the issue:
cc -fPIE -DPIE -m64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fstack-protector-all -Wendif-labels -Wmissing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/SDL -o /tmp/siyuan/qemu-conf-31225-10750-20820.exe /tmp/siyuan/qemu-conf-9193-10750-15100.c -Wl,-z,relro -Wl,-z,now -pie -m64 -g -lSDL -lpthread
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libSDL.so: undefined reference to `_XGetRequest'
collect2: ld returned 1 exit status
It seems like a linking error, more clues to you:
/u/lib64 ❯❯❯ lsa libSDL.so
lrwxrwxrwx. 1 root root 20 Sep 11 23:24 libSDL.so -> libSDL-1.2.so.0.11.3
/u/lib64 ❯❯❯ ldd libSDL.so
linux-vdso.so.1 => (0x00007fffa4d43000)
libm.so.6 => /lib64/libm.so.6 (0x00007ff3dd306000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007ff3dd102000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007ff3dcee4000)
libc.so.6 => /lib64/libc.so.6 (0x00007ff3dcb50000)
/lib64/ld-linux-x86-64.so.2 (0x000000318da00000)
~/D/qemu-1.4.2 ❯❯❯ sdl-config --libs
-lSDL -lpthread
~/D/qemu-1.4.2 ❯❯❯ pkg-config --libs sdl
-lSDL -lpthread

Related

Unable to install any Ruby binaries in macOS 11.5.2 (BigSur)

Recently got a new MacBook Pro Apple M1 chip and tried to install ruby 2.5.0 using rvm but unable to succeed the installation
Error running '__rvm_make -j8'
please read /Users/sridhar/.rvm/log/1633882248_ruby-2.5.0/make.log
There has been an error while running make. Halting the installation.
tried many options like reinstalling RVM, other packages like openssl etc but no luck
The same error comes when installing any ruby version
output of make.log
+__rvm_make:0> make -j8
CC = gcc
LD = ld
LDSHARED = gcc -dynamiclib
CFLAGS = -O3 -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -Wdivision-by-zero -Wdeprecated-declarations -Wmisleading-indentation -Wextra-tokens -fno-common -pipe
XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector -fno-strict-overflow -fvisibility=hidden -DRUBY_EXPORT
CPPFLAGS = -I/opt/homebrew/opt/openssl#3/include -I/opt/homebrew/opt/libyaml/include -I/opt/homebrew/opt/libksba/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/zlib/include -I/opt/homebrew/opt/openssl#1.1/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -I. -I.ext/include/-darwin20 -I./include -I. -I./enc/unicode/10.0.0
DLDFLAGS = -L/opt/homebrew/opt/openssl#3/lib -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -L/opt/homebrew/opt/libyaml/lib -L/opt/homebrew/opt/libksba/lib -L/opt/homebrew/opt/readline/lib -L/opt/homebrew/opt/zlib/lib -L/opt/homebrew/opt/openssl#1.1/lib -install_name /Users/sridhar/.rvm/rubies/ruby-2.5.0/lib/libruby.2.5.dylib -compatibility_version 2.5 -current_version 2.5.0 -fstack-protector -framework Foundation -fstack-protector -framework Foundation
SOLIBS = -lpthread -ldl -lobjc
LANG =
LC_ALL =
LC_CTYPE = UTF-8
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 12.0.5 (clang-1205.0.22.11)
Target: arm64-apple-darwin20.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
compiling ./main.c
compiling dmydln.c
compiling miniinit.c
compiling dmyext.c
generating miniprelude.c
translating probes probes.d
compiling bignum.c
executable host ruby is required. use --with-baseruby option.
make: *** [miniprelude.c] Error 1
make: *** Waiting for unfinished jobs....
. ./vm_opts.h
+__rvm_make:0> return 2
Finally got it working with this solution mentioned here
CFLAGS="-Wno-error=implicit-function-declaration" rvm install 2.5.5
Maybe install newer version of ruby. For me, any version later than 2.6.9 works well, rvm install 2.6.9

Error running '__rvm_make -j8' when trying to install Ruby using RVM

I am trying to use RVM to install Ruby. I have been following the Installfest guide over at RailsBridge.
So far, I have installed RVM (curl -L get.rvm.io | bash -s stable) and configured RVM to use Homebrew (rvm autolibs homebrew). When I enter rvm install ruby into Terminal, I get the following output:
ruby-2.5.1 - #removing src/ruby-2.5.1..
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.13/x86_64/ruby-2.5.1.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx_brew.
Certificates bundle '/usr/local/etc/openssl#1.1/cert.pem' is already up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/jules/.rvm/rubies/ruby-2.5.1, this may take a while depending on your cpu(s)...
ruby-2.5.1 - #downloading ruby-2.5.1, this may take a while depending on your connection...
ruby-2.5.1 - #extracting ruby-2.5.1 to /Users/jules/.rvm/src/ruby-2.5.1.....
ruby-2.5.1 - #configuring......................................................|
ruby-2.5.1 - #post-configuration.
ruby-2.5.1 - #compiling....
Error running '__rvm_make -j8',
please read /Users/jules/.rvm/log/1530823409_ruby-2.5.1/make.log
There has been an error while running make. Halting the installation.
I opened /Users/jules/.rvm/log/1530823409_ruby-2.5.1/make.log in an attempt to make progress, but I wasn't able to glean any meaning from the file. I have pasted the contents below:
[2018-07-05 16:44:45] __rvm_make
__rvm_make ()
{
\make "$#" || return $?
}
current path: /Users/jules/.rvm/src/ruby-2.5.1
PATH=/usr/local/opt/coreutils/bin:/usr/local/opt/pkg-config/bin:/usr/local/opt/libtool/bin:/usr/local/opt/automake/bin:/usr/local/opt/autoconf/bin:/Users/jules/anaconda2/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/Users/jules/.rvm/bin
command(2): __rvm_make -j8
++ make -j8
CC = gcc
LD = ld
LDSHARED = gcc -dynamiclib
CFLAGS = -O3 -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -Wdivision-by-zero -Wdeprecated-declarations -Wextra-tokens -fno-common -pipe
XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector -fno-strict-overflow -fvisibility=hidden -DRUBY_EXPORT
CPPFLAGS = -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl#1.1/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -I. -I.ext/include/x86_64-darwin17 -I./include -I. -I./enc/unicode/10.0.0
DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl#1.1/lib -install_name /Users/jules/.rvm/rubies/ruby-2.5.1/lib/libruby.2.5.dylib -compatibility_version 2.5 -current_version 2.5.1 -fstack-protector -framework Foundation -fstack-protector -framework Foundation
SOLIBS = -lpthread -lgmp -ldl -lobjc
LANG = en_US.UTF-8
LC_ALL =
LC_CTYPE =
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.1.0 (clang-902.0.39.2)
Target: x86_64-apple-darwin17.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
compiling ./main.c
compiling dmydln.c
compiling miniinit.c
compiling dmyext.c
compiling miniprelude.c
translating probes probes.d
compiling bignum.c
compiling class.c
compiling compar.c
compiling compile.c
error: error reading '/dev/fd/7'
1 error generated.
clang: error: unable to remove file: Operation not permitted
dtrace: failed to compile script probes.d: Preprocessor failed to process input program
make: *** [probes.h] Error 1
make: *** Waiting for unfinished jobs....
++ return 2
Where should I go from here? Cheers!
Update: I Googled error: error reading '/dev/fd/7' from make.log and solved the problem by uninstalling Avira: https://github.com/rvm/rvm/issues/4313.
This worked for me:
rvm install ruby-2.5.1 --with-openssl-dir=/usr/local/opt/openssl
The openssl flag fixed my error! In case it's helpful, the last line of mymake.log was:
openssl_missing.c:39:18: error: expected ';' after top level declarator
EVP_MD_CTX_create(void)
This worked for me:
renaming /usr/local/include to /usr/local/include_old
Ref: Broken c++ std libraries on macOS High Sierra 10.13

`gem install tiny_tds` on OS X Yosemite failing with "You have to install development tools first."

Looking for a wise sage to point me in the right direction for what I can do next.
I use RVM and brew on OS X. I've confirmed that xcode is up to date and that xcode command line tools are installed.
I'm hitting this error during gem install tiny_tds
/Users/bdx/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/mkmf.rb:381:in
'try_do': The compiler failed to generate an executable file.
(RuntimeError)
You have to install development tools first.
from /Users/bdx/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/mkmf.rb:461:in 'try_link0'
from /Users/bdx/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/mkmf.rb:476:in 'try_link'
from /Users/bdx/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/mkmf.rb:619:in 'try_func'
I added some debug logging to mkmf.rb to see what was going on at that point.
The call to try_do was passing the following in the command argument:
command
/usr/local/opt/gcc46/bin/gcc-4.6 -o conftest -I/Users/bdx/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1/x86_64-darwin13.4.0 -I/Users/bdx/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby/backward -I/Users/bdx/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1 -I. -I/Users/bdx/.rvm/rubies/ruby-1.9.3-p448/include -I/usr/include -I/usr/local/include -I/usr/local/mysql/include -I/opt/X11/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/include -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -fno-common -pipe conftest.c -L. -L/Users/bdx/.rvm/rubies/ruby-1.9.3-p448/lib -L/Users/bdx/.rvm/rubies/ruby-1.9.3-p448/lib -L/usr/lib -L/usr/local/lib -L/usr/local/mysql/lib -L/opt/X11/lib -L/usr/local/git/lib -L/Users/bdx/.rvm/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl/lib -L. -L/usr/local/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl/lib -lruby.1.9.1 -lpthread -ldl -lobjc
Following that command argument, I found that /usr/local/opt/gcc46/bin/gcc-4.6 didn't exist. Doing locate gcc-4.6 found its path for me, so I ran: ln -s /usr/local/opt/gcc46/bin/gcc-4.6 /usr/local/Library/ENV/4.3/gcc-4.6 and tried again, but the same error keeps occurring.
I have encountered the same error -
You have to install development tools first
when tried to install tiny_tds gem. When inspecting the log file mkmf.rb, I found the error was:
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
Running xcode-select --reset fixed the problem for me.

Fail to install ruby 1.9.2 in RVM on OSX 10.10 Yosemite

Ok guys, I already tried to:
Reinstall RVM;
Update XCode to 6.1;
Install command_line_tools_for_osx_10.10_for_xcode_6.1.dmg;
Nothing works for me!
When I run rvm install ruby-1.9.2 I got this error:
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.10/x86_64/ruby-1.9.2-p330.
It is not possible to build movable binaries for rubies 1.8-1.9.2, but you can do it for your system only.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Certificates in '/usr/local/etc/openssl/cert.pem' are already up to date.
Requirements installation successful.
/Users/brunnosantos/.rvm/scripts/functions/build: line 110: 33084 Segmentation fault: 11 ${compiler} "$#" 2>&1
Installing Ruby from source to: /Users/brunnosantos/.rvm/rubies/ruby-1.9.2-p330, this may take a while depending on your cpu(s)...
ruby-1.9.2-p330 - #downloading ruby-1.9.2-p330, this may take a while depending on your connection...
######################################################################## 100.0%
ruby-1.9.2-p330 - #extracting ruby-1.9.2-p330 to /Users/brunnosantos/.rvm/src/ruby-1.9.2-p330....
ruby-1.9.2-p330 - #applying patch /Users/brunnosantos/.rvm/patches/ruby/GH-488.patch.
ruby-1.9.2-p330 - #applying patch /Users/brunnosantos/.rvm/patches/ruby/ssl_no_ec2m.patch.
ruby-1.9.2-p330 - #configuring.
Error running 'env CFLAGS=-O3 -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/include LDFLAGS=-L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl/lib ./configure --prefix=/Users/brunnosantos/.rvm/rubies/ruby-1.9.2-p330 --with-opt-dir=/usr/local/opt/libyaml --without-tcl --without-tk --disable-install-doc --enable-shared',
showing last 15 lines of /Users/brunnosantos/.rvm/log/1413833087_ruby-1.9.2-p330/configure.log
[2014-10-20 17:24:50] ./configure
current path: /Users/brunnosantos/.rvm/src/ruby-1.9.2-p330
PATH=/usr/local/opt/pkg-config/bin:/usr/local/opt/libtool/bin:/usr/local/opt/automake/bin:/usr/local/opt/autoconf/bin:/usr/local/heroku/bin:/Users/brunnosantos/dotfiles/powerline/scripts:/usr/local/bin:/Users/brunnosantos/.azk/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Users/brunnosantos/bin:/Users/brunnosantos/.rvm/bin:/Users/brunnosantos/go/bin:/usr/local/smlnj/bin
command(10): env CFLAGS=-O3 -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/include LDFLAGS=-L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl/lib ./configure --prefix=/Users/brunnosantos/.rvm/rubies/ruby-1.9.2-p330 --with-opt-dir=/usr/local/opt/libyaml --without-tcl --without-tk --disable-install-doc --enable-shared
configure: WARNING: unrecognized options: --without-tcl, --without-tk
checking build system type... i386-apple-darwin14.0.0
checking host system type... i386-apple-darwin14.0.0
checking target system type... i386-apple-darwin14.0.0
checking whether the C compiler works... no
configure: error: in `/Users/brunnosantos/.rvm/src/ruby-1.9.2-p330':
configure: error: C compiler cannot create executables
See `config.log' for more details
There has been an error while running configure. Halting the installation.
When I tried rvm install ruby-1.9.2 --with-gcc=clang I got:
ruby-1.9.2-p330 - #removing src/ruby-1.9.2-p330..
Checking requirements for osx.
Certificates in '/usr/local/etc/openssl/cert.pem' are already up to date.
Requirements installation successful.
Warning: found user selected compiler 'clang', this will suppress RVM auto detection mechanisms.
Installing Ruby from source to: /Users/brunnosantos/.rvm/rubies/ruby-1.9.2-p330, this may take a while depending on your cpu(s)...
ruby-1.9.2-p330 - #downloading ruby-1.9.2-p330, this may take a while depending on your connection...
ruby-1.9.2-p330 - #extracting ruby-1.9.2-p330 to /Users/brunnosantos/.rvm/src/ruby-1.9.2-p330....
ruby-1.9.2-p330 - #applying patch /Users/brunnosantos/.rvm/patches/ruby/GH-488.patch.
ruby-1.9.2-p330 - #applying patch /Users/brunnosantos/.rvm/patches/ruby/ssl_no_ec2m.patch.
ruby-1.9.2-p330 - #configuring..........................................
ruby-1.9.2-p330 - #post-configuration.
ruby-1.9.2-p330 - #compiling...........................................................................................................................................
Error running '__rvm_make -j 1',
showing last 15 lines of /Users/brunnosantos/.rvm/log/1413833194_ruby-1.9.2-p330/make.log
#define UNINITIALIZED_VAR(x) x = x
^
4 warnings generated.
clang -O3 -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/include -fno-common -pipe -I. -I.ext/include/x86_64-darwin14.0.0 -I./include -I. -DRUBY_EXPORT -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -o cont.o -c cont.c
clang -O3 -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/include -fno-common -pipe -I. -I.ext/include/x86_64-darwin14.0.0 -I./include -I. -DRUBY_EXPORT -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -o ascii.o -c ./enc/ascii.c
clang -O3 -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/include -fno-common -pipe -I. -I.ext/include/x86_64-darwin14.0.0 -I./include -I. -DRUBY_EXPORT -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -o us_ascii.o -c ./enc/us_ascii.c
clang -O3 -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/include -fno-common -pipe -I. -I.ext/include/x86_64-darwin14.0.0 -I./include -I. -DRUBY_EXPORT -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -o unicode.o -c ./enc/unicode.c
clang -O3 -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/include -fno-common -pipe -I. -I.ext/include/x86_64-darwin14.0.0 -I./include -I. -DRUBY_EXPORT -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -o utf_8.o -c ./enc/utf_8.c
clang -O3 -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/include -fno-common -pipe -I. -I.ext/include/x86_64-darwin14.0.0 -I./include -I. -DRUBY_EXPORT -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -o newline.o -c newline.c
clang -O3 -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/include -fno-common -pipe -I. -I.ext/include/x86_64-darwin14.0.0 -I./include -I. -DRUBY_EXPORT -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -o dmyext.o -c dmyext.c
clang -O3 -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/include -fno-common -pipe -L. -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl/lib -Wl,-u,_objc_msgSend main.o dmydln.o dmyencoding.o dmyversion.o miniprelude.o array.o bignum.o class.o compar.o complex.o dir.o dln_find.o enum.o enumerator.o error.o eval.o load.o proc.o file.o gc.o hash.o inits.o io.o marshal.o math.o node.o numeric.o object.o pack.o parse.o process.o random.o range.o rational.o re.o regcomp.o regenc.o regerror.o regexec.o regparse.o regsyntax.o ruby.o safe.o signal.o sprintf.o st.o strftime.o string.o struct.o time.o transcode.o util.o variable.o compile.o debug.o iseq.o vm.o vm_dump.o thread.o cont.o ascii.o us_ascii.o unicode.o utf_8.o newline.o dmyext.o -lpthread -ldl -lobjc -o miniruby
miniruby(46919,0x7fff7a0cc300) malloc: *** error for object 0x7fed53001a08: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
make: *** [.rbconfig.time] Abort trap: 6
++ return 2
There has been an error while running make. Halting the installation.
Full log file /Users/brunnosantos/.rvm/log/1413833194_ruby-1.9.2-p330/make.log can be viwed in: https://gist.github.com/squiter/b6c4280946454b6b7764
I installed 1.9.3 with rvm install ruby-1.9.3 --with-gcc=clang, worked well, but no success with 1.9.2.
I don't know what I can try anymore....
Did you try this?
export CC=/usr/bin/gcc
and then trying to install?
Hope it helps!
This is a reported known problem in Ruby on OSX depending on your C compiler version.
You might find a solution here: https://github.com/sstephenson/ruby-build/issues/648
I found that reinstalling gcc4.2 (via homebrew, in my case: 'brew install gcc42') and then using that clang compiler when installing older rubies allows the installation to succeed.
I have the ruby 2.2.0 version installed and I try to install the -v 1.9.2 and I do this previously recommended and when I try to install ruby I have his fail:
```
$ rvm install ruby -v '1.9.2'
Already installed ruby-2.2.0.
To reinstall use:
rvm reinstall ruby-2.2.0
```
Anyone can Help me, the problem is the new version of Mac OS X Yosemite( I'm so bad about the updating of this OS I has so many errors on drivers(wi-fi, bluetooth, etc...)

"cannot find -lssl; cannot find -lcrypto" when installing mysql-python?

I'm struggling to install the mysql-python pip either systemwide or in a venv on Ubuntu 14.04 with MariaDB 10 installed. Also tried with MariaDB 5.5 and getting the same error. I don't have this issue with vanilla mysql-server installed.
I have the following installed via apt-get:
build-essential
python-dev
libmariadbclient-dev (thats the MariaDB replacement for libmysqlclient-dev)
python-mysqldb
Originally I thought this was an issue installing this into a venv but I've subsequently noticed mysql-python won't install systemwide either. Below are the cmds I used to install in a venv.
virtualenv venv
. venv/bin/activate
pip install mysql-python==1.2.5
In file included from _mysql.c:44:0:
/usr/include/mysql/my_config.h:439:0: warning: "HAVE_WCSCOLL" redefined [enabled by default]
#define HAVE_WCSCOLL
^
In file included from /usr/include/python2.7/pyconfig.h:3:0,
from /usr/include/python2.7/Python.h:8,
from _mysql.c:29:
/usr/include/x86_64-linux-gnu/python2.7/pyconfig.h:911:0: note: this is the location of the previous definition
#define HAVE_WCSCOLL 1
^x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/_mysql.o -L/usr/lib/x86_64-linux-gnu -lmariadbclient_r -lpthread -lz -lm -lssl -lcrypto -ldl -o build/lib.linux-x86_64-2.7/_mysql.so
/usr/bin/ld: cannot find -lssl
/usr/bin/ld: cannot find -lcrypto
collect2: error: ld returned 1 exit status
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Cleaning up...
Command /root/env/bin/python -c "import setuptools, tokenize;__file__='/root/env/build/mysql- python/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-EyhO2v-record/install-record.txt --single-version-externally-managed --compile --install-headers /root/env/include/site/python2.7 failed with error code 1 in /root/env/build/mysql-python
Storing debug log for failure in /root/.pip/pip.log
You need to have installed the development libraries of OpenSSL. It can be a libssl-dev, libssl-devel if your distribution provides separated packages for the dev libraries. Or install the complete openssl package if they don't.
(venv)➜ src pip install mysql-python==1.2.5
Downloading/unpacking mysql-python==1.2.5
Downloading MySQL-python-1.2.5.zip (108kB): 108kB downloaded
Running setup.py (path:/home/braiam/src/venv/build/mysql-python/setup.py) egg_info for package mysql-python
Installing collected packages: mysql-python
Running setup.py install for mysql-python
building '_mysql' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 -I/usr/include/mysql -I/usr/include/python2.7 -c _mysql.c -o build/temp.linux-x86_64-2.7/_mysql.o -DBIG_JOINS=1 -fno-strict-aliasing -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing
In file included from _mysql.c:44:0:
/usr/include/mysql/my_config.h:439:0: warning: "HAVE_WCSCOLL" redefined
#define HAVE_WCSCOLL
^
In file included from /usr/include/python2.7/pyconfig.h:3:0,
from /usr/include/python2.7/Python.h:8,
from _mysql.c:29:
/usr/include/x86_64-linux-gnu/python2.7/pyconfig.h:911:0: note: this is the location of the previous definition
#define HAVE_WCSCOLL 1
^
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z,relro -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/_mysql.o -L/usr/lib/x86_64-linux-gnu -lmariadbclient_r -lpthread -lz -lm -lssl -lcrypto -ldl -o build/lib.linux-x86_64-2.7/_mysql.so
Successfully installed mysql-python
Cleaning up...
But, there were two messages that you have that I didn't, namely:
/usr/bin/ld: cannot find -lssl
/usr/bin/ld: cannot find -lcrypto
Which if you did ld -lcrypto --verbose or ld -lssl --verbose wouldn't produce this results:
➜ src ld -lcrypto --verbose | grep succeeded
attempt to open //usr/lib/x86_64-linux-gnu/libcrypto.so succeeded
ld: warning: cannot find entry symbol _start; not setting start address
➜ src ld -lssl --verbose | grep succeeded
attempt to open //usr/lib/x86_64-linux-gnu/libssl.so succeeded
ld: warning: cannot find entry symbol _start; not setting start address
So, to fix this just make sure you have installed the libssl-dev package which provides both libraries.
I meet the similar error on MacOS but there is no "/usr/bin/ld: cannot find -lssl" for me.
Solved with the following steps:
Step 1. Make sure you have installed openssl with homebrew.
brew install openssl
Step 2. In a terminal:
export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/opt/openssl/lib/
For Linux you can also try yum install your missing library and add them to LIBRARY_PATH.
For Debian 9.x:
apt install libssl-dev
For CentOS:
sudo yum install openssl-devel

Resources