I'm trying to install rvm and ruby. I've got rvm installed, but whenever I run rvm install x it fails. I look in make.log and I see the following:
[2020-08-07 15:49:26] __rvm_make
__rvm_make ()
{
\make "$#" || return $?
}
current path: /Users/hine/.rvm/src/ruby-2.6.5
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/hine/.cargo/bin:/Users/hine/google-cloud-sdk/bin:/usr/local/opt/ruby/bin:/Users/hine/.fastlane/bin:/Users/hine/.nvm/versions/node/v8.10.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/mysql/bin:/Users/hine/istio-1.0.2/bin:/Users/hine/.rvm/bin
command(2): __rvm_make -j4
++ make -j4
BASERUBY = /usr/local/opt/ruby/bin/ruby --disable=gems
CC = gcc
LD = ld
LDSHARED = gcc -dynamiclib
CFLAGS = -O3 -ggdb3 -Wall -Wextra -Wdeclaration-after-statement -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -fno-common -pipe
XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-strict-overflow -fvisibility=hidden -DRUBY_EXPORT -DCANONICALIZATION_FOR_MATHN
CPPFLAGS = -I/usr/local/opt/libyaml/include -I/usr/local/opt/libksba/include -I/usr/local/opt/readline/include -I/usr/local/opt/zlib/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-darwin18 -I./include -I. -I./enc/unicode/12.1.0
DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -L/usr/local/opt/libyaml/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/zlib/lib -L/usr/local/opt/openssl#1.1/lib -install_name /Users/hine/.rvm/rubies/ruby-2.6.5/lib/libruby.2.6.dylib -compatibility_version 2.6 -current_version 2.6.5 -fstack-protector-strong -framework Security -framework Foundation -fstack-protector-strong -framework Security -framework Foundation
SOLIBS = -lpthread -lgmp -ldl -lobjc
LANG = en_US.UTF-8
LC_ALL =
LC_CTYPE =
Configured with: --prefix=/Users/hine/Downloads/Xcode 10.2.app/Contents/Developer/usr --with-gxx-include-dir=/Users/hine/Downloads/Xcode 10.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1
Apple LLVM version 10.0.1 (clang-1001.0.46.3)
Target: x86_64-apple-darwin18.7.0
Thread model: posix
InstalledDir: /Users/hine/Downloads/Xcode 10.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
compiling ./main.c
compiling dmydln.c
compiling miniinit.c
compiling dmyext.c
compiling miniprelude.c
translating probes probes.d
compiling ast.c
compiling bignum.c
. ./vm_opts.h
compiling class.c
compiling compar.c
compiling compile.c
compiling complex.c
compiling cont.c
compiling debug.c
compiling debug_counter.c
compiling dir.c
compiling dln_find.c
compiling encoding.c
compiling enum.c
compiling enumerator.c
compiling error.c
compiling eval.c
compiling file.c
compiling gc.c
compiling hash.c
compiling inits.c
compiling io.c
compiling iseq.c
compiling load.c
compiling marshal.c
compiling math.c
making mjit_config.h
compiling mjit_compile.c
compiling node.c
compiling numeric.c
compiling object.c
compiling pack.c
compiling parse.c
compiling proc.c
compiling process.c
compiling random.c
compiling range.c
compiling rational.c
compiling re.c
compiling regcomp.c
compiling regenc.c
compiling regerror.c
compiling regexec.c
compiling regparse.c
compiling regsyntax.c
compiling ruby.c
compiling safe.c
compiling signal.c
compiling sprintf.c
compiling st.c
compiling strftime.c
compiling string.c
compiling struct.c
compiling symbol.c
compiling thread.c
compiling time.c
compiling transcode.c
compiling transient_heap.c
compiling util.c
compiling variable.c
./revision.h unchanged
compiling vm.c
compiling vm_backtrace.c
compiling vm_dump.c
compiling vm_trace.c
compiling ./missing/explicit_bzero.c
compiling ./missing/setproctitle.c
compiling addr2line.c
compiling dmyenc.c
config.status: creating ruby-runner.h
compiling dln.c
compiling localeinit.c
compiling prelude.c
compiling array.c
compiling mjit.c
assembling coroutine/amd64/Context.S
compiling enc/ascii.c
compiling enc/us_ascii.c
compiling enc/unicode.c
compiling enc/utf_8.c
compiling enc/trans/newline.c
compiling version.c
building rb_mjit_header.h
linking miniruby
rb_mjit_header.h updated
generating encdb.h
building .ext/include/x86_64-darwin18/rb_mjit_min_header-2.6.5.h
./miniruby -I./lib -I. -I.ext/common ./tool/transform_mjit_header.rb "gcc " rb_mjit_header.h .ext/include/x86_64-darwin18/rb_mjit_min_header-2.6.5.h
encdb.h updated
./tool/ifchange "--timestamp=.rbconfig.time" rbconfig.rb rbconfig.tmp
rbconfig.rb updated
generating enc.mk
creating verconf.h
verconf.h updated
compiling loadpath.c
making srcs under enc
/bin/sh: /Users/hine/Downloads/Xcode: No such file or directory
make: *** [srcs-enc] Error 127
make: *** Waiting for unfinished jobs....
Transforming external functions to static:
transform_mjit_header: making external definition of 'Init_vm_stack_canary' static inline
transform_mjit_header: making external definition of 'rb_vm_opt_struct_aset' static inline
transform_mjit_header: making external definition of 'rb_vm_opt_struct_aref' static inline
transform_mjit_header: making external definition of 'rb_eql_opt' static inline
transform_mjit_header: changing definition of 'rb_equal_opt' to declaration
transform_mjit_header: changing definition of 'rb_vm_search_method_slowpath' to declaration
transform_mjit_header: making external definition of 'rb_vm_rewrite_cref' static inline
transform_mjit_header: making external definition of 'rb_vm_push_frame' static inline
transform_mjit_header: making external definition of 'rb_vm_block_ep_update' static inline
transform_mjit_header: making external definition of 'rb_vm_cref_new_toplevel' static inline
transform_mjit_header: making external definition of 'rb_vm_frame_block_handler' static inline
transform_mjit_header: making external definition of 'rb_vm_ep_local_ep' static inline
transform_mjit_header: making declaration of 'rb_vm_rewrite_cref' static inline
transform_mjit_header: making declaration of 'rb_vm_frame_block_handler' static inline
transform_mjit_header: making declaration of 'rb_vm_block_ep_update' static inline
transform_mjit_header: making declaration of 'rb_vm_ep_local_ep' static inline
transform_mjit_header: SKIPPED to transform __sigbits
transform_mjit_header: making declaration of 'Init_vm_stack_canary' static inline
transform_mjit_header: making declaration of 'rb_eql_opt' static inline
transform_mjit_header: SKIPPED to transform __sincospi
transform_mjit_header: SKIPPED to transform __sincospif
transform_mjit_header: SKIPPED to transform __sincos
transform_mjit_header: SKIPPED to transform __sincosf
transform_mjit_header: SKIPPED to transform __inline_isnormall
transform_mjit_header: SKIPPED to transform __inline_isnormald
transform_mjit_header: SKIPPED to transform __inline_isnormalf
transform_mjit_header: SKIPPED to transform __inline_signbitl
transform_mjit_header: SKIPPED to transform __inline_signbitd
transform_mjit_header: SKIPPED to transform __inline_signbitf
transform_mjit_header: SKIPPED to transform __inline_isnanl
transform_mjit_header: SKIPPED to transform __inline_isnand
transform_mjit_header: SKIPPED to transform __inline_isnanf
transform_mjit_header: SKIPPED to transform __inline_isinfl
transform_mjit_header: SKIPPED to transform __inline_isinfd
transform_mjit_header: SKIPPED to transform __inline_isinff
transform_mjit_header: SKIPPED to transform __inline_isfinitel
transform_mjit_header: SKIPPED to transform __inline_isfinited
transform_mjit_header: SKIPPED to transform __inline_isfinitef
transform_mjit_header: SKIPPED to transform __sputc
ln -sf ../../../.ext/include/x86_64-darwin18/rb_mjit_min_header-2.6.5.h include/ruby-2.6.0/x86_64-darwin18/rb_mjit_min_header-2.6.5.h
++ return 2
tl;dir:
/bin/sh: /Users/hine/Downloads/Xcode: No such file or directory
make: *** [srcs-enc] Error 127
So this is correct that Xcode is not at Downloads/Xcode. It's actually at Downloads/Xcode 10.2.
How do I make rvm know that?
Related
I'm trying to convert this simple makefile into a CMakeLists.txt. I'm specifically struggling with the flags.
SOURCE = triangle.cpp shader.cpp
CC = g++
CFLAGS = -Wall -Wextra -pedantic -framework OpenGL -framework GLUT -lGLEW -lglfw
OBJECT = window
default:
$(CC) -o $(OBJECT) $(SOURCE) $(CFLAGS)
clean:
rm -f $(OBJECT)
Here's my CMakeLists.txt:
cmake_minimum_required(VERSION 3.0)
project(Graphics)
set(CMAKE_CXX_FLAGS "-Wall -Wextra -pedantic -framework OpenGL -framework GLUT -lGLEW -lglfw")
#add_definitions(${CMAKE_CXX_FLAGS})
add_executable(
trtangle
triangle.cpp
)
Here's the error message I get:
Scanning dependencies of target triangle
[ 50%] Building CXX object CMakeFiles/triangle.dir/triangle.cpp.o
clang: warning: -framework OpenGL: 'linker' input unused [-Wunused command-line-argument]
clang: warning: -framework GLUT: 'linker' input unused [-Wunused-command-line-argument]
clang: warning: -lGLEW: 'linker' input unused [-Wunused-command-line-argument]
clang: warning: -lglfw: 'linker' input unused [-Wunused-command-line-argument]
/Users/neilculbertson/Desktop/OpenGL/triangle.cpp:2:10: fatal error: 'GL/glew.h' file not found
#include <GL/glew.h>
^~~~~~~~~~~
1 error generated.
make[2]: *** [CMakeFiles/triangle.dir/triangle.cpp.o] Error 1
make[1]: *** [CMakeFiles/triangle.dir/all] Error 2
make: *** [all] Error 2
I've also tried setting CMAKE_C_FLAGS But still no luck. Keep in mind when I use the makefile alone, everything compiles and works perfectly. I'm wondering if it's a GL error? or maybe I installed GLEW weirdly?
cmake
cmake_minimum_required(VERSION 3.0) # This line is required
project(triangle) # This line is required
make
CC = g++
CFLAGS = -Wall -Wextra -pedantic -framework OpenGL -framework GLUT -lGLEW -lglfw
cmake
set(CMAKE_CXX_FLAGS "-Wall -Wextra -pedantic -framework OpenGL -framework GLUT -lGLEW -lglfw")
make
SOURCE = triangle.cpp shader.cpp
default:
$(CC) -o $(OBJECT) $(SOURCE) $(CFLAGS)
cmake
# The name of the result and all required sources
add_executable(triangle triangle.cpp shader.cpp)
# These libraries are required
find_package(OpenGL REQUIRED)
find_package(GLEW REQUIRED)
find_package(glfw3 3.0 REQUIRED)
# ... and the path to the header files and so files
target_include_directories(triangle ${OPENGL_INCLUDE_DIRS} ${GLEW_INCLUDE_DIRS})
target_link_libraries(triangle ${OPENGL_LIBRARIES} ${GLEW_LIBRARIES} glfw3)
Other possibility is to collect all sources within a list at first.
set(SOURCES triangle.cpp shader.cpp)
add_executable(triangle ${SOURCES)
make
OBJECT = window
cmake
Not necessary
make
clean:
rm -f $(OBJECT)
cmake
This is built in.
cmake_minimum_required(VERSION 3.0)
project(Graphics)
add_executable(
trtangle
triangle.cpp
)
target_compile_options(trtangle PRIVATE -Wall -Wextra -pedantic)
find_package(OpenGL REQUIRED)
find_package(GLEW REQUIRED)
find_package(glfw3 3.3 REQUIRED)
target_include_directories(trtangle ${OPENGL_INCLUDE_DIRS} ${GLEW_INCLUDE_DIRS})
target_link_libraries(trtangle ${OPENGL_LIBRARIES} ${GLEW_LIBRARIES} glfw)
I am trying to build my root file system by referring to
http://emreboy.wordpress.com/2012/12/20/building-a-root-file-system-using-busybox/comment-page-1/
The change I did was (arm-linux-gnueabi- in place of arm-linux-)
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- defconfig
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- menuconfig
$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- install
It fails on this step(partial error log). Please advise
CC util-linux/volume_id/volume_id.o
CC util-linux/volume_id/xfs.o
AR util-linux/volume_id/lib.a
LINK busybox_unstripped
Trying libraries: crypt m
Failed: -Wl,--start-group -lcrypt -lm -Wl,--end-group
Output of:
arm-linux-gnueabi-gcc -Wall -Wshadow -Wwrite-strings -Wundef -Wstrict-prototypes -Wunused -Wunused-parameter -Wunused-function -Wunused-value -Wmissing-prototypes -Wmissing-declarations -Wdeclaration-after-statement -Wold-style-definition -fno-builtin-strlen -finline-limit=0 -fomit-frame-pointer -ffunction-sections -fdata-sections -fno-guess-branch-probability -funsigned-char -static-libgcc -falign-functions=1 -falign-jumps=1 -falign-labels=1 -falign-loops=1 -Os -static -o busybox_unstripped -Wl,--sort-common -Wl,--sort-section,alignment -Wl,--start-group applets/built-in.o archival/lib.a archival/libarchive/lib.a console-tools/lib.a coreutils/lib.a coreutils/libcoreutils/lib.a debianutils/lib.a e2fsprogs/lib.a editors/lib.a findutils/lib.a init/lib.a libbb/lib.a libpwdgrp/lib.a loginutils/lib.a mailutils/lib.a miscutils/lib.a modutils/lib.a networking/lib.a networking/libiproute/lib.a networking/udhcp/lib.a printutils/lib.a procps/lib.a runit/lib.a selinux/lib.a shell/lib.a sysklogd/lib.a util-linux/lib.a util-linux/volume_id/lib.a archival/built-in.o archival/libarchive/built-in.o console-tools/built-in.o coreutils/built-in.o coreutils/libcoreutils/built-in.o debianutils/built-in.o e2fsprogs/built-in.o editors/built-in.o findutils/built-in.o init/built-in.o libbb/built-in.o libpwdgrp/built-in.o loginutils/built-in.o mailutils/built-in.o miscutils/built-in.o modutils/built-in.o networking/built-in.o networking/libiproute/built-in.o networking/udhcp/built-in.o printutils/built-in.o procps/built-in.o runit/built-in.o selinux/built-in.o shell/built-in.o sysklogd/built-in.o util-linux/built-in.o util-linux/volume_id/built-in.o -Wl,--end-group -Wl,--start-group -lcrypt -lm -Wl,--end-group
==========
debianutils/lib.a(mktemp.o): In function `mktemp_main':
mktemp.c:(.text.mktemp_main+0x70): warning: the use of `tempnam' is dangerous, better use `mkstemp'
networking/lib.a(nslookup.o): In function `print_host':
nslookup.c:(.text.print_host+0x24): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
networking/lib.a(ipcalc.o): In function `ipcalc_main':
ipcalc.c:(.text.ipcalc_main+0x15c): warning: Using 'gethostbyaddr' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
libbb/lib.a(inet_common.o): In function `INET_resolve':
inet_common.c:(.text.INET_resolve+0x32): warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
networking/lib.a(inetd.o): In function `reread_config_file':
inetd.c:(.text.reread_config_file+0x546): warning: Using 'getservbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
networking/lib.a(netstat.o): In function `ip_port_str':
netstat.c:(.text.ip_port_str+0x28): warning: Using 'getservbyport' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
networking/lib.a(inetd.o): In function `reread_config_file':
inetd.c:(.text.reread_config_file+0x4e4): warning: Using 'getrpcbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
networking/lib.a(inetd.o): In function `unregister_rpc':
inetd.c:(.text.unregister_rpc+0xc): undefined reference to `pmap_unset'
networking/lib.a(inetd.o): In function `register_rpc':
inetd.c:(.text.register_rpc+0x30): undefined reference to `pmap_unset'
inetd.c:(.text.register_rpc+0x46): undefined reference to `pmap_set'
networking/lib.a(inetd.o): In function `prepare_socket_fd':
inetd.c:(.text.prepare_socket_fd+0x52): undefined reference to `bindresvport'
collect2: ld returned 1 exit status
make: *** [busybox_unstripped] Error 1
With the help from vinay hunachyal the answer is as follows
use latest stable busybox code
use the same tool chain (arm-none-linux-gnueabi-gcc) for all the steps (not as the one actually given on the blog)
I am trying to install Ruby using RVM in Mountain Lion and keep on getting errors while running make, even when I do so with gcc=clang (as is the recommended solution on other posts). I have XCode updated with command line utilities installed.
The make.log reads
[2013-02-18 17:37:00] make
CC = clang
LD = ld
LDSHARED = clang -dynamic -bundle
CFLAGS = -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=shorten-64-to-32 -Werror=implicit-function-declaration -pipe
XCFLAGS = -include ruby/config.h -include ruby/missing.h -fvisibility=hidden -DRUBY_EXPORT
CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/Users/maraaverick/.rvm/usr/include -I. -I.ext/include/x86_64-darwin12.2.0 -I./include -I.
DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -Wl,-flat_namespace
SOLIBS =
compiling main.c
compiling dmydln.c
compiling dmyencoding.c
compiling version.c
compiling dmyversion.c
compiling miniprelude.c
compiling array.c
compiling bignum.c
bignum.c:2732:26: warning: while loop has empty body [-Wempty-body]
while (--ny && !zds[ny]); ++ny;
^
bignum.c:2732:26: note: put the semicolon on a separate line to silence this warning
1 warning generated.
compiling class.c
compiling compar.c
compiling complex.c
compiling dir.c
compiling dln_find.c
compiling enum.c
compiling enumerator.c
compiling error.c
compiling eval.c
compiling load.c
compiling proc.c
compiling file.c
compiling gc.c
gc.c:3060:1: warning: unused function 'chain_finalized_object' [-Wunused-function]
chain_finalized_object(st_data_t key, st_data_t val, st_data_t arg)
^
1 warning generated.
compiling hash.c
compiling inits.c
compiling io.c
compiling marshal.c
compiling math.c
compiling node.c
compiling numeric.c
compiling object.c
compiling pack.c
compiling parse.c
compiling process.c
compiling random.c
compiling range.c
compiling rational.c
compiling re.c
compiling regcomp.c
compiling regenc.c
compiling regerror.c
compiling regexec.c
compiling regparse.c
regparse.c:582:15: error: implicit conversion loses integer precision: 'st_index_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
return t->num_entries;
~~~~~~ ~~~^~~~~~~~~~~
1 error generated.
make: *** [regparse.o] Error 1
The same is true when I do not specify gcc, and when I try to install with openssl and a standalone gcc package as per the recommendations here
rvm install 1.9.3 --with-openssl-dir=$rvm_path/usr
Although when I tried to specify my local gcc I am told it's not in my path:
$ CC=/opt/local/bin/gcc-apple-4.2 rvm install ruby-1.9.3-p194 --enable-shared --without-tk --without-tcl
You requested building with '/opt/local/bin/gcc-apple-4.2' but it is not in your path.
Any help would be much appreciated. Thanks very much.
you are using clang here is better explanation of the problem https://stackoverflow.com/a/14594287/497756 and here is improved process (not yet on rvm head): https://stackoverflow.com/a/14940278/497756
This is my first time using Ruby. I became aware not to use sudo to install Gems so I followed this tutotrial (http://pragmaticstudio.com/blog/2010/9/23/install-rails-ruby-mac) to install RVM so that I could update my version of Ruby and then install Middleman (http://middlemanapp.com/).
RVM installation worked, but when installing Ruby 1.9.3 at the '#compiling' stage I get the following error:
Error running 'make', please read
/Users/Mark/.rvm/log/ruby-1.9.3-p385/make.log There has been an error
while running make. Halting the installation.
I opened the log file and unlike a lot of other issues I've seen, the file doesn't contain references to 'readline' but to 'compiling' which I assume relates to the '#compiling' stage of the Ruby install. Below is the output to make.log:
[2013-02-12 09:04:26] make
CC = clang
LD = ld
LDSHARED = clang -dynamic -bundle
CFLAGS = -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=shorten-64-to-32 -Werror=implicit-function-declaration -pipe
XCFLAGS = -include ruby/config.h -include ruby/missing.h -fvisibility=hidden -DRUBY_EXPORT
CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/Users/Mark/.rvm/usr/include -I. -I.ext/include/x86_64-darwin12.2.0 -I./include -I.
DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -Wl,-flat_namespace
SOLIBS =
compiling main.c
compiling dmydln.c
compiling dmyencoding.c
compiling version.c
compiling dmyversion.c
compiling miniprelude.c
compiling array.c
compiling bignum.c
bignum.c:2732:26: warning: while loop has empty body [-Wempty-body]
while (--ny && !zds[ny]); ++ny;
^
bignum.c:2732:26: note: put the semicolon on a separate line to silence this warning
1 warning generated.
compiling class.c
compiling compar.c
compiling complex.c
compiling dir.c
compiling dln_find.c
compiling enum.c
compiling enumerator.c
compiling error.c
compiling eval.c
compiling load.c
compiling proc.c
compiling file.c
compiling gc.c
gc.c:3060:1: warning: unused function 'chain_finalized_object' [-Wunused-function]
chain_finalized_object(st_data_t key, st_data_t val, st_data_t arg)
^
1 warning generated.
compiling hash.c
compiling inits.c
compiling io.c
compiling marshal.c
compiling math.c
compiling node.c
compiling numeric.c
compiling object.c
compiling pack.c
compiling parse.c
compiling process.c
compiling random.c
compiling range.c
compiling rational.c
compiling re.c
compiling regcomp.c
compiling regenc.c
compiling regerror.c
compiling regexec.c
compiling regparse.c
regparse.c:582:15: error: implicit conversion loses integer precision: 'st_index_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
return t->num_entries;
~~~~~~ ~~~^~~~~~~~~~~
1 error generated.
make: *** [regparse.o] Error 1
If I run 'make --version' I get the following output:
GNU Make 3.81 Copyright (C) 2006 Free Software Foundation, Inc. This
is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
This program built for i386-apple-darwin11.3.0
I'm struggling to find an exact matching issue, so if anyone could help that would be great.
Cheers,
Mark.
I followed some of the advice here and in other posts linked and Googled, but in the end, updating GCC via Homebrew is what finally got the Ruby installation to complile and complete.
Specific link I used for updating GCC: Installing Ruby on Mac OS X 10.8.2
So thanks for all the help, I can't be sure if it was a combination of all the updates and cleanup as well as GCC or just GCC, but I'm up and running.
Although you don't see the error it is in fact caused by readline. As mentioned by atmosx I'd remove the default MAC OS X install of ruby and follow the process from the beginning.
Or following this https://rvm.io/packages/readline/ to help resolve readline. Also for reference look at this previous question: Error running make when installing Ruby 1.8.7-p302 via RVM on Mac OS 10.5.8
So complete steps are:
rvm pkg install readline
rvm remove 1.8.7
rvm cleanup all
rvm install 1.8.7 -C –with-readline-dir=$rvm_path/usr
Thanks to Andrew at http://anlek.com/2011/01/rvm-install-1-8-7-p330-fails/ for the pointer.
I've been having some problems installing Ruby 1.9.3 (or any version after 1.8.7 for that matter).
See below for error log:
[2012-10-26 19:26:24] make
CC = clang
LD = ld
LDSHARED = clang -dynamiclib
CFLAGS = -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=shorten-64-to-32 -Werror=implicit-function-declaration -I/Users/username/.rvm/usr/include -fno-common -pipe
XCFLAGS = -include ruby/config.h -include ruby/missing.h -fvisibility=hidden -DRUBY_EXPORT
CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I. -I.ext/include/x86_64-darwin10.8.0 -I./include -I.
DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -Wl,-flat_namespace -install_name /Users/username/.rvm/rubies/ruby-1.9.3-p286/lib/libruby.1.9.1.dylib -current_version 1.9.1 -compatibility_version 1.9.1 -Wl,-unexported_symbol,_Init_* -Wl,-unexported_symbol,*_threadptr_* -Wl,-u,_objc_msgSend
SOLIBS =
compiling main.c
compiling dmydln.c
compiling dmyencoding.c
compiling version.c
compiling dmyversion.c
compiling miniprelude.c
compiling array.c
compiling bignum.c
compiling class.c
compiling compar.c
compiling complex.c
compiling dir.c
compiling dln_find.c
compiling enum.c
compiling enumerator.c
compiling error.c
compiling eval.c
compiling load.c
compiling proc.c
compiling file.c
compiling gc.c
compiling hash.c
compiling inits.c
compiling io.c
compiling marshal.c
compiling math.c
compiling node.c
compiling numeric.c
compiling object.c
compiling pack.c
compiling parse.c
compiling process.c
compiling random.c
compiling range.c
compiling rational.c
compiling re.c
compiling regcomp.c
compiling regenc.c
compiling regerror.c
compiling regexec.c
compiling regparse.c
compiling regsyntax.c
compiling ruby.c
compiling safe.c
compiling signal.c
compiling sprintf.c
compiling st.c
compiling strftime.c
compiling string.c
compiling struct.c
compiling time.c
compiling transcode.c
compiling util.c
compiling variable.c
compiling compile.c
compiling debug.c
compiling iseq.c
compiling vm.c
In file included from vm.c:25:
In file included from ./vm_exec.c:106:
insns.def:634:9: warning: explicitly assigning a variable of type 'VALUE' (aka 'unsigned long') to itself [-Wself-assign]
val = val;
~~~ ^ ~~~
In file included from vm.c:27:
./vm_method.c:102:85: warning: unused variable 'prev_ume' [-Wunused-variable]
struct unlinked_method_entry_list_entry *ume = vm->unlinked_method_entry_list, *prev_ume = 0, *curr_ume;
^
./vm_method.c:102:100: warning: unused variable 'curr_ume' [-Wunused-variable]
struct unlinked_method_entry_list_entry *ume = vm->unlinked_method_entry_list, *prev_ume = 0, *curr_ume;
^
3 warnings generated.
compiling vm_dump.c
compiling thread.c
compiling cont.c
compiling ./enc/ascii.c
compiling ./enc/us_ascii.c
compiling ./enc/unicode.c
compiling ./enc/utf_8.c
compiling newline.c
compiling ./missing/setproctitle.c
linking miniruby
rbconfig.rb updated
generating enc.mk
compiling dln.c
compiling encoding.c
generating prelude.c
compiling prelude.c
linking static-library libruby.1.9.1-static.a
linking shared-library libruby.1.9.1.dylib
generating encdb.h
encdb.h unchanged
making enc
compiling ./enc/encdb.c
linking encoding encdb.bundle
compiling ./enc/big5.c
linking encoding big5.bundle
compiling ./enc/cp949.c
linking encoding cp949.bundle
compiling ./enc/emacs_mule.c
linking encoding emacs_mule.bundle
compiling ./enc/euc_jp.c
linking encoding euc_jp.bundle
compiling ./enc/euc_kr.c
linking encoding euc_kr.bundle
compiling ./enc/euc_tw.c
linking encoding euc_tw.bundle
compiling ./enc/gb2312.c
linking encoding gb2312.bundle
compiling ./enc/gb18030.c
linking encoding gb18030.bundle
compiling ./enc/gbk.c
linking encoding gbk.bundle
compiling ./enc/iso_8859_1.c
linking encoding iso_8859_1.bundle
compiling ./enc/iso_8859_2.c
linking encoding iso_8859_2.bundle
compiling ./enc/iso_8859_3.c
linking encoding iso_8859_3.bundle
compiling ./enc/iso_8859_4.c
linking encoding iso_8859_4.bundle
compiling ./enc/iso_8859_5.c
linking encoding iso_8859_5.bundle
compiling ./enc/iso_8859_6.c
linking encoding iso_8859_6.bundle
compiling ./enc/iso_8859_7.c
linking encoding iso_8859_7.bundle
compiling ./enc/iso_8859_8.c
linking encoding iso_8859_8.bundle
compiling ./enc/iso_8859_9.c
linking encoding iso_8859_9.bundle
compiling ./enc/iso_8859_10.c
linking encoding iso_8859_10.bundle
compiling ./enc/iso_8859_11.c
linking encoding iso_8859_11.bundle
compiling ./enc/iso_8859_13.c
linking encoding iso_8859_13.bundle
compiling ./enc/iso_8859_14.c
linking encoding iso_8859_14.bundle
compiling ./enc/iso_8859_15.c
linking encoding iso_8859_15.bundle
compiling ./enc/iso_8859_16.c
linking encoding iso_8859_16.bundle
compiling ./enc/koi8_r.c
linking encoding koi8_r.bundle
compiling ./enc/koi8_u.c
linking encoding koi8_u.bundle
compiling ./enc/shift_jis.c
linking encoding shift_jis.bundle
compiling ./enc/utf_16be.c
linking encoding utf_16be.bundle
compiling ./enc/utf_16le.c
linking encoding utf_16le.bundle
compiling ./enc/utf_32be.c
linking encoding utf_32be.bundle
compiling ./enc/utf_32le.c
linking encoding utf_32le.bundle
compiling ./enc/windows_1251.c
linking encoding windows_1251.bundle
making srcs under enc
make[1]: Nothing to be done for `srcs'.
generating transdb.h
transdb.h unchanged
making trans
compiling ./enc/trans/transdb.c
linking transcoder transdb.bundle
compiling ./enc/trans/big5.c
linking transcoder big5.bundle
compiling ./enc/trans/chinese.c
linking transcoder chinese.bundle
compiling ./enc/trans/emoji.c
linking transcoder emoji.bundle
compiling ./enc/trans/emoji_iso2022_kddi.c
linking transcoder emoji_iso2022_kddi.bundle
compiling ./enc/trans/emoji_sjis_docomo.c
linking transcoder emoji_sjis_docomo.bundle
compiling ./enc/trans/emoji_sjis_kddi.c
linking transcoder emoji_sjis_kddi.bundle
compiling ./enc/trans/emoji_sjis_softbank.c
linking transcoder emoji_sjis_softbank.bundle
compiling ./enc/trans/escape.c
linking transcoder escape.bundle
compiling ./enc/trans/gb18030.c
linking transcoder gb18030.bundle
compiling ./enc/trans/gbk.c
linking transcoder gbk.bundle
compiling ./enc/trans/iso2022.c
linking transcoder iso2022.bundle
compiling ./enc/trans/japanese.c
linking transcoder japanese.bundle
compiling ./enc/trans/japanese_euc.c
linking transcoder japanese_euc.bundle
compiling ./enc/trans/japanese_sjis.c
linking transcoder japanese_sjis.bundle
compiling ./enc/trans/korean.c
linking transcoder korean.bundle
compiling ./enc/trans/single_byte.c
linking transcoder single_byte.bundle
compiling ./enc/trans/utf8_mac.c
linking transcoder utf8_mac.bundle
compiling ./enc/trans/utf_16_32.c
linking transcoder utf_16_32.bundle
making encs
configuring -test-/add_suffix
configuring -test-/array/resize
configuring -test-/bug-3571
configuring -test-/bug-3662
configuring -test-/funcall
configuring -test-/load/dot.dot
configuring -test-/old_thread_select
configuring -test-/st/numhash
configuring -test-/string
configuring -test-/wait_for_single_fd
configuring -test-/win32/dln
Failed to configure -test-/win32/dln. It will not be installed.
configuring -test-/win32/fd_setsize
Failed to configure -test-/win32/fd_setsize. It will not be installed.
configuring bigdecimal
configuring continuation
configuring coverage
configuring curses
configuring date
configuring dbm
configuring digest
configuring digest/bubblebabble
configuring digest/md5
configuring digest/rmd160
configuring digest/sha1
configuring digest/sha2
configuring dl
configuring dl/callback
configuring dl/win32
Failed to configure dl/win32. It will not be installed.
configuring etc
configuring fcntl
configuring fiber
configuring fiddle
configuring gdbm
Failed to configure gdbm. It will not be installed.
configuring iconv
configuring io/console
configuring io/nonblock
configuring io/wait
configuring json
configuring json/generator
configuring json/parser
configuring mathn/complex
configuring mathn/rational
configuring nkf
configuring objspace
configuring openssl
configuring pathname
configuring psych
configuring pty
configuring racc/cparse
configuring readline
configuring ripper
configuring sdbm
configuring socket
configuring stringio
configuring strscan
configuring syck
configuring syslog
configuring tk
check functions.........
check struct members..
check libraries....
Use ActiveTcl libraries (if available).
Search tclConfig.sh and tkConfig.sh....................................
Valid [tclConfig.sh, tkConfig.sh] are found in [["/System/Library/Frameworks/Tcl.framework", "/System/Library/Frameworks/Tk.framework"], ["/usr/lib", "/usr/lib"], ["/System/Library/Frameworks/Tcl.framework/Versions/Current", "/System/Library/Frameworks/Tk.framework/Versions/Current"], ["/System/Library/Frameworks/Tcl.framework/Versions/8.5", "/System/Library/Frameworks/Tk.framework/Versions/8.5"], ["/System/Library/Frameworks/Tcl.framework/Versions/8.4", "/System/Library/Frameworks/Tk.framework/Versions/8.4"]]
Use [tclConfig.sh, tkConfig.sh] == ["/System/Library/Frameworks/Tcl.framework/tclConfig.sh", "/System/Library/Frameworks/Tk.framework/tkConfig.sh"]
Use MacOS X Frameworks.
Find Tcl/Tk libraries. Make tcltklib.so which is required by Ruby/Tk.
configuring tk/tkutil
configuring win32ole
Failed to configure win32ole. It will not be installed.
configuring zlib
Failed to configure zlib. It will not be installed.
linking shared-object -test-/add_suffix/bug.bundle
installing default bug libraries
compiling resize.c
linking shared-object -test-/array/resize.bundle
installing default resize libraries
compiling bug.c
linking shared-object -test-/bug-3571/bug.bundle
installing default bug libraries
compiling bug.c
linking shared-object -test-/bug-3662/bug.bundle
installing default bug libraries
compiling passing_block.c
linking shared-object -test-/funcall/funcall.bundle
installing default funcall libraries
compiling dot.dot.c
linking shared-object -test-/load/dot.dot/dot.dot.bundle
installing default dot.dot libraries
linking shared-object -test-/old_thread_select/old_thread_select.bundle
installing default old_thread_select libraries
compiling numhash.c
linking shared-object -test-/st/numhash.bundle
installing default numhash libraries
compiling cstr.c
compiling ellipsize.c
compiling enc_associate.c
compiling init.c
compiling modify.c
compiling set_len.c
linking shared-object -test-/string/string.bundle
installing default string libraries
linking shared-object -test-/wait_for_single_fd/wait_for_single_fd.bundle
installing default wait_for_single_fd libraries
make[2]: Nothing to be done for `all'.
make[2]: Nothing to be done for `all'.
linking shared-object bigdecimal.bundle
installing default bigdecimal libraries
compiling continuation.c
linking shared-object continuation.bundle
installing default continuation libraries
compiling coverage.c
linking shared-object coverage.bundle
installing default coverage libraries
compiling curses.c
linking shared-object curses.bundle
installing default curses libraries
linking shared-object date_core.bundle
installing default date_core libraries
compiling dbm.c
dbm.c:818:16: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Wsign-compare]
if (val.dsize == (int)RSTRING_LEN(valstr) &&
~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~
1 warning generated.
linking shared-object dbm.bundle
installing default dbm libraries
compiling digest.c
linking shared-object digest.bundle
installing digest libraries
installing default digest libraries
compiling bubblebabble.c
linking shared-object digest/bubblebabble.bundle
installing default bubblebabble libraries
compiling md5init.c
linking shared-object digest/md5.bundle
ld: warning: ignoring file /usr/local/lib/libz.dylib, file was built for unsupported file format which is not the architecture being linked (x86_64)
ld: in /usr/local/lib/libz.1.dylib, file was built for unsupported file format which is not the architecture being linked (x86_64) for architecture
x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [../../../.ext/x86_64-darwin10.8.0/digest/md5.bundle] Error 1
make[1]: *** [ext/digest/md5/all] Error 2
make: *** [build-ext] Error 2
I'm trying to install through RVM but just installing Ruby from source isn't helping. I can't seem to figure out what's going on. I tried appending --with-gcc=clang and env ARCHFLAGS="-arch x86_64"
Any advice is much appreciated! Thanks.
You have an incompatibly-built version of libz installed in /usr/local/lib, perhaps from Homebrew, probably a 32-bit only version where now you need a 64-bit or universal version. You could just delete it at the risk of breaking something else you have installed or you could update it. A safer option: temporarily mv it to another location before you install ruby and then mv it back. You shouldn't need it as OS X supplies a version of libz.