You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
make profile-opt includes -fprofile* flags in _sysconfigdata CFLAGS #67093
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee='https://github.com/gpshead'closed_at=<Date2015-02-04.04:21:00.974>created_at=<Date2014-11-19.22:55:34.402>labels= ['type-bug']
title='make profile-opt includes -fprofile* flags in _sysconfigdata CFLAGS'updated_at=<Date2015-03-25.06:40:47.327>user='https://github.com/gpshead'
This can be traced to the built _sysconfigdata.py file which contains the command line passed CFLAGS from the build_all_use_profile target's sub-make vs the distutils.sysconfig module's Makefile parsing which finds the PY_CFLAGS value from the Makefile itself.
One of either stripping the profile-opt related flags out when generating _sysconfigdata.py or explicitly generating a good _sysconfigdata.py file outside of the sub-make's with the profiling generate or use flags seems like a good idea. The latter is likely easier; just regenerate _sysconfigdata.py after the sub-make.
changed the title [-]make profile-opt fails to update _sysconfigdata.py during the rebuild[/-][+]make profile-opt includes -fprofile* flags in _sysconfigdata CFLAGS[/+]on Nov 19, 2014
I'm also hitting an issue with test_sysconfig_module, but for a different reason: While building Python, I used "make EXTRA_CFLAGS='some flags'" and this makes test_sysconfig_module fail when I run "make test" or "python -m test.regrtest".
The problem is that EXTRA_CFLAGS, like profile-opt, is not in the Makefile, so _sysconfigdata has it stored from build - unlike distutils, which can't see the EXTRA_CFLAGS variable in the environment, thus resulting in failure.
I'm not sure what's the proper solution here, but I think requiring people to run "make test" with precisely the same EXTRA_CFLAGS as "make" is not right (although it solves the issue). This makes me think this is a bug - should I open a new issue?
Activity
gpshead commentedon Nov 19, 2014
FAIL: test_sysconfig_module (distutils.tests.test_sysconfig.SysconfigTestCase)
----------------------------------------------------------------------
This can be traced to the built _sysconfigdata.py file which contains the command line passed CFLAGS from the build_all_use_profile target's sub-make vs the distutils.sysconfig module's Makefile parsing which finds the PY_CFLAGS value from the Makefile itself.
One of either stripping the profile-opt related flags out when generating _sysconfigdata.py or explicitly generating a good _sysconfigdata.py file outside of the sub-make's with the profiling generate or use flags seems like a good idea. The latter is likely easier; just regenerate _sysconfigdata.py after the sub-make.
gpshead commentedon Nov 19, 2014
Should _sysconfigdata.py contain these flags for reference, implying that it is this test or distutils.sysconfig implementation which is really wrong?
[-]make profile-opt fails to update _sysconfigdata.py during the rebuild[/-][+]make profile-opt includes -fprofile* flags in _sysconfigdata CFLAGS[/+]gpshead commentedon Nov 19, 2014
attaching a proposed workaround in the unittest.
gpshead commentedon Feb 4, 2015
see also bpo-23390
bkabrda commentedon Mar 24, 2015
I'm also hitting an issue with test_sysconfig_module, but for a different reason: While building Python, I used "make EXTRA_CFLAGS='some flags'" and this makes test_sysconfig_module fail when I run "make test" or "python -m test.regrtest".
The problem is that EXTRA_CFLAGS, like profile-opt, is not in the Makefile, so _sysconfigdata has it stored from build - unlike distutils, which can't see the EXTRA_CFLAGS variable in the environment, thus resulting in failure.
I'm not sure what's the proper solution here, but I think requiring people to run "make test" with precisely the same EXTRA_CFLAGS as "make" is not right (although it solves the issue). This makes me think this is a bug - should I open a new issue?
ned-deily commentedon Mar 25, 2015
Slavek, this issue and its superseder are both closed so comments here will likely not be acted on.