Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GTK include folders not set properly for CINC #9

Open
WugWugg opened this issue Apr 6, 2018 · 0 comments
Open

GTK include folders not set properly for CINC #9

WugWugg opened this issue Apr 6, 2018 · 0 comments

Comments

@WugWugg
Copy link

WugWugg commented Apr 6, 2018

I was working with the code and experience an issue with libgtk2.0-dev dependencies not being found. I tracked this down to 2 issues related to gtk includes. (1) The default $pwre_conf_incdir will incorrectly link /usr/include/gtk-2.0/gtk not the expected /usr/include/gtk-2.0. (2) the $flavour variable is not being set inside of the makefile's scope; thus, the command 'pkg-config --cflags gtk+-2.0' will never be added to the includes. I'll try to point out the points in the code I found to be troublesome.

proview/src/tools/bld/src/os_linux/hw_x86_64/variables.mk:127-131
ifeq ($(flavour),gtk) cinc := -I$(inc_dir) -I$(einc_dir) -I$(hw_source) -I$(os_source) -I$(co_source) $(pwre_conf_incdir) $(pwre_conf_incdirgtk) $(pwre_conf_incdirgst) else cinc := -I$(inc_dir) -I$(einc_dir) -I$(hw_source) -I$(os_source) -I$(co_source) $(pwre_conf_incdir) $(pwre_conf_incdirqt) endif

proview/src/tools/pwre/src/os_linux/pwre_configure.sh:395-401
if [ $pwre_conf_qt -eq 1 ]; then pwre_config_check_lib qt QT qt qt 0 "/usr/lib/libQtGui.so:/usr/lib/$hwpl-linux-$gnu/libQtGui.so" pwre_config_check_include qt QT 1 "/usr/include/qt4/QtGui/QtGui" else pwre_config_check_lib gtk GTK gtk gtk 0 "/usr/lib/libgtk-x11-2.0.so:/usr/lib/$hwpl-linux-$gnu/libgtk-x11-2.0.so" pwre_config_check_include gtk GTK 1 "/usr/local/include/gtk-2.0/gtk.h:/usr/local/include/gtk-2.0/gtk/gtk.h:/usr/include/gtk-2.0/gtk/gtk.h" fi

proview/src/tools/pwre/src/os_linux/pwre_configure.sh:53
incdir=${file%/*}

I have hard coded $flavour to be 'gtk' out right in the variable.mk. Unless the gtk-2.0/gtk folder needs to be in the $pwre_conf_incdir for legacy reasons, it should be parsed to be added as gtk-2.0. This however, has the pitfall of not including necessary dependencies for it. Thus, perhaps removing it from the $pwre_conf_incdir is advantageous. Lastly, the easy fix for $flavor is setting it to an env var and reading it in that way. It does seem that some build calls are setup to run that way. However, when running build_kernel() it will not pass the flavor in as gtk but rather src on modules that need them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant