linking shared-object rlibmemcached.bundle failing on gem install - ruby

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.

Related

Compiling Tilde text editor on MacOS

I'm trying to compile The Tilde Text Editor under MacOS 10.12.2 (Sierra) with no previous experience in compiling (so please correct me on anything) and I'm getting this error:
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [src/libt3window.la] Error 1
Steps so far (some are redundant):
Install homebrew, Xcode
brew install cmake
brew install gettext
brew link --force gettext
brew install autoconf (?)
brew install automake (?)
brew install libtool
brew install pkg-config
brew install libunistring
brew install libsigc++
build libtranscript from source by changing this from configure:
[ -z "${LIBTOOL}" ] && LIBTOOL="libtool"
to this:
[ -z "${LIBTOOL}" ] && LIBTOOL="glibtool"
and this in Makefile.in
LIBTOOL=libtool
to this:
LIBTOOL=glibtool
then ./configure && make && sudo make install
build libt3window from source by changing configure and Makefile.in like with libtranscript, then ./configure && make. So with make the error shows up:
duplicate symbol __t3_modifier_hack in:
src/.libs/window.o
src/.libs/terminal_init.o
ld: 5 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [src/libt3window.la] Error 1
And one more question: how to I remove everything I installed?
This is caused by a bug in libt3window (a missing "extern" in the declaration of the _t3_modifier_hack variable). This is fixed in version 0.2.6 of libt3window.

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.

Brew install failing on OS X - possibly something to do with new XCode

I'm trying to do a brew install of fontconfig on OS X 10.8.3 and I'm being thrown with a nasty error. I have XCode 4.6.1 installed.
$ brew install fontconfig
==> Installing fontconfig dependency: pkg-config
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/pkg-config-0.28.mountain_lion.bottle.tar.gz
######################################################################## 100.0%
==> Pouring pkg-config-0.28.mountain_lion.bottle.tar.gz 🍺 /usr/local/Cellar/pkg-config/0.28: 10 files, 636K
==> Installing fontconfig
==> Downloading http://fontconfig.org/release/fontconfig-2.10.91.tar.gz Already downloaded: /Library/Caches/Homebrew/fontconfig-2.10.91.tar.gz
==> Patching patching file src/fcarch.h
==> ./configure --with-add-fonts=/Library/Fonts,~/Library/Fonts --prefix=/usr/local/Cellar/fontconfig/2.10.91
==> make install
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [libfontconfig.la] Error 1
make[1]: *** [install] Error 2
make: *** [install-recursive] Error 1
READ THIS: https://github.com/mxcl/homebrew/wiki/troubleshooting
There seems to be very little information around this issue and it's pretty painful.
*SOLVED*
Turned out I had the DYLD_LIBRARY_PATH env variable set to use with Oracle, and this was causing reference to 32-bit libraries.
Unsetting the DYLD_LIBRARY_PATH env variable fixed this.
Anybody using an Oracle client on their mac should be wary of this!

Error installing ruby 1.9.3 on Snow Leopard

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).

Phusion Passenger Ubuntu 11.10

I just upgraded to ubuntu 11.10 and I have a problem starting phusion passenger. I get the following error:
/usr/bin/ld: /usr/lib/ruby/gems/1.8/gems/passenger-3.0.8/ext/nginx/../common/libpassenger_common.a(aggregate.o): undefined reference to symbol 'round##GLIBC_2.2.5'
/usr/bin/ld: note: 'round##GLIBC_2.2.5' is defined in DSO /usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu/libm.so so try adding it to the linker command line
/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu/libm.so: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[1]: *** [objs/nginx] Error 1
make[1]: Leaving directory `/tmp/root-passenger-23103/nginx-1.0.5'
make: *** [build] Error 2
Was wondering if there is a fix for this issue or if it is a known issue that may be fixed soon.
Thanks
To fix this problem install gcc-4.4.
sudo apt-get install gcc-4.4 g++-4.4 libstdc++6-4.4-dev
rvmsudo CC=gcc-4.4 passenger-install-nginx-module
The rvmsudo solution did not work for me, as I had the passenger gem already installed, and rvm wanted to use that instead of the system-wide one that rvmsudo installed.
What did work for me is:
sudo apt-get install gcc-4.4 g++-4.4 libstdc++6-4.4-dev
CC=gcc-4.4 passenger start

Resources