Project

General

Profile

Actions

Bug #9010

open

./configure --prefix= cannot handle directories with spaces

Added by postmodern (Hal Brodigan) over 10 years ago. Updated 5 months ago.

Status:
Assigned
Target version:
-
ruby -v:
trunk
Backport:
[ruby-core:57793]
Tags:

Description

It appears that the linking task fails when the --prefix value contains spaces.

Steps to Reproduce:

  1. ./configure --prefix="$HOME/foo bar"
  2. make

Expected Result: success
Actual Result:

make[2]: Entering directory /home/hal/src/ruby-2.0.0-p247' linking ruby gcc: error: bar/lib: No such file or directory gcc: error: bar/lib: No such file or directory make[2]: *** [ruby] Error 1 make[2]: Leaving directory /home/hal/src/ruby-2.0.0-p247'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/hal/src/ruby-2.0.0-p247'
make: *** [build-ext] Error 2

Actions #1

Updated by nagachika (Tomoyuki Chikanaga) over 10 years ago

  • Tracker changed from Backport to Bug
  • Project changed from Backport200 to Ruby master
  • Status changed from Open to Assigned
  • Assignee set to nobu (Nobuyoshi Nakada)
  • Priority changed from 5 to Normal

Updated by Hanmac (Hans Mackowiak) over 10 years ago

maybe its a problem with your shell? on Mac i am currently using it works

hm or try if you can build ruby-trunk.

Updated by postmodern (Hal Brodigan) about 10 years ago

Tested against r44682 on bash 4.2.5 and got the same error:

$ ./configure --prefix="$HOME/foo bar"
$ make
...
linking static-library libruby-static.a
verifying static-library libruby-static.a
linking ruby
gcc: error: bar/lib: No such file or directory
gcc: error: bar/lib: No such file or directory
make[2]: *** [ruby] Error 1
make[2]: Leaving directory `/vault/0/src/ruby/trunk'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/vault/0/src/ruby/trunk'
make: *** [build-ext] Error 2

Updated by hsbt (Hiroshi SHIBATA) over 9 years ago

  • ruby -v set to trunk

I can't reproduce with trunk and ruby_2_1 branch.

Actions #5

Updated by postmodern (Hal Brodigan) about 9 years ago

Still hitting this with ruby 2.2.1.

Steps To Reproduce

mkdir "$PWD/fake home"
export HOME="$PWD/fake home"
cd "$HOME"
wget http://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.1.tar.bz2
tar -xjvf ruby-2.2.1.tar.bz2
cd ruby-2.2.1
./configure --prefix="$HOME/.rubies/ruby-2.2.1"
make

Result

linking ruby
gcc: error: home/.rubies/ruby-2.2.1/lib: No such file or directory
gcc: error: home/.rubies/ruby-2.2.1/lib: No such file or directory
make[2]: *** [ruby] Error 1
make[2]: Leaving directory `/home/hal/fake home/ruby-2.2.1'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/hal/fake home/ruby-2.2.1'
make: *** [build-ext] Error 2

Updated by jeremyevans0 (Jeremy Evans) almost 3 years ago

This appears to still be an issue in the master branch. It appears to be first hit when linking extensions (example uses --prefix="/home/jeremy/local foo bar"):

cc -shared -fPIC -o ../../../.ext/x86_64-openbsd6.9/-test-/RUBY_ALIGNOF.so c.o -L. -L../../.. -L. -L/usr/local/lib -fstack-protector-strong -Wl,-E -L/usr/local/lib    -Wl,-rpath,/home/jeremy/local foo bar/lib -L/home/jeremy/local foo bar/lib -lruby  -lm   -lc

Seems like quoting the -Wl,-rpath, and -L arguments may fix this particular case, but I'm not sure if that will cause other problems.

Updated by fcheung (Frederick Cheung) 5 months ago

Still happening on master as b1f345b1 when building on macos:

../configure --prefix="${HOME}/dir with space/.rubies/ruby-master"
make install

produces

...
linking shared-library libruby.3.3.dylib
clang: error: no such file or directory: 'with'
clang: error: no such file or directory: 'space/.rubies/ruby-master/lib/libruby.3.3.dylib'
make: *** [libruby.3.3.dylib] Error 1
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0