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

Fedora31 build failed (psutils error) #25754

Closed
rdazvd opened this issue Feb 13, 2020 · 8 comments
Closed

Fedora31 build failed (psutils error) #25754

rdazvd opened this issue Feb 13, 2020 · 8 comments
Labels

Comments

@rdazvd
Copy link

@rdazvd rdazvd commented Feb 13, 2020

building 'psutil._psutil_linux' extension
    creating build/temp.linux-x86_64-2.7
    creating build/temp.linux-x86_64-2.7/psutil
    gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=567 -DPSUTIL_LINUX=1 -I/home/rdazvd/dev/github/servo/python/_virtualenv2.7/include/python2.7 -c psutil/_psutil_common.c -o build/temp.linux-x86_64-2.7/psutil/_psutil_common.o
    psutil/_psutil_common.c:9:10: fatal error: Python.h: No such file or directory
        9 | #include <Python.h>
          |          ^~~~~~~~~~
    compilation terminated.
    error: command 'gcc' failed with exit status 1

@jdm
Copy link
Member

@jdm jdm commented Feb 13, 2020

Could you include a log of the build failure?

@rdazvd rdazvd changed the title Fedora31 build failed ̣ Fedora31 build failed (psutils error) Feb 13, 2020
@pshaughn
Copy link
Member

@pshaughn pshaughn commented Feb 13, 2020

I observe that bootstrap.py lists python2-virtualenv and python2-pip, but not python2-dev which is probably where this header would be expected to come from. (I've never built on Fedora so don't take this as definitive.)

@rdazvd
Copy link
Author

@rdazvd rdazvd commented Feb 13, 2020

Very sorry for the half-baked issue. Pressed a few wrong buttons as I am struggling with a terribly configured keyboard right now :)

A thing to note is that there is no python2-virtualenv package on Fedora 31 (I installed it locally with pip2.7 -m --user virtualenv). All other dependencies were installed as instructed on the readme file.

Here is my entire output:

[rdazvd@localhost servo]$ ./mach bootstrap
"/home/rdazvd/dev/github/servo/python/_virtualenv2.7/bin/python2.7" "-m" "pip" "install" "-I" "-r" "/home/rdazvd/dev/github/servo/tests/wpt/web-platform-tests/tools/wptrunner/requirements_firefox.txt" failed with error code 1:
Output:
Processing /home/rdazvd/.cache/pip/wheels/72/f0/83/1deefd7488816075f93dfb716a58606c983f6561b926b080fd/marionette_driver-3.0.0-py2-none-any.whl
Collecting mozcrash==1.1.0
  Using cached mozcrash-1.1.0-py2.py3-none-any.whl (8.5 kB)
Collecting mozdownload==1.26.0
  Using cached mozdownload-1.26.0-py2-none-any.whl (26 kB)
Processing /home/rdazvd/.cache/pip/wheels/7c/b7/a7/6d63d69107436817ddd77c663fde6f41f481fb47a20c8a15d5/mozInstall-2.0.0-py2.py3-none-any.whl
Collecting mozleak==0.2
  Using cached mozleak-0.2-py2.py3-none-any.whl (6.9 kB)
Processing /home/rdazvd/.cache/pip/wheels/d3/0e/e7/ef092538ca859f8d1f29ce5bc67492d0a86232fe0256f92864/moznetwork-0.27-py2-none-any.whl
Collecting mozprocess==1.0.0
  Using cached mozprocess-1.0.0-py2.py3-none-any.whl (21 kB)
Collecting mozprofile==2.4.0
  Using cached mozprofile-2.4.0-py2.py3-none-any.whl (22 kB)
Collecting mozrunner==7.7.0
  Using cached mozrunner-7.7.0-py2.py3-none-any.whl (34 kB)
Collecting mozversion==2.2.0
  Using cached mozversion-2.2.0-py2.py3-none-any.whl (4.3 kB)
Collecting psutil==5.6.7
  Using cached psutil-5.6.7.tar.gz (448 kB)
Collecting six
  Using cached six-1.14.0-py2.py3-none-any.whl (10 kB)
