Build failure - 'cmake .. 'works fine but then the build fails at the 'make' stage. Output detailed in attached file. Previously no problems building Rosegarden. Ubuntu 20.04 using Jack2 dev files.
That is surprising. So those symbols are not in jack/jack.h or jack/types.h. What version of libjack-jackd2-dev do you have installed? I've got "1.9.12~dfsg-2ubuntu2":
I have the same - Version: 1.9.12~dfsg-2ubuntu2. When you refer to symbols, I checked the text file attachment and noticed that the character mapping was garbled (on my phone anyway) So I've attached a screenshot from the console, showing all line numbers. Thanks for looking into this, previous builds have worked fine.
The one in /usr/include/jack is the key one on my machine. The ones in /usr/src are related to the kernel and are not related to JACK. I'm wondering if you have any in other places.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I installed Jack 1.9.19 the most recent I believe - ah yes there is another jack.h, the file I sent earlier was the one copied to my home folder, the other is at /usr/local/include/jack/jack.h, which I've attached in case that's of interest.
Ok, so you've got two versions of jack/jack.h installed. One in /usr/include and one in /usr/local/include. The compiler is picking up one of these, and one or both are missing jack_free(). Have a look at both of them and see if either has jack_free().
I'm guessing at some point you must have built and installed an older version and it ended up in /usr/local. Or maybe even in /usr. Or both.
If jack_free() is missing from /usr/include/jack/jack.h, you can re-install libjack-jackd2-dev. That should fix /usr. And now you might be able to build.
sudo apt reinstall libjack-jackd2-dev
If you still can't build, jack_free() is probably missing from /usr/local/include/jack/jack.h. It would be nice if source distributions provided a "make uninstall", but usually they do not. Which means the easiest solution here is to build the latest version of JACK and install it to /usr/local. this will write over the old version in there and you should be back up and running.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Re-installing libjack-jack2-dev wasn't enough until I copied all the header files from /usr/include/jack*.h over to /usr/local/include/jack. Then the build worked. Thanks for your help, just wonder what it is that directs "make" to use a particular directory after the "cmake .." instruction.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
With cmake, you can specify where you want "make install" to install the files using the CMAKE_INSTALL_PREFIX environment variable. The default is /usr/local. If you want to install to /usr:
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
I think this is also used by package maintainers when they want to do a fake install someplace which will then be used to make an install package (e.g. .deb file).
Copying the headers to /usr/local may not fix the problem completely. The other part of the equation is the libraries. For JACK:
If the headers and libraries do not match, you might either get linker errors or crashes at runtime. Be on the lookout for this. The safest solution is to build the latest from source and install to /usr/local over top of the outdated headers and libs.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've checked and there are 3 versions of each of those libraries. If Rosegarden crashes I'll keep these in mind, but it at least seems to start alright so far. Thanks again.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That is surprising. So those symbols are not in
jack/jack.h
orjack/types.h
. What version of libjack-jackd2-dev do you have installed? I've got "1.9.12~dfsg-2ubuntu2":I have the same - Version: 1.9.12~dfsg-2ubuntu2. When you refer to symbols, I checked the text file attachment and noticed that the character mapping was garbled (on my phone anyway) So I've attached a screenshot from the console, showing all line numbers. Thanks for looking into this, previous builds have worked fine.
Ok, can you attach a copy of /usr/include/jack/jack.h? That will be interesting to see. If it's even there.
Yes, it's there. Could it possibly be...out of date?
I've attached types.h, since you mentioned it.
Yours appears to be ever so slightly newer than mine. With a bunch of comment improvements. But
jack_free()
is there. So, why isn't it finding it?Do you have
locate
installed? That will let us find all versions of jack.h on your machine:$ locate -b '\jack.h' /usr/include/jack/jack.h /usr/src/linux-headers-5.4.0-74/include/sound/jack.h /usr/src/linux-headers-5.4.0-74-lowlatency/include/config/extcon/adc/jack.h /usr/src/linux-headers-5.4.0-74-lowlatency/include/config/snd/jack.h /usr/src/linux-headers-5.8.0-53-generic/include/config/extcon/adc/jack.h /usr/src/linux-headers-5.8.0-53-generic/include/config/snd/jack.h /usr/src/linux-headers-5.8.0-53-lowlatency/include/config/extcon/adc/jack.h /usr/src/linux-headers-5.8.0-53-lowlatency/include/config/snd/jack.h /usr/src/linux-headers-5.8.0-55-generic/include/config/extcon/adc/jack.h /usr/src/linux-headers-5.8.0-55-generic/include/config/snd/jack.h /usr/src/linux-headers-5.8.0-55-lowlatency/include/config/extcon/adc/jack.h /usr/src/linux-headers-5.8.0-55-lowlatency/include/config/snd/jack.h /usr/src/linux-hwe-5.8-headers-5.8.0-53/include/sound/jack.h /usr/src/linux-hwe-5.8-headers-5.8.0-55/include/sound/jack.h
The one in /usr/include/jack is the key one on my machine. The ones in /usr/src are related to the kernel and are not related to JACK. I'm wondering if you have any in other places.
Even better you can ask locate to look for jack/jack.h and you will find only the relevant ones:
$ locate 'jack/jack.h' /usr/include/jack/jack.h
I installed Jack 1.9.19 the most recent I believe - ah yes there is another jack.h, the file I sent earlier was the one copied to my home folder, the other is at /usr/local/include/jack/jack.h, which I've attached in case that's of interest.
Console output
Ah yes jack_free() missing from this other copy
Just realised - the jack.h in my home folder was supplied for building jack 1.9.19 from source.
Ok, so you've got two versions of jack/jack.h installed. One in /usr/include and one in /usr/local/include. The compiler is picking up one of these, and one or both are missing jack_free(). Have a look at both of them and see if either has
jack_free()
.I'm guessing at some point you must have built and installed an older version and it ended up in /usr/local. Or maybe even in /usr. Or both.
If
jack_free()
is missing from /usr/include/jack/jack.h, you can re-install libjack-jackd2-dev. That should fix /usr. And now you might be able to build.If you still can't build,
jack_free()
is probably missing from /usr/local/include/jack/jack.h. It would be nice if source distributions provided a "make uninstall", but usually they do not. Which means the easiest solution here is to build the latest version of JACK and install it to /usr/local. this will write over the old version in there and you should be back up and running.Thanks I'll try that
Re-installing libjack-jack2-dev wasn't enough until I copied all the header files from /usr/include/jack*.h over to /usr/local/include/jack. Then the build worked. Thanks for your help, just wonder what it is that directs "make" to use a particular directory after the "cmake .." instruction.
With cmake, you can specify where you want "make install" to install the files using the
CMAKE_INSTALL_PREFIX
environment variable. The default is /usr/local. If you want to install to /usr:I think this is also used by package maintainers when they want to do a fake install someplace which will then be used to make an install package (e.g. .deb file).
Copying the headers to /usr/local may not fix the problem completely. The other part of the equation is the libraries. For JACK:
If the headers and libraries do not match, you might either get linker errors or crashes at runtime. Be on the lookout for this. The safest solution is to build the latest from source and install to /usr/local over top of the outdated headers and libs.
I've checked and there are 3 versions of each of those libraries. If Rosegarden crashes I'll keep these in mind, but it at least seems to start alright so far. Thanks again.