pierrep / lpmt

Rewrite of the Little Projection Mapping Tool (http://projection-mapping.org/tools/lpmt/)
GNU General Public License v3.0
54 stars 4 forks source link

cairo.h build errors #3

Closed yiids closed 4 years ago

yiids commented 4 years ago

Hi. Im getting build errors. Im on debian 10. I downloaded openframeworks and place lpmt in the apps/myapps folder. errors: In file included from /home/y/src/visuals/of_v0.11.0_linux64gcc6_release/libs/openFrameworks/ofMain.h:65, from /home/y/src/visuals/of_v0.11.0_linux64gcc6_release/apps/myApps/lpmt/src/main.cpp:1: /home/y/src/visuals/of_v0.11.0_linux64gcc6_release/libs/openFrameworks/graphics/ofCairoRenderer.h:4:10: fatal error: cairo.h: No such file or directory

include "cairo.h"

      ^~~~~~~~~

compilation terminated. make[1]: [/home/y/src/visuals/of_v0.11.0_linux64gcc6_release/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:217: obj/linux64/Release/src/main.o] Error 1 make[1]: Leaving directory '/home/y/src/visuals/of_v0.11.0_linux64gcc6_release/apps/myApps/lpmt' make: [/home/y/src/visuals/of_v0.11.0_linux64gcc6_release/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:129: Release] Error 2

I have libcairo installed: ii libcairo2:amd64 1.16.0-4 amd64 Cairo 2D vector graphics library

if I do the same on openframeworks 0.10 it does build.

yiids commented 4 years ago

btw, the reason I tried with OF 0.10 is because building with 0.11 gives me segfaults: Starting program: /home/y/src/visuals/of_v0.10.1_linux64gcc6_release/apps/myApps/lpmt/bin/lpmt_debug [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [New Thread 0x7fffe3a29700 (LWP 8868)] [ error ] ofTruetypeFont: Trying to allocate texture of 256x256 which is bigger than supported in current platform: 0

Thread 1 "lpmt_debug" received signal SIGSEGV, Segmentation fault. 0x0000000000000000 in ?? () (gdb) bt full

0 0x0000000000000000 in ()

1 0x00007ffff59b0a38 in XML_ParseBuffer () at /lib/x86_64-linux-gnu/libexpat.so.1

2 0x00007fffe2c50134 in glPrimitiveBoundingBox () at /lib/x86_64-linux-gnu/libGLX_mesa.so.0

3 0x00007fffe2c4ae29 in glPrimitiveBoundingBox () at /lib/x86_64-linux-gnu/libGLX_mesa.so.0

4 0x00007fffe2c40cc5 in () at /lib/x86_64-linux-gnu/libGLX_mesa.so.0

5 0x00007fffe2c2d859 in () at /lib/x86_64-linux-gnu/libGLX_mesa.so.0

6 0x00007fffe2c28f64 in () at /lib/x86_64-linux-gnu/libGLX_mesa.so.0

7 0x00007fffe2c2997d in () at /lib/x86_64-linux-gnu/libGLX_mesa.so.0

8 0x00007ffff7809b5e in () at /lib/x86_64-linux-gnu/libglfw.so.3

9 0x00007ffff780a424 in () at /lib/x86_64-linux-gnu/libglfw.so.3

10 0x00007ffff7807375 in () at /lib/x86_64-linux-gnu/libglfw.so.3

11 0x00007ffff7800fd2 in glfwCreateWindow () at /lib/x86_64-linux-gnu/libglfw.so.3

12 0x000055555594f0ea in ofAppGLFWWindow::setup(ofGLFWWindowSettings const&) (this=0x5555561ee990, _settings=...) at /home/y/src/visuals/of_v0.10.1_linux64gcc6_release/libs/openFrameworks/app/ofAppGLFWWindow.cpp:231

    sharedContext = 0x0
    framebufferW = 32767
    framebufferH = -138362296
    tmpWindowW = 0
    tmpWindowH = 139
    inited = false

13 0x000055555594e8dc in ofAppGLFWWindow::setup(ofGLWindowSettings const&) (this=0x5555561ee990, settings=...) at /home/y/src/visuals/of_v0.10.1_linux64gcc6_release/libs/openFrameworks/app/ofAppGLFWWindow.cpp:147

    glSettings = 0x7fffffffe0c0

14 0x000055555595340f in ofAppBaseGLWindow::setup(ofWindowSettings const&) (this=0x5555561ee990, settings=...) at /home/y/src/visuals/of_v0.10.1_linux64gcc6_release/libs/openFrameworks/app/ofAppBaseWindow.h:113

    glSettings = 0x7fffffffe0c0

15 0x00005555558aa3a1 in ofMainLoop::createWindow(ofWindowSettings const&) (this=0x555556249100, settings=...) at /home/y/src/visuals/of_v0.10.1_linux64gcc6_release/libs/openFrameworks/app/ofMainLoop.cpp:65

    window = std::shared_ptr<ofAppGLFWWindow> (use count 2, weak count 1) = {get() = 0x5555561ee990}

16 0x00005555558a503b in ofCreateWindow(ofWindowSettings const&) (settings=...) at /home/y/src/visuals/of_v0.10.1_linux64gcc6_release/libs/openFrameworks/app/ofAppRunner.cpp:222

17 0x00005555555e5ab3 in main() () at /home/y/src/visuals/of_v0.10.1_linux64gcc6_release/apps/myApps/lpmt/src/main.cpp:11

    settings = 
        {<ofGLWindowSettings> = {<ofWindowSettings> = {_vptr.ofWindowSettings = 0x555555bbc170 <vtable for ofGLFWWindowSettings+16>, title = "", windowMode = OF_WINDOW, width = 1280, height = 800, sizeSet = true, position = {{{x = 100, y = 100}, {r = 100, g = 100}, {s = 100, t = 100}}}, positionSet = true}, glVersionMajor = 2, glVersionMinor = 1}, numSamples = 4, doubleBuffering = true, redBits = 8, greenBits = 8, blueBits = 8, alphaBits = 8, depthBits = 24, stencilBits = 0, stereo = false, visible = true, iconified = false, decorated = true, resizable = true, monitor = 0, multiMonitorFullScreen = false, shareContextWith = std::shared_ptr<ofAppBaseWindow> (empty) = {get() = 0x0}}

(gdb)

pierrep commented 4 years ago

Looks like none of these errors are LPMT specific, they are related to building OF. 0.10.1 and 0.11.0 are different beasts build wise.

You might have libcairo2, but you probably need libcairo2-dev. check that you have that.

Always run the install_dependencies.sh script on Linux when switching to a new version of OF. On debian it can be found here: openFrameworks/scripts/linux/debian/install_dependencies.sh You'll need to run it using sudo.

Try that and get back to me.

yiids commented 4 years ago

I ran the script and all dependencies are installed, including libcairo-dev. I have /usr/include/cairo/cairo.h

pierrep commented 4 years ago

Are you able to build other OF apps?

yiids commented 4 years ago

one of the commits of the last two days somehow fixed the problem, now it builds without errors on OF 0.11

pierrep commented 4 years ago

I can't really see how any of my recent commits would have any impact on the build process, but glad that you have it fixed. I did a bunch of work last week that has improved lots of things!