Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.9.3 Error running '__rvm_make -j4' #4200

Open
pkrawc opened this issue Oct 7, 2017 · 16 comments
Open

1.9.3 Error running '__rvm_make -j4' #4200

pkrawc opened this issue Oct 7, 2017 · 16 comments

Comments

@pkrawc
Copy link

pkrawc commented Oct 7, 2017

Description

I cannot install an old ruby version, 1.9.3-p194, on macOS High Sierra.

Steps to reproduce

  1. Check to make sure current ruby will install, 2.4.1
  2. run rvm install 1.9.3-p194
Error running '__rvm_make -j4',
please read /Users/patrick/.rvm/log/1507348148_ruby-1.9.3-p194/make.log
There has been an error while running make. Halting the installation.

Actual behavior

rvm install 1.9.3-p194

@levinunnink
Copy link

I'm running into a very similar problem trying to install any ruby version on High Sierra.

@pkuczynski
Copy link
Member

@levinunnink did you installed xcode command line tools with xcode-select --install?

@saransh9
Copy link

saransh9 commented Oct 17, 2017

yes, still getting the same error
make.log

@nisavid
Copy link

nisavid commented Oct 23, 2017

I'm seeing the same error, namely:

compiling syslog.c
In file included from /usr/include/sys/cdefs.h:587:0,
                 from /usr/include/sys/_types.h:32,
                 from /usr/include/_types.h:27,
                 from /usr/include/string.h:61,
                 from ../.././include/ruby/ruby.h:48,
                 from syslog.c:11:
/usr/include/sys/syslog.h:227:124: error: expected ',' or ';' before '__asm'
 void syslog(int, const char *, ...) __printflike(2, 3) __not_tail_called __DARWIN_ALIAS_STARTING(__MAC_10_13, __IPHONE_NA, __DARWIN_EXTSN(syslog));
                                                                                                                            ^

For me, however, this is occurring in yet another set of cases, which are apparently inconsistent with the previous reports. I'm hitting it when building Ruby 1.9.3-p551 on macOS 10.13 with recent versions of GCC:

  • rvm install 1.9.3 --with-gcc=gcc-5
    • GCC 5.5.0 via Homebrew gcc@5 5.5.0
  • rvm install 1.9.3 --with-gcc=gcc-6
    • GCC 6.4.0 via Homebrew gcc@6 6.4.0
  • rvm install 1.9.3 --with-gcc=gcc-7
    • GCC 7.2.0 via Homebrew gcc 7.2.0

Building Ruby 1.9.3-p551 with GCC 4.9.4 (Homebrew gcc@4.9 4.9.4), via rvm install 1.9.3 or rvm install 1.9.3 --with-gcc=gcc-4.9, I get different errors:

In file included from /usr/include/Availability.h:194:0,
                 from /usr/include/stdlib.h:61,
                 from ./include/ruby/defines.h:29,
                 from ./regenc.h:34,
                 from ./enc/big5.c:30:
/usr/include/AvailabilityInternal.h:25584:74: error: missing binary operator before token "("
 #if defined(__has_feature) && defined(__has_attribute) && __has_attribute(availability)
                                                                          ^
In file included from /usr/include/stdlib.h:61:0,
                 from ./include/ruby/defines.h:29,
                 from ./regenc.h:34,
                 from ./enc/big5.c:30:
/usr/include/Availability.h:387:74: error: missing binary operator before token "("
 #if defined(__has_feature) && defined(__has_attribute) && __has_attribute(availability)
                                                                          ^

(3 occurrences of this pair of errors, corresponding to ./enc/big5.c,./enc/euc_kr.c, and ./enc/cp949.c)

These are suspiciously similar to an old GCC issue. If I understand correctly, this was caused by Apple reinterpreting the short-circuiting behavior of && to also apply to the detection of syntax errors in preprocessor directives—a notion that does not follow from C99 and is not implemented by GCC. That issue was patched in GCC 4.8 and 4.9 via a specific workaround applied when encountering these header files on macOS. I have no insight into why this issue is now reappearing. Perhaps the workaround in GCC needs to be adjusted to account for something specific about macOS 10.13—just guessing.


