A problem I had with Graphviz yesterday - I couldn't find anything documenting this exact error on Stack Overflow or elsewhere, so I decided to write it up.
On Linux, every call to dot started failing with the error message:
No fonts found; this probably means that the fontconfig
library is not correctly configured. You may need to
edit the fonts.conf configuration file. More information
about fontconfig can be found in the fontconfig(3) manual
page and on http://fontconfig.org
But checking /etc/fonts, the location of the three fontconfig files:
/etc/fonts/fonts.conf
/etc/fonts/fonts.dtd
/etc/fonts/conf.d
showed them all to be in the right place.
The fontconfig command fc-list also gave a non-empty list of installed fonts.
If a folder named .fontconfig exists in the user's home directory, Graphviz will default to using the fonts installed in that directory instead of using those installed under /etc/fonts
In my case, somehow an empty directory ~/.fontconfig had been created without my knowledge. Copying all content from /etc/fonts to this directory solved the problem, as did deleting the ~/.fontconfig directory.
Related
When I follow the steps in the VCPKG documentation page to install on Windows, the noted steps fail on the line .\bootstrap-vcpkg.bat.
Specifically, these are the steps I follow, exactly according to the instructions at the above link.
Run Powershell (not as administrator)
cd <parent_directory>
git clone https://github.com/Microsoft/vcpkg.git
cd .\vcpkg\
.\bootstrap-vcpkg.bat
.\vcpkg integrate install
All above steps (seem to) succeed, until the last (in red, below).
I see the following output:
(Note: the screenshot also shows an additional line at the end - in which I attempted to install a desired package for use in a project - which failed with the same error.)
I looked through the source code of vcpkg and found that the offending line of code looks like this (vcpkg.cpp):
Modifying the vcpkg.cpp source to display the missing path, rebuilding, and testing shows that the missing directory is:
<vcpkg>/installed/...
...But the installed directory does not exist in the vcpkg root directory.
Because I am following the basic installation instructions from the vcpkg documentation, I'm stumped as to what I am doing wrong, what is wrong in my setup, or what to do about it.
Can someone please explain why installation of VCPKG followed by any call to "vcpkg install" results in the error Changing the working dir failed?
I had mistakenly defined the VCPKG_ROOT environment variable to a directory that is a subdirectory of the root directory of the vcpkg project.
This is an easy mistake to make, as I describe below.
The vcpkg executable itself checks for the existence of the VCPKG_ROOT environment variable, and if present, uses its value to override the path to the root folder for the vcpkg project that is used internally by the running vcpkg binary.
I created an environment variable with the same name (VCPKG_ROOT) for a different purpose - so that my own downstream application could be provided the path to the include files for a library installed by vcpkg. It makes sense that I would choose the name VCPKG_ROOT, because in fact vcpkg, by default, installs libraries into a subdirectory of its own root directory.
Specifically:
If the root directory of the 'vcpkg' project is <vcpkg>...
...then by default the vcpkg executable installs libraries such that the include paths for the libraries that are installed are placed in <vcpkg>\installed\...\include\
(And other library files, such as binaries, are also placed in directories nested within <vcpkg>.)
The problem was that I defined VCPKG_ROOT to be the second bullet, not the first. So it's an easy mistake to make, given that the choice of name "VCPKG_ROOT" kind of makes sense in both scenarios!
I just suggested an improved error message via a pull request to the vcpkg project - if accepted, this might save some other poor soul the stress and lost time of tracking down this glitch.
I am trying to install the YAML 1.2 extension to PHP 5.6 under IIS 10 (Windows 10). I am using http://pecl.php.net/package/yaml/1.2.0/windows to download the files.
I have downloaded the PHP 5.6 non-thread-safe DLL (x86 to match my version of PHP), copied php_yaml.dll to my extension directory, copied yaml.dll to C:\Windows\System32 (which is reported as one of the paths in phpinfo()) and added extension=php_yaml.dll to my php.ini. I've verified with phpinfo() that the correct php.ini file is being loaded, and commenting out other extensions removes them from the output of phpinfo().
However, YAML doesn't appear in the output of phpinfo() and the functions are not loaded. Running php-cgi.exe -v from the command line gives a warning:
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\PHP\php_5_06_14\ext\php_yaml.dll' - The specified module could not be found.
in Unknown on line 0
The file exists at the location specified and the permissions appear to be correct. What else can I do to get it working?
As far as I can tell, the use of PECL as package manager is being in dropping.
Having to install extensions in a server makes things more complicated and it depends on the environment, permissions, etc.
I'm sure someone could help you solve that (I haven't work on windows in years, so I can't)
But, instead I suggest you another solution. Maybe you can opt for it, maybe you have to stick with the extension, but, in case you can actually look for other option, I suggest you to use another library.
https://github.com/symfony/yaml
And, you could use Composer to install your libraries, I suggest you take a look at it.
Again, it may be for you or not, but I think this would be a lot easier.
I hope that helps.
I put the path to my extension directory in the path environment variable. That fixed the issue for me.
I have this strange situation that after updating Qt from 4.8 to 5.3, Qt Creator (v.3.2.1) will not take any keyboard input. The keyboard is working normally in other applications.
I'm on Debian Wheezy (7.7) with XFCE, but installed the Qt5 set of packages from wheezy-backports.
Does anyone have an idea what can be done about this?
Update:
As requested, here's the Terminal output:
libEGL warning: DRI2: failed to authenticate
xkbcommon:ERROR: failed to add default include path auto
Qt: Failed to create XKB context!
Use QT_XKB_CONFIG_ROOT environmental variable to provide an addtional search path,
add ':' as separator to provide several search paths and/or make sure that XKB
configurationdata directory contains recent enough contents, to update please see
http://cgit.freedesktop.org/xkeyboard-config/ .
It is apparently a known bug, some messages and posts talks about this issue on the Internet.
Maybe try this, from https://lists.debian.org/debian-backports/2014/10/msg00061.html
Opening Qt5 applications from backports (or self compiled against backported
Qt5) have some trouble finding XCB data:
$ /usr/lib/x86_64-linux-gnu/qt5/examples/quick/d
ialogs/systemdialogs/systemdialogs
xkbcommon: ERROR: failed to add default include path auto
Qt: Failed to create XKB context!
Use QT_XKB_CONFIG_ROOT environmental variable to provide an additional search
path, add ':' as separator to provide several search paths and/or make sure
that XKB configuration data directory contains recent enough contents, to
update please see http://cgit.freedesktop.org/xkeyboard-config/ .
Applications run fine, but can't get input from the keyboard.
As the warning points out, setting the environment variable fixes it:
export QT_XKB_CONFIG_ROOT=/usr/share/X11/xkb
So, try to run qtcreator with the folowing command:
export QT_XKB_CONFIG_ROOT=/usr/share/X11/xkb && qtcreator
~]$ /usr/local/bin/xca
xkbcommon: ERROR: failed to add default include path /usr/share/X11/xkb
Qt: Failed to create XKB context!
Use QT_XKB_CONFIG_ROOT environmental variable to provide an additional search path, add ':' as separator to provide several search paths and/or make sure that XKB configuration data directory contains recent enough contents, to update please see http://cgit.freedesktop.org/xkeyboard-config/ .
sudo apt-get install xkb-data (xkeyboard-config)
has solved my problem (no input from keyboard)
Fed up with emacs22 that came with Xcode, I set out to upgrade to emacs24. I do not want to overwrite the system defaults, and do not want to mess up with it either, so I tried to install emacs in a custom directory other than /usr/local/.
Say I set the prefix to CUSTOM_DIR/emacs-24.2. I built and installed emacs 24.2 to the CUSTOM_DIR/emacs-24.2 directory, so bin/, libexec/, share/, and var/ are all there. (Yes, I have manually checked all required files; the installation is totally complete in the custom directory.) But when I tried to run the new version of emacs, I got the following error messages:
Warning: arch-dependent data dir (/usr/local/libexec/emacs/24.2/x86_64-apple-darwin12.2.1/) does not exist.
Warning: arch-independent data dir (/usr/local/share/emacs/24.2/etc/) does not exist.
Warning: Lisp directory `/usr/local/share/emacs/24.2/site-lisp' does not exist.
Warning: Lisp directory `/usr/local/share/emacs/site-lisp' does not exist.
Warning: Lisp directory `/usr/local/share/emacs/24.2/lisp' does not exist.
Warning: Lisp directory `/usr/local/share/emacs/24.2/leim' does not exist.
Error: charsets directory not found:
/usr/local/share/emacs/24.2/etc/charsets
Emacs will not function correctly without the character map files.
Please check your installation!
So obviously emacs's search path was not affected despite the option --prefix=CUSTOM_DIR/emacs-24.2 I specified when running configure. How do I fix this? Is there any configuration files I need to change, or do I need to add some configuration options when configuring and building emacs? (I built emacs 24.2 from tarball.)
P.S. Please do not suggest other ways of installation. I do know how to install emacs 24, either by installing to /usr/local/, which appeared to have no problem at all; or with MacPorts or similar projects; or by directly running from the command line component found in Emacs.app binary distribution. I simply want to fix this very problem. Thanks.
When using homebrew to install graphviz, the script gets to the point of "Making install in tkstubs" and then throws the following fatal error:
In file included from tkStubLib.c:15:
/usr/include/tk.h:78:11: fatal error: 'X11/Xlib.h' file not found
#include <X11/Xlib.h>
I have installed XQuartz as X11 has been dropped in Mountain Lion, but I'm unsure if it is installed correctly. The location of Xlib.h is:
/opt/X11/include/X11/Xlib.h
There are also two symlinks to /opt/X11, they are:
/usr/X11
/usr/X11R6
Does this look like the correct setup to you? I've never dealt with X11 or XQuartz until yesterday.
Cheers.
After installing XQuartz you may add a symlink to your X11 installation folder by just entering
ln -s /opt/X11/include/X11 /usr/local/include/X11
in terminal. That will fix the problem as well without changing any ruby script.
You need to tell the tkstubs build (and possibly other bits in the package as well) to look for headers in /opt/X11/include; this is not on the standard include path.
Usually this is achieved by passing -I/opt/X11/include as an additional compiler flag, the method to do so is however dependent on the build system.
For reasonably modern configure scripts, the best approach is to pass it in the environment variable CPPFLAGS; if the package uses another build system or this doesn't work for another reason, then you need to look at the Makefile in the build directory.
You can enter in your shell before the compile/link (or brew) command:
export CPPFLAGS=-I/opt/X11/include
The export line will tell the compile/linker to look in /opt/X11/include for the X11 include files
Had the same issue and running this command on terminal
xcode-select --install
worked for me. Run this command after installing xQuartz.
If you need this to work in your CMake builds:
if(APPLE)
include_directories(AFTER "/opt/X11/include")
endif()
That worked well for me.
I got it to install by copying the x11 header file directory to the /opt/local/include directory. Probably not the best way to work around it but quick and easy.
I found this thread while trying to compile ffmpeg from source on OS X. I needed --enable-x11grab and the homebrew build does not support this option.
I had XQuartz installed already but I kept getting errors from ./configure: ERROR: Xlib not found. I thought the answers here would solve my problem, but they did not!
So, if anyone is ever in the same boat, my solution was this:
I opened up the generated config.log and found lots of errors referring to various includes and header files, including X11/Xlib.h - this is misleading. At the very bottom of the logfile was the key, pkg-config was complaining about looking for xbc.pc, and requested that it be put on the path. However, the error message that is displayed on the terminal says nothing about pkg-config or xbc!
The solution is to add to your PKG_CONFIG_PATH environment variable. Mine was nonexistent, so I just did export PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig/ (the folder where I found xbc.pc).
I reran configure and everything worked like a charm!
TL;DR: check config.log - don't trust the terminal output!
Since the make file is looking for X11/xlib.h i.e., it is looking for X11 folder in the current directory, one way to solve this problem is to simply copy the /opt/X11/include/X11 directory to the directory that contains make file.