From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-il1-f173.google.com (mail-il1-f173.google.com [209.85.166.173]) by sourceware.org (Postfix) with ESMTPS id 80EC33858C39 for ; Tue, 28 Dec 2021 01:27:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 80EC33858C39 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=math.ucdavis.edu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-il1-f173.google.com with SMTP id v10so13104272ilj.3 for ; Mon, 27 Dec 2021 17:27:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=C1LjM1SRuMBvkfnTTK8zCr1GRd02D9TSR860Q4gVS20=; b=aGuqm0B0+5qPQML45qncmuL2456F38WwxInW/rwZr/FA5/cxa5nZKSdSB6tRBb3i0v yYGE2XTHVsGD6YgPPPecDcxq5SnXWYWniMjGFk8YMG7I7d0c932H5SnqpF7Ulss1nszs hftB7RQWf+8lYLXo6Ayv9D+UKV1ddHERKMaUkV347DfnQWjgh/mINN5t8ZBB64r6oHfy 6QAUTQheridNLiDX+/PDQK8ibnKcR1SfBK5QXkGhcWaBEuH397TWdW5+DvjeMriXb4pg oxDgjdXFaNaPZY99nExTWs9PkY3xer4LgmPdV6/Bc7wKCkRObztwa5au/1Ue1VIEypYq uICA== X-Gm-Message-State: AOAM5307A0f8Z5m00ua0OQMqW9Tzpf4mhFJpcKPNHPPBoo93lXvgzdKH RkCQ5YJnLExMfjWM3f7Mh6kYbtgdaAEAABnSZZ2eo6D196E= X-Google-Smtp-Source: ABdhPJz0xZVbfl/kU8sHrvRotzkJxFGgn2Lb//mHWUJq+L+Clp+Gw9TpWi3c0jyYoPKBGBStLA8B9SUCZt+42fG9asY= X-Received: by 2002:a05:6e02:1c44:: with SMTP id d4mr8670358ilg.270.1640654868372; Mon, 27 Dec 2021 17:27:48 -0800 (PST) MIME-Version: 1.0 From: Matthias Koeppe Date: Mon, 27 Dec 2021 17:27:37 -0800 Message-ID: Subject: python 3.9 package leaks CFLAGS into user packages via sysconfig To: cygwin@cygwin.com X-Spam-Status: No, score=-0.1 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, HTML_MESSAGE, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP, URI_DOTEDU autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: cygwin@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Dec 2021 01:27:51 -0000 $ python3.9 -m sysconfig | grep CFLAGS CFLAGS = "-Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -ggdb -O2 -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4 -DOPENSSL_NO_SSL3=1 -I/usr/include/uuid/ -fdebug-prefix-map=/pub/devel/python/python39/python39-3.9.9-1.x86_64/build=/usr/src/debug/python39-3.9.9-1 -fdebug-prefix-map=/pub/devel/python/python39/python39-3.9.9-1.x86_64/src/Python-3.9.9=/usr/src/debug/python39-3.9.9-1 -ggdb -O2 -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4 -DOPENSSL_NO_SSL3=1 -I/usr/include/uuid/ -fdebug-prefix-map=/pub/devel/python/python39/python39-3.9.9-1.x86_64/build=/usr/src/debug/python39-3.9.9-1 -fdebug-prefix-map=/pub/devel/python/python39/python39-3.9.9-1.x86_64/src/Python-3.9.9=/usr/src/debug/python39-3.9.9-1" These flags will end up in builds of user Python packages with extensions via sysconfig/distutils. This should be fixed by putting the necessary flags for the Python build into CFLAGS_NODIST instead -- see similar fix for Homebrew's packaging of python3 in https://github.com/Homebrew/homebrew-core/pull/68528 Reference: https://trac.sagemath.org/ticket/33078 -- Dr. Matthias Koeppe . . . . . . . . http://www.math.ucdavis.edu/~mkoeppe Professor of Mathematics