|Anonymous | Login||2017-11-17 21:48 EST|
|Main | My View | View Issues | Change Log | Roadmap | My Account|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000865||graphviz||Build/Install||public||2005-04-06 03:00||2011-04-28 04:03|
|Platform||OS||x86-Linux-RedHat ES 3.0 WS upda||OS Version|
|Summary||0000865: Compiling graphviz on Linux - dot cannot find Helvetica (fontconfig problem?)|
For some time I used the graphviz-2.2-1.fc1.i386.rpm
and it worked just fine for me. Then I found a minor problem
with generated CMAP files, which I need to work around.
The problem is that in the input code like
DOT transforms single quotes to &-encoded XML entities,
to do not mask single quotes - it is unnecessary inside
I've downloaded the sources of graphviz graphviz-2.2.tar.gz,
and fixed that problem (the fix is not generic, it will work
for my specific input, but I'm not sure about other inputs).
Now, when I run the compiled ./dot -Tpng -oa.png input.dot,
it says that it cannot find Helvetica font, and the generated png image
has wrong layout because of missing font.
I've already met a similar problem while working with RedHat73 version
of graphviz, because that version does not work with fontconfig.
It looks like my compiled binary also does not use fontconfig,
which is strange - ./configure reported that it locates fontconfig
headers and libraries, it only did not locate fontconfig-config.
I tried to find fontconfig-config with no success. It does not seem
to be part of fontconfig-devel, which was installed on my system
The question is: how to compile graphviz properly, so it will use
fontconfig and locate all necessary fonts?
I did not find hints in FAQs and documentation.
BTW, I do not understand why my compiled dot searches for Helvetica
while the version from RPM uses Times-Roman (if I'm not mistaken).
Thank you in advance.
Fontconfig has moved to the pkg-config mechanism. Future releases of Graphviz will use that, but
I think the warning about not finding fontconfig-config doesn't matter as long as it reported that it found the header and library.
Does "ldd `which dot`" show libfontconfig ? (Or in the build tree, use: "libtool --mode=execute ldd ./dot")
Are you saying that ./test/cmap_test.dot is not explicitly setting "Helvetica" as its font?
Oops I just noticed that cmap_test.dot was attached to the report.
It does contain explicit selection of Helvetica, which explains why it is not searching for the default Times-Roman.
Did you ./configure --with-mylibgd ? Does the ldd output show "libgd" or "libgvgd" ?
[ellson] > Hi John,
> I've understood what was the problem, or at least fixed it
> First I have that RPM package installed, and it put all libraries under
It shouldn't. It should install all its libraries in /usr/lib/graphviz/
Are you sure that these aren't from a previous locally-built install? The default prefix for
local builds is /usr/local.
> Then, before compiling graphviz sources, I removed that RPM package by
> running 'rpm -e graphviz'
> It removed the package but not libraries.
You might also want to do a "make unistall" from your local build tree.
Also. Graphviz uses the builtin -rpath mechanism to find its libraries and
doesn't need anything in LD_LIBRARY_PATH. If you have
LD_LIBRARY_PATH set that might cause it to find the wrong libraries.
> I've understood it after
> looking on output of 'ldd `which ./dot`' - thank you for the hint
> When executing, dot worked with those libraries, and this somehow cased
> the problem with fonts.
> I renamed '/usr/local/lib/graphviz' to '/usr/local/lib/graphviz-save',
> so that ld could not find them.
> Then I put all the libraries compiled from sources instead of them, and
> dot started to work correctly.
> I still do not understand why the "old" libraries did not find fonts -
> they are from the same graphviz version, just from RPM.
RPMs built for vanilla RH73 or RH9 systems don't have fontconfig support.
> Anyway, I think you may assume this case closed.
> Most probably, I should do "make install" to have all the things on
> their places.
The -rpath mechanism assumes installation.
If you are building locally you can build for any location you like by use of ./configure --prefix=/my/install/location/
Graphviz will be installed in bin/, lib/, share/, ... under this prefix.
> BTW, could you please tell me if it is possible to link dot statically
> with libraries like 'libgraph', 'libcommon', 'libgvrender', etc?
You are supposed to be able to "./configure --disable-shared --enable-static" but I think there
was a bug report on this recently.
|Tags||No tags attached.|
|2011-04-28 04:03||user1||New Issue|
|2011-04-28 04:03||user1||Assigned To||=> user695|
|MantisBT 1.2.5[^] Copyright © 2000 - 2011 MantisBT Group|