TTf support for Mac

678 views
Skip to first unread message

Himanshu Sharma

unread,
Jul 25, 2013, 10:35:46 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

Martin Krzywinski

unread,
Jul 26, 2013, 4:42:09 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.
Visit this group at http://groups.google.com/group/circos-data-visualization.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Samantha

unread,
Oct 9, 2013, 11:17:14 PM10/9/13
to circos-data-...@googlegroups.com
Hi Martin,

I'm sure you're sick of GD issues at this point, but like so many before me I'm super new to all of this and don't really know what to do.
I think I'm encountering a nearly identical problem to the one on this feed.
Things start fine, then I get:


*** CIRCOS ERROR ***

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

      /Applications/circos100813/bin/../fonts/symbols/symbols.otf

etc...

 Stack trace:
 at /Applications/circos100813/bin/../lib/Circos/Error.pm line 354
    Circos::Error::fatal_error('font', 'no_ttf', '/Applications/circos100813/bin/../fonts/symbols/symbols.otf') called at /Applications/circos100813/bin/../lib/Circos/Font.pm line 192
    Circos::Font::get_label_size('font_file', '/Applications/circos100813/bin/../fonts/symbols/symbols.otf', 'size', 10, 'text', 'abc123') called at /Applications/circos100813/bin/../lib/Circos/Font.pm line 243
    Circos::Font::sanity_check() called at /Applications/circos100813/bin/../lib/Circos.pm line 771
    Circos::run('Circos', 'configfile', '/Applications/circos100813/etc/eremophORPIariz.ashx/circos/ci...') called at ./circos line 300

- So as you suggested up here I tried "bin/gddiag" and saw this error

$ perl ./gddiag  /Applications/circos100813/etc/eremophORPIariz.ashx/circos/circos.conf
allocated 29202 colors
Can't locate object method "png" via package "GD::Image" at ./gddiag line 209.

So there is something wrong with my GD:Image module?


when I run ./test.modules it says "ok" next to everything.
also when I run
gdlib-config --all
I see this:


GD library  2.0.33
includedir: /usr/local/include
cflags:     -I/usr/local/include
ldflags:     -L/usr/X11/lib -Wl,-framework,CoreServices -Wl,-framework,ApplicationServices  -L/usr/X11/lib
libs:       -lXpm -lX11 -lfontconfig -lfreetype -lpng12 -lz  -liconv
libdir:     /usr/local/lib
features:   GD_XPM GD_FONTCONFIG GD_FREETYPE GD_PNG GD_GIF

Which is supposed to be good news right? Since freetype is listed where it needs to be?

Got any tips of where I should go from here?
I hadn't typed a word of code until ~2weeks ago, so go easy on me :) 
Thanks so much
-Sam


Martin Krzywinski

unread,
Oct 10, 2013, 6:23:43 PM10/10/13
to circos-data-...@googlegroups.com
The test.modules script only verifies that the modules are installed. In some cases, a module could be installed but still malfunctioning, if it wasn't hooked into the system libraries correctly.

To run gddiag, you don't need "perl gddiag"

$ bin/gddiag

is enough. The perl interpreter will automatically be called to parse the script. 

> Can't locate object method "png" via package "GD::Image" at ./gddiag line 209.

This error suggests that the GD perl module is not correctly installed. It looks like you have libgd, and it has the right features. During the installation of the GD module, the build script looks for libgd - this step may have barfed. 

You should try installing GD manually. Get the source from 


Once unpacked, here's what installation looks like on my Mac (10.6.8)

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

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

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
GD library used from:       /usr/local
Checking if your kit is complete...
Looks good
Writing Makefile for GD

Then run

$ make
$ make test
$ make install



Martin Krzywinski
science + art



Samantha

unread,
Oct 10, 2013, 7:54:24 PM10/10/13
to circos-data-...@googlegroups.com
That worked!
I had been seeing "Makefile.PL" in these feeds and didn't know where it was coming from

Thanks so so very much!


Brendan Kohrn

unread,
Mar 20, 2014, 6:16:12 PM3/20/14
to circos-data-...@googlegroups.com
Martin, 

I'm having a similar error, only when I try to install GD manually, I get this:

>: 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_GIF GD_GIFANIM GD_OPENPOLYGON
GD library used from:       /usr/local
Generating a Unix-style Makefile
Writing Makefile for GD
Writing MYMETA.yml and MYMETA.json
>: make
/usr/bin/perl GD/Image.pm.PLS GD/Image.pm
Extracting Image.pm (with variable substitutions)
cp GD/Polyline.pm blib/lib/GD/Polyline.pm
cp qd.pl blib/lib/qd.pl
cp GD/Image.pm blib/lib/GD/Image.pm
cp GD/Simple.pm blib/lib/GD/Simple.pm
cp GD.pm blib/lib/GD.pm
AutoSplitting blib/lib/GD.pm (blib/lib/auto/GD)
cp GD/Polygon.pm blib/lib/GD/Polygon.pm
cp GD/Group.pm blib/lib/GD/Group.pm
Running Mkbootstrap for GD ()
chmod 644 GD.bs
/usr/bin/perl /Library/Perl/5.12/ExtUtils/xsubpp  -typemap /System/Library/Perl/5.12/ExtUtils/typemap -typemap typemap  GD.xs > GD.xsc && mv GD.xsc GD.c
llvm-gcc-4.2 -c  -I/usr/local/include -arch x86_64 -arch i386 -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector -I/usr/local/include -Wformat=0 -Os   -DVERSION=\"2.52\" -DXS_VERSION=\"2.52\"  "-I/System/Library/Perl/5.12/darwin-thread-multi-2level/CORE"  -DHAVE_GIF GD.c
rm -f blib/arch/auto/GD/GD.bundle
LD_RUN_PATH="/usr/lib:/usr/local/lib" llvm-gcc-4.2 -mmacosx-version-min=10.7  -arch x86_64 -arch i386 -bundle -undefined dynamic_lookup -L/usr/local/lib -fstack-protector GD.o  -o blib/arch/auto/GD/GD.bundle \
  -L/usr/X11/lib -L/usr/local/lib -lz -liconv -lgd   \
 
ld: warning: ignoring file /usr/local/lib/libgd.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
chmod 755 blib/arch/auto/GD/GD.bundle
/usr/bin/perl -MExtUtils::Command::MM -e 'cp_nonempty' -- GD.bs blib/arch/auto/GD/GD.bs 644
/usr/bin/perl "-Iblib/arch" "-Iblib/lib" bdf_scripts/bdf2gdfont.PLS bdf_scripts/bdf2gdfont.pl
Extracting bdf2gdfont.pl (with variable substitutions)
cp bdf_scripts/bdf2gdfont.pl blib/script/bdf2gdfont.pl
/usr/bin/perl -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/bdf2gdfont.pl
Manifying blib/man1/bdf2gdfont.pl.1
Manifying blib/man3/GD.3pm
Manifying blib/man3/GD::Image.3pm
Manifying blib/man3/GD::Polygon.3pm
Manifying blib/man3/GD::Polyline.3pm
Manifying blib/man3/GD::Simple.3pm
>: make test
Running Mkbootstrap for GD ()
chmod 644 GD.bs
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/GD.t ........ 1/12 Testing using gif support.
t/GD.t ........ Failed 6/12 subtests 
(less 3 skipped subtests: 3 okay)
t/Polyline.t .. ok   

Test Summary Report
-------------------
t/GD.t      (Wstat: 0 Tests: 12 Failed: 6)
  Failed tests:  2-7
Files=2, Tests=13,  0 wallclock secs ( 0.02 usr  0.01 sys +  0.09 cusr  0.01 csys =  0.13 CPU)
Result: FAIL
Failed 1/2 test programs. 6/13 subtests failed.
make: *** [test_dynamic] Error 255

Any advice?  
To unsubscribe from this group and stop receiving emails from it, send an email to circos-data-visualization+unsub...@googlegroups.com.

Martin Krzywinski

unread,
Mar 21, 2014, 2:33:55 AM3/21/14
to circos-data-...@googlegroups.com
You're missing FreeType support in libgd. The features line should have GD_FREETYPE.




Martin Krzywinski
science + art



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/d/optout.

Junhao Wen

