Dlib: x11 is missing

Created on 3 Jun 2017  Â·  8Comments  Â·  Source: davisking/dlib

I've followed the guide for installing imglab. I am on OS X 10.11.4.

When I run cmake --build . --config Release I get:

...

[ 92%] Building CXX object CMakeFiles/imglab.dir/src/main.cpp.o
In file included from /Users/christinazou/Downloads/dlib-master/tools/imglab/src/main.cpp:4:
In file included from /Users/christinazou/Downloads/dlib-master/tools/imglab/src/metadata_editor.h:6:
In file included from /Users/christinazou/Downloads/dlib-master/dlib/../dlib/gui_widgets.h:13:
In file included from /Users/christinazou/Downloads/dlib-master/dlib/../dlib/gui_widgets/widgets.h:16:
In file included from /Users/christinazou/Downloads/dlib-master/dlib/../dlib/gui_widgets/drawable.h:10:
In file included from /Users/christinazou/Downloads/dlib-master/dlib/../dlib/gui_widgets/../gui_core.h:14:
In file included from /Users/christinazou/Downloads/dlib-master/dlib/../dlib/gui_core/xlib.h:4:
/Users/christinazou/Downloads/dlib-master/dlib/../dlib/gui_core/gui_core_kernel_2.h:11:2: 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."
 ^
/Users/christinazou/Downloads/dlib-master/dlib/../dlib/gui_core/gui_core_kernel_2.h:12:2: error: "Also make sure you have libx11-dev installed on your system"
#error "Also make sure you have libx11-dev installed on your system"
 ^
2 errors generated.
make[2]: *** [CMakeFiles/imglab.dir/src/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/imglab.dir/all] Error 2
make: *** [all] Error 2

I already tried to install x11 by doing:

brew cask install xquartz

But still get this error. What do I do?

Most helpful comment

Yeah, well, turns out most people don't read documentation. And the more documentation you add the less likely they are to read it. It's way better if cmake can detect this and then print out a big error message that tells them what to do. Although, pretty often I get people posting questions where they copy and paste the error message that tells them exactly what to do to solve their problem. I then have to literally copy and paste the error back to them and they go "finally, I couldn't find that information anywhere!". Except they literally posted that themselves. It's crazy. That's how bad a lot of people are at reading documentation.

Anyway, if you could figure out what is going on with cask and update the cmake scripts so they print a message about this I would be forever grateful :)

All 8 comments

Just realized I had not installed xquartz properly (had to do it off of the xquartz website), then had to delete my build and start over to get it to work. You might want to add those instructions to the README. OSX versions after 10.6 do not come with x11.

Where else would you get it other than the website?

Hi Davis,

You can install through homebrew on Macs now using Cask (in short, Cask is a brew tap that extends homebrew to install in /Applications/ folder, e.g., it also has google-chrome, amongst many other apps)… at this point though it never made sense to me why not just to download from website directly (brew cask requires sudo rights + doesn’t install in brew Cellar (i.e. /Cellar/, which is where brew installs)— but in some cases it is handy and or the only option (say for like an application that typically is only on windows might be offered by brew cask)

Anyways, seems I am always asking you questions— so figured might as well give an answer for a change lol :)

Cheers,
Joe

On Jun 2, 2017, at 6:58 PM, Davis E. King notifications@github.com wrote:

Where else would you get it other than the website?

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub https://github.com/davisking/dlib/issues/624#issuecomment-305927473, or mute the thread https://github.com/notifications/unsubscribe-auth/AEBm5Q_kQLGGQU9md5BNp3glnk-UXgODks5sAJOGgaJpZM4Nu3I8.

Ah, darn. brew seems to include a lot of broken packages. Pretty regularly people will contact me about something like this and really their problem is that brew's package maintainers have broken something. I guess X11 is now on that list of "things brew is messing up" :(

Thanks for the heads up though :) If you or anyone encounters this again it would be cool if someone could figure out a way to catch this bad version of X11 inside cmake and avoid it or at least give a useful diagnostic message.

I actually had an issue with this as well (just recently when I got a new MacBook )— maybe even worth noting on under website FAQs or something for us Mac users :)

I mean, the problem was a trivial fix once realized— I couldn’t compile anything with involving GUI headers or using flag -X11… took me only a minute to realize the problem, but perhaps this was because it was not too long before that I used cask to install xquartz, at which point I changed to version directly from website.

On Jun 4, 2017, at 3:11 PM, Davis E. King notifications@github.com wrote:

Ah, darn. brew seems to include a lot of broken packages. Pretty regularly people will contact me about something like this and really their problem is that brew's package maintainers have broken something. I guess X11 is now on that list of "things brew is messing up" :(

Thanks for the heads up though :) If you or anyone encounters this again it would be cool if someone could figure out a way to catch this bad version of X11 inside cmake and avoid it or at least give a useful diagnostic message.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/davisking/dlib/issues/624#issuecomment-306060502, or mute the thread https://github.com/notifications/unsubscribe-auth/AEBm5VSaKcVCRdLYG-DTxDLOKwrnHTHGks5sAwF4gaJpZM4Nu3I8.

Yeah, well, turns out most people don't read documentation. And the more documentation you add the less likely they are to read it. It's way better if cmake can detect this and then print out a big error message that tells them what to do. Although, pretty often I get people posting questions where they copy and paste the error message that tells them exactly what to do to solve their problem. I then have to literally copy and paste the error back to them and they go "finally, I couldn't find that information anywhere!". Except they literally posted that themselves. It's crazy. That's how bad a lot of people are at reading documentation.

Anyway, if you could figure out what is going on with cask and update the cmake scripts so they print a message about this I would be forever grateful :)

Very true/ good point… And yeah, for sure, I will look incorporating this into cmake sometime this week.

On Jun 4, 2017, at 3:40 PM, Davis E. King notifications@github.com wrote:

Yeah, well, turns out most people don't read documentation. And the more documentation you add the less likely they are to read it. It's way better if cmake can detect this and then print out a big error message that tells them what to do. Although, pretty often I get people posting questions where they copy and paste the error message that tells them exactly what to do to solve their problem. I then have to literally copy and paste the error back to them and they go "finally, I couldn't find that information anywhere!". Except they literally posted that themselves. It's crazy. That's how bad a lot of people are at reading documentation.

Anyway, if you could figure out what is going on with cask and update the cmake scripts so they print a message about this I would be forever grateful :)

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/davisking/dlib/issues/624#issuecomment-306062211, or mute the thread https://github.com/notifications/unsubscribe-auth/AEBm5TtG1dGY9-NpZE0c8faBDLpCr2xIks5sAwhGgaJpZM4Nu3I8.

riding the same boat here

Was this page helpful?
0 / 5 - 0 ratings