Opened 3 years ago

Closed 3 years ago

#8540 closed defect (fixed)

Remove CONFINCLUDEDIR, CONFINCLUDEPY, INCLUDEPY, INCLUDEDIR, etc from sysconfigdata

Reported by: Zach Pearson Owned by: Zach Pearson
Priority: major Milestone:
Component: Build System Version:
Keywords: Cc: chimerax-programmers
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

We pinned setuptools to version 65.1.1 to avoid a change in distutils that changed the order of precedence for finding Python headers. Before that change, the includes local to ChimeraX were preferred. After, we always got system Python headers. I opened an issue with distutils, requesting that the nearest Python be used, but it's been implied that our environment and others like ours are simply misconfigured.

It does seem to work to just remove the values of the sysconfigdata variables listed in this ticket, though we might need to remove others to get stray library folders out of linkers' paths.

This has come up again today because I received an email from GitHub pointing out a security vulnerability in 65.1.1

We have a script that cleans sysconfigdata of unwanted variables in prereqs/Python; I just propose adding at least these four from the title to it.

Change History (2)

comment:1 by Zach Pearson, 3 years ago

I successfully built ChimeraX with this change and, after going back and building the core again to double-check, I can see that the include directories are correct using the latest setuptools (67.4.0).

Example call:

gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -DMAJOR_VERSION=1 -DMINOR_VERSION=0 -I/Users/zjp/git/rbvi/ChimeraX/ChimeraX.app/Contents/include -Icore_cpp/mac_util/ -I/Users/zjp/git/rbvi/ChimeraX/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c core_cpp/mac_util/module.cpp -o build/temp.macosx-10.9-universal2-cpython-39/core_cpp/mac_util/module.o -std=c++11 -stdlib=libc++ -ObjC++ -std=c++11 -stdlib=libc++ -pipe -fvisibility-ms-compat

comment:2 by Zach Pearson, 3 years ago

Resolution: fixed
Status: assignedclosed

I bumped setuptools after clearing those values from _sysconfigdata.

Note: See TracTickets for help on using tickets.