Hopefully this saves someone a few hours of troubleshooting waf needlessly…
the waf version included in the repo is so old that the syntax of File.open (mode) used is no longer valid… (at least before python3.11)
❯ lossywav-for-posix master* python3 waf configure
Waf: The wscript in '/Users/teddy/Code/tmp/lossywav-for-posix' is unreadable
Traceback (most recent call last):
File "/Users/teddy/Code/tmp/lossywav-for-posix/.waf3-1.9.5-e9e36ebc81cc860d8a25c4c34f0b27ec/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 "/Users/teddy/Code/tmp/lossywav-for-posix/.waf3-1.9.5-e9e36ebc81cc860d8a25c4c34f0b27ec/waflib/Scripting.py", line 135, in set_main_module
Context.g_module=Context.load_module(file_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/teddy/Code/tmp/lossywav-for-posix/.waf3-1.9.5-e9e36ebc81cc860d8a25c4c34f0b27ec/waflib/Context.py", line 347, in load_module
code=Utils.readf(path,m='rU',encoding=encoding)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/teddy/Code/tmp/lossywav-for-posix/.waf3-1.9.5-e9e36ebc81cc860d8a25c4c34f0b27ec/waflib/Utils.py", line 122, in readf
f=open(fname,m)
^^^^^^^^^^^^^
ValueError: invalid mode: 'rUb'
…
Checking for compiler flags -flto : yes
Checking for linker flags -flto : yes
Checking for optimized LINKFLAGS support:
Checking for linker flags ['-Wl,-O1'] : no
Checking for linker flags ['-Wl,--sort-common'] : no
Checking for linker flags ['-Wl,--as-needed'] : no
Checking for linker flags ['-Wl,-z,relro'] : no
Checking for linker flags ['-Wl,-z,now'] : no
Checking API support:
Invalid argument 'function_name' in test
Checking for header chrono : yes
Invalid argument 'function_name' in test
Checking for header sys/resource.h : yes
Invalid argument 'function_name' in test
Checking for header sys/stat.h : yes
Invalid argument 'function_name' in test
…
In any case, waf build will fail
[12/15] Compiling units/nRemoveBits.cpp
In file included from ../units/nFillFFT.cpp:28:
../units/nCore.h:37:2: error: Neither Windows API nor std::chrono seems to be available.
#error Neither Windows API nor std::chrono seems to be available.
^
In file included from ../units/nFillFFT.cpp:28:
In file included from ../units/nCore.h:49:
../units/nSupport.h:40:2: error: Neither Windows API nor stat()/chmod() seems to be available.
#error Neither Windows API nor stat()/chmod() seems to be available.
^
../units/nSupport.h:127:2: error: Neither Windows API nor stat()/chmod() seems to be available.
#error Neither Windows API nor stat()/chmod() seems to be available.
^
In file included from ../units/nFillFFT.cpp:28:
../units/nCore.h:345:2: error: Neither Windows API nor std::chrono seems to be available.
#error Neither Windows API nor std::chrono seems to be available.
^
4 errors generated.
…
Despite all this, building directly with the makefile is successful 🎉 .
Hopefully this saves someone a few hours of troubleshooting
waf
needlessly…the waf version included in the repo is so old that the syntax of
File.open
(mode) used is no longer valid… (at least beforepython3.11
)downloading a newer waf (2.X ?) resolves this issue
But waf's config api appears to have also changed and it is unclear whether these tests actually pass
In any case, waf build will fail
Despite all this, building directly with the makefile is successful 🎉 .
x86-64 darwin-macos lossywav