RVM: trouble installing libyaml package on Snow Leopard - ruby

I'm using RVM 1.13.4 on Mac OS 10.6.8, with XCode 3.2.6. The upgrade to Snow Leopard was fairly recent, and I believe that's when I started having this problem.
When I run rvm pkg install libyaml, I get the following error:
Fetching yaml-0.1.4.tar.gz to /Users/tsherif/.rvm/archives
Extracting yaml-0.1.4.tar.gz to /Users/tsherif/.rvm/src
Prepare yaml in /Users/tsherif/.rvm/src/yaml-0.1.4.
Configuring yaml in /Users/tsherif/.rvm/src/yaml-0.1.4.
Compiling yaml in /Users/tsherif/.rvm/src/yaml-0.1.4.
Error running 'make ', please read /Users/tsherif/.rvm/log/yaml/make.log
Database file /Users/tsherif/.rvm/config/packages does not exist.
Not sure what the story is with config/packages. The make.log file contains the following:
[2012-05-06 05:37:14] make
make all-recursive
Making all in include
make[2]: Nothing to be done for `all'.
Making all in src
/bin/sh ../libtool --tag=CC --mode=compile /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I.. -I../include -g -O2 -MT api.lo -MD -MP -MF .deps/api.Tpo -c -o api.lo api.c
../libtool: line 787: X--tag=CC: command not found
../libtool: line 820: libtool: ignoring unknown tag : command not found
../libtool: line 787: X--mode=compile: command not found
../libtool: line 953: *** Warning: inferring the mode of operation is deprecated.: command not found
../libtool: line 954: *** Future versions of Libtool will require --mode=MODE be specified.: command not found
../libtool: line 984: libtool: warning: cannot infer operation mode from `/usr/bin/gcc-4.2': No such file or directory
../libtool: line 7011: libtool: you must specify a MODE: command not found
../libtool: line 7012: Try `libtool --help' for more information.: command not found
make[2]: *** [api.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
It seems like the shell is trying to execute arguments to libtool as commands before passing them to libtool? The commands aren't found so the string command not found is passed to libtool, which then spews out a bunch of error output that sh tries to execute and, of course, fails to do. Does it maybe have something to do with the Xs that seem to be added to the --tag and --mode options? That's my best guess, anyway, given my limited understanding of libtool and make.
I've tried adding the following options, based on similar questions I've seen on SO, but to no avail:
--with-gcc=clang
--enable-shared
I've also tried installing libyaml separately (without RVM) using both MacPorts and compiling from source, but neither worked. And oddly enough, if I install Psych as a gem after installing Ruby, there's no problem (but I do want it compiled with Ruby).

Have you tried installing with Homebrew? It makes most dependency packages very easy to install, then run brew install libyaml.

Related

Error in make cdec

I am trying to implement text generator of JAMR. It redirects me to install cdec. I followed this tutorial to install cdec. BUT
I installed gcc-4.8 (I had a better version 5.x but I thought 4.8 is neccessary). So I installed gcc-4.8 using this. And I build Boost using this (in ~/prefix/sw), I used boost_1_58 because it was latest. Everything worked fine.
Coming back to the tutorial, instead of cd ~/prefix/sw I went to cd jamr/tools/cdec where my cdec is present. Did autoreconf -ifv and ./configure --prefix=/home/student/prefix, fine till now (I just had to comment line 216 of containing boost_major_version and wrote boost_major_version="158"). But when I do make after a while I get
libtool: link: g++ -std=gnu++11 -fPIC -g -O3 /usr/lib /usr/lib -o reconstruct_weights reconstruct_weights.o -L/usr/lib libutils.a -ldl -lrt -lboost_program_options -lboost_regex -lboost_serialization -lboost_system -lboost_filesystem -lz -lbz2
/usr/bin/ld: cannot find /usr/lib: File format not recognized
/usr/bin/ld: cannot find /usr/lib: File format not recognized
collect2: error: ld returned 1 exit status
Makefile:836: recipe for target 'reconstruct_weights' failed
make[2]: *** [reconstruct_weights] Error 1
make[2]: Leaving directory '/home/student/ATS/jamr/tools/cdec-2014-10-12/utils'
Makefile:480: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/student/ATS/jamr/tools/cdec-2014-10-12'
Makefile:410: recipe for target 'all' failed
make: *** [all] Error 2
I tried sudo make, simple ./configure and make clean;make. No help. This is make file.
When you are in the cdec folder and you try to execute the commands there according to the instructions, we see that you get the collect2 error: error: ld returned 1 exit status. In the cdec folder, i initially execute the command:
gcc -std=gnu99 -Wall -Werror -g array_product.c -o array_product -I../../ZDK -L../../ZDK -I../../TestLib04 -L../../TestLib04 -ltestlib04 -lzdk -lncurses -lm
After this command, the error is solved and i get to the file and it says:
> First, you need all the build dependencies, and the fastest way to install them all is this command, which installs not only the compiler but the additional boost libraries and Flex that you'll need. sudo apt-get install build-essential libboost-all-dev cmake flex
> Secondly, create a directory and go into it (you said ~/prefix/sw in your comments).
> Thirdly, git clone https://github.com/redpony/cdec.git
> Fourthly, you probably did not read the README page on the GitHub repository which explains what commands to run to make the software build. It lists these as the build steps, after cd-ing into the newly created cdec folder.

How to cross compile iw to Xilinx Petalinux?

Update
The error happens at line 8962 of libtool, which performs a lot of commands inside a loop. The content of the problematic command is
arm-xilinx-linux-gnueabi-gcc -shared -fPIC -DPIC genl/.libs/ctrl.o genl/.libs/family.o genl/.libs/genl.o genl/.libs/mngt.o -Wl,-rpath -Wl,/usr/arm-linux-gnueabi/lib -L/usr/arm-linux-gnueabi/lib -lnl-3 -lpthread -lm -O2 -Wl,--version-script=../libnl.sym -Wl,-soname -Wl,libnl-genl-3.so.200 -o .libs/libnl-genl-3.so.200.19.0
If I manually run it, it says
error: genl/.libs/ctrl.o: No such file or directory
the .o s are there, but the problem is that make install is under sudo, but sudo is a different environment and it doesn't recognize the paths. So solution is:
sudo -s
source /opt/pkg/......./settings.sh
source command is required by Xilinx Petalinux for the paths. Now make install will work
Original
I am following the beyond logic example to cross compile the iw tool. The first step is the libnl. I am using CentOS to crossc compile libnl, so I have to run source /opt/pkg/.../settings.sh to setup the arm-xilinx-linux-gnueabi-gcc paths. I then used ./configure --host=arm-xilinx-linux-gnueabi --prefix=/usr/arm-xilinx-linux-gnueabi
The make is running fine. But make install failed with following errors:
libtool: install: (cd /xxx/libnl-3.2.24/lib; /bin/sh /home/xxx/libnl-3.2.24/libtool --silent --tag CC --mode=relink arm-xilinx-linux-gnueabi-gcc -g -O2 -version-info 219:0:19 -Wl,--version-script=../libnl.sym -o libnl-genl-3.la -rpath /usr/arm-xilinx-linux-gnueabi/lib genl/ctrl.lo genl/family.lo genl/genl.lo genl/mngt.lo libnl-3.la -lpthread -lm )
/xxx/libnl-3.2.24/libtool: line 8962:
arm-xilinx-linux-gnueabi-gcc: command not found
libtool: install: error: relink `libnl-genl-3.la' with the above command before installing it
make[3]: *** [install-libLTLIBRARIES] Error 1
make[3]: Leaving directory `/xxx/libnl-3.2.24/lib'
make[2]: *** [install-am] Error 2
make[2]: Leaving directory `/xxx/libnl-3.2.24/lib'
make[1]: *** [install] Error 2
make[1]: Leaving directory `/xxx/libnl-3.2.24/lib'
make: *** [install-recursive] Error 1
so since make is successful using arm-xilinx-linux-gnueabi-gcc, why make install is complaining it can't find it?
Problem is with following statement
./configure --host=arm-xilinx-linux-gnueabi --prefix=/usr/arm-xilinx-linux-gnueabi
arm-xilinx-linux-gnueabi is not installed at /usr thats why getting arm-xilinx-linux-gnueabi-gcc: command not founderror.
Install arm toolchain and then follow procedure mentioned in beyond logic example

Brew - node did not build

Homebrew 0.9.3
OSX 10.8.2
I'm wondering if you have seen anything like this?
==> make install
brew: superenv removed: -O3 -gdwarf-2 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter
20 errors generated.
make[1]: *** [/private/tmp/node-tiuh/node-v0.8.12/out/Release/obj.target/uv/deps/uv/src/unix/darwin.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [node] Error 2
Error: node did not build
Logs: /Users/justin/Library/Logs/Homebrew/node/
Help: https://github.com/mxcl/homebrew/wiki/troubleshooting
https://github.com/mxcl/homebrew/issues/13282
I had the same error.
Open up XCode
go to XCode->Preferences
go to the Downloads tab and install command line tools (or update them)
If you dont have Xcode, you can also download them separately
Xcode 4.4 and later install Command Line Tools

Chef-solo install - gecode compile error

Im trying to install chef-solo on CentOS 6.3 x64 and when I run:
sudo chef-solo -c /etc/chef/solo.rb -j ~/chef.json -r http://s3.amazonaws.com/chef-solo/bootstrap-latest.tar.gz
I'm getting this output:
g++ -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG \
-c -o gecode/int/extensional.o gecode/int/extensional.cpp
make[1]: Leaving directory `/tmp/chef-solo/gecode-3.5.0'
STDERR: {standard input}: Assembler messages:
{standard input}:13822: Warning: end of file not at end of a line; newline inserted
{standard input}:14946: Error: unknown pseudo-op: `.'
{standard input}:14946: Error: open CFI at the end of file; missing .cfi_endproc directive
g++: Internal error: Killed (program cc1plus)
Please submit a full bug report.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
make[1]: *** [gecode/int/extensional.o] Error 1
make: *** [compilelib] Error 2
---- End output of "bash" "/tmp/chef-script20120904-19809-1ofhwoq" ----
Ran "bash" "/tmp/chef-script20120904-19809-1ofhwoq" returned 2
I can install gecode from the RBEL6 repo without any problems but the cookbook attempts to install from source. I found this pull request on github which attempts to install from the RBEL repo but I got an error saying that the repository metadata couldn't be found. Anyone know what to do?
Since I have been searching for an answer to this, my findings were rather ... unsurprising.
I simply ran out of memory. I had to compile my files on another system with the same OS (copied over /tmp/chef-solo/gecode-3.5.0 to the box and just ran make) and synced the resulting folder back to run make install
Once the library is found the compile step is skipped and you should be good to continue.

capybara-webkit (0.8.0) failed to build on window 7

I am a newbie. I am trying to build capybara-webkit (0.8.0) with native extensions on window 7. I already installed (path set):RubyMine, Ruby SDK and Gems, Rails, DevKit, Qt, gmake, g++. But I still got the following error msg. Any help is greatly appreciated.
$ gem install capybara-webkit -v '0.8.0'
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing capybara-webkit:
ERROR: Failed to build gem native extension.
c:/Ruby193/bin/ruby.exe extconf.rb
c:\Qt\4.8.2\bin\qmake.EXE
c:\make\gmake.EXE
cd src/ && c:/Qt/4.8.2/bin/qmake.exe c:/Ruby193/lib/ruby/gems/1.9.1/gems/capybara-webkit-0.8.0/src/webkit_server.pro -spec c:/Qt/4.8.2/mkspecs/macx-g++ -o Makef\ile.webkit_server
c:\make\gmake.EXE
cd src/ && gmake -f Makefile.webkit_server
gmake[1]: Entering directory `c:/Ruby193/lib/ruby/gems/1.9.1/gems/capybara-webkit-0.8.0/src'
g++ -c -pipe -g -Wall -W -DQT_WEBKIT_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -Ic:/Qt/4.8.2/mkspecs/macx-g++ -I. -Ic:/Qt/4.8.2/include/QtCore -Ic:/Qt/4.8.2/include/QtNetwork -Ic:/Qt/4.8.2/include/QtGui -Ic:/Qt/4.8.2/include/QtWebKit -Ic:/Qt/4.8.2/include -I. -o RequestedUrl.o RequestedUrl.cpp
process_begin: CreateProcess((null), g++ -c -pipe -g -Wall -W -DQT_WEBKIT_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -Ic:/Qt/4.8.2/mkspecs/macx-g++ -I. -Ic:/Qt/4.8.2/include/QtCore -Ic:/Qt/4.8.2/include/QtNetwork -Ic:/Qt/4.8.2/include/QtGui -Ic:/Qt/4.8.2/include/QtWebKit -Ic:/Qt/4.8.2/include -I. -o RequestedUrl.o Req
uestedUrl.cpp, ...) failed.
make (e=2): The system cannot find the file specified.
gmake[1]: * [RequestedUrl.o] Error 2
gmake[1]: Leaving directory c:/Ruby193/lib/ruby/gems/1.9.1/gems/capybara-webkit-0.8.0/src'
c:/Ruby193/lib/ruby/1.9.1/fileutils.rb:1515:instat': No such file or directory
- src/webkit_server (Errno::ENOENT)
from c:/Ruby193/lib/ruby/1.9.1/fileutils.rb:1515:in block in fu_each_src_dest'
from c:/Ruby193/lib/ruby/1.9.1/fileutils.rb:1529:infu_each_src_dest0'
from c:/Ruby193/lib/ruby/1.9.1/fileutils.rb:1513:in fu_each_src_dest'
from c:/Ruby193/lib/ruby/1.9.1/fileutils.rb:395:incp'
from c:/Ruby193/lib/ruby/gems/1.9.1/gems/capybara-webkit-0.8.0/lib/capybara_webkit_builder.rb:33:in build'
from c:/Ruby193/lib/ruby/gems/1.9.1/gems/capybara-webkit-0.8.0/lib/capybara_webkit_builder.rb:39:inbuild_all'
from extconf.rb:2:in `'
Gem files will remain installed in c:/Ruby193/lib/ruby/gems/1.9.1/gems/capybara-webkit-0.8.0 for inspection.
Results logged to c:/Ruby193/lib/ruby/gems/1.9.1/gems/capybara-webkit-0.8.0/./gem_make.out
I was getting similar errors to this, as well as errors such as:
g++.exe: unrecognized option '-headerpad_max_install_names'
make[1]: Leaving directory /ruby/gems/shared/gems/capybara-webkit-0.12.1/src'
Errno::ENOENT: No such file or directory - C:/JRuby/lib/ruby/gems/shared/gems/capybara-webkit-0.12.1/src/webkit_server
LoadError: no such file to load
No such file or directory - C:/Ruby/capybara-webkit-0.12.1/src/webkit_server
Basically the answer to all these errors is to do with the version of capybara-webkit that you install on Windows depending on exactly the right versions of QT, and the right version of the g++ compiler included in mingw toolset. The right versions have to be installed and the correct bin directories added to your windows path.
Plus, there are issues with RbConfig::CONFIG['host_os'] which on windows 8 returns "mswin32" and not "mingw32". Therefore you have to fix capybara_webkit_builder.rb and spec_helper.rb to the following: /mingw32|mswin32/. If you don't do this then you will run macx-g++ which won't work on windows. You have to run win32-g++ on windows.
If you're using JRuby, then the RUBY_PLATFORM is set to "java". Therefore you have to change corresponding capybara_webkit_builder.rb and connection.rb to /mingw32|java/. If you don't do this, then the binary will compile (but with a bug in connection) but the compiler will crash out with the can't find the webkit-server error.
You have to follow the install script at https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit
At the final instruction on windows, you have to "cd" to the gem directory and then run
bundle exec gem install capybara-webkit-0.12.1.gem
or whichever version you have built.
So, the answers are get all the right versions of each dependency, fix the bugs, ensure the windows path variable points to the right versions of g++ compilers (don't forget to restart cmd after you've changed the path variable) and then ensure you're in the right directory when you run commands.

Resources