Processing /home/rdazvd/.cache/pip/wheels/7f/d9/c6/19632d599677910115e65645ac5ccfe1d647ac262b806f91a9/mozfile-2.1.0-py2.py3-none-any.whl
Collecting mozlog>=3.0
  Using cached mozlog-5.0-py2.py3-none-any.whl (67 kB)
Collecting mozinfo>=1.0.0
  Using cached mozinfo-1.2.1-py2.py3-none-any.whl (7.1 kB)
Collecting redo==2.0.3
  Using cached redo-2.0.3-py2.py3-none-any.whl (5.2 kB)
Collecting packaging>=19.0
  Using cached packaging-20.1-py2.py3-none-any.whl (36 kB)
Collecting treeherder-client<6.0.0,>=5.0.0
  Using cached treeherder_client-5.0.0-py2.py3-none-any.whl (5.2 kB)
Collecting requests<3.0.0,>=2.21.0
  Using cached requests-2.22.0-py2.py3-none-any.whl (57 kB)
Collecting progressbar2>=3.34.3
  Using cached progressbar2-3.47.0-py2.py3-none-any.whl (24 kB)
Collecting mozdevice>=3.0.1
  Using cached mozdevice-3.0.7-py2.py3-none-any.whl (31 kB)
Collecting blessings>=1.3
  Using cached blessings-1.7-py2-none-any.whl (26 kB)
Collecting mozterm
  Using cached mozterm-1.0.0-py2.py3-none-any.whl (3.4 kB)
Collecting distro==1.4.0
  Using cached distro-1.4.0-py2.py3-none-any.whl (17 kB)
Collecting pyparsing>=2.0.2
  Using cached pyparsing-2.4.6-py2.py3-none-any.whl (67 kB)
Collecting chardet<3.1.0,>=3.0.2
  Using cached chardet-3.0.4-py2.py3-none-any.whl (133 kB)
Collecting idna<2.9,>=2.5
  Using cached idna-2.8-py2.py3-none-any.whl (58 kB)
Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1
  Using cached urllib3-1.25.8-py2.py3-none-any.whl (125 kB)
Collecting certifi>=2017.4.17
  Using cached certifi-2019.11.28-py2.py3-none-any.whl (156 kB)
Collecting python-utils>=2.3.0
  Using cached python_utils-2.3.0-py2.py3-none-any.whl (12 kB)
Building wheels for collected packages: psutil
  Building wheel for psutil (setup.py): started
  Building wheel for psutil (setup.py): finished with status 'error'
  Running setup.py clean for psutil
Failed to build psutil
Installing collected packages: six, blessings, mozterm, mozlog, mozversion, mozdevice, mozfile, mozprofile, distro, mozinfo, mozprocess, mozrunner, marionette-driver, mozcrash, redo, pyparsing, packaging, chardet, idna, urllib3, certifi, requests, treeherder-client, python-utils, progressbar2, mozdownload, mozinstall, mozleak, moznetwork, psutil
    Running setup.py install for psutil: started
    Running setup.py install for psutil: finished with status 'error'
