Stazed / rakarrack-plus

Rakarrack plus LV2s
GNU General Public License v2.0
36 stars 8 forks source link

make fail with "erreur fatale: FL/Fl_Tiled_Image.H : Aucun fichier ou dossier de ce type" #43

Closed domichel closed 1 year ago

domichel commented 1 year ago

Which mean fatal error: FL/Fl_Tiled_Image.H : No file or directory of that type That is on a gentoo linux amd64 system with fltk-1.3.5 and cmake 3.27.3.

$ make
[  1%] Building CXX object lv2/CMakeFiles/rakarrack-plus-lv2.dir/rkrlv2.C.o
Dans le fichier inclus depuis /home/dom/softs/Musique/rakarrack-plus/lv2/../src/FX/Effect.h:22,
                 depuis /home/dom/softs/Musique/rakarrack-plus/lv2/rkrlv2.h:39,
                 depuis /home/dom/softs/Musique/rakarrack-plus/lv2/rkrlv2.C:21:
/home/dom/softs/Musique/rakarrack-plus/lv2/../src/FX/../global.h:38:10: erreur fatale: FL/Fl_Tiled_Image.H : Aucun fichier ou dossier de ce type
   38 | #include <FL/Fl_Tiled_Image.H>
      |          ^~~~~~~~~~~~~~~~~~~~~
