You are not logged in.
Pages: 1
Hi, I'm trying to install python2 to solve some legacy ctf challenges with pwntools, I tried https://bbs.archlinux.org/viewtopic.php?id=276946 but somehow it's not working.
$ pyenv install 2.7.18
-> https://www.python.org/ftp/python/2.7.18/Python-2.7.18.tar.xz
Installing Python-2.7.18...
patching file configure
patching file configure.ac
patching file setup.py
patching file Mac/Tools/pythonw.c
patching file setup.py
patching file Doc/library/ctypes.rst
patching file Lib/test/test_str.py
patching file Lib/test/test_unicode.py
patching file Modules/_ctypes/_ctypes.c
patching file Modules/_ctypes/callproc.c
patching file Modules/_ctypes/ctypes.h
patching file Modules/_ctypes/callproc.c
patching file setup.py
patching file Mac/Modules/qt/setup.py
patching file setup.py
BUILD FAILED (Arch Linux using python-build 2.6.16)
Inspect or clean up the working tree at /tmp/python-build.20251217153757.55339
Results logged to /tmp/python-build.20251217153757.55339.log
Last 10 log lines:
Python/ast.c:2631:17: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
2631 | if (!import_alias)
| ^~
Include/asdl.h:42:31: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
42 | #define asdl_seq_SET(S, I, V) (S)->elements[I] = (V)
| ^
Python/ast.c:2633:21: note: in expansion of macro ‘asdl_seq_SET’
2633 | asdl_seq_SET(aliases, i / 2, import_alias);
| ^~~~~~~~~~~~
make: *** [Makefile:1382: Python/ast.o] Error 1Any help would be appreciated
Last edited by tugoese (2025-12-18 12:51:55)
Offline
These look like warnings and notes but no errors. There should be a longer log file somewhere. Maybe gcc is not compatible anymore?
But I would rather recommend using docker and not have these old libraries and modules pollute your system.
Online
Uhh.... I don't think gcc is involved with this also Docker seems too much & I need those libraries for compatibility
Offline
There is no evidence for or against gcc. These few warnings you showed are from compilation, so maybe gcc?
Docker is not much, it's easily installed and used.
Online
That's not llvm so most likely gcc and not fatal - the fatal error is ahead of that, check /tmp/python-build.20251217153757.55339.log
Also there's still https://aur.archlinux.org/packages/python2
Offline
There is no evidence for or against gcc. These few warnings you showed are from compilation, so maybe gcc?
We'll see
Also there's still https://aur.archlinux.org/packages/python2
It works but I still need pip2 (It's broken)
Offline
Include/asdl.h:9:15: error: cannot use keyword ‘false’ as enumeration constant
9 | typedef enum {false, true} bool;
| ^~~~~
Include/asdl.h:9:15: note: ‘false’ is a keyword with ‘-std=c23’ onwardsSo yes, it's gcc and it's new(ish) default of c23. You'd need to set that to a previous standard, but I have no idea how to do that in this workflow.
Offline
Afaiu using the AUR package has overcome that problem via https://aur.archlinux.org/cgit/aur.git/ … 96dbc1a640 ?
So how is
It works but I still need pip2 (It's broken)
pip2 broken?
https://aur.archlinux.org/packages/python2-pip has an unresolved dependency (funnily enough it's python2-resolvelib)
If you're gonna use pyenv, you can set the CFLAGS environment to "--std=c17", https://brandonrozek.com/blog/pyenvbuildflags/
Offline
It is gcc & it works by changing the CFLAGS
Last edited by tugoese (2025-12-18 12:51:35)
Offline
Pages: 1