openAVproductions / openAV-Luppp

Luppp is a live performance tool, created by OpenAV productions.
http://openavproductions.com/luppp
GNU General Public License v3.0
258 stars 44 forks source link

Build failure: no member named 'cairo_cc' in 'Fl' #190

Closed yurivict closed 6 years ago

yurivict commented 6 years ago

configure finds ntk fine

-- Checking for module 'ntk'
--   Found ntk, version 1.3.0

I actually have fltk-1.3.4 installed.

But the build later fails:

In file included from src/eventhandlergui.cxx:29:
In file included from src/gui.hxx:28:
In file included from src/goptions.hxx:37:
src/avtk/avtk_button.h:102:4: error: unknown type name 'cairo_t'
                        cairo_t *cr = Fl::cairo_cc();
                        ^
src/avtk/avtk_button.h:102:22: error: no member named 'cairo_cc' in 'Fl'
                        cairo_t *cr = Fl::cairo_cc();
                                      ~~~~^

Building 1.1.1 on FreeBSD 11.1 (attempting to create the FreeBSD port).

harryhaaren commented 6 years ago

Hi @yurivict, FreeBSD? Cool - I'm not sure if any of the OpenAV software has been ported to a BSD yet... :) [Edit: I see no reason why it wouldn't just compile - OpenAV tries to keep dependencies to a minimum - with this NTK issue, I remember why I dislike any dependencies!]

The compile error you've encountered is a mismatch between FLTK and NTK. Although NTK is very similar, it is a fork of FLTK. The NTK fork contains routines to draw to their backend using Cairo - hence when compiling against FLTK it gives these errors.

In order to resolve them, you'll need to grab the NTK library, which may (or probably may-not..) be in FreeBSD ports already. The Git link and details available from here: http://non.tuxfamily.org/wiki/NTK

Hope that helps, and please do post back here with updates! -H

yurivict commented 6 years ago

I'm not sure if any of the OpenAV software has been ported to a BSD yet

I've recently ported a lot of LV2 plugins to FreeBSD. But probably nothing yours yet ...

I have both installed: fltk-1.3.4 Cross-platform C++ graphical user interface toolkit ntk-1.3.0 Fork of FLTK 1.3.0 which adds graphics rendering via Cairo, etc

It says that it found ntk, exactly what it needs. ntk has the .pc file:

# pkg-config --cflags  ntk
-I/usr/local/include/ntk -pthread

fltk, however, doesn't have a .pc file, and is installed into the default package location: /usr/local/include/FL.

It appears that although cmake looks for and finds ntk, build actually uses fltk, because -I/usr/local/include is searched first by the compiler. It seems like a problem of fltk vs. ntk, but your package gets confused and suffers.

Are you able to place ntk headers ahead of the the default include location?

yurivict commented 6 years ago

This fixed the conflict: https://github.com/openAVproductions/openAV-Luppp/pull/191 Now the FreeBSD port builds fine.

harryhaaren commented 6 years ago

Merged PR https://github.com/openAVproductions/openAV-Luppp/pull/191, thanks for fixing!