IndexError when running waf configure

I have a problem when I tried to run the ./waf configure command, here is my error message:

Setting top to : /usr/local/src/ardour
Setting out to : /usr/local/src/ardour/build
Traceback (most recent call last):
File “/usr/local/src/ardour/.waf3-2.0.26-44bc421a5f6bb452d70d83cbd5abc3fa/waflib/Scripting.py”, line 119, in waf_entry_point
run_commands()
File “/usr/local/src/ardour/.waf3-2.0.26-44bc421a5f6bb452d70d83cbd5abc3fa/waflib/Scripting.py”, line 182, in run_commands
ctx=run_command(cmd_name)
File “/usr/local/src/ardour/.waf3-2.0.26-44bc421a5f6bb452d70d83cbd5abc3fa/waflib/Scripting.py”, line 173, in run_command
ctx.execute()
File “/usr/local/src/ardour/.waf3-2.0.26-44bc421a5f6bb452d70d83cbd5abc3fa/waflib/Configure.py”, line 85, in execute
super(ConfigurationContext,self).execute()
File “/usr/local/src/ardour/.waf3-2.0.26-44bc421a5f6bb452d70d83cbd5abc3fa/waflib/Context.py”, line 92, in execute
self.recurse([os.path.dirname(g_module.root_path)])
File “/usr/local/src/ardour/.waf3-2.0.26-44bc421a5f6bb452d70d83cbd5abc3fa/waflib/Context.py”, line 133, in recurse
user_function(self)
File “/usr/local/src/ardour/wscript”, line 1029, in configure
set_version ()
File “/usr/local/src/ardour/wscript”, line 239, in set_version
other = parts[1].split(‘-’, 1)
IndexError: list index out of range

What should i do?

Did you do a shallow clone (using -depth ..)?

When compiling using git, git describe needs to work and return a valid revision. currently it should print 8.7-72-g4fc4a2ca09.

Alternatively you can get a source .tar.gz from Download Ardour | Ardour Community

it shows the below output when i try to print out the parts in line 238 of wscript
parts: [“fatal: detected dubious ownership in repository at ‘/usr/local/src/ardour’”]

P.S. i get the source .tar.gz from the official website, so i think the file should be valid?

That usually means the user who cloned the git repo is not identical to the user that builds it.

as build user, you could run git config --global --add safe.directory ‘/usr/local/src/ardour to allow that user to run git describe, or first chown that folder…

Your ./waf configure bugs at the compiler check and a working run (even from a shallow git clone) should produce something like

Setting top to                           : /A/ardour 
Setting out to                           : /A/ardour/build 
Checking for 'gcc' (C compiler)          : /usr/bin/gcc
Checking for 'g++' (C++ compiler)        : /usr/bin/g++

Do you have a compiler installed?
What does gcc -v print out?

I think i have install gcc already?
Here is my output of gcc -version

gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

The official tar.bz2 file from this site extracts to Ardour-8.7.0

Did you rename that folder to ardour afterwards (Setting top to : /usr/local/src/ardour) or did someone else extract and rename it and possibly not give you permission to access all the files in it?

I dont think i have change anything after clone the official tar.bz2 file

You clearly didn’t just extract tar.bz2 file your supposedly got from here
https://community.ardour.org/download?architecture=x86_64&type=source
If that had been the case you would have ended up with an “Ardour-8.7.0” folder instead of an “ardour” one.

I would suggest you download the file once more and try again.

ic, thank you.

i have try to redo and now getting the “Ardour-8.7.0” folder, but when i running ./waf config, it shows below message:

Setting top to : /usr/local/src/Ardour-8.7.0
Setting out to : /usr/local/src/Ardour-8.7.0/build
Checking for ‘gcc’ (C compiler) : /usr/bin/gcc
Checking for ‘g++’ (C++ compiler) : /usr/bin/g++

Global Configuration

  • Install prefix : /usr/local
  • Debuggable build : True
  • Build documentation : False

Ardour Configuration

  • Will build against private GTK dependency stack : no
  • Will rely on libintl built into libc : yes
  • Will build against private Ardour dependency stack : no
    Checking for function ‘dlopen’ in dlfcn.h : yes
    Checking for boost library >= 1.68 : yes
    Checking for program ‘pkg-config’ : /usr/bin/pkg-config
    Checking for ‘alsa’ : yes
    Checking for ‘libpulse’ : yes
    Checking for ‘glib-2.0’ >= 2.28 : yes
    Checking for ‘gthread-2.0’ >= 2.2 : yes
    Checking for ‘glibmm-2.4’ >= 2.32.0 : yes
    Checking for ‘sndfile’ >= 1.0.18 : yes
    Checking for ‘giomm-2.4’ >= 2.2 : yes
    Checking for ‘libcurl’ >= 7.0.0 : yes
    Checking for ‘libarchive’ >= 3.0.0 : yes
    Checking for ‘liblo’ >= 0.26 : yes
    Checking for ‘taglib’ >= 1.9 : yes
    Checking for ‘vamp-sdk’ >= 2.1 : yes
    Checking for ‘vamp-hostsdk’ >= 2.1 : yes
    Checking for ‘rubberband’ : yes
    Checking for ‘libusb-1.0’ >= 1.0.16 : yes
    Checking for rubberband >= 3.0.0 : no
    Checking for sndfile RF64=>RIFF support : Found
    Checking for int128 support : lots of bits found.
    Checking for ‘futex’ syscall support : yes
    Checking for ‘jack’ >= 0.121.0 : not found
    Checking for clang : no
    Checking compiler for AVX512F intrinsics : Found
    Checking compiler for AVX/FMA intrinsics : Found
    Checking for ‘fftw3f’ : yes
    Checking for ‘libudev’ : yes
    Checking for ‘aubio’ >= 0.3.2 : not found

i have install these library already, here are their version:
clang --version
Ubuntu clang version 14.0.0-1ubuntu1.1
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

jackd --version
jackdmp version 1.9.20 tmpdir /dev/shm protocol

What should i do for fixing this issue?

NOTE: Try the second of these first.

apt-get build-dep ardour

Not in front of an ubuntu box atm, but it may also be:

apt-get build-dep ardour8

Depending on how they packaged it. This should install the required build dependencies for ardour. The issue is for some packages you may need to install the -dev package which installs the source code needed to build applications.

 Seablade

To elaborate on the config info you’re seeing; the missing clang and jack aren’t necessary to build a working program. That’s why the config continues after those entries.

You can compile ardour with the clang compiler instead of gcc and that entry is just to show that it’s not clang that being used.
Similarly you can use pure ALSA, instead of Jack, as an audio backend and that’s actually what the developer recommends for most people.

However the aubio development package is required and since you don’t have it that’s why ./waf configure stops at that point.

As Seablade says; running apt-get build-dep for Ubuntu’s version of ardour is the simplest way of getting the required development packages.
You could also do it the manual way by running sudo apt-get install libaubio-dev (and similar) for each of the packages ./waf configure stops at.

Also, your configuration will build a debug-version of Ardour; which is probably not what you want unless you’re planning on debugging the program.
If you run ./waf configure --optimize you’ll get a version that’s optimized for standard use.

./waf configure --help shows you other possible options.

If you want to build ardour with clang (for whatever reason), you’d have to make sure the waf script knows about that.
The easiest way to do that is to wrap the commands in variable definitions like:

CC='clang' CXX='clang++' ./waf  configure $YourOpts

CC='clang' CXX='clang++' ./waf  build