unread,
Jun 26, 2023, 4:21:09 PM6/26/23
to Circos
It's really frustrating. 
I got the same error, and then I installed FreeType:

sudo cpanm Font::FreeType


But I still got the same error:


*** CIRCOS ERROR ***


      cwd: /Users/hao/Project/fujiplot


      command: /Users/hao/Software/circos-0.69-6-kanai/bin/circos -conf

      /Users/hao/Project/fujiplot/config/circos.conf -debug_group summary


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

  from the font file


      /Users/hao/Software/circos-0.69-6-kanai/bin/../fonts/modern/cmunbmr.ttf


  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


      http://www.perlmonks.org/?node_id=621579


  If you are having trouble debugging this error, first read the best practices

  tutorial for helpful tips that address many common problems


      http://www.circos.ca/documentation/tutorials/reference/best_practices


  The debugging facility is helpful to figure out what's happening under the

  hood


      http://www.circos.ca/documentation/tutorials/configuration/debugging


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


      http://groups.google.com/group/circos-data-visualization


  Please include this error, all your configuration, data files and the version

  of Circos you're running (circos -v).Do not email me directly -- please use

  the group.


  Stack trace:

 at /Users/hao/Software/circos-0.69-6-kanai/bin/../lib/Circos/Error.pm line 425.

Circos::Error::fatal_error("font", "no_ttf", "/Users/hao/Software/circos-0.69-6-kanai/bin/../fonts/modern/c"...) called at /Users/hao/Software/circos-0.69-6-kanai/bin/../lib/Circos/Font.pm line 192

Circos::Font::get_label_size("font_file", "/Users/hao/Software/circos-0.69-6-kanai/bin/../fonts/modern/c"..., "size", 10, "text", "abc123") called at /Users/hao/Software/circos-0.69-6-kanai/bin/../lib/Circos/Font.pm line 243

Circos::Font::sanity_check() called at /Users/hao/Software/circos-0.69-6-kanai/bin/../lib/Circos.pm line 726

Circos::run("Circos", "configfile", "/Users/hao/Project/fujiplot/config/circos.conf", "_cwd", "/Users/hao/Project/fujiplot", "_argv", "-conf /Users/hao/Project/fujiplot/config/circos.conf -debug_g"..., "debug_group", ...) called at /Users/hao/Software/circos-0.69-6-kanai/bin/circos line 536

mv: rename /Users/hao/Project/fujiplot/output/circos.png to /Users/hao/Project/fujiplot/output_example/circos.png: No such file or directory





Junhao Wen

unread,
Jun 26, 2023, 4:26:07 PM6/26/23
to Circos
I was able to successfully run this:

(base)  ✘ MacBook-Pro  ~/Software/circos-0.69-6-kanai/bin  perl gddiag 

allocated 20603 colors

Created color diagnostic image at gddiag.png

GD version 2.77


Junhao Wen

unread,
Jun 26, 2023, 4:27:15 PM6/26/23
to Circos

Junhao Wen

unread,
Jun 26, 2023, 4:30:58 PM6/26/23
to Circos
To install FreeType:

sudo cpanm Font::FreeType 

Password:

Font::FreeType is up to date. (0.16)


Junhao Wen

unread,
Jun 26, 2023, 4:32:16 PM6/26/23
to Circos
Output for gdlib config:

gdlib-config --all

gdlib-config: warning: this script is deprecated; please use the pkg-config file instead.

GD library  2.2.5

includedir: /usr/local/include

cflags:     -I/usr/local/include

ldflags:     -L/usr/X11/lib

libs:          -lz  -L/usr/local/lib -lpng15    -lfontconfig   -ljpeg   -lXpm -liconv

libdir:     /usr/local/lib

features:   GD_GIF GD_GIFANIM GD_OPENPOLYGON GD_ZLIB GD_PNG GD_FONTCONFIG GD_JPEG GD_XPM


Martin Krzywinski

unread,
Jun 26, 2023, 4:43:29 PM6/26/23
to circos-data-...@googlegroups.com

The kind folks at ActiveState have created a Perl build environment for Circos.

There's still a couple of bugs to work out and I'll ping here when they're fully baked.

m

Martin Krzywinski
science + art


Reply all
Reply to author
Forward
0 new messages