Error:
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
  ERROR: Command errored out with exit status 1:
   command: /home/rdazvd/dev/github/servo/python/_virtualenv2.7/bin/python2.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-98hVVq/psutil/setup.py'"'"'; __file__='"'"'/tmp/pip-install-98hVVq/psutil/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-9FrsrR
       cwd: /tmp/pip-install-98hVVq/psutil/
  Complete output (44 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-2.7
  creating build/lib.linux-x86_64-2.7/psutil
  copying psutil/_pswindows.py -> build/lib.linux-x86_64-2.7/psutil
  copying psutil/_pssunos.py -> build/lib.linux-x86_64-2.7/psutil
  copying psutil/_psposix.py -> build/lib.linux-x86_64-2.7/psutil
  copying psutil/_psosx.py -> build/lib.linux-x86_64-2.7/psutil
  copying psutil/_pslinux.py -> build/lib.linux-x86_64-2.7/psutil
  copying psutil/_psbsd.py -> build/lib.linux-x86_64-2.7/psutil
  copying psutil/_psaix.py -> build/lib.linux-x86_64-2.7/psutil
  copying psutil/_compat.py -> build/lib.linux-x86_64-2.7/psutil
  copying psutil/_common.py -> build/lib.linux-x86_64-2.7/psutil
  copying psutil/__init__.py -> build/lib.linux-x86_64-2.7/psutil
  creating build/lib.linux-x86_64-2.7/psutil/tests
  copying psutil/tests/test_windows.py -> build/lib.linux-x86_64-2.7/psutil/tests
  copying psutil/tests/test_unicode.py -> build/lib.linux-x86_64-2.7/psutil/tests
  copying psutil/tests/test_system.py -> build/lib.linux-x86_64-2.7/psutil/tests
  copying psutil/tests/test_sunos.py -> build/lib.linux-x86_64-2.7/psutil/tests
  copying psutil/tests/test_process.py -> build/lib.linux-x86_64-2.7/psutil/tests
  copying psutil/tests/test_posix.py -> build/lib.linux-x86_64-2.7/psutil/tests
  copying psutil/tests/test_osx.py -> build/lib.linux-x86_64-2.7/psutil/tests
  copying psutil/tests/test_misc.py -> build/lib.linux-x86_64-2.7/psutil/tests
  copying psutil/tests/test_memory_leaks.py -> build/lib.linux-x86_64-2.7/psutil/tests
  copying psutil/tests/test_linux.py -> build/lib.linux-x86_64-2.7/psutil/tests
  copying psutil/tests/test_contracts.py -> build/lib.linux-x86_64-2.7/psutil/tests
  copying psutil/tests/test_connections.py -> build/lib.linux-x86_64-2.7/psutil/tests
  copying psutil/tests/test_bsd.py -> build/lib.linux-x86_64-2.7/psutil/tests
  copying psutil/tests/test_aix.py -> build/lib.linux-x86_64-2.7/psutil/tests
  copying psutil/tests/runner.py -> build/lib.linux-x86_64-2.7/psutil/tests
  copying psutil/tests/__main__.py -> build/lib.linux-x86_64-2.7/psutil/tests
  copying psutil/tests/__init__.py -> build/lib.linux-x86_64-2.7/psutil/tests
  running build_ext
  building 'psutil._psutil_linux' extension
  creating build/temp.linux-x86_64-2.7
  creating build/temp.linux-x86_64-2.7/psutil
  gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=567 -DPSUTIL_LINUX=1 -I/home/rdazvd/dev/github/servo/python/_virtualenv2.7/include/python2.7 -c psutil/_psutil_common.c -o build/temp.linux-x86_64-2.7/psutil/_psutil_common.o
  psutil/_psutil_common.c:9:10: fatal error: Python.h: No such file or directory
      9 | #include <Python.h>
        |          ^~~~~~~~~~
  compilation terminated.
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for psutil
    ERROR: Command errored out with exit status 1:
     command: /home/rdazvd/dev/github/servo/python/_virtualenv2.7/bin/python2.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-98hVVq/psutil/setup.py'"'"'; __file__='"'"'/tmp/pip-install-98hVVq/psutil/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-GUtMVp/install-record.txt --single-version-externally-managed --compile --install-headers /home/rdazvd/dev/github/servo/python/_virtualenv2.7/include/site/python2.7/psutil
         cwd: /tmp/pip-install-98hVVq/psutil/
    Complete output (44 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-2.7
    creating build/lib.linux-x86_64-2.7/psutil
    copying psutil/_pswindows.py -> build/lib.linux-x86_64-2.7/psutil
    copying psutil/_pssunos.py -> build/lib.linux-x86_64-2.7/psutil
    copying psutil/_psposix.py -> build/lib.linux-x86_64-2.7/psutil
    copying psutil/_psosx.py -> build/lib.linux-x86_64-2.7/psutil
    copying psutil/_pslinux.py -> build/lib.linux-x86_64-2.7/psutil
    copying psutil/_psbsd.py -> build/lib.linux-x86_64-2.7/psutil
    copying psutil/_psaix.py -> build/lib.linux-x86_64-2.7/psutil
    copying psutil/_compat.py -> build/lib.linux-x86_64-2.7/psutil
    copying psutil/_common.py -> build/lib.linux-x86_64-2.7/psutil
    copying psutil/__init__.py -> build/lib.linux-x86_64-2.7/psutil
    creating build/lib.linux-x86_64-2.7/psutil/tests
    copying psutil/tests/test_windows.py -> build/lib.linux-x86_64-2.7/psutil/tests
    copying psutil/tests/test_unicode.py -> build/lib.linux-x86_64-2.7/psutil/tests
    copying psutil/tests/test_system.py -> build/lib.linux-x86_64-2.7/psutil/tests
    copying psutil/tests/test_sunos.py -> build/lib.linux-x86_64-2.7/psutil/tests
    copying psutil/tests/test_process.py -> build/lib.linux-x86_64-2.7/psutil/tests
    copying psutil/tests/test_posix.py -> build/lib.linux-x86_64-2.7/psutil/tests
    copying psutil/tests/test_osx.py -> build/lib.linux-x86_64-2.7/psutil/tests
    copying psutil/tests/test_misc.py -> build/lib.linux-x86_64-2.7/psutil/tests
    copying psutil/tests/test_memory_leaks.py -> build/lib.linux-x86_64-2.7/psutil/tests
    copying psutil/tests/test_linux.py -> build/lib.linux-x86_64-2.7/psutil/tests
    copying psutil/tests/test_contracts.py -> build/lib.linux-x86_64-2.7/psutil/tests
    copying psutil/tests/test_connections.py -> build/lib.linux-x86_64-2.7/psutil/tests
    copying psutil/tests/test_bsd.py -> build/lib.linux-x86_64-2.7/psutil/tests
    copying psutil/tests/test_aix.py -> build/lib.linux-x86_64-2.7/psutil/tests
    copying psutil/tests/runner.py -> build/lib.linux-x86_64-2.7/psutil/tests
    copying psutil/tests/__main__.py -> build/lib.linux-x86_64-2.7/psutil/tests
    copying psutil/tests/__init__.py -> build/lib.linux-x86_64-2.7/psutil/tests
    running build_ext
    building 'psutil._psutil_linux' extension
    creating build/temp.linux-x86_64-2.7
    creating build/temp.linux-x86_64-2.7/psutil
    gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=567 -DPSUTIL_LINUX=1 -I/home/rdazvd/dev/github/servo/python/_virtualenv2.7/include/python2.7 -c psutil/_psutil_common.c -o build/temp.linux-x86_64-2.7/psutil/_psutil_common.o
    psutil/_psutil_common.c:9:10: fatal error: Python.h: No such file or directory
        9 | #include <Python.h>
          |          ^~~~~~~~~~
    compilation terminated.
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/rdazvd/dev/github/servo/python/_virtualenv2.7/bin/python2.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-98hVVq/psutil/setup.py'"'"'; __file__='"'"'/tmp/pip-install-98hVVq/psutil/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-GUtMVp/install-record.txt --single-version-externally-managed --compile --install-headers /home/rdazvd/dev/github/servo/python/_virtualenv2.7/include/site/python2.7/psutil Check the logs for full command output.
@rdazvd
Copy link
Author

@rdazvd rdazvd commented Feb 13, 2020

I observe that bootstrap.py lists python2-virtualenv and python2-pip, but not python2-dev which is probably where this header would be expected to come from. (I've never built on Fedora so don't take this as definitive.)

I have python2-devel-2.7.17-1.fc31.x86_64 installed which, in theory, contains the necessary header file.

@eiglow
Copy link

@eiglow eiglow commented Feb 20, 2020

At the moment, the lack of python2-virtualenv is still preventing Servo from being built at all on Fedora 31. I haven't been able to find any substitutes.

@dralley
Copy link
Contributor

@dralley dralley commented Mar 25, 2020

It seems like mach is in a state where at least python3 ./mach build --dev functions appropriately. So, if on Fedora 30 or 31, try using python3 & python3-virtualenv.

@dralley
Copy link
Contributor

@dralley dralley commented Apr 14, 2020

@jdm This should be fixed by #26174

@dralley
Copy link
Contributor

@dralley dralley commented Apr 14, 2020

In any event, I can build on Fedora 31 w/ python3-devel installed (and I don't have python2-devel installed)

@jdm jdm closed this Apr 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.