noedigcode / konfyt

Digital keyboard workstation for Linux.
http://www.noedig.co.za/konfyt
GNU General Public License v3.0
42 stars 1 forks source link

Build issue with Carla-2.2.0 #19

Closed ycollet closed 4 years ago

ycollet commented 4 years ago

I am trying to compile Konfyt for Fedora 33 (where Carla-2.2.0 ist installed). I've got the following error message during compilation:

src/konfytCarlaEngine.cpp: In member function 'virtual void KonfytCarlaEngine::removeSfz(int)':
src/konfytCarlaEngine.cpp:177:37: warning: invalid conversion from 'int' to 'CarlaHostHandle' {aka '_CarlaHostHandle*'} [-fpermissive]
  177 |     bool ret = carla_remove_plugin( pluginIdInCarla );
      |                                     ^~~~~~~~~~~~~~~
      |                                     |
      |                                     int
src/konfytCarlaEngine.cpp:177:53: error: too few arguments to function 'bool carla_remove_plugin(CarlaHostHandle, uint)'
  177 |     bool ret = carla_remove_plugin( pluginIdInCarla );
      |                                                     ^
In file included from src/konfytCarlaEngine.h:28,
                 from src/konfytCarlaEngine.cpp:22:
/usr/include/carla/CarlaHost.h:644:19: note: declared here
  644 | CARLA_EXPORT bool carla_remove_plugin(CarlaHostHandle handle, uint pluginId);
      |                   ^~~~~~~~~~~~~~~~~~~
src/konfytCarlaEngine.cpp: In member function 'virtual void KonfytCarlaEngine::initEngine(KonfytJackEngine*)':
src/konfytCarlaEngine.cpp:223:29: error: cannot convert 'CarlaBackend::EngineOption' to 'CarlaHostHandle' {aka '_CarlaHostHandle*'}
  223 |     carla_set_engine_option(ENGINE_OPTION_PROCESS_MODE, ENGINE_PROCESS_MODE_SINGLE_CLIENT, NULL);
      |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~
      |                             |
      |                             CarlaBackend::EngineOption
In file included from src/konfytCarlaEngine.h:28,
                 from src/konfytCarlaEngine.cpp:22:
/usr/include/carla/CarlaHost.h:501:59: note:   initializing argument 1 of 'void carla_set_engine_option(CarlaHostHandle, CarlaBackend::EngineOption, int, const char*)'
  501 | CARLA_EXPORT void carla_set_engine_option(CarlaHostHandle handle, EngineOption option, int value, const char* valueStr);
      |                                           ~~~~~~~~~~~~~~~~^~~~~~
src/konfytCarlaEngine.cpp:227:29: error: cannot convert 'CarlaBackend::EngineOption' to 'CarlaHostHandle' {aka '_CarlaHostHandle*'}
  227 |     carla_set_engine_option(ENGINE_OPTION_PATH_RESOURCES, 0, "/usr/lib/lv2/carla.lv2/resources/");
      |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                             |
      |                             CarlaBackend::EngineOption
In file included from src/konfytCarlaEngine.h:28,
                 from src/konfytCarlaEngine.cpp:22:
/usr/include/carla/CarlaHost.h:501:59: note:   initializing argument 1 of 'void carla_set_engine_option(CarlaHostHandle, CarlaBackend::EngineOption, int, const char*)'
  501 | CARLA_EXPORT void carla_set_engine_option(CarlaHostHandle handle, EngineOption option, int value, const char* valueStr);
      |                                           ~~~~~~~~~~~~~~~~^~~~~~
src/konfytCarlaEngine.cpp:231:23: error: cannot convert 'const char*' to 'CarlaHostHandle' {aka '_CarlaHostHandle*'}
  231 |     carla_engine_init("JACK", jack_client_name.toLocal8Bit().constData());
      |                       ^~~~~~
      |                       |
      |                       const char*
In file included from src/konfytCarlaEngine.h:28,
                 from src/konfytCarlaEngine.cpp:22:
/usr/include/carla/CarlaHost.h:412:53: note:   initializing argument 1 of 'bool carla_engine_init(CarlaHostHandle, const char*, const char*)'
  412 | CARLA_EXPORT bool carla_engine_init(CarlaHostHandle handle, const char* driverName, const char* clientName);
      |                                     ~~~~~~~~~~~~~~~~^~~~~~
src/konfytCarlaEngine.cpp: In member function 'virtual void KonfytCarlaEngine::setGain(int, float)':
src/konfytCarlaEngine.cpp:247:23: warning: invalid conversion from 'int' to 'CarlaHostHandle' {aka '_CarlaHostHandle*'} [-fpermissive]
  247 |     carla_set_volume( pluginIdInCarla, newGain );
      |                       ^~~~~~~~~~~~~~~
      |                       |
      |                       int
src/konfytCarlaEngine.cpp:247:48: error: too few arguments to function 'void carla_set_volume(CarlaHostHandle, uint, float)'
  247 |     carla_set_volume( pluginIdInCarla, newGain );
      |                                                ^
In file included from src/konfytCarlaEngine.h:28,
                 from src/konfytCarlaEngine.cpp:22:
/usr/include/carla/CarlaHost.h:949:19: note: declared here
  949 | CARLA_EXPORT void carla_set_volume(CarlaHostHandle handle, uint pluginId, float value);
      |                   ^~~~~~~~~~~~~~~~
make: *** [Makefile:1320: konfytCarlaEngine.o] Error 1
noedigcode commented 4 years ago

What command do you use to build? Did you add the "CONFIG+=KONFYT_NO_CARLA" argument to qmake as described in the readme?

noedigcode commented 4 years ago

I am trying to compile Konfyt for Fedora 33 (where Carla-2.2.0 ist installed).

I might have misread your post and assumed you meant "Carla-2.2.0 isn't installed".

If you meant "Carla-2.2.0 is installed" - I will look into it ASAP.

ycollet commented 4 years ago

Sorry: Carla-devel is installed on my machine :)

ycollet commented 4 years ago

I will try the CONFIG+=KONFYT_NO_CARLA until the fix

noedigcode commented 4 years ago

I created a fix for the master branch on the master-carla220 branch, and similar for the testing branch. You are running a very new system with a very new Carla (Carla 2.2 is not yet officially released), which had an API change. I hope the fixes work for you. Remember, to run Konfyt using Carla as the SFZ backend, use the -c command-line option. Without it, Linuxsampler is used.

ycollet commented 4 years ago

Thanks for the fix. On Fedora 32 and 33, they have distributed Carla 2.2.0 some days ago. Carla has a 2.2.0 tag which dates back Sat Sep 26. I will perform the test tomorrow.

ycollet commented 4 years ago

Konfyt-1.1.1 builds fine on Fedora 31,32 and 33. The rpm package is now available here: https://copr.fedorainfracloud.org/coprs/ycollet/linuxmao/

noedigcode commented 4 years ago

Awesome! Thanks.