saghul / pythonz

Python installation manager supporting CPython, Stackless, PyPy and Jython
http://saghul.github.io/pythonz
MIT License
753 stars 69 forks source link

CPython's Makefile.pre.in for versions prior to 2.7 won't work with svn 1.7 or greater #109

Closed hackaugusto closed 8 years ago

hackaugusto commented 8 years ago

pythonz install 2.6 failed with the following error message:

gcc -pthread -c -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -DSVNVERSION=\"LC_ALL=C svnversion .\" -o Modules/getbuildinfo.o ./Modules/getbuildinfo.c gcc: error: directory": No such file or directory Makefile:517: recipe for target 'Modules/getbuildinfo.o' failed

This can be solved by either running SVNVERSION="Unversioned directory" pythonz install 2.6 or by patching the Makefile.pre.in:

500c500
<       $(CC) -c $(PY_CFLAGS) -DSVNVERSION=\"`LC_ALL=C $(SVNVERSION)`\" -o $@ $(srcdir)/Modules/getbuildinfo.c

---
>       $(CC) -c $(PY_CFLAGS) -DSVNVERSION="\"`LC_ALL=C $(SVNVERSION)`\"" -o $@ $(srcdir)/Modules/getbuildinfo.c

This occured to me with the following software:

[hack@pingback CPython-2.6]$ uname -r
4.4.1-2-ARCH
[hack@pingback CPython-2.6]$ make --version
GNU Make 4.1
Built for x86_64-unknown-linux-gnu
Copyright (C) 1988-2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
[hack@pingback CPython-2.6]$ autoconf --version
autoconf (GNU Autoconf) 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+/Autoconf: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>, <http://gnu.org/licenses/exceptions.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by David J. MacKenzie and Akim Demaille.
[hack@pingback CPython-2.6]$ svnversion --version
svnversion, version 1.9.3 (r1718519)
   compiled Dec 28 2015, 22:11:41 on x86_64-unknown-linux-gnu

Copyright (C) 2015 The Apache Software Foundation.
This software consists of contributions made by many people;
see the NOTICE file for more information.
Subversion is open source software, see http://subversion.apache.org/

[hack@pingback CPython-2.6]$
hackaugusto commented 8 years ago

As a reference, this was changed in the mercurial revision 150986ab3db2 for the issue 6094.

The change was done because SVN >1.7 added a space in the output, so the aditional quotes were necessary.

saghul commented 8 years ago

Fixed in #112