Menu

#1603 Build failure JackDriver.cpp

None
closed
None
1
2021-06-19
2021-06-18
No

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.

1 Attachments

Discussion

  • Ted Felix

    Ted Felix - 2021-06-19

    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":

    $ dpkg --search /usr/include/jack/jack.h
    libjack-jackd2-dev:amd64: /usr/include/jack/jack.h
    $ dpkg --status libjack-jackd2-dev | grep "Version"
    Version: 1.9.12~dfsg-2ubuntu2
    
     
  • Will Jackson

    Will Jackson - 2021-06-19

    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.

     
  • Ted Felix

    Ted Felix - 2021-06-19

    Ok, can you attach a copy of /usr/include/jack/jack.h? That will be interesting to see. If it's even there.

     
  • Will Jackson

    Will Jackson - 2021-06-19

    Yes, it's there. Could it possibly be...out of date?

     
  • Will Jackson

    Will Jackson - 2021-06-19

    I've attached types.h, since you mentioned it.

     
  • Ted Felix

    Ted Felix - 2021-06-19

    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.

     
  • Ted Felix

    Ted Felix - 2021-06-19

    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
    
     
  • Will Jackson

    Will Jackson - 2021-06-19

    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.

     
  • Will Jackson

    Will Jackson - 2021-06-19

    Console output

     
  • Will Jackson

    Will Jackson - 2021-06-19

    Ah yes jack_free() missing from this other copy

     
  • Will Jackson

    Will Jackson - 2021-06-19

    Just realised - the jack.h in my home folder was supplied for building jack 1.9.19 from source.

     
  • Ted Felix

    Ted Felix - 2021-06-19

    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.

     
  • Ted Felix

    Ted Felix - 2021-06-19
    • assigned_to: Ted Felix
     
  • Will Jackson

    Will Jackson - 2021-06-19

    Thanks I'll try that

     
  • Will Jackson

    Will Jackson - 2021-06-19

    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.

     
  • Ted Felix

    Ted Felix - 2021-06-19

    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:

    /usr/lib/x86_64-linux-gnu/libjack.so
    /usr/lib/x86_64-linux-gnu/libjacknet.so
    /usr/lib/x86_64-linux-gnu/libjackserver.so
    

    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.

     
  • Ted Felix

    Ted Felix - 2021-06-19
    • status: open --> closed
     
  • Will Jackson

    Will Jackson - 2021-06-19

    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.

     

Log in to post a comment.