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

Installation fails at calling libtool when install dir contains space #1407

Closed
m5n opened this issue Jan 9, 2016 · 3 comments
Closed

Installation fails at calling libtool when install dir contains space #1407

m5n opened this issue Jan 9, 2016 · 3 comments

Comments

@m5n
Copy link

m5n commented Jan 9, 2016

Building this on Cygwin using ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-cygwin].
Note the user directory contains a space: "Space Space"

Below is the full output, but the issue is that quotes are no longer around the path when libtool is called:

 /bin/sh ./libtool   --mode=install /usr/bin/install -c   libxml2.la '/home/Space Space/.gem/ruby/gems/nokogiri-1.6.7/ports/x86_64-unknown-cygwin/libxml2/2.9.2/lib'
libtool: install: /usr/bin/install -c .libs/libxml2.lai /home/Space Space/.gem/ruby/gems/nokogiri-1.6.7/ports/x86_64-unknown-cygwin/libxml2/2.9.2/lib/libxml2.la

Full output:

Installing nokogiri 1.6.7 with native extensions

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    /usr/bin/ruby.exe -r ./siteconf20160108-3592-twtqs6.rb extconf.rb
checking if the C compiler accepts ... yes
Building nokogiri using packaged libraries.
Using mini_portile version 2.0.0
checking for gzdopen() in -lz... yes
checking for iconv... yes
************************************************************************
IMPORTANT NOTICE:

Building Nokogiri with a packaged version of libxml2-2.9.2
with the following patches applied:
        - 0001-Revert-Missing-initialization-for-the-catalog-module.patch
        - 0002-Fix-missing-entities-after-CVE-2014-3660-fix.patch
        - 0003-Stop-parsing-on-entities-boundaries-errors.patch
        - 0004-Cleanup-conditional-section-error-handling.patch
        - 0005-CVE-2015-1819-Enforce-the-reader-to-run-in-constant-.patch
        - 0006-Another-variation-of-overflow-in-Conditional-section.patch
        - 0007-Fix-an-error-in-previous-Conditional-section-patch.patch
        - 0008-CVE-2015-8035-Fix-XZ-compression-support-loop.patch
        - 0009-Updated-config.guess.patch
        - 0010-Fix-parsering-short-unclosed-comment-uninitialized-access.patch

Team Nokogiri will keep on doing their best to provide security
updates in a timely manner, but if this is a concern for you and want
to use the system library instead; abort this installation process and
reinstall nokogiri as follows:

    gem install nokogiri -- --use-system-libraries
        [--with-xml2-config=/path/to/xml2-config]
        [--with-xslt-config=/path/to/xslt-config]

If you are using Bundler, tell it to use the option:

    bundle config build.nokogiri --use-system-libraries
    bundle install

Note, however, that nokogiri is not fully compatible with arbitrary
versions of libxml2 provided by OS/package vendors.
************************************************************************
Extracting libxml2-2.9.2.tar.gz into tmp/x86_64-unknown-cygwin/ports/libxml2/2.9.2... OK
Running git apply with /home/Space Space/.gem/ruby/gems/nokogiri-1.6.7/patches/libxml2/0001-Revert-Missing-initialization-for-the-catalog-module.patch... OK
Running git apply with /home/Space Space/.gem/ruby/gems/nokogiri-1.6.7/patches/libxml2/0002-Fix-missing-entities-after-CVE-2014-3660-fix.patch... OK
Running git apply with /home/Space Space/.gem/ruby/gems/nokogiri-1.6.7/patches/libxml2/0003-Stop-parsing-on-entities-boundaries-errors.patch... OK
Running git apply with /home/Space Space/.gem/ruby/gems/nokogiri-1.6.7/patches/libxml2/0004-Cleanup-conditional-section-error-handling.patch... OK
Running git apply with /home/Space Space/.gem/ruby/gems/nokogiri-1.6.7/patches/libxml2/0005-CVE-2015-1819-Enforce-the-reader-to-run-in-constant-.patch... OK
Running git apply with /home/Space Space/.gem/ruby/gems/nokogiri-1.6.7/patches/libxml2/0006-Another-variation-of-overflow-in-Conditional-section.patch... OK
Running git apply with /home/Space Space/.gem/ruby/gems/nokogiri-1.6.7/patches/libxml2/0007-Fix-an-error-in-previous-Conditional-section-patch.patch... OK
Running git apply with /home/Space Space/.gem/ruby/gems/nokogiri-1.6.7/patches/libxml2/0008-CVE-2015-8035-Fix-XZ-compression-support-loop.patch... OK
Running git apply with /home/Space Space/.gem/ruby/gems/nokogiri-1.6.7/patches/libxml2/0009-Updated-config.guess.patch... OK
Running git apply with /home/Space Space/.gem/ruby/gems/nokogiri-1.6.7/patches/libxml2/0010-Fix-parsering-short-unclosed-comment-uninitialized-access.patch... OK
Running 'configure' for libxml2 2.9.2... OK
Running 'compile' for libxml2 2.9.2... OK
Running 'install' for libxml2 2.9.2... ERROR, review '/home/Space Space/.gem/ruby/gems/nokogiri-1.6.7/ext/nokogiri/tmp/x86_64-unknown-cygwin/ports/libxml2/2.9.2/install.log' to see what happened. Last lines are:
========================================================================
make[3]: Leaving directory '/home/Space Space/.gem/ruby/gems/nokogiri-1.6.7/ext/nokogiri/tmp/x86_64-unknown-cygwin/ports/libxml2/2.9.2/libxml2-2.9.2/include'
make[2]: Leaving directory '/home/Space Space/.gem/ruby/gems/nokogiri-1.6.7/ext/nokogiri/tmp/x86_64-unknown-cygwin/ports/libxml2/2.9.2/libxml2-2.9.2/include'
Making install in .
make[2]: Entering directory '/home/Space Space/.gem/ruby/gems/nokogiri-1.6.7/ext/nokogiri/tmp/x86_64-unknown-cygwin/ports/libxml2/2.9.2/libxml2-2.9.2'
make[3]: Entering directory '/home/Space Space/.gem/ruby/gems/nokogiri-1.6.7/ext/nokogiri/tmp/x86_64-unknown-cygwin/ports/libxml2/2.9.2/libxml2-2.9.2'
 /usr/bin/mkdir -p '/home/Space Space/.gem/ruby/gems/nokogiri-1.6.7/ports/x86_64-unknown-cygwin/libxml2/2.9.2/lib'
 /bin/sh ./libtool   --mode=install /usr/bin/install -c   libxml2.la '/home/Space Space/.gem/ruby/gems/nokogiri-1.6.7/ports/x86_64-unknown-cygwin/libxml2/2.9.2/lib'
