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

Can't build libuv on gcc 7 because it's not 7.something #162

Open
interfect opened this issue Aug 28, 2017 · 1 comment
Open

Can't build libuv on gcc 7 because it's not 7.something #162

interfect opened this issue Aug 28, 2017 · 1 comment

Comments

@interfect
Copy link

My build throws the following error building libuv:

Compiling Test jsbuild/tests/secretbox8_xsalsa20poly1305
Compiling Test jsbuild/tests/stream
Compiling Test jsbuild/tests/stream3
Compiling Test jsbuild/tests/stream2
Compiling Test jsbuild/tests/stream4
Waiting for [3] processes
Waiting for [2] processes
Waiting for [1] processes
done
testing python python
sys.version_info(major=2, minor=7, micro=13, releaselevel='final', serial=0)

Build Libuv
Traceback (most recent call last):
  File "./gyp_uv.py", line 81, in <module>
    (major, minor), is_clang = compiler_version()
ValueError: need more than 1 value to unpack
make: *** out: No such file or directory.  Stop.

It then continues on and dies because libuv didn't build.

It's because Ubuntu 17.10 (which I am cool enough to be running in August) ships GCC 7, which has a version (from gcc -dumpversion) of just 7 (and not 7.0). gyp_uv.py assums that the gcc -dumpversion output will always contain a .:

def compiler_version():
  proc = subprocess.Popen(CC.split() + ['--version'], stdout=subprocess.PIPE)
  is_clang = 'clang' in proc.communicate()[0].split('\n')[0]
  proc = subprocess.Popen(CC.split() + ['-dumpversion'], stdout=subprocess.PIPE)
  version = proc.communicate()[0].split('.')
  version = map(int, version[:2])
  version = tuple(version)
  return (version, is_clang)

version gets unpacked into a 2-element tuple later, but GCC 7 makes version only have one item.

interfect added a commit to interfect/cjdns that referenced this issue Aug 28, 2017
GCC 7 reports a version of `7` and not `7.0`.

Fixes hyperboria#162
@zotdv
Copy link

zotdv commented Jan 2, 2018

dumpversion in GCC 7.2.0 also returns 7 instead of 7.2

me@VirtualBox:~/cjdns$ gcc --version
gcc (Ubuntu 7.2.0-8ubuntu3) 7.2.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

me@VirtualBox:~/cjdns$ gcc -dumpversion
7

So shoud you get major & minor version from --version but not -dumpversion ?

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

No branches or pull requests

2 participants