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

can't make pdlib on Ubuntu 16.04 - #error DLIB_NO_GUI_SUPPORT is defined so you can't use the GUI code #12

Open
SlavikCA opened this issue Jan 6, 2019 · 7 comments

Comments

@SlavikCA
Copy link
Contributor

SlavikCA commented Jan 6, 2019

Tried to follow README
But make fails with this error:

root@ubhome:/home/slavik/face/pdlib# make
/bin/bash /home/slavik/face/pdlib/libtool --mode=compile g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/home/slavik/face/pdlib -DPHP_ATOM_INC -I/home/slavik/face/pdlib/include -I/home/slavik/face/pdlib/main -I/home/slavik/face/pdlib -I/usr/include/php/20151012 -I/usr/include/php/20151012/main -I/usr/include/php/20151012/TSRM -I/usr/include/php/20151012/Zend -I/usr/include/php/20151012/ext -I/usr/include/php/20151012/ext/date/lib -I/usr/local/include  -DHAVE_CONFIG_H  -std=c++11   -c /home/slavik/face/pdlib/src/face_detection.cc -o src/face_detection.lo
libtool: compile:  g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/home/slavik/face/pdlib -DPHP_ATOM_INC -I/home/slavik/face/pdlib/include -I/home/slavik/face/pdlib/main -I/home/slavik/face/pdlib -I/usr/include/php/20151012 -I/usr/include/php/20151012/main -I/usr/include/php/20151012/TSRM -I/usr/include/php/20151012/Zend -I/usr/include/php/20151012/ext -I/usr/include/php/20151012/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -std=c++11 -c /home/slavik/face/pdlib/src/face_detection.cc  -fPIC -DPIC -o src/.libs/face_detection.o
In file included from /usr/local/include/dlib/gui_core/xlib.h:4:0,
                 from /usr/local/include/dlib/gui_core.h:14,
                 from /usr/local/include/dlib/gui_widgets/drawable.h:10,
                 from /usr/local/include/dlib/gui_widgets/widgets.h:16,
                 from /usr/local/include/dlib/gui_widgets.h:13,
                 from /home/slavik/face/pdlib/src/face_detection.cc:6:
/usr/local/include/dlib/gui_core/gui_core_kernel_2.h:11:2: error: #error "DLIB_NO_GUI_SUPPORT is defined so you can't use the GUI code.  Turn DLIB_NO_GUI_SUPPORT off if you want to use it."
 #error "DLIB_NO_GUI_SUPPORT is defined so you can't use the GUI code.  Turn DLIB_NO_GUI_SUPPORT off if you want to use it."
  ^
/usr/local/include/dlib/gui_core/gui_core_kernel_2.h:12:2: error: #error "Also make sure you have libx11-dev installed on your system"
 #error "Also make sure you have libx11-dev installed on your system"
  ^

And yes, I have libx11-dev installed on my system.

Any way around that issue?

Or is there pdlib.so I can download (where?) and use?

@SlavikCA
Copy link
Contributor Author

SlavikCA commented Jan 6, 2019

ok, figured solutions here:
#13

I needed to install libx11-dev even before dlib...

@Snake883
Copy link

I'm having a similar issue:

/usr/local/include/dlib/gui_core/gui_core_kernel_2.h:11:2: error: #error "DLIB_NO_GUI_SUPPORT is defined so you can't use the GUI code. Turn DLIB_NO_GUI_SUPPORT off if you want to use it."
#error "DLIB_NO_GUI_SUPPORT is defined so you can't use the GUI code. Turn DLIB_NO_GUI_SUPPORT off if you want to use it."
^
/usr/local/include/dlib/gui_core/gui_core_kernel_2.h:12:2: error: #error "Also make sure you have libx11-dev installed on your system"
#error "Also make sure you have libx11-dev installed on your system"
^
Makefile:198: recipe for target 'src/face_detection.lo' failed

I'm trying to get FaceRecognition install and working on NextCloud. There's no X11 interface, only the Nextcloud WebGUI.

How do I get this to work? How do I turn DLIB_NO_GUI_SUPPORT off?

Thank you.

@stalker314314
Copy link
Contributor

Take a look here, where we written installation instructions. I think, when you did ./configure, you didn't have libx11-dev, so ./configure generate makefile with DLIB_NO_GUI_SUPPORT. Try adding libx11-dev and starting ./configure again.

@stalker314314
Copy link
Contributor

But...you shouldn't have to hunt installation instruction on some non-related repo:) I will try to write it in README.md (here or in fork)

@Snake883
Copy link

Snake883 commented Jan 18, 2020

Thanks....finally got past the error by removing the folders dlib and pdlib and starting over.

@voarsh2
Copy link

voarsh2 commented Dec 29, 2020

Thanks....finally got past the error by removing the folders dlib and pdlib and starting over.

Thanks for your helpful tip!

@jimbolimbo13
Copy link

jimbolimbo13 commented Feb 19, 2021

Thanks....finally got past the error by removing the folders dlib and pdlib and starting over.

Yep, that did it for me too. I suspect I didn't install libx11-dev until after building dlib the first time

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

5 participants