Bug#992669: python3.9-dev: python3.9-config --cflags includes -specs=/usr/share/dpkg/no-pie-compile.specs

2021-08-24 Thread Mark Watts
Matthias,

I've added the --embed flag to the python3.9-config options in my
Dockerfile example above, but have the same result. Apparently the
specs file comes from libdpkg-perl. I don't understand what the specs
file actually does, but I was able to build with or without it. If it
*is* supposed to be in the flags for something, libdpkg-perl should at
least be a "suggests" if not "recommends", right?

On Mon, Aug 23, 2021 at 5:09 AM Matthias Klose  wrote:
>
> On 8/22/21 5:59 AM, Mark Watts wrote:
> > Package: python3.9-dev
> > Version: 3.9.2-1
> > Severity: normal
> > X-Debbugs-Cc: watts.mark2...@gmail.com
> >
> > Dear Maintainer,
> >
> > I'm using the python3.9-config --cflags to provide flags for building a
> > program that embeds python. I'm doing this in a Docker container with
> > the essential parts described by the Dockerfile excerpt below. I would
> > expect that any files referenced in the CFLAGS would be installed along
> > with python3.9-config. Instead, I have to install another package to get
> > this file or do a sed on cflags to remove the -specs argument.
>
> your expectations are unexpected. You have to call python3-config with the
> --embed options for the embedded case.  That will get you the complete options
> needed for embedding an interpreter.  I'm not sure I want to have these extra
> dependencies as part of the python3.9-dev package.
>
> You also don't write which options are missing from your build.



-- 
Cheers,

Mark W.



Bug#992669: python3.9-dev: python3.9-config --cflags includes -specs=/usr/share/dpkg/no-pie-compile.specs

2021-08-23 Thread Matthias Klose
On 8/22/21 5:59 AM, Mark Watts wrote:
> Package: python3.9-dev
> Version: 3.9.2-1
> Severity: normal
> X-Debbugs-Cc: watts.mark2...@gmail.com
> 
> Dear Maintainer,
> 
> I'm using the python3.9-config --cflags to provide flags for building a
> program that embeds python. I'm doing this in a Docker container with
> the essential parts described by the Dockerfile excerpt below. I would
> expect that any files referenced in the CFLAGS would be installed along
> with python3.9-config. Instead, I have to install another package to get
> this file or do a sed on cflags to remove the -specs argument.

your expectations are unexpected. You have to call python3-config with the
--embed options for the embedded case.  That will get you the complete options
needed for embedding an interpreter.  I'm not sure I want to have these extra
dependencies as part of the python3.9-dev package.

You also don't write which options are missing from your build.



Bug#992669: python3.9-dev: python3.9-config --cflags includes -specs=/usr/share/dpkg/no-pie-compile.specs

2021-08-21 Thread Mark Watts
Package: python3.9-dev
Version: 3.9.2-1
Severity: normal
X-Debbugs-Cc: watts.mark2...@gmail.com

Dear Maintainer,

I'm using the python3.9-config --cflags to provide flags for building a
program that embeds python. I'm doing this in a Docker container with
the essential parts described by the Dockerfile excerpt below. I would
expect that any files referenced in the CFLAGS would be installed along
with python3.9-config. Instead, I have to install another package to get
this file or do a sed on cflags to remove the -specs argument.

Dockerfile:
```
FROM debian:11

ENV PYTHON_VERSION 3.9
# pkg-config is needed because, somehow, the CFLAGS in the python config script
# adds a flag that depends on a file from a package pkg-config depends on...
RUN apt-get update && \
apt-get install -y "^python${PYTHON_VERSION}-dev$" 

RUN python${PYTHON_VERSION}-config --cflags | grep -qF 
/usr/share/dpkg/no-pie-compile.specs 
RUN test -f /usr/share/dpkg/no-pie-compile.specs
```


-- System Information:
Debian Release: 11.0
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.10.0-7-amd64 (SMP w/8 CPU threads)
Kernel taint flags: TAINT_WARN
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages python3.9-dev depends on:
ii  libexpat1-dev 2.2.10-2
ii  libpython3.9  3.9.2-1
ii  libpython3.9-dev  3.9.2-1
ii  python3.9 3.9.2-1
ii  zlib1g-dev1:1.2.11.dfsg-2

Versions of packages python3.9-dev recommends:
ii  libc6-dev [libc-dev]  2.31-16

python3.9-dev suggests no packages.

-- no debconf information