libtool: install: /usr/bin/install -c .libs/libxml2.lai /home/Space Space/.gem/ruby/gems/nokogiri-1.6.7/ports/x86_64-unknown-cygwin/libxml2/2.9.2/lib/libxml2.la
/usr/bin/install: target 'Space/.gem/ruby/gems/nokogiri-1.6.7/ports/x86_64-unknown-cygwin/libxml2/2.9.2/lib/libxml2.la' is not a directory
Makefile:912: recipe for target 'install-libLTLIBRARIES' failed
make[3]: *** [install-libLTLIBRARIES] Error 1
make[3]: Leaving directory '/home/Space Space/.gem/ruby/gems/nokogiri-1.6.7/ext/nokogiri/tmp/x86_64-unknown-cygwin/ports/libxml2/2.9.2/libxml2-2.9.2'
Makefile:1731: recipe for target 'install-am' failed
make[2]: *** [install-am] Error 2
make[2]: Leaving directory '/home/Space Space/.gem/ruby/gems/nokogiri-1.6.7/ext/nokogiri/tmp/x86_64-unknown-cygwin/ports/libxml2/2.9.2/libxml2-2.9.2'
Makefile:1429: recipe for target 'install-recursive' failed
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory '/home/Space Space/.gem/ruby/gems/nokogiri-1.6.7/ext/nokogiri/tmp/x86_64-unknown-cygwin/ports/libxml2/2.9.2/libxml2-2.9.2'
Makefile:1725: recipe for target 'install' failed
make: *** [install] Error 2
========================================================================
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=/usr/bin/$(RUBY_BASE_NAME)
        --help
        --clean
        --use-system-libraries
        --enable-static
        --disable-static
        --with-zlib-dir
        --without-zlib-dir
        --with-zlib-include
        --without-zlib-include=${zlib-dir}/include
        --with-zlib-lib
        --without-zlib-lib=${zlib-dir}/lib
        --enable-cross-build
        --disable-cross-build
/home/Space Space/.gem/ruby/gems/mini_portile2-2.0.0/lib/mini_portile2/mini_portile.rb:366:in `block in execute': Failed to complete install task (RuntimeError)
        from /home/Space Space/.gem/ruby/gems/mini_portile2-2.0.0/lib/mini_portile2/mini_portile.rb:337:in `chdir'
        from /home/Space Space/.gem/ruby/gems/mini_portile2-2.0.0/lib/mini_portile2/mini_portile.rb:337:in `execute'
        from /home/Space Space/.gem/ruby/gems/mini_portile2-2.0.0/lib/mini_portile2/mini_portile.rb:116:in `install'
        from /home/Space Space/.gem/ruby/gems/mini_portile2-2.0.0/lib/mini_portile2/mini_portile.rb:151:in `cook'
        from extconf.rb:289:in `block (2 levels) in process_recipe'
        from extconf.rb:182:in `block in chdir_for_build'
        from extconf.rb:181:in `chdir'
        from extconf.rb:181:in `chdir_for_build'
        from extconf.rb:288:in `block in process_recipe'
        from extconf.rb:187:in `tap'
        from extconf.rb:187:in `process_recipe'
        from extconf.rb:478:in `<main>'

extconf failed, exit code 1

Gem files will remain installed in /home/Space Space/.gem/ruby/gems/nokogiri-1.6.7 for inspection.
Results logged to /home/Space Space/.gem/ruby/extensions/x86_64-cygwin/nokogiri-1.6.7/gem_make.out
@m5n
Copy link
Author

m5n commented Jan 10, 2016

Worked around it by temporarily renaming the directory with spaces and overriding some environment variables to point to the new location instead.

@flavorjones
Copy link
Member

Hi!

I believe that the Makefile that libxml2 generates does contain a properly-quoted directory in the command. Can you double-check what it looks like on your system?

I imagine that this might be an issue with the version of libtool you have on your machine? It doesn't look like an issue that Nokogiri or even mini_portile can address.

@m5n
Copy link
Author

m5n commented Jan 14, 2016

Sorry, I don't have the project anymore, so I cannot test this without recreating everything. Since I posted the workaround and you rightly so indicated this is not a Nokogiri issue, I am closing this issue.

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

2 participants