I'm having Ruby 2.1.1 build failures on rbenv 0.4.0-97-gfe0b243 with OS X 10.9.3. Excerpt:
checking whether LDFLAGS is valid... no
configure: error: something wrong with
LDFLAGS="-L/Users/erik/.rbenv/versions/2.1.1/lib "
make: *** No targets specified and no makefile found. Stop.
Shell output in this Gist or:
Downloading ruby-2.1.1.tar.gz...
-> http://dqw8nmjcqpjn7.cloudfront.net/e57fdbb8ed56e70c43f39c79da1654b2
Installing ruby-2.1.1...
BUILD FAILED
Inspect or clean up the working tree at
/var/folders/gt/p9gcc3mx36104jplq02qcrwh0000gn/T/ruby-build.20140521110828.13171
Results logged to
/var/folders/gt/p9gcc3mx36104jplq02qcrwh0000gn/T/ruby-build.20140521110828.13171.log
Last 10 log lines:
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for cd using physical directory... cd -P
checking whether CFLAGS is valid... yes
checking whether LDFLAGS is valid... no
configure: error: something wrong with
LDFLAGS="-L/Users/erik/.rbenv/versions/2.1.1/lib "
BUILD FAILED
Inspect or clean up the working tree at
/var/folders/gt/p9gcc3mx36104jplq02qcrwh0000gn/T/ruby-build.20140521110828.13171
Results logged to
/var/folders/gt/p9gcc3mx36104jplq02qcrwh0000gn/T/ruby-build.20140521110828.13171.log
Last 10 log lines:
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for cd using physical directory... cd -P
checking whether CFLAGS is valid... yes
checking whether LDFLAGS is valid... no
configure: error: something wrong with
LDFLAGS="-L/Users/erik/.rbenv/versions/2.1.1/lib "
make: *** No targets specified and no makefile found. Stop.
Log output in this Gist.
This issue belongs to ruby-build, where the rbenv install command comes from. Please see https://github.com/sstephenson/ruby-build/wiki for instructions how to upgrade, then try again. If it's still failing after the upgrade, please open this issue in ruby-build project. Thanks
It's pretty bizarre that you had this failure, when the LDFLAGS issue was supposed to be fixed in 50bf60f9c2510fbee7f111046e97fe8bf9e66472. I'm going to presume that this sorted itself out in the meantime and close this. If anyone has more information and failures with latest ruby-build, please report to ruby-build project. Thanks!
I have this same problem
I'm also having this same problem - building fine on >= ruby-2.1.2 but failing on 2.1.1.
This is on a brand new machine (7 days old) with a fresh Xcode, homebrew, etc). OSX 10.10.3.
Here's the output from the build log.
...
checking build system type... x86_64-apple-darwin14.3.0
checking host system type... x86_64-apple-darwin14.3.0
checking target system type... x86_64-apple-darwin14.3.0
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether clang accepts -g... yes
checking for clang option to accept ISO C89... none needed
checking whether we are using the GNU C++ compiler... yes
checking whether clang++ accepts -g... yes
checking how to run the C preprocessor... clang -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking whether clang needs -traditional... no
checking for ld... ld
checking whether the linker is GNU ld... no
checking whether clang -E accepts -o... yes
checking for real target cpu... x86_64
checking for ranlib... ranlib
checking for ar... ar
checking for as... as
checking for objdump... no
checking for gobjdump... no
checking for objcopy... no
checking for gobjcopy... no
checking for nm... nm
checking whether ln -s works... yes
checking whether make sets $(MAKE)... yes
checking for a BSD-compatible install... /usr/local/bin/ginstall -c
checking for a thread-safe mkdir -p... /usr/local/bin/gmkdir -p
checking for dtrace... dtrace
checking for dot... no
checking for doxygen... no
checking for pkg-config... pkg-config
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for cd using physical directory... cd -P
checking whether CFLAGS is valid... yes
checking whether LDFLAGS is valid... no
configure: error: something wrong with LDFLAGS="-L/Users/stone/.rbenv/versions/2.1.1/lib "
make: *** No targets specified and no makefile found. Stop.
@dafstone It's probably a build bug with Ruby 2.1.1. Please upgrade to latest Ruby 2.1.x to fix it, as you already discovered. There should be nothing that prevents you from upgrading a project from Ruby 2.1.1 to latest patch version. There should be no functional changes.
Having the same problem with OS X 10.10.4 using ruby-build 20150719-13-g86919c8 installing any ruby version.
The ruby I have is the system version, ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin14].
Try to create directory pointed by LDFLAGS, in example:
mkdir -p /Users/stone/.rbenv/versions/2.1.1/lib
For me - it worked!
@janusznowakowski That's what's confusing about this failure. Ruby-build automatically creates the directories referenced by LDFLAGS since https://github.com/sstephenson/ruby-build/commit/50bf60f9c2510fbee7f111046e97fe8bf9e66472 years ago. I'm glad that you found a workaround, but it's puzzling to me why it's failing in the first place.
@mislav Yes, workaround by @janusznowakowski worked for me. Thanks.
Hi,
Although I have update ruby-build and rbenv to the latest version I am experiencing this issue.
$ rbenv install 2.2.0
Downloading ruby-2.2.0.tar.gz...
-> https://dqw8nmjcqpjn7.cloudfront.net/7671e394abfb5d262fbcd3b27a71bf78737c7e9347fa21c39e58b0bb9c4840fc
Installing ruby-2.2.0...
BUILD FAILED (OS X 10.10.5 using ruby-build 20151028-8-g25371c6)
Inspect or clean up the working tree at /var/folders/pt/1bt8d33d6f560gnyc9jy9rpr0000gn/T/ruby-build.20151113145051.19198
Results logged to /var/folders/pt/1bt8d33d6f560gnyc9jy9rpr0000gn/T/ruby-build.20151113145051.19198.log
Last 10 log lines:
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for cd using physical directory... cd -P
checking whether CFLAGS is valid... yes
checking whether LDFLAGS is valid... no
configure: error: something wrong with LDFLAGS="-L/Users/hiro/.rbenv/versions/2.2.0/lib "
make: *** No targets specified and no makefile found. Stop.
I have also tried the suggested work around but I am still experiencing this.
Reporting also logs:
$ cat /var/folders/pt/1bt8d33d6f560gnyc9jy9rpr0000gn/T/ruby-build.20151113150550.23950.log
/var/folders/pt/1bt8d33d6f560gnyc9jy9rpr0000gn/T/ruby-build.20151113150550.23950 ~/.rbenv/plugins/ruby-build
HTTP/1.1 200 OK
Content-Type: binary/octet-stream
Content-Length: 16613636
Connection: keep-alive
Date: Tue, 10 Nov 2015 23:08:14 GMT
Last-Modified: Mon, 13 Apr 2015 20:10:53 GMT
ETag: "326e99ddc75381c7b50c85f7089f3260"
Accept-Ranges: bytes
Server: AmazonS3
Age: 16898
X-Cache: Hit from cloudfront
Via: 1.1 453967c146678453a641464c7ad8eab6.cloudfront.net (CloudFront)
X-Amz-Cf-Id: -nk9xiIwvbVIVi1JqqvTU1q4fG6_9vNMIEvWCJNs_ZBQr4oOjq9NJw==
/var/folders/pt/1bt8d33d6f560gnyc9jy9rpr0000gn/T/ruby-build.20151113150550.23950/ruby-2.2.2 /var/folders/pt/1bt8d33d6f560gnyc9jy9rpr0000gn/T/ruby-build.20151113150550.23950 ~/.rbenv/plugins/ruby-build
config.guess already exists
config.sub already exists
checking build system type... x86_64-apple-darwin14.5.0
checking host system type... x86_64-apple-darwin14.5.0
checking target system type... x86_64-apple-darwin14.5.0
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether clang accepts -g... yes
checking for clang option to accept ISO C89... none needed
checking whether we are using the GNU C++ compiler... yes
checking whether clang++ accepts -g... yes
checking how to run the C preprocessor... clang -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking whether clang needs -traditional... no
checking for ld... ld
checking whether the linker is GNU ld... no
checking whether clang -E accepts -o... yes
checking for real target cpu... x86_64
checking for ranlib... ranlib
checking for ar... ar
checking for as... as
checking for objdump... no
checking for gobjdump... no
checking for objcopy... no
checking for gobjcopy... no
checking for nm... nm
checking whether ln -s works... yes
checking whether make sets $(MAKE)... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for a thread-safe mkdir -p... -d
use 'mkdir -p' as MKDIR_P
checking for dtrace... dtrace
checking for dot... dot
checking for doxygen... no
checking for pkg-config... pkg-config
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for cd using physical directory... cd -P
checking whether CFLAGS is valid... yes
checking whether LDFLAGS is valid... no
configure: error: something wrong with LDFLAGS="-L/Users/hiro/.rbenv/versions/2.2.2/lib "
make: *** No targets specified and no makefile found. Stop.
Ok, I have updated to Macosx 10.11 and it seems to work now...
I have updated to Macosx 10.11 and it seems to work now...
@hiromipaw That's strange, but I'm glad you worked around your problem!
This error just surfaced for me as well. Strange as I'd only just set up a brand new rbenv install on since upgrading to OSX 10.11
It worked about 2 weeks ago but this was the first time since then I needed to install a new ruby. I've not updated rbenv or ruby-build, I have updated homebrew and OSX has possibly run some updates in the background but I'm not sure, there is an XCode update in the list, could that be a culprit.
Can confirm that mkdir -p ~/.rbenv/versions/2.1.0/lib fixed it though. brew upgrade ruby-build has also helped (upgraded to 20151028)
I'm having problems installing any versions of ruby with ruby-build latest and current master of rbenv. This is pretty bad. See https://github.com/rbenv/ruby-build/issues/859
Colleague ran into the same problem with 2.1.0 on El Capitan. Manual mkdir also fixed it.
@mla 2.1.0 had a problem, but has been fixed in recent versions of ruby-build. Make sure your colleague updates!
Mine wasn't working because there was no /usr/local/lib directory (none of my brew formulae needed it). Creating it and re-running the install fixed the issue for me.
_(comment added for wider google-ability for problems other than this issue)_
For the record, the same fix helped rvm install 2.3.1 (where there was no rvm known ruby 2.3.1 binary & it had to compile it itself).
$ rvm install 2.3.1
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.11/x86_64/ruby-2.3.1.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
...
<elided>
...
ruby-2.3.1 - #extracting ruby-2.3.1 to /Users/ddd/.rvm/src/ruby-2.3.1....
ruby-2.3.1 - #configuring......
Error running './configure --prefix=/Users/ddd/.rvm/rubies/ruby-2.3.1 --with-opt-dir=/opt/local --disable-install-doc --enable-shared',
showing last 15 lines of /Users/ddd/.rvm/log/1468957690_ruby-2.3.1/configure.log
...
<elided>
...
checking whether CFLAGS is valid... yes
checking whether LDFLAGS is valid... no
configure: error: something wrong with LDFLAGS="-L/sw/lib -L/usr/local/lib -L/usr/lib -L/lib -I/usr/X11R6/include -I/opt/X11/include -I/opt/local/include"
There has been an error while running configure. Halting the installation.
Setting LDFLAGS to only directories that existed allowed the configure;make;install to proceed normally.
Can confirm. Whatever directory LDFLAGS referenced inside it, didn't exist. Creating it allowed for install to run fine.
Last 10 log lines:
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for cd using physical directory... cd -P
checking whether CFLAGS is valid... yes
checking whether LDFLAGS is valid... no
configure: error: something wrong with LDFLAGS="-L/Users/PAC?ckq4/.rbenv/versions/2.4.0/lib "
make: * No targets specified and no makefile found. Stop.
I get above error. It is because my user folder name us PACxecckq4. As a result xe is converted as ? and it fails.
Any solution? please
this worked for me: https://github.com/rbenv/ruby-build/issues/798
Most helpful comment
Try to create directory pointed by LDFLAGS, in example:
mkdir -p /Users/stone/.rbenv/versions/2.1.1/lib
For me - it worked!