0

I've been trying to compile digikam and as part of that process needed to compile jasper. Jasper developers use cmake, I wanted to make a .deb package -- in fact was trying to learn how to make a package to share -- and so tried to do this (which errors as below):

sudo checkinstall -D "sudo cmake --build '/home/username/Downloads/jasper/buildlocal' --target install"

Checkinstall run with sudo returns a "not found" error (end of 4th line) despite the command being passed to it working successfully:

Installing with sudo cmake --build '/home/username/Downloads/jasper/buildlocal' --target install...

========================= Installation results ===========================
/var/tmp/tmp.miGWYgiNzT/installscript.sh: 4: sudo cmake --build '/home/username/Downloads/jasper/buildlocal' --target install: not found

****  Installation failed. Aborting package creation.

Cleaning up...OK

Bye.

To repeat, the command

sudo cmake --build '/home/username/Downloads/jasper/buildlocal' --target install

was successful, but neither sudo checkinstall, nor sudo cmake with plain checkinstall, nor using sudo for both, worked.

How can I pass the write invocation to checkinstall to make a package here. More details of all commands run at my blog, but I feel this is enough to answer the question.

3
  • 1
    IIRC you're supposed to run checkinstall with the actual install command as arguments, not as a single quoted argument. So: sudo checkinstall -D cmake --build '/home/username/Downloads/jasper/buildlocal' --target install
    – muru
    Jan 4 at 0:23
  • I'll try that, but it may take a couple of weeks before I get chance, thank you.
    – pbhj
    Jan 4 at 20:55
  • @muru that worked, thanks. If you want to make it an answer I'll endorse it, not sure if it's canonical enough really, perhaps I shoulda rtfm.
    – pbhj
    Jan 14 at 0:36
1

IIRC you're supposed to run checkinstall with the actual install command as arguments, not as a single quoted argument. So:

sudo checkinstall -D cmake --build '/home/username/Downloads/jasper/buildlocal' --target install

This is not very clear from the manpage, but the README has some examples:

  • Run checkinstall:

    checkinstall
    

    NOTE: If you give no arguments to checkinstall it will run a "make install". If you give arguments, the first non-option argument will be used as the install command. This is useful when the install command is not "make install" but something else like "make install_packages" or "setup" or whatever, i.e.

    checkinstall make install_packages
    checkinstall make modules_install
    checkinstall install.sh
    checkinstall setup
    checkinstall rpm -i my-package-1.0.i386-1.rpm
    
1
  • Thanks muru, sometimes it's the easiest things that get you!
    – pbhj
    Jan 14 at 10:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.