TrueType support for GD - Mac

636 views
Skip to first unread message

Andrew Garber

unread,
Apr 13, 2011, 6:15:29 PM4/13/11
to Circos
Hello,


I've run gddiag and created a .png with the colors, but no text.

- I've deleted GD.pm and reinstalled through CPAN
- I looked in /usr/lib and have libgd.2.dylib and libgd.dylib
- I've installed freetype 2.4.4, 90% sure it was successful

Is there anything that jumps out as wrong, or any checks I can run to
see why GD may not have TrueType support?


Thanks,

Andrew Garber

Martin

unread,
Apr 13, 2011, 6:21:21 PM4/13/11
to Circos

If you install GD manually,

> perl Makefile.PL
...
Included Features: GD_XPM GD_JPEG GD_FONTCONFIG GD_FREETYPE
GD_PNG GD_GIF GD_GIFANIM GD_OPENPOLYGON GD_UNCLOSEDPOLY GD_ANIMGIF
GD_FTCIRCLE VERSION_33
...

Do you see GD_FREETYPE?

You can also see whether 'gd' has freetype included using gdlib-
config, which is required for GD to use this functionality.

> gdlib-config --all
GD library 2.0.33
includedir: /usr/include
cflags: -I/usr/include
ldflags: -L/usr/lib64
libs: -lXpm -lX11 -ljpeg -lfontconfig -lfreetype -lpng12 -lz -
lm
libdir: /usr/lib64
features: GD_XPM GD_JPEG GD_FONTCONFIG GD_FREETYPE GD_PNG GD_GIF

Andrew Garber

unread,
Apr 13, 2011, 8:52:34 PM4/13/11
to circos-data-...@googlegroups.com
After manual install, it doesn't look like GD_FREETYPE is in there.  I downloaded the GD-2.45 tar from CPAN.


OUTPUT FOR MANUAL GD INSTALL 

Configuring for libgd version 2.0.34.
Checking for stray libgd header files...none found.

Included Features:          GD_PNG GD_GIF GD_GIFANIM GD_OPENPOLYGON GD_UNCLOSEDPOLY GD_ANIMGIF GD_FTCIRCLE VERSION_33
GD library used from:       /usr
Checking if your kit is complete...
Looks good
Writing Makefile for GD


OUTPUT FOR GDLIB-CONFIG

GD library  2.0.34
includedir: /usr/include
cflags:     -I/usr/include
ldflags:     
libs:       -lpng -lz  -liconv
libdir:     /usr/lib
features:   GD_PNG GD_GIF GD_GIFANIM GD_OPENPOLYGON



--
You received this message because you are subscribed to the Google Groups "Circos" group.
To post to this group, send email to circos-data-...@googlegroups.com.
To unsubscribe from this group, send email to circos-data-visual...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/circos-data-visualization?hl=en.


Martin

unread,
Apr 14, 2011, 12:46:33 PM4/14/11
to Circos

Looks like you'll need to recompile gdlib, since it was not compiled
with freetype.

Himanshu Sharma

unread,
Jul 25, 2013, 12:17:59 AM7/25/13
to circos-data-...@googlegroups.com
Hi Martin,
I have Compiled GD lib and I can see freetype gd when I try both. I am using Circos-0.64 . Here is my output of the commands you suggest and error that I am getting. I am using Mac as well.

perl Makefile.PL 
Notice: Type perl Makefile.PL -h for command-line option summary.

Configuring for libgd version 2.1.0.
Checking for stray libgd header files...none found.

Included Features:          GD_JPEG GD_FREETYPE GD_PNG GD_GIF GD_GIFANIM GD_OPENPOLYGON
GD library used from:       /usr/local
Checking if your kit is complete...
Looks good
Writing Makefile for GD


