Mamba icon indicating copy to clipboard operation
Mamba copied to clipboard

Cannot compile on Debian 12 (Bookworm)

Open ekacoei opened this issue 10 months ago • 1 comments

I tried to compile Mamba v2.6;

Debian has different include paths, where each library has its own subdirectory.

Here is a list of soft links I added to the filesystem to make it compile

$ ls -l /usr/local/include/
total 0
lrwxrwxrwx 1 root root 37 Mar  3 23:34 cairo-deprecated.h -> /usr/include/cairo/cairo-deprecated.h
lrwxrwxrwx 1 root root 35 Mar  3 23:34 cairo-features.h -> /usr/include/cairo/cairo-features.h
lrwxrwxrwx 1 root root 26 Mar  3 23:33 cairo.h -> /usr/include/cairo/cairo.h
lrwxrwxrwx 1 root root 34 Mar  3 23:33 cairo-version.h -> /usr/include/cairo/cairo-version.h
lrwxrwxrwx 1 root root 31 Mar  3 23:34 cairo-xlib.h -> /usr/include/cairo/cairo-xlib.h
lrwxrwxrwx 1 root root 26 Mar  3 23:19 glib -> /usr/include/glib-2.0/glib
lrwxrwxrwx 1 root root 55 Mar  3 23:20 glibconfig.h -> /usr/lib/x86_64-linux-gnu/glib-2.0/include/glibconfig.
h
lrwxrwxrwx 1 root root 28 Mar  3 23:18 glib.h -> /usr/include/glib-2.0/glib.h
lrwxrwxrwx 1 root root 31 Mar  3 23:24 sigc++ -> /usr/include/sigc++-3.0/sigc++/
lrwxrwxrwx 1 root root 24 Mar  3 23:22 sigc++-3.0 -> /usr/include/sigc++-3.0/
lrwxrwxrwx 1 root root 59 Mar  3 23:25 sigc++config.h -> /usr/lib/x86_64-linux-gnu/sigc++-3.0/include/sigc++config.h

since the Makefile does not honor CFLAGS and CPPFLAGS there is no way of providing these paths by command line.

and ended with a collection of errors. I will pick one random example

MidiKeyBoard.cpp:143:22: error: no matching function for call to ‘mem_fun(midikeyboard::XKeyBoard*, void (midikeyboard::XKeyBoard::*)())’
  143 |         sigc::mem_fun(this, &XKeyBoard::nsm_show_ui));
      |         ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/sigc++/functors/functor_trait.h:22,
                 from /usr/local/include/sigc++/adaptors/adaptor_trait.h:24,
                 from /usr/local/include/sigc++/functors/slot.h:24,
                 from /usr/local/include/sigc++/signal_base.h:27,
                 from /usr/local/include/sigc++/signal.h:25:
/usr/local/include/sigc++/functors/mem_fun.h:241:1: note: candidate: ‘decltype(auto) sigc::mem_fun(T_obj&, T_return (T_obj2::*)(T_arg ...)) [with T_return = void; T_obj = midikeyboard::XKeyBoard*; T_obj2 = midikeyboard::XKeyBoard; T_arg = {}]’ (near match)
  241 | mem_fun(/**/ T_obj& obj, T_return (T_obj2::*func)(T_arg...))
      | ^~~~~~~
/usr/local/include/sigc++/functors/mem_fun.h:241:1: note:   conversion of argument 1 would be ill-formed:

That appears to be a compiler error to me. Might it be missing linker directories?

ekacoei avatar Mar 03 '25 22:03 ekacoei

Mamba use pkg-config to fetch the include paths. So, no matter were a library is installed, when the system is setup correctly, mamba will find them.

Mamba use the CXXFLAGS variable, which is more common this day's, it respect any distribution setting for this.

All you need to do to build Mamba is install the dependency's mentioned on the project site from your distribution. On debian it's:

apt install libfluidsynth-dev libc6-dev libsmf-dev libcairo2-dev libx11-dev liblo-dev libsigc++-2.0-dev libasound2-dev

That will pull in libjack-dev automatically.

When done a simple make will build mamba. I'm a debian user myself, using debian/sid. I've just setup a virtualbox with debian12 to confirm that it all works as expected.

brummer10 avatar Mar 04 '25 06:03 brummer10