Problems building 2.2.0 on Mac

Hello,

I’m trying to build Ruby 2.2.0 on Mac and am running into this error:

etc.c:788:56: error: passing ‘void’ to parameter of incompatible type
‘VALUE’
(aka ‘unsigned long’)

clang logs several of these before giving up. I am on OS X 10.10, latest
Xcode tools and clang. I could not find reports of this via Google or at
the Ruby bug tracker. Please advise.

Thank you,
Kevin

On Jan 1, 2015, at 20:01, Kevin W. [email protected] wrote:

Hello,

I’m trying to build Ruby 2.2.0 on Mac and am running into this error:

etc.c:788:56: error: passing ‘void’ to parameter of incompatible type ‘VALUE’
(aka ‘unsigned long’)

clang logs several of these before giving up. I am on OS X 10.10, latest Xcode
tools and clang. I could not find reports of this via Google or at the Ruby bug
tracker. Please advise.

What flags and/or env vars did you use for configure and/or make?

On 1/2/15 12:47 AM, Ryan D. wrote:

What flags and/or env vars did you use for configure and/or make?

export CFLAGS="" && ./configure --prefix=/usr/local/ruby --enable-shared
–with-openssl-dir=/opt/local --enable-load-relative

Kevin W. wrote in post #1165875:

On 1/2/15 12:47 AM, Ryan D. wrote:

What flags and/or env vars did you use for configure and/or make?

export CFLAGS="" && ./configure --prefix=/usr/local/ruby --enable-shared
–with-openssl-dir=/opt/local --enable-load-relative

Thank you very much. This problem has been bothering me for days. I use
rvm and installed successfully with your command. Post the command just
in case others may need it.

CC=/usr/bin/gcc CFLAGS="" rvm install 2.2.0 -C
–enable-shared,–with-openssl-dir=/opt/local,–enable-load-relative

I add CC=/usr/bin/gcc because of the configure problem.

On 1/2/15 5:36 PM, Ryan D. wrote:

I just successfully built using your command (minus openssl since I don’t have
that setup).

Please make sure:

  • Homebrew doesn’t have gcc installed
  • xcode-select -p points to your xcode. If not either -r, -s <path> or
    --install.

Lemme know if that helps at all.

I cleaned up the build, disabled some other env vars in my ~/.profile,
and tried again–it builds cleanly.

Not sure what tripped me up before, but this works now. Thanks for the
suggestion to look at the env vars.

Kevin