Error installing ruby 1.9.3 on Snow Leopard - ruby

I tried installing ruby 1.9.3 on Snow Leopard using:
rvm install 1.9.3 --with-gcc=clang
After installing the gcc compiler (I am running xcode 4.2). But I am getting the following make error:
/usr/bin/gcc-4.2 -dynamic -bundle -o ../../.ext/x86_64-darwin10.8.0/tcltklib.bundle stubs.o tcltklib.o -L. -L../.. -L/$
ld: in /usr/local/lib/libgcc_s.1.dylib, missing required architecture x86_64 in file for architecture x86_64
collect2: ld returned 1 exit status
make[1]: *** [../../.ext/x86_64-darwin10.8.0/tcltklib.bundle] Error 1
make: *** [mkmain.sh] Error 1

/usr/bin/gcc-4.2 is not provided in Xcode 4.2 this file might be left by older installation, try:
rvm install 1.9.3 --with-gcc=clang
Also it could be solved by uninstalling Xcode with:
/Library/Developer/Shared/uninstall-devtools
rm -rf /Library/Developer/
And installing Xcode again (clean).

Related

How install crfsuite on Mac OS Monterey M1

brew install fails on M1 Mac with Monterey and Xcode installed for arm64 arch
tried various options to get it work, but didn't work those.
Other details:
cmake: 3.22.2
clang:
Apple clang version 13.0.0 (clang-1300.0.29.30)
Target: arm64-apple-darwin21.3.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
autoconf: 2.71
make: 3.81
arch: arm64
lingamoorthi.ankam#LingamorthysMBP ~ % brew install crfsuite
...
libtool: compile: clang -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../../include -I. -I./include -mfpmath=sse -msse2 -DUSE_SSE -O3 -fomit-frame-pointer -ffast-math -Winline -std=c99 -c src/lookup3.c -fno-common -DPIC -o .libs/libcqdb_la-lookup3.o
error: unknown FP unit 'sse'
error: unknown FP unit 'sse'
make[1]: *** [libcqdb_la-cqdb.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [libcqdb_la-lookup3.lo] Error 1
make: *** [install-recursive] Error 1
lingamoorthi.ankam#LingamorthysMBP ~ %
also in the similar way liblbfgs(crfsuite dependency) also failed, but manually installing it succeeded.
All tools installed are uptodate.
lingamoorthi.ankam#LingamorthysMBP ~ % cmake --version
cmake version 3.22.2
...
lingamoorthi.ankam#LingamorthysMBP ~ % automake --version
automake (GNU automake) 1.16.5
...
lingamoorthi.ankam#LingamorthysMBP ~ % clang --version
Apple clang version 13.0.0 (clang-1300.0.29.30)
Target: arm64-apple-darwin21.3.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
lingamoorthi.ankam#LingamorthysMBP ~ % autoconf --version
autoconf (GNU Autoconf) 2.71
...
lingamoorthi.ankam#LingamorthysMBP ~ % make --version
...
This program built for i386-apple-darwin11.3.0
You might want to try to disable sse2
Here is a suggestion
brew install crfsuite
Running `brew update --auto-update`...
==> Auto-updated Homebrew!
Updated 3 taps (homebrew/core, homebrew/cask and brewsci/science).
You have 6 outdated formulae installed.
You can upgrade them with brew upgrade
or list them with brew outdated.
==> Downloading https://github.com/downloads/chokkan/crfsuite/crfsuite-0.12.tar.
Already downloaded: /Users/foo/Library/Caches/Homebrew/downloads/3b692f540345f335f203e8aa30a52e7279cba5d08e285130f811a02b565d8c46--crfsuite-0.12.tar.gz
==> Installing crfsuite from brewsci/science
==> ./configure --prefix=/opt/homebrew/Cellar/crfsuite/0.12
==> make install
...
error: unknown FP unit 'sse'
error: unknown FP unit 'sse'
make[1]: *** [libcqdb_la-cqdb.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [libcqdb_la-lookup3.lo] Error 1
make: *** [install-recursive] Error 1
Untar the downloaded crfsuite package
tar xvfz /Users/foo/Library/Caches/Homebrew/downloads/3b692f540345f335f203e8aa30a52e7279cba5d08e285130f811a02b565d8c46--crfsuite-0.12.tar.gz
Configure with disabled sse2 and other flags then make and install
cd crfsuite-0.12
./configure --prefix=$HOME/local --disable-shared --with-pic --disable-sse2
make
make install
Run ./configure --help to get details of parameters

I am unable to install Jekyll on macOs High Sierra. bundle install stops on ffi make error

I am trying to install Jekyll on macOs and the bundle install command fails while install the ffi gem. Below is the error.
/bin/sh ./libtool --tag=CC --mode=link xcrun clang -arch i386 -Wall -fexceptions -no-undefined
-version-info `grep -v '^#'
/private/var/folders/l7/th5yr79s4q91ln9ycpx4ht5h0000gn/T/bundler20190605-84487-xz6vrpffi-1.11.1/gems/ffi-1.11.1/ext/ffi_c/libffi/libtool-version`
'-arch' 'i386' -arch i386 -o libffi.la -rpath /usr/local/lib src/prep_cif.lo src/types.lo src/raw_api.lo
src/java_raw_api.lo src/closures.lo src/x86/ffi.lo src/x86/sysv.lo
libtool: link: xcrun clang -dynamiclib -o .libs/libffi.7.dylib src/.libs/prep_cif.o src/.libs/types.o
src/.libs/raw_api.o src/.libs/java_raw_api.o src/.libs/closures.o src/x86/.libs/ffi.o src/x86/.libs/sysv.o
-arch i386 -arch i386 -arch i386 -install_name /usr/local/lib/libffi.7.dylib -compatibility_version 9
-current_version 9.0 -Wl,-single_module
ld: warning: The i386 architecture is deprecated for macOS (remove from the Xcode build setting: ARCHS)
Undefined symbols for architecture i386:
"___x86.get_pc_thunk.bx", referenced from:
_ffi_call_i386 in sysv.o
_ffi_closure_raw_SYSV in sysv.o
_ffi_closure_raw_THISCALL in sysv.o
"___x86.get_pc_thunk.dx", referenced from:
_ffi_closure_i386 in sysv.o
_ffi_closure_STDCALL in sysv.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [libffi.la] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all] Error 2
make: ***
["/private/var/folders/l7/th5yr79s4q91ln9ycpx4ht5h0000gn/T/bundler20190605-84487-xz6vrpffi-1.11.1/gems/ffi-1.11.1/ext/ffi_c"/libffi-i386/.libs/libffi_convenience.a]
Error 2
make failed, exit code 2
Gem files will remain installed in
/var/folders/l7/th5yr79s4q91ln9ycpx4ht5h0000gn/T/bundler20190605-84487-xz6vrpffi-1.11.1/gems/ffi-1.11.1 for
inspection.
Results logged to
/var/folders/l7/th5yr79s4q91ln9ycpx4ht5h0000gn/T/bundler20190605-84487-xz6vrpffi-1.11.1/extensions/universal-darwin-17/2.3.0/ffi-1.11.1/gem_make.out
An error occurred while installing ffi (1.11.1), and Bundler cannot continue.
Make sure that `gem install ffi -v '1.11.1' --source 'https://rubygems.org/'` succeeds before bundling.
In Gemfile:
github-pages was resolved to 198, which depends on
github-pages-health-check was resolved to 1.16.1, which depends on
typhoeus was resolved to 1.3.1, which depends on
ethon was resolved to 0.12.0, which depends on
ffi
try this
$ open /Library/Developer/CommandLineTools/Packages/
then run package
macOS_SDK_headers_for_macOS_10.14.pkg
the answer is reference hereenter link description here,
if this work please give me a vote thanks

linking shared-object rlibmemcached.bundle failing on gem install

When I try to install the memcached gem:
gem install memcached -v '1.4.1
I get this error and the install fails:
linking shared-object rlibmemcached.bundle
ld: in '/usr/local/lib/libcrypto.0.9.8.dylib', file was built for i386 which is not the architecture being linked (x86_64): /usr/local/lib/libcrypto.0.9.8.dylib for architecture x86_64
collect2: ld returned 1 exit status
make: *** [rlibmemcached.bundle] Error 1
make failed, exit code 2
Any one have any suggestions for how to fix this?
For anyone who finds this later...
I should have read the prompt more closely. I had a conflicting libcrypto.dylib on my computer. I ran
brew doctor
and that highlighted the erroneous files. I removed them, then the gem install went just fine.

Unable to install Jekyll on Mac OSX 10.9.1 with xcode and rvm installed

Not having any luck installing Jekyll on Mac OSX 10.9.1
I have rvm installed and also Xcode 5.0.2.
When I run gem install jekyll it tells me...
Permission denied -
/Users/Vivid/.rvm/gems/ruby-1.9.2-p320/extensions/x86_64-darwin-12
I then ran sudo gem install jekyll and I then get:
ERROR: Error installing jekyll:
ERROR: Failed to build gem native extension.
/Users/Vivid/.rvm/rubies/ruby-1.9.2-p320/bin/ruby extconf.rb
creating Makefile
make clean
make
gcc-4.2 -I. -I/Users/Vivid/.rvm/rubies/ruby-1.9.2-p320/include/ruby-1.9.1/x86_64-darwin12.2.0 -I/Users/Vivid/.rvm/rubies/ruby-1.9.2-p320/include/ruby-1.9.1/ruby/backward -I/Users/Vivid/.rvm/rubies/ruby-1.9.2-p320/include/ruby-1.9.1 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -I/Users/Vivid/.rvm/usr/include -fno-common -pipe -o porter.o -c porter.c
make: gcc-4.2: No such file or directory
make: *** [porter.o] Error 1
make failed, exit code 2
Gem files will remain installed in /Users/Vivid/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/gems/1.9.1/gems/fast-stemmer-1.0.2 for inspection.
Results logged to /Users/Vivid/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/gems/1.9.1/extensions/x86_64-darwin-12/1.9.1/fast-stemmer-1.0.2/gem_make.out
This is the contents of /Users/Vivid/.rvm/gems/ruby-1.9.3-p327/gems/fast-stemmer-1.0.2/ext/gem_make.out:
/Users/Vivid/.rvm/rubies/ruby-1.9.3-p327/bin/ruby extconf.rb
creating Makefile
make
compiling porter.c
make: /usr/bin/gcc-4.2: No such file or directory
make: *** [porter.o] Error 1
Something is clearly not right. Any advice would be magic, cheers.
You need to install gcc-4.2. Make sure you have Homebrew installed and run
brew install apple-gcc42
Make sure you see happy output when you run:
which gcc-4.2
Then try re-running:
sudo gem install jekyll
Boom! Installed.

make error when installing `ruby-1.8.7-p334` with `rvm` on Snow Leopard

Some of my Ruby gems stopped working after installing Snow Leopard (OS X 10.6). I also installed Xcode (to get make) and get the following error when installing ruby-1.8.7-p334 with rvm. I was able to succesfully install it when running Leopard. Any help would be appreciated.
Macintosh:haloror patelc75$ rvm install ruby-1.8.7-p334
Installing Ruby from source to: /Users/patelc75/.rvm/rubies/ruby-1.8.7-p334, this may take a while depending on your cpu(s)...
ruby-1.8.7-p334 - #fetching
ruby-1.8.7-p334 - #extracted to /Users/patelc75/.rvm/src/ruby-1.8.7-p334 (already extracted)
ruby-1.8.7-p334 - #configuring
ruby-1.8.7-p334 - #compiling
ERROR: Error running 'make ', please read /Users/patelc75/.rvm/log/ruby-1.8.7-p334/make.log
ERROR: There has been an error while running make. Halting the installation.
Macintosh:haloror patelc75$ more /Users/patelc75/.rvm/log/ruby-1.8.7-p334/make.log
[2011-08-23 17:21:55] make
gcc -g -O2 -fno-common -pipe -fno-common -DRUBY_EXPORT -L. main.o dmydln.o libruby-static.a -ldl -lobjc -o miniruby
Undefined symbols:
"_Init_ext", referenced from:
_require_libraries in libruby-static.a(ruby.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [miniruby] Error 1
Please check the log file at /Users/patelc75/.rvm/log/ruby-1.8.7-p334/make.log
readline may be the issue most of the time. to fix that please do
rvm pkg install readline
before that you might want to do
rvm remove 1.8.7
rvm cleanup

Resources