J'ai donc récemment rejoint le monde Mac et acheté un MacBook - que j'aime d'ailleurs.
J'ai du mal à installer correctement tous mes outils de développement et je ne connais pas à 100% les différences entre la CLI Linux et la CLI OSX.
En ce moment, j'essaie d'installer quelques versions différentes de Ruby via RVM.
J'ai essayé d'obtenir gcc4.2 comme je l'ai vu, mais quel que soit le compilateur que j'utilise, j'obtiens des messages similaires. En cela, j'essaie d'installer le 2.0.0-preview2, mais je reçois également les mêmes messages pour les autres versions:
$ rvm install 2.0.0-preview2
No binary rubies available for: downloads/ruby-2.0.0-preview2.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
Fetching openssl-1.0.1c.tar.gz to /usr/local/rvm/archives
Extracting openssl to /usr/local/rvm/src/openssl-1.0.1c
Configuring openssl in /usr/local/rvm/src/openssl-1.0.1c.
Error running 'env LDFLAGS=-L/opt/sm/pkg/active/lib CFLAGS=-I/opt/sm/pkg/active/include CPATH=/opt/sm/pkg/active/include ./Configure darwin64-x86_64-cc -I/usr/local/rvm/usr/include -L/usr/local/rvm/usr/lib zlib no-asm no-krb5 shared --prefix=/usr/local/rvm/usr --with-opt-dir=/usr/local/rvm/usr', please read /usr/local/rvm/log/ruby-2.0.0-preview2/openssl/configure.log
Compiling openssl in /usr/local/rvm/src/openssl-1.0.1c.
Error running 'make', please read /usr/local/rvm/log/ruby-2.0.0-preview2/openssl/make.log
Updating openssl certificates
Error running 'update_openssl_certs', please read /usr/local/rvm/log/ruby-2.0.0-preview2/openssl.certs.log
Installing Ruby from source to: /usr/local/rvm/rubies/ruby-2.0.0-preview2, this may take a while depending on your cpu(s)...
ruby-2.0.0-preview2 - #downloading ruby-2.0.0-preview2, this may take a while depending on your connection...
ruby-2.0.0-preview2 - #extracted to /usr/local/rvm/src/ruby-2.0.0-preview2 (already extracted)
ruby-2.0.0-preview2 - #configuring
Error running 'env LDFLAGS=-L/opt/sm/pkg/active/lib CFLAGS=-I/opt/sm/pkg/active/include CPATH=/opt/sm/pkg/active/include ./configure --enable-shared --disable-install-doc --prefix=/usr/local/rvm/rubies/ruby-2.0.0-preview2 --with-opt-dir=/usr/local/rvm/usr:/usr/local/rvm/usr', please read /usr/local/rvm/log/ruby-2.0.0-preview2/configure.log
There has been an error while running configure. Halting the installation.
Voici la sortie des quatre fichiers journaux mentionnés:
/usr/local/rvm/log/ruby-2.0.0-preview2/openssl/configure.log:
[2012-12-12 22:49:21] env LDFLAGS=-L/opt/sm/pkg/active/lib CFLAGS=-I/opt/sm/pkg/active/include CPATH=/opt/sm/pkg/active/include ./Configure darwin64-x86_64-cc -I/usr/local/rvm/usr/include -L/usr/local/rvm/usr/lib zlib no-asm no-krb5 shared --prefix=/usr/local/rvm/usr --with-opt-dir=/usr/local/rvm/usr
Usage: Configure [no-<cipher> ...] [enable-<cipher> ...] [experimental-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-dso] [no-krb5] [sctp] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--test-sanity] os/compiler[:flags]
/usr/local/rvm/log/ruby-2.0.0-preview2/openssl/make.log:
[2012-12-12 22:49:21] make
making all in crypto...
making all in crypto/objects...
/usr/bin/perl obj_dat.pl obj_mac.h obj_dat.h
/usr/bin/perl objxref.pl obj_mac.num obj_xref.txt > obj_xref.h
cc -I.. -I../.. -I../modes -I../asn1 -I../evp -I../../include -O -c -o obj_dat.o obj_dat.c
cc -I.. -I../.. -I../modes -I../asn1 -I../evp -I../../include -O -c -o obj_xref.o obj_xref.c
ar r ../../libcrypto.a o_names.o obj_dat.o obj_lib.o obj_err.o obj_xref.o
/usr/bin/ranlib: file: ../../libcrypto.a(ebcdic.o) has no symbols
/usr/bin/ranlib: file: ../../libcrypto.a(fips_ers.o) has no symbols
/usr/bin/ranlib ../../libcrypto.a || echo Never mind.
/usr/bin/ranlib: file: ../../libcrypto.a(ebcdic.o) has no symbols
/usr/bin/ranlib: file: ../../libcrypto.a(fips_ers.o) has no symbols
making all in crypto/md4...
make[2]: Nothing to be done for `all'.
making all in crypto/md5...
make[2]: Nothing to be done for `all'.
making all in crypto/sha...
make[2]: Nothing to be done for `all'.
making all in crypto/mdc2...
make[2]: Nothing to be done for `all'.
making all in crypto/hmac...
make[2]: Nothing to be done for `all'.
making all in crypto/ripemd...
make[2]: Nothing to be done for `all'.
making all in crypto/whrlpool...
make[2]: Nothing to be done for `all'.
making all in crypto/des...
cc -I.. -I../.. -I../modes -I../asn1 -I../evp -I../../include -O -c -o set_key.o set_key.c
set_key.c:399:17: error: unsupported inline asm: input with type 'unsigned long' matching output with type 'unsigned int'
*(k++)=ROTATE(t2,30)&0xffffffffL;
~~~~~~~^~~~~~
./des_locl.h:170:19: note: expanded from macro 'ROTATE'
: "I"(n),"0"(a) \
^
set_key.c:402:17: error: unsupported inline asm: input with type 'unsigned long' matching output with type 'unsigned int'
*(k++)=ROTATE(t2,26)&0xffffffffL;
~~~~~~~^~~~~~
./des_locl.h:170:19: note: expanded from macro 'ROTATE'
: "I"(n),"0"(a) \
^
2 errors generated.
make[2]: *** [set_key.o] Error 1
make[1]: *** [subdirs] Error 1
make: *** [build_crypto] Error 1
/usr/local/rvm/log/ruby-2.0.0-preview2/openssl.certs.log:
[2012-12-12 22:49:24] update_openssl_certs
-bash: cd: /usr/local/rvm/usr/ssl: No such file or directory
/usr/local/rvm/log/ruby-2.0.0-preview2/configure.log:
[2012-12-12 22:49:24] env LDFLAGS=-L/opt/sm/pkg/active/lib CFLAGS=-I/opt/sm/pkg/active/include CPATH=/opt/sm/pkg/active/include ./configure --enable-shared --disable-install-doc --prefix=/usr/local/rvm/rubies/ruby-2.0.0-preview2 --with-opt-dir=/usr/local/rvm/usr:/usr/local/rvm/usr
checking build system type... x86_64-apple-darwin12.2.1
checking host system type... x86_64-apple-darwin12.2.1
checking target system type... x86_64-apple-darwin12.2.1
checking whether the C compiler works... no
configure: error: in `/usr/local/rvm/src/ruby-2.0.0-preview2':
configure: error: C compiler cannot create executables
See `config.log' for more details
OpenSSL a été installé via homebrew:
$ brew info openssl
openssl: stable 1.0.1c
http://openssl.org
This formula is keg-only.
Mac OS X already provides this software and installing another version in
parallel can cause all kinds of trouble.
The OpenSSL provided by OS X is too old for some software.
/usr/local/Cellar/openssl/1.0.1c (429 files, 15M)
https://github.com/mxcl/homebrew/commits/master/Library/Formula/openssl.rb
Quelqu'un peut-il m'indiquer la bonne direction? J'ai l'impression de manquer quelque chose d'évident.
Merci d'avance.
la source
Réponses:
Résolu en réinstallant Xcode, les outils CLI, openssl (brew), autoconf (brew), automake (brew) et apple-gcc42 (brew). Après la réinstallation, j'ai couru
rvm get head
(grâce à @mpapis dans #rvm sur freenode).rvm get head
m'a donné ce qui suit:Après cela, je viens de courir:
Et tout a fonctionné :)
la source
rvm get head
plus tôt, j'aurais peut-être évité d'installer / réinstaller certains des packages.rvm get head
suivibrew update
etbrew install ...
(tas de paquets manquants) a fait l'affaire pour moi.J'ai eu des problèmes similaires et il s'est avéré que je n'avais pas installé de paquets, principalement ceux-ci:
llvm-3.2 est le compilateur gcc, je crois, était le principal problème car openssl n'a pas pu exécuter ./Configure et Make.
Vérifiez si ceux-ci sont installés en premier et peut-être que cela vous aidera avant de devoir tout réinstaller. Cela m'a pris 2 jours pour que Ruby 2.0.0 / Rails 3.1.1 fonctionne, j'espère que cela aide quelqu'un.
la source