gdlib-config --all
GD library  2.1.0
includedir: /usr/local/include
cflags:     -I/usr/local/include
ldflags:     -L/usr/X11/lib -L/usr/local/lib
libs:       -ljpeg -lz  -L/usr/local/lib -lpng16 -L/usr/local/lib -lfreetype -lz -lbz2 -liconv
libdir:     /usr/local/lib
features:   GD_JPEG GD_FREETYPE GD_PNG GD_GIF GD_GIFANIM GD_OPENPOLYGON



Error : *** CIRCOS ERROR ***

  There was a problem with True Type font support. Circos could not render text
  from the font file

      /Users/hsharma/Documents/circos-0.64/fonts/symbols/symbols.otf

  Please check that gd (system graphics library) and GD (Perl's interface to gd)
  are compiled with True Type support.

  On UNIX systems, try

      gdlib-config --all

  and look for GD_FREETYPE in the 'features' line and -lfreetype in the 'libs'
  line. If these are there, it's likely that your Perl GD module needs
  recompiling.

  For help in installing libgd and/or GD, see


  If you are having trouble debugging this error, use this tutorial to learn how
  to use the debugging facility


  If you're still stumped, get support in the Circos Google Group


  Stack trace:
 at /Users/hsharma/Documents/circos-0.64/bin/../lib/Circos/Error.pm line 354
Circos::Error::fatal_error('font', 'no_ttf', '/Users/hsharma/Documents/circos-0.64/fonts/symbols/symbols.otf') called at /Users/hsharma/Documents/circos-0.64/bin/../lib/Circos/Font.pm line 192
Circos::Font::get_label_size('font_file', '/Users/hsharma/Documents/circos-0.64/fonts/symbols/symbols.otf', 'size', 10, 'text', 'abc123') called at /Users/hsharma/Documents/circos-0.64/bin/../lib/Circos/Font.pm line 243
Circos::Font::sanity_check() called at /Users/hsharma/Documents/circos-0.64/bin/../lib/Circos.pm line 771
Circos::run('Circos', 'configfile', '../plots/resistant.conf') called at ./bin/circos line 300

Can you suggest me what I should try next ?.

Thanks,
Himanshu




> > To unsubscribe from this group, send email to circos-data-visualization+unsub...@googlegroups.com.

Himanshu Sharma

unread,
Jul 25, 2013, 7:32:53 PM7/25/13
to circos-data-...@googlegroups.com
Hi Can anyone help? Were you able to get it working @Andrew . I really want to get it working.
Thanks,
Himanshu

Himanshu Sharma

unread,
Jul 25, 2013, 11:39:23 PM7/25/13
to circos-data-...@googlegroups.com
Hi Martin,
Can you please help me with this. I am trying to read it everywhere in your posts and other places but I cannot seem to quite understand the solution for it.
Thanks,
Himanshu 

Martin Krzywinski

unread,
Jul 26, 2013, 4:41:39 PM7/26/13
to circos-data-...@googlegroups.com
Based on this error

Circos::Font::get_label_size('
font_file', '/Users/hsharma/Documents/circos-0.64/fonts/symbols/symbols.otf', 'size', 10, 'text', 'abc123') called at /Users/hsharma/Documents/circos-0.64/bin/../lib/Circos/Font.pm line 243

it looks like you're trying to use the symbols font to render the text "abc123". This font is special and doesn't define all characters.

Can you run bin/gddiag to create this test image



Martin Krzywinski
science + art



--
You received this message because you are subscribed to the Google Groups "Circos" group.
To unsubscribe from this group and stop receiving emails from it, send an email to circos-data-visual...@googlegroups.com.

To post to this group, send email to circos-data-...@googlegroups.com.

Noushin Farnoud

unread,
Aug 21, 2013, 11:28:27 AM8/21/13
to circos-data-...@googlegroups.com
Hi Martin,

I have received the exact same error msg on OSX 10.8.4 ('There was a problem with True Type font support') and running the gdlib-config --all returns:

GD library  2.1.0
includedir: /usr/local/include
cflags:     -I/usr/local/include
ldflags:    
libs:       -ljpeg -lz  -liconv
libdir:     /usr/local/lib
features:   GD_JPEG GD_GIF GD_GIFANIM GD_OPENPOLYGON

So it seems that GD_FREETYPE does not exit in the features, nor is -lfreetype in the 'libs' line!
Also, when I tried to run gddiag as you suggested, I received the following:

allocated 29202 colors
Can't locate object method "png" via package "GD::Image" at /Users/rahnaman/Documents/circos-0.64/bin/gddiag line 209.

Can you please let me know how I can solve this error?

Many Thanks,
Noushin


On Friday, July 26, 2013 4:41:39 PM UTC-4, Martin wrote:
Based on this error

Circos::Font::get_label_size('
font_file', '/Users/hsharma/Documents/circos-0.64/fonts/symbols/symbols.otf', 'size', 10, 'text', 'abc123') called at /Users/hsharma/Documents/circos-0.64/bin/../lib/Circos/Font.pm line 243

it looks like you're trying to use the symbols font to render the text "abc123". This font is special and doesn't define all characters.

Can you run bin/gddiag to create this test image



Martin Krzywinski
science + art



On Thu, Jul 25, 2013 at 8:39 PM, Himanshu Sharma <hns...@gmail.com> wrote:
Hi Martin,
Can you please help me with this. I am trying to read it everywhere in your posts and other places but I cannot seem to quite understand the solution for it.
Thanks,
Himanshu 


On Thursday, July 25, 2013 7:32:53 PM UTC-4, Himanshu Sharma wrote:
Hi Can anyone help? Were you able to get it working @Andrew . I really want to get it working.
Thanks,
Himanshu

--
You received this message because you are subscribed to the Google Groups "Circos" group.
To unsubscribe from this group and stop receiving emails from it, send an email to circos-data-visualization+unsub...@googlegroups.com.

Martin Krzywinski

unread,
Aug 21, 2013, 2:59:25 PM8/21/13
to circos-data-...@googlegroups.com
You're missing PNG support in gd. In your features report

> features:   GD_JPEG GD_GIF GD_GIFANIM GD_OPENPOLYGON

GD_PNG is missing. You need to install libpng and recompile gd. 

I know, it's a pain.


Martin Krzywinski
science + art



To unsubscribe from this group and stop receiving emails from it, send an email to circos-data-visual...@googlegroups.com.

Rahnamay Farnoud, Noushin/Sloan-Kettering Institute

unread,
Aug 21, 2013, 3:33:45 PM8/21/13
to circos-data-...@googlegroups.com
Hi Martin,

I had installed libpng before, but just to be on the safe side, I deleted both "libpng" and "libgd" and re-installed them again.
But it seems libgd still does not recognize the Freestyle or PNG. Do you know how I can make it run?

I am attaching the installation outputs for libpng (libpng-1.5.17) and libgd(libgd-2.1.0) here as well, in case it helps.

Also, I have installed free type-2.5.0 in the same directory as the rest (/path/to/circos-0.64/bin/srctemp).

Many Thanks,
Noushin
libgd.out.rtf
png.out.rtf

Martin Krzywinski

unread,
Aug 21, 2013, 3:48:08 PM8/21/13
to circos-data-...@googlegroups.com
Your libgd installation is still not seeing either PNG nor the Freetype libraries.  

This is reported during installation

Support for Zlib:                 yes

   Support for PNG library:          no

   Support for JPEG library:         yes

   Support for VPX library:          no

   Support for TIFF library:         no

   Support for Freetype 2.x library: no

   Support for Fontconfig library:   no

   Support for Xpm library:          no

   Support for pthreads:             yes

Don't install these libraries in non-standard places, unless you're willing to point the configure scripts of libgd to these locations. 

It's been a long time since I compiled these libraries. Looks like your libpng was written to /usr/local. Is this directory scanned for libraries in libgd installation?



Martin Krzywinski
science + art



--
You received this message because you are subscribed to the Google Groups "Circos" group.
To unsubscribe from this group and stop receiving emails from it, send an email to circos-data-visual...@googlegroups.com.
To post to this group, send email to circos-data-...@googlegroups.com.
Visit this group at http://groups.google.com/group/circos-data-visualization.
For more options, visit https://groups.google.com/groups/opt_out.



On Aug 21, 2013, at 2:59 PM, Martin Krzywinski <martin.k...@gmail.com> wrote:

libpng



Rahnamay Farnoud, Noushin/Sloan-Kettering Institute

unread,
Aug 22, 2013, 5:32:06 PM8/22/13
to circos-data-...@googlegroups.com
Thanks Martin for your help!
 
I did not change anything when I installed these and assumed all libraries can link together. 

It was a nightmare trying to locate where each default library is. So I deleted everything and re-installed circos at 
/usr/local
and then all the additional packages at 
/usr/local/src
I then configured  them all into: /usr/local (no src)

e.g., ./configure --prefix=/usr/local/libpng-1.6.2

But the same problem! 
I can not find what are the default paths that libgd uses to look for libraries,
however, since it can not see PNG I thought it worths to find where PNG libraries are since that was the only one I could find.

This is what I have done:

$ cd /usr/local/libpng-1.6.2/bin
$ libpng-config --libdir
/usr/local/bin

which probably means whatever "gdlib" is using as default, does not include /usr/local/bin!

I have spent my whole day trying to figure how to fetch out other library paths and how to force gdlib to look into specific defaults paths but to no avail :( 

I greatly appreciate your feedback.

Thanks,
Noushin

You received this message because you are subscribed to a topic in the Google Groups "Circos" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/circos-data-visualization/GrxhNtsMtxE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to circos-data-visual...@googlegroups.com.

Paulo Nuin

unread,
Aug 22, 2013, 10:04:21 PM8/22/13
to circos-data-...@googlegroups.com
On 2013-08-22, at 5:32 PM, "Rahnamay Farnoud, Noushin/Sloan-Kettering Institute" <noushin...@gmail.com> wrote:

Thanks Martin for your help!
 
I did not change anything when I installed these and assumed all libraries can link together. 

It was a nightmare trying to locate where each default library is. So I deleted everything and re-installed circos at 
/usr/local
and then all the additional packages at 
/usr/local/src
I then configured  them all into: /usr/local (no src)

e.g., ./configure --prefix=/usr/local/libpng-1.6.2



Remove the libpng from the end, just use /usr/local


But the same problem! 
I can not find what are the default paths that libgd uses to look for libraries,
however, since it can not see PNG I thought it worths to find where PNG libraries are since that was the only one I could find.

This is what I have done:

$ cd /usr/local/libpng-1.6.2/bin
$ libpng-config --libdir
/usr/local/bin

which probably means whatever "gdlib" is using as default, does not include /usr/local/bin!

I have spent my whole day trying to figure how to fetch out other library paths and how to force gdlib to look into specific defaults paths but to no avail :( 

I greatly appreciate your feedback.


Martin Krzywinski

unread,
Aug 22, 2013, 11:13:34 PM8/22/13
to circos-data-...@googlegroups.com
Paulo is right. You're using --prefix incorrectly. 

You probably have libpng in /usr/local/lib not in /usr/local/libpng-1.6.2/lib. You may have compiled the code in /usr/local/libpng-1.6.2 but during the installation phase the files were written to /usr/local/lib and /usr/local/include.


Martin Krzywinski
science + art



Rahnamay Farnoud, Noushin/Sloan-Kettering Institute

unread,
Aug 23, 2013, 6:58:01 PM8/23/13
to circos-data-...@googlegroups.com
Thanks Paulo and Martin,

I deleted everything (again!) and went on to download/install circos and its dependencies using Homebrew, exactly according to the instructions here:

everything went fine (and I checked the outputs). I was just unable to install CircosAPI ($git clone git:github.com/kylase/CircosAPI)
which I don't think is crucial for running Circos.

Going back to the example in the Circos tutorial
cd example
./run
and here is the output I get. I think the good news is the libraries are found, but it seems some modules within GD are missing, am I right?

debuggroup summary 0.06s welcome to circos v0.64 2 May 2013
debuggroup summary 0.06s loading configuration from file etc/circos.conf
debuggroup summary 0.06s found conf file etc/circos.conf
debuggroup summary 0.24s debug will appear for these features: summary
debuggroup summary 0.24s parsing karyotype and organizing ideograms
debuggroup summary 0.37s applying global and local scaling
debuggroup summary 0.37s allocating image, colors and brushes
dyld: lazy symbol binding failed: Symbol not found: _gdImageCreateTrueColor
  Referenced from: /Users/rahnaman/perl5/perlbrew/perls/perl-5.16.0/lib/site_perl/5.16.0/darwin-2level/auto/GD/GD.bundle
  Expected in: dynamic lookup

dyld: Symbol not found: _gdImageCreateTrueColor
  Referenced from: /Users/rahnaman/perl5/perlbrew/perls/perl-5.16.0/lib/site_perl/5.16.0/darwin-2level/auto/GD/GD.bundle
  Expected in: dynamic lookup

I very much appreciate your help!

Noushin

Rahnamay Farnoud, Noushin/Sloan-Kettering Institute

unread,
Aug 26, 2013, 1:14:09 PM8/26/13
to circos-data-...@googlegroups.com
Hi again,

I am still trying to install Circos! I removed Freetype and repeated the entire installation using Homebrew 
But I am still getting the same error!

MPED0001:5 rahnaman$ circos -conf etc/circos.conf 
debuggroup summary 0.06s welcome to circos v0.64 2 May 2013
debuggroup summary 0.06s loading configuration from file etc/circos.conf
debuggroup summary 0.06s found conf file etc/circos.conf
debuggroup summary 0.24s debug will appear for these features: summary
debuggroup summary 0.24s parsing karyotype and organizing ideograms
debuggroup summary 0.37s applying global and local scaling
debuggroup summary 0.37s allocating image, colors and brushes
dyld: lazy symbol binding failed: Symbol not found: _gdImageCreateTrueColor
  Referenced from: /Users/rahnaman/perl5/perlbrew/perls/perl-5.16.0/lib/site_perl/5.16.0/darwin-2level/auto/GD/GD.bundle
  Expected in: dynamic lookup

dyld: Symbol not found: _gdImageCreateTrueColor
  Referenced from: /Users/rahnaman/perl5/perlbrew/perls/perl-5.16.0/lib/site_perl/5.16.0/darwin-2level/auto/GD/GD.bundle
  Expected in: dynamic lookup

Any feedback is greatly appreciated. I hope I can use Circos!

Many Thanks,
Noushin

Paulo Nuin

unread,
Aug 27, 2013, 8:08:26 AM8/27/13
to circos-data-...@googlegroups.com, circos-data-...@googlegroups.com
Can you try reinstalling Perl GD just to relink the library? It might help

Paulo

Sent from my iPhone

Martin Krzywinski

unread,
Aug 28, 2013, 12:06:48 AM8/28/13
to circos-data-...@googlegroups.com
> Symbol not found: _gdImageCreateTrueColor

This error relates to 24-bit images, so called "true color" images by gd. This is unrelated to font issues.

We're not gd experts here, unfortunately, and these kinds of errors are very hard to debug for someone else. After a few cycles of compilation, installation and deletion your system can be littered with old files that are inadvertently being linked to as you move down the dependency list.

I would first make sure that your gd installation is alright, before even attempting to do anything with GD. libgd should have some tests that you can run to verify that its internals are sane.


Martin Krzywinski
science + art



Reply all
Reply to author
Forward
0 new messages