xmms2 / promoe

A client with a WinAmp / XMMS 1 look
GNU General Public License v2.0
7 stars 3 forks source link

Impossible to compile because ./waf fails with ValueError: invalid mode: 'rUb' #5

Closed hartwork closed 1 year ago

hartwork commented 1 year ago
# cd "$(mktemp -d)"
# git clone https://github.com/xmms2/promoe
# cd promoe
# ./waf 
Waf: The wscript in '/tmp/tmp.UYkkj8WTyB/promoe' is unreadable
Traceback (most recent call last):
  File "/tmp/tmp.UYkkj8WTyB/promoe/.waf3-1.8.20-c859ca7dc3693011756f4edf45c36626/waflib/Scripting.py", line 104, in waf_entry_point
    set_main_module(os.path.normpath(os.path.join(Context.run_dir,Context.WSCRIPT_FILE)))
  File "/tmp/tmp.UYkkj8WTyB/promoe/.waf3-1.8.20-c859ca7dc3693011756f4edf45c36626/waflib/Scripting.py", line 129, in set_main_module
    Context.g_module=Context.load_module(file_path)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/tmp.UYkkj8WTyB/promoe/.waf3-1.8.20-c859ca7dc3693011756f4edf45c36626/waflib/Context.py", line 349, in load_module
    code=Utils.readf(path,m='rU',encoding=encoding)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/tmp.UYkkj8WTyB/promoe/.waf3-1.8.20-c859ca7dc3693011756f4edf45c36626/waflib/Utils.py", line 87, in readf
    f=open(fname,m)
      ^^^^^^^^^^^^^
ValueError: invalid mode: 'rUb'
# python --version
Python 3.11.1
Malvineous commented 1 year ago

This error is due to a bug in waf which has long ago been fixed upstream, the waf version in this project just needs updating.

In the meantime the only solution I have found is to run waf through Python 2 instead, i.e. python2 ./waf configure && python2 ./waf build.