[Bug 1768644] Re: PY_CFLAGS contains reference to -specs=/usr/share/dpkg/no-pie-compile.specs
Launchpad Bug Tracker
1768644 at bugs.launchpad.net
Thu Sep 20 07:14:51 UTC 2018
This bug was fixed in the package python3.6 - 3.6.6-1~18.04
---------------
python3.6 (3.6.6-1~18.04) bionic-proposed; urgency=medium
* SRU: LP: #1792143. Update Python 3.6 to the recent subminor release.
python3.6 (3.6.6-1) unstable; urgency=medium
* Python 3.6.6 release.
python3.6 (3.6.6~rc1-4) unstable; urgency=medium
* Update to 20180622 from the 3.6 branch.
- Fix installation of idlelib testsuite.
python3.6 (3.6.6~rc1-3) unstable; urgency=medium
* Update to 20180619 from the 3.6 branch.
* Let ensurepip work with pip versions 9 or 10. Closes: #901797.
* pdb(1): Fix pointer to HTML documentation. Closes: #901603.
python3.6 (3.6.6~rc1-1) unstable; urgency=medium
* Python 3.6.6 release candidate 1.
python3.6 (3.6.5-10) unstable; urgency=medium
* Update to 20180608 from the 3.6 branch.
* Update the the sysconfig-debian-schemes patch, not yet applied.
sysconfig: The 'posix_local' schema name is the default unless the env var
DEB_PYTHON_INSTALL_LAYOUT is set to 'deb' or 'deb_system'. Use the latter
for package buillds.
* Build cmath as a builtin instead of an extension.
* Run the test_code_module, test_zipfile tests in the autopkg tests again.
* Build using GCC 8.
python3.6 (3.6.5-9) unstable; urgency=medium
* python3.6: Add breaks on python3-all (<< 3.6.5~rc1-1),
python3-dev (<< 3.6.5~rc1-1), python3-venv (<< 3.6.5-2). Closes: #898401.
python3.6 (3.6.5-8) unstable; urgency=medium
* Fix the lto build for extensions, passing -fPIC to the linker.
python3.6 (3.6.5-6) unstable; urgency=medium
* Don't inject dpkg's compiler specs into distutils. LP: #1768644.
python3.6 (3.6.5-5) unstable; urgency=medium
* Fix the lto build on x86_64 architectures.
* Make the build of the shared modules verbose again.
python3.6 (3.6.5-4) unstable; urgency=medium
* Re-enable pgo/lto builds.
-- Matthias Klose <doko at ubuntu.com> Wed, 12 Sep 2018 20:26:19 +0200
** Changed in: python3.6 (Ubuntu Bionic)
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to python3.6 in Ubuntu.
https://bugs.launchpad.net/bugs/1768644
Title:
PY_CFLAGS contains reference to -specs=/usr/share/dpkg/no-pie-
compile.specs
Status in python3.6 package in Ubuntu:
Fix Released
Status in python3.6 source package in Bionic:
Fix Released
Status in python3.6 source package in Cosmic:
Fix Released
Bug description:
SRU:
Impact]
* Causing a build failure
[Test Case]
* See below. Or just check that the flag doesn't show
up when building extensions.
[Regression Potential]
* I don't see any. These flags are injected anyway
in the package builds for extensions. It's only about
virtualenv installations.
Minimal reproduction (docker):
FROM ubuntu:bionic
RUN apt-get update && \
apt-get install -y --no-install-recommends gcc python-dev virtualenv && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN virtualenv /venv -ppython3 && \
/venv/bin/pip install ujson
Fails with:
Collecting ujson
Downloading https://files.pythonhosted.org/packages/16/c4/79f3409bc710559015464e5f49b9879430d8f87498ecdc335899732e5377/ujson-1.35.tar.gz (192kB)
Building wheels for collected packages: ujson
Running setup.py bdist_wheel for ujson: started
Running setup.py bdist_wheel for ujson: finished with status 'error'
Complete output from command /venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-x7e5igby/ujson/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-de4xsrzr --python-tag cp36:
running bdist_wheel
running build
running build_ext
building 'ujson' extension
creating build
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/python
creating build/temp.linux-x86_64-3.6/lib
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.6-EKG1lX/python3.6-3.6.5=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I./python -I./lib -I/usr/include/python3.6m -I/venv/include/python3.6m -c ./python/ujson.c -o build/temp.linux-x86_64-3.6/./python/ujson.o -D_GNU_SOURCE
x86_64-linux-gnu-gcc: error: /usr/share/dpkg/no-pie-compile.specs: No such file or directory
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Failed building wheel for ujson
Running setup.py clean for ujson
Failed to build ujson
Installing collected packages: ujson
Running setup.py install for ujson: started
Running setup.py install for ujson: finished with status 'error'
Complete output from command /venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-x7e5igby/ujson/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-d0l7cnq5/install-record.txt --single-version-externally-managed --compile --install-headers /venv/include/site/python3.6/ujson:
running install
running build
running build_ext
building 'ujson' extension
creating build
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/python
creating build/temp.linux-x86_64-3.6/lib
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.6-EKG1lX/python3.6-3.6.5=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I./python -I./lib -I/usr/include/python3.6m -I/venv/include/python3.6m -c ./python/ujson.c -o build/temp.linux-x86_64-3.6/./python/ujson.o -D_GNU_SOURCE
x86_64-linux-gnu-gcc: error: /usr/share/dpkg/no-pie-compile.specs: No such file or directory
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-x7e5igby/ujson/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-d0l7cnq5/install-record.txt --single-version-externally-managed --compile --install-headers /venv/include/site/python3.6/ujson" failed with error code 1 in /tmp/pip-install-x7e5igby/ujson/
The command '/bin/sh -c virtualenv /venv -ppython3 && /venv/bin/pip install ujson' returned a non-zero code: 1
The root cause of this seems to be the PY_CFLAGS sysconfig setting
which contains flags that were used to build python itself, including
a reference to a file which doesn't exist:
root at 71b2faa3da66:/# python3 -m sysconfig | grep no-pie-compile
CFLAGS = "-Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.6-EKG1lX/python3.6-3.6.5=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security"
CONFIGURE_CFLAGS = "-g -fdebug-prefix-map=/build/python3.6-EKG1lX/python3.6-3.6.5=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security"
CONFIG_ARGS = "'--enable-shared' '--prefix=/usr' '--enable-ipv6' '--enable-loadable-sqlite-extensions' '--with-dbmliborder=bdb:gdbm' '--with-computed-gotos' '--without-ensurepip' '--with-system-expat' '--with-system-libmpdec' '--with-system-ffi' 'CC=x86_64-linux-gnu-gcc' 'CFLAGS=-g -fdebug-prefix-map=/build/python3.6-EKG1lX/python3.6-3.6.5=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security ' 'LDFLAGS=-Wl,-Bsymbolic-functions -specs=/usr/share/dpkg/no-pie-link.specs -Wl,-z,relro' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2'"
PY_CFLAGS = "-Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.6-EKG1lX/python3.6-3.6.5=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security"
PY_CORE_CFLAGS = "-Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.6-EKG1lX/python3.6-3.6.5=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -IObjects -IInclude -IPython -I. -I../Include -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPy_BUILD_CORE"
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python3.6/+bug/1768644/+subscriptions
More information about the foundations-bugs
mailing list