Open awesomebytes opened 6 years ago
@awesomebytes It appears to be using the wrong (well, on Gentoo at least) include directory. I'll patch it up right away.
Hello, I'm the phantom from the past, and here I come again with the same error haha:
-- Some or all of the gtk libraries were not found. (missing: GTK2_GDKCONFIG_INCLUDE_DIR GTK2_GLIBCONFIG_INCLUDE_DIR)
...
/home/user/gentoo/var/tmp/portage/ros-kinetic/image_view-1.12.23/work/image_view-1.12.23/src/nodelets/disparity_nodelet.cpp:42:10: fatal error: gtk/gtk.h: No such file or directory
#include <gtk/gtk.h>
^~~~~~~~~~~
But it's there (as the last time):
$ find /tmp/gentoo/ -name "gtk.h"
/tmp/gentoo/usr/include/gtk-3.0/gtk/gtk.h
/tmp/gentoo/usr/include/gtk-2.0/gtk/gtk.h
@awesomebytes the issue here is that normal distros don't install gtk this way.
I'd try patching the CMakeLists.txt
file to add
set(GTK2_GDKCONFIG_INCLUDE_DIR ${EPREFIX%/}/usr/include/gtk-2.0)
Made a patch: https://gist.github.com/awesomebytes/8371eaefc0513fd538e08b14748cc814
Workarounding locally with:
mkdir -p $EPREFIX/etc/portage/patches/ros-kinetic/image_view
cd $EPREFIX/etc/portage/patches/ros-kinetic/image_view
wget https://gist.githubusercontent.com/awesomebytes/8371eaefc0513fd538e08b14748cc814/raw/d46e3be3205570709ed573cd1e568025153c0b0f/0001-force-to-find-gtk.patch
And it builds. I'll need to have a different patch for x86 tho as it's not lib64 but just lib there...
@awesomebytes that's definitely true!
I'd do something like that suggested here.
include(CheckTypeSize)
check_type_size(long LONG_SIZE)
So... After that I do an If-else with 4 and 8 as values to either do one thing or the other? Hmmm ok, but it looks pretty ugly. Wouldn't it be better to check some uname -m
thing? I think CMake has some variables with it already ready to use.
If using
It finds it...
The first warning:
And then I get:
@allenh1 this lib64 thing may be familiar to you?