On the other hand, I can successfully build Ruby 1.9.3-p551 with Clang 900.0.38 (Apple LLVM 9.0.0, Xcode 9.0.1) via rvm install 1.9.3 --with-gcc=gcc. On completion, in addition to the usual warning about using an unmaintained Ruby version, it emits the following spooky warning:

Ruby 'ruby-1.9.3-p551' was built using clang - but it's not (fully) supported, expect errors.

Given that this appears to be the only way to build Ruby 1.9.3 on my system, it would be very helpful to know what sorts of errors I might expect. Unfortunately, I haven't figured out an effective way to search for this. The closest I've come is this vague reference from 5 years ago.


All other MRI versions build successfully, apparently using gcc—that is, Clang 900.0.38 (Apple LLVM 9.0.0, Xcode 9.0.1)—by default, without any complaints. Specifically, the following versions build with a simple rvm install <version>:

  • 2.0.0-p648
  • 2.1.10
  • 2.2.8
  • 2.3.5
  • 2.4.2

Note: I updated RVM via rvm get head before performing these builds.

@levinunnink
Copy link

@pkuczynski Yeah, for me the fix was to do a complete reinstall of macOS. I had configured a new system using the Migration Assistant and nothing I did would get ruby to find the headers it needed to compile. A clean reinstall of the system fixed the problem. No idea what the actual cause was.

@poysama
Copy link

poysama commented Nov 14, 2017

Running into the same problem and fixed it with @nisadavid post.

Running on RVM 1.29.3 and installed ruby-1.9.3-p484

@eirvandelden
Copy link

eirvandelden commented Nov 28, 2017

Running into the same issue, this was not fixed by running:

  • rvm reinstall ruby-1.9.3-p551 log
  • rvm reinstall ruby-1.9.3-p551 --with-gcc=gcc log

Odly enough this works:

  • rvm install ruby-1.9.3-p551 --with-gcc=gcc

@andrewdeck
Copy link

Ran into this exact same issue.
rvm install ruby-1.9.3-p551 --with-gcc=gcc
worked for me.

@wilvk
Copy link

wilvk commented Jan 28, 2018

@nisavid The spooky warning at the end probably relates to the warning at the start:
Warning: found user selected compiler 'gcc', this will suppress RVM auto detection mechanisms.

@mpapis
Copy link
Member

mpapis commented Jan 28, 2018

The best course of action will be to start supporting clang(--with-gcc=gcc) for 1.9.3 on newest OSX

@stevesuo
Copy link

eirvelden's solution worked for me, too:

rvm install ruby-1.9.3-p551 --with-gcc=gcc

@martinverdejo
Copy link

Not sure if its the same problem. I am on OSX 10.13. Trying to install ruby-2.3.4 but I'm getting Error running '__rvm_make -j 1'. I tried rvm install 2.3.4 --with-gcc=gcc but encountered the same problem.

Here is my make.log

@andyroberts
Copy link

+1 for @eirvandelden; The --with-gcc=gcc option worked for me also.

I'm on a brand new iMac, running OSX10.13.3. Oddly there's no sign of an obvious error in the make.log - it just suddenly fails:

installing default openssl libraries
linking shared-object socket.bundle
linking shared-object openssl.bundle
linking shared-object ripper.bundle
make: *** [build-ext] Error 2
++ return 2 

@ahessen
Copy link

ahessen commented Mar 8, 2018

Same issue. Trying to install ruby version 1.9.3-p194 on OSX 10.13.3. Getting error rvm_make -j4

@rashidshafique
Copy link

seriously is there any solution to this __rvm_make -j8 compile errors ive tried installing many rubies but no ruby gets installed something to do with gcc

@juvham
Copy link

juvham commented Aug 23, 2018

it seem like mac header file error do to fix that

rm -rf /usr/local/include

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

No branches or pull requests