Problem compiling yaml-0.1.4 on OS X Lion #1121

Closed
davidfstr opened this Issue Sep 20, 2012 · 20 comments

Comments

Projects
None yet
3 participants

Repro steps:

rvm install 1.9.3

Among the output are the lines:

Extracting yaml-0.1.4.tar.gz to /Users/davidf/.rvm/src
Configuring yaml in /Users/davidf/.rvm/src/yaml-0.1.4.
Compiling yaml in /Users/davidf/.rvm/src/yaml-0.1.4.
Error running 'make ', please read /Users/davidf/.rvm/log/ruby-1.9.3-p194/yaml/make.log

Inspecting the log file yields the line:

[2012-09-19 23:27:46] make 
Launch of "make" failed: the PowerPC architecture is no longer supported.

This is a very strange message given that I am running a MacBook Pro with an Intel Core i7 processor. Running make manually works just fine.

I am not sure if this a bug with rvm, yaml, or some other component, but I will start by posting the issue here.

Member

richo commented Sep 20, 2012

Can you gist the whole logfile?

Actually those two lines are the entire log file for make.log.

In case you meant the entire rvm install sequence, here's the gist for that:
https://gist.github.com/3754498

Member

richo commented Sep 20, 2012

Thanks, can you also gist rvm info for me, as well as uname -a

I'm trying to work out how it thinks you're on PPC.

Owner

mpapis commented Sep 20, 2012

there are few things that could influence this, most commons are:

head -n1000 /etc/rvmrc ~/.rvmrc
env | grep -iE 'ppc|powerpc|arch|cflags'
gcc --version
gcc-4.2 --version

RVM automatically picks gcc-4.2 when it is available - as the gcc most likely points to clang/llvm compiler which is not fully supported by ruby.

I notice that env | grep -iE 'ppc|powerpc|arch|cflags' turns up a reference to /usr/local/teTeX/bin/powerpc-apple-darwin-current. Not sure where that came from, but I can modify my shell rc file to snip it out.

Hmm... Removing that from my PATH didn't do the trick.

Regarding the other items:

  • I have no /etc/rvmrc or ~/.rvmrc.
  • env | grep -iE 'ppc|powerpc|arch|cflags' => (now nothing)
  • gcc --version => i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)
  • gcc-4.2 --version => i686-apple-darwin11-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)
  • nvm info => https://gist.github.com/3759647
  • uname -a => Darwin Cathode.local 11.4.0 Darwin Kernel Version 11.4.0: Mon Apr 9 19:32:15 PDT 2012; root:xnu-1699.26.8~1/RELEASE_X86_64 x86_64
Owner

mpapis commented Sep 21, 2012

@davidfstr can you gist: /Users/davidf/.rvm/src/ruby-1.9.3-p194/config.status

Owner

mpapis commented Sep 22, 2012

I'm very sorry, I listed wrong path to the file, it should be /Users/davidf/.rvm/src/yaml-0.1.4/config.status, but this will give us a good comparison, maybe there is something wrong in libyaml arch detection.

Here's yaml's config.status: https://gist.github.com/3772265

Owner

mpapis commented Sep 23, 2012

looks like ./configure worked properly => build='x86_64-apple-darwin11.4.0', also other lines indicate x86_64 should be used.

maybe try:

CC=gcc-4.2 rvm pkg install libyaml

does it fail the same?

The command CC=gcc-4.2 rvm pkg install libyaml had the same result.

I also tried:

export CC=gcc-4.2
rvm pkg install libyaml

Same result, with make yielding the same log file.

(Apologizes for the delay. It's been a very busy week.)

Owner

mpapis commented Sep 27, 2012

@davidfstr good news is that you will not have to compile libyaml anymore - bad news is I have some work to make it happen, there is most likely a fix needed for rvm to not install libyaml if ruby is installed in binary mode, also I need to prepare a build of ruby for OSX Lion.

@mpapis mpapis added a commit that referenced this issue Sep 27, 2012

@mpapis mpapis fix osx 10.7 ruby-1.9.3 binary, switch osx system selctor 10.7.4 -> 1…
…0.7, fix building movable rubies on osx (libyaml), update #1145, update #1121
32e30ef
Owner

mpapis commented Sep 27, 2012

@davidfstr try:

rvm get stable && rvm reinstall 1.9.3

Seems to work. Thanks!

davidfstr closed this Sep 30, 2012

mpapis was assigned Oct 3, 2012

FWIW, I blew away my rvm after messing with it and have this problem again, even after rvm get stable && rvm reinstall 1.9.3. Luckily the make failure for yaml doesn't abort the installation.

Subsequent invocations of ruby (or gem) print the warning:

It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.

Workaround is to manually run gem install psych, which eliminates these warnings.

Owner

mpapis commented Jan 16, 2013

@davidfstr there were some extra fixes on head, could you retry with rvm head version?

@mpapis The psych warning is eliminated. However the original yaml make error remains. Details: https://gist.github.com/4548017

In case it's useful I will have a completely fresh OS X 10.7.5 VM spun up this evening, which I will be doing a fresh rvm install in.

Owner

mpapis commented Jan 16, 2013

please open a new ticket and include outputs and log files

Apparently this problem does not occur on a fresh OS X 10.7.5 machine. So no new ticket from me. :-)

I guess I will wrangle my own host machine for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment