[issue5941] customize_compiler broken
Cournapeau David da...@ar.media.kyoto-u.ac.jp added the comment: Ok, here is a patch which fixes the issue while retaining the AR customization. Here is what it does: - configure defines both AR and ARFLAGS in the configure script, and those are used in the Makefile - ARFLAGS is used instead of the harcoded rc (rc is the default value for ARFLAGS in configure) - Both AR and ARFLAGS are used in customize_compiler in distutils. If any of them is customized from the environment, they are overriden. Some examples: - default: nothing changes, except that archiver is set to ar rc instead of ar in customize_compiler, thus build_clib is not broken anymore - setting AR/ARFLAGS in configure: those are used in the python build - ARFLAGS=cru python setup.py build_clib will use ar cru instead of ar cr for libraries. The only thing I am a bit unsure is that instead of ar -cr, we have ar cr used as archiver in distutils. Since ac cr is currently used in the python makefile, I guess most unixes understand ar cr, though. -- keywords: +patch Added file: http://bugs.python.org/file13911/bug_5941.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5941 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5941] customize_compiler broken
Tarek Ziadé ziade.ta...@gmail.com added the comment: Fixed in r72445 and r72446 Thanks David ! -- status: open - closed versions: -Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5941 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5941] customize_compiler broken
Changes by Tarek Ziadé ziade.ta...@gmail.com: -- priority: - critical ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5941 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5941] customize_compiler broken
Cournapeau David da...@ar.media.kyoto-u.ac.jp added the comment: The bug is also present in python 2.7a -- versions: +Python 2.7, Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5941 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5941] customize_compiler broken
Tarek Ziadé ziade.ta...@gmail.com added the comment: what is your traceback ? I want to make sure I have the same in the test I built. Also, just before the traceback, can you tell me the exact command that is spawned in ccompiler.py line 1036. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5941 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5941] customize_compiler broken
Cournapeau David da...@ar.media.kyoto-u.ac.jp added the comment: You can see the traceback in this recent email: http://mail.python.org/pipermail/python-list/2009-May/712106.html -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5941 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5941] customize_compiler broken
Tarek Ziadé ziade.ta...@gmail.com added the comment: Ok I am able to reproduce it. We can't change AR in the makefile, so I think the best way is to add like you said the -cr option in Python Makefile under a new variable, then use it in customize_compiler I'll ask on python-dev because I am new to the Makefile. A turnaround until then is to set AR with the correct option in os.environ['AR'] -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5941 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5941] customize_compiler broken
Changes by Floris Bruynooghe floris.bruynoo...@gmail.com: -- nosy: +flub ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5941 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5941] customize_compiler broken
New submission from Cournapeau David da...@ar.media.kyoto-u.ac.jp: The customize_compiler function is broken in python 3.1. The archiver for a 'standard' unix compiler is set as ['ar', '-cr'], but in python 3.*, customize_compiler overwrites self.archiver from get_sysconfig_var('AR'), and AR is defined as ar, which breaks create_static_library. I think the solution is to define a new env variable AR_something or to set AR to 'ar -rc' (like LDSHARED is set to ['gcc', '-shared'] on gnu systems, for example). -- assignee: tarek components: Distutils messages: 87231 nosy: cdavid, tarek severity: normal status: open title: customize_compiler broken versions: Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5941 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5941] customize_compiler broken
Tarek Ziadé ziade.ta...@gmail.com added the comment: Hi David, do you have an example that breaks, I can reuse to write the test ? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5941 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5941] customize_compiler broken
Cournapeau David da...@ar.media.kyoto-u.ac.jp added the comment: Hi Tarek, Yes, I have a simple example, which show both 5940 and 5941 bugs: from distutils.core import setup # How to install libfoo.a/foo.lib in say pkg_dir/lib ? setup(name='yo', libraries=[('foo', {'sources': ['foo.c']})]) foo.c can be an empty file. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5941 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5941] customize_compiler broken
Cournapeau David da...@ar.media.kyoto-u.ac.jp added the comment: Both should be set as serious, in the sense that build_clib is totally broken ATM, with no simple workaround. OTOH, maybe numpy is the only user of build_clib, in which case it is not so serious (I use my own fixed, copied versions of the original code for the time being in numpy distutils extensions). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5941 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com