compilation terminée.
make[2]: *** [lv2/CMakeFiles/rakarrack-plus-lv2.dir/build.make:76: lv2/CMakeFiles/rakarrack-plus-lv2.dir/rkrlv2.C.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:269: lv2/CMakeFiles/rakarrack-plus-lv2.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

This append both with the git code and with 1.2.3.

$ cmake -L .
CMake Deprecation Warning at CMakeLists.txt:3 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

USING GNU OPTIMIZATIONS
-- Found aconnect in /usr/bin/aconnect
-- Found rt in /usr/lib64/librt.a
-- Found dl in /usr/lib64/libdl.a
-- 
-- =========================================================
-- Build Configuration for Rakarrack-plus-1.2.3 for Linux
-- =========================================================
-- 
-- ___________________ Optimizations________________________
-- Vectorization. . . . . . . . . . . . . . . . . . . . . .: Yes
-- Use altiveck . . . . . . . . . . . . . . . . . . . . . .: No
-- Use sse. . . . . . . . . . . . . . . . . . . . . . . . .: Yes
-- Use sse2 . . . . . . . . . . . . . . . . . . . . . . . .: Yes
-- 
-- ______________________Library____________________________
-- PkgConfig. . . . . . . . . . . . . . . . . . . . . . . .: Yes
-- FLTK toolkit . . . . . . . . . . . . . . . . . . . . . .: Yes
-- ALSA MIDI Sequencer support. . . . . . . . . . . . . . .: Yes
-- X11 support. . . . . . . . . . . . . . . . . . . . . . .: Yes
-- Freetype support . . . . . . . . . . . . . . . . . . . .: Yes
-- Zlib support . . . . . . . . . . . . . . . . . . . . . .: Yes
-- pthread support (libpthread) . . . . . . . . . . . . . .: Yes
-- JACK Audio Connection Kit library. . . . . . . . . . . .: Yes
-- Fontconfig support . . . . . . . . . . . . . . . . . . .: Yes
-- Fast Fourier Transform (fftw3) . . . . . . . . . . . . .: Yes
-- General audio file (libsndfile). . . . . . . . . . . . .: Yes
-- Samplerate conversion (libsamplerate). . . . . . . . . .: Yes
-- Xft support. . . . . . . . . . . . . . . . . . . . . . .: Yes
-- Xrender support. . . . . . . . . . . . . . . . . . . . .: Yes
-- Xpm support (libxpm) . . . . . . . . . . . . . . . . . .: Yes
-- Liblo support. . . . . . . . . . . . . . . . . . . . . .: Yes
-- LV2 support. . . . . . . . . . . . . . . . . . . . . . .: Yes
-- 
-- ____________________ User Options________________________
-- Use optimizations. . . . . . . . . . . . . . . . . . . .: Yes
-- Vectorization. . . . . . . . . . . . . . . . . . . . . .: Yes
-- Use altiveck . . . . . . . . . . . . . . . . . . . . . .: Yes
-- Use sse. . . . . . . . . . . . . . . . . . . . . . . . .: Yes
-- Use sse2 . . . . . . . . . . . . . . . . . . . . . . . .: Yes
-- Build Rakarrack-plus . . . . . . . . . . . . . . . . . .: Yes
-- Build LV2s (RakarrackPlus.lv2) . . . . . . . . . . . . .: Yes
-- Build Carla lv2 presets. . . . . . . . . . . . . . . . .: No
-- Build for debug. . . . . . . . . . . . . . . . . . . . .: No
-- NSM session support. . . . . . . . . . . . . . . . . . .: Yes
-- Sysex preset save support. . . . . . . . . . . . . . . .: No
-- 
-- 
-- Building for Release
-- Flags: -std=c++11 -Wno-unused-parameter -O3 -ffast-math -pipe -fsigned-char -msse -msse2 -mfpmath=sse -ftree-vectorize -fvect-cost-model
-- Configuring done (0.2s)
-- Generating done (0.1s)
-- Build files have been written to: /home/dom/softs/Musique/rakarrack-plus-1.2.3/build
-- Cache values
BuildCarlaPresets:BOOL=OFF
BuildForDebug:BOOL=OFF
BuildLV2Plugins:BOOL=ON
BuildOptionsBasic:STRING=-std=c++11 -Wno-unused-parameter -O3 -ffast-math -pipe -fsigned-char
BuildOptionsDebug:STRING=-std=c++11 -O0 -g3 -ggdb -Wall -Wextra -Wpointer-arith
BuildOptions_Altivec:STRING=-maltivec
BuildOptions_SSE:STRING=-msse -mfpmath=sse
BuildOptions_SSE2:STRING=-msse -msse2 -mfpmath=sse
BuildOptions_Vectorization:STRING=-ftree-vectorize -fvect-cost-model
BuildRakarrackPlus:BOOL=ON
EnableAltivec:BOOL=ON
EnableNSM:BOOL=ON
EnableOptimizations:BOOL=ON
EnableSSE:BOOL=ON
EnableSSE2:BOOL=ON
EnableSysex:BOOL=OFF
EnableVectorization:BOOL=ON
FLTK_CONFIG_SCRIPT:FILEPATH=/usr/bin/fltk-config
FLTK_FLUID_EXECUTABLE:FILEPATH=/usr/bin/fluid
FLTK_INCLUDE_DIR:PATH=/usr/include/fltk
LV2_INSTALL_DIR:PATH=lib/lv2/RakarrackPlus.lv2
X11_xcb_xkb_INCLUDE_PATH:PATH=/usr/include

FLTK_INCLUDE_DIR is correct and the missing file exist. Is it something I can do about this?

Stazed commented 1 year ago

This looks like it is failing to build the LV2's properly. I believe I know what the issue is, but would like to confirm that the failure is for LV2 build only. Could you build LV2s only with:

cmake -DBuildRakarrackPlus=OFF ..

Also try building Rakarrack-plus only with:

cmake -DBuildLV2Plugins-OFF ..

If I am correct, Rakarrack-plus should build and the LV2s only should fail.

Thanks.

domichel commented 1 year ago

Thanks,

I get the same error with both of them. I try with: cmake -DLV2_INSTALL_DIR:PATH=lib64/lv2/RakarrackPlus.lv2 .. because on gentoo amd64, all lv2 plugins are into /usr/lib64/lv2, but get the same error.

Also:

$ cat /usr/lib64/pkgconfig/lv2.pc
prefix=/usr
includedir=${prefix}/include

lv2dir=/usr/lib64/lv2
plugindir=/usr/lib64/lv2

Name: LV2
Description: Plugin standard for audio systems
Version: 1.18.10
Cflags: -I${includedir}
Stazed commented 1 year ago

I just pushed a commit in the wip branch. Try rebuilding the wip branch with a clean build directory. The LV2 install directory should not matter.

domichel commented 1 year ago

With cmake .., I get a similar error:

[ 29%] Linking CXX shared library rakarrack-plus-lv2.so
[ 29%] Built target rakarrack-plus-lv2
[ 29%] Building CXX object src/CMakeFiles/rakarrack-plus.dir/Config_fltk.C.o
Dans le fichier inclus depuis /home/dom/softs/Musique/rakarrack-plus/src/Config_fltk.C:29:
/home/dom/softs/Musique/rakarrack-plus/src/global.h:48:10: erreur fatale: FL/Fl_Tiled_Image.H : Aucun fichier ou dossier de ce type
   48 | #include <FL/Fl_Tiled_Image.H>
      |          ^~~~~~~~~~~~~~~~~~~~~
compilation terminée.
make[2]: *** [src/CMakeFiles/rakarrack-plus.dir/build.make:76: src/CMakeFiles/rakarrack-plus.dir/Config_fltk.C.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:295: src/CMakeFiles/rakarrack-plus.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

But it work fine with cmake -DBuildRakarrackPlus=OFF ... Thanks.

Stazed commented 1 year ago

That is strange... Just to confirm, your Gentoo distribution has the Fl_Tiled_Image.H file in the FLTK include directory: On Manjaro and Ubuntu FLTK it is located in /usr/include/FL/. Not sure where FLTK is installed on Gentoo.

The error is saying that the Fl_Tiled_Image.H file cannot be found. Unless there is some error in the FLTK installation, I do not know what else could be the problem.

The reason the LV2 only now builds is because I removed the FLTK includes which were not needed for LV2s.

domichel commented 1 year ago
$ locate Fl_Tiled_Image.H
/usr/include/fltk/FL/Fl_Tiled_Image.H
/usr/include/ntk/FL/Fl_Tiled_Image.H

If I take a look at the fltk files list, all include files are in /usr/include/fltk/FL/, which imply the fltk base include dir is not /usr/include but /usr/include/fltk, it is a symlink /usr/include/fltk/Fl -> FL, the .so files are into /usr/lib64/fltk/, the executables in /usr/bin, and it is /usr/share/cmake/Modules/FLTK-Functions.cmake

Well, if it is an issue specific to gentoo, I can try to make a gentoo specific patch for it.

domichel commented 1 year ago

BTW, in the meantime, I have done a rakarrack-plus ebuild in order to be able to use portage to install that great software. I will publish it into an overlay and at the gentoo bugzilla when that issue will be solved. When taking a look inside CMakeLists.txt, it is a python3 check if I understand well. Is it a build time dependency or, as I think, a run time depend?

domichel commented 1 year ago

It work now. And no patch is needed, it is a variable in src/CMakeLists.txt: cmake -DFLTK_INCLUDE_DIRS:PATH=/usr/include/fltk ..

I have to try it on master and 1.2.3, and I will report later how it worked.

domichel commented 1 year ago

The patch You committed for lv2 is needed. But 1.2.3 and master are building fine with -DFLTK_INCLUDE_DIRS:PATH=/usr/include/fltk -DBuildLV2Plugins=OFF

Thanks.

Stazed commented 1 year ago

The python3 is a build dependency, but only if you are building the carla presets. Your original post indicated that carla presets were not being build, and the presets are not build by default. Python3 is not a runtime dependency.

Interesting, your original post showed:

FLTK_INCLUDE_DIR:PATH=/usr/include/fltk

And your cmake that works:

FLTK_INCLUDE_DIRS:PATH=/usr/include/fltk

The only difference being:

DIR vs DIRS

Looks like some sort of Gentoo specific issue regarding how the fltk library is packaged and cmake???

I will be putting out another micro release soon, and push the patch to master as it was valid regardless of the build failure.

Thanks for reporting the issue.

domichel commented 1 year ago

A typo I guess... And you are welcome. You and your team did a very good job with that software. I just try it a few minutes, and it works great.

Stazed commented 1 year ago

It appears that the typo may be on my part. I sent another patch to wip branch with a fix to the CmakeLists.txt. This might allow you to compile without the need to manually set the FLTK_INCLUDE_DIRS variable.

domichel commented 1 year ago

Yep, with your last push, the FLTK_INCLUDE_DIRS variable is not needed anymore here.

Stazed commented 1 year ago

Great. Thanks for confirming and helping to track this down. Just pushed this and 1.2.4 to main.

domichel commented 1 year ago

Great and Thanks for the good work.