GD Freetype and Fontconfig Installation Issues

520 views
Skip to first unread message

Parnal Sinha

unread,
Oct 20, 2020, 10:54:16 PM10/20/20
to Circos
Hello everyone,

As usual - another GD Problem except it seems that I am missing the core freetype and fontconfig.

At first, this post by Jun Inoue (https://groups.google.com/g/circos-data-visualization/c/Pgp1FSqSVRc/m/0vTMwt9TMaYJ) seems to be very promising - I was going to try basically the second link she had posted: 


Didn't get me anywhere apart from having downloaded freetype - I can' seem to run install gd --with-freetype. A lot of people seem to be having this issue when they try to use Homebrew. I removed gd too but I seem to be at my wits end now - can anyone provide clarification? If not, would uninstallation and reinstallation be the best bet? I just want to get the example running. 

I see everyone running this simple line and it magically downloads it for them and I'm sitting here like :(

(circos) Parnals-MacBook-Pro-2:current parnalsinha$ brew install libgd --with-freetype

Usage: brew install [options] formula|cask

Install a formula or cask. Additional options specific to a formula may be

appended to the command.

Unless HOMEBREW_NO_INSTALL_CLEANUP is set, brew cleanup will then be run for

the installed formulae or, every 30 days, for all formulae.

  -d, --debug                      If brewing fails, open an interactive

                                   debugging session with access to IRB or a

                                   shell inside the temporary build directory.

  -f, --force                      Install formulae without checking for

                                   previously installed keg-only or

                                   non-migrated versions. Overwrite existing

                                   files when installing casks.

  -v, --verbose                    Print the verification and postinstall

                                   steps.

      --formula, --formulae        Treat all named arguments as formulae.

      --env                        If std is passed, use the standard build

                                   environment instead of superenv. If super

                                   is passed, use superenv even if the formula

                                   specifies the standard build environment.

      --ignore-dependencies        An unsupported Homebrew development flag to

                                   skip installing any dependencies of any

                                   kind. If the dependencies are not already

                                   present, the formula will have issues. If

                                   you're not developing Homebrew, consider

                                   adjusting your PATH rather than using this

                                   flag.

      --only-dependencies          Install the dependencies with specified

                                   options but do not install the formula

                                   itself.

      --cc                         Attempt to compile using the specified

                                   compiler, which should be the name of the

                                   compiler's executable, e.g. gcc-7 for GCC

                                   7. In order to use LLVM's clang, specify

                                   llvm_clang. To use the Apple-provided

                                   clang, specify clang. This option will

                                   only accept compilers that are provided by

                                   Homebrew or bundled with macOS. Please do

                                   not file issues if you encounter errors

                                   while using this option.

  -s, --build-from-source          Compile formula from source even if a

                                   bottle is provided. Dependencies will still

                                   be installed from bottles if they are

                                   available.

      --force-bottle               Install from a bottle if it exists for the

                                   current or newest version of macOS, even if

                                   it would not normally be used for

                                   installation.

      --include-test               Install testing dependencies required to

                                   run brew test formula.

      --HEAD                       If formula defines it, install the HEAD

                                   version, aka. master, trunk, unstable.

      --fetch-HEAD                 Fetch the upstream repository to detect if

                                   the HEAD installation of the formula is

                                   outdated. Otherwise, the repository's HEAD

                                   will only be checked for updates when a new

                                   stable or development version has been

                                   released.

      --keep-tmp                   Retain the temporary files created during

                                   installation.

      --build-bottle               Prepare the formula for eventual bottling

                                   during installation, skipping any

                                   post-install steps.

      --bottle-arch                Optimise bottles for the specified

                                   architecture rather than the oldest

                                   architecture supported by the version of

                                   macOS the bottles are built on.

      --display-times              Print install times for each formula at the

                                   end of the run.

  -i, --interactive                Download and patch formula, then open a

                                   shell. This allows the user to run

                                   ./configure --help and otherwise

                                   determine how to turn the software package

                                   into a Homebrew package.

  -g, --git                        Create a Git repository, useful for

                                   creating patches to the software.

      --cask, --casks              Treat all named arguments as casks.

      --[no-]binaries              Disable/enable linking of helper

                                   executables. Default: enabled

      --require-sha                Require all casks to have a checksum.

      --[no-]quarantine            Disable/enable quarantining of downloads.

                                   Default: enabled

      --skip-cask-deps             Skip installing cask dependencies.

      --appdir                     Target location for Applications. Default:

                                   /Applications

      --colorpickerdir             Target location for Color Pickers. Default:

                                   ~/Library/ColorPickers

      --prefpanedir                Target location for Preference Panes.

                                   Default: ~/Library/PreferencePanes

      --qlplugindir                Target location for QuickLook Plugins.

                                   Default: ~/Library/QuickLook

      --mdimporterdir              Target location for Spotlight Plugins.

                                   Default: ~/Library/Spotlight

      --dictionarydir              Target location for Dictionaries. Default:

                                   ~/Library/Dictionaries

      --fontdir                    Target location for Fonts. Default:

                                   ~/Library/Fonts

      --servicedir                 Target location for Services. Default:

                                   ~/Library/Services

      --input_methoddir            Target location for Input Methods. Default:

                                   ~/Library/Input Methods

      --internet_plugindir         Target location for Internet Plugins.

                                   Default: ~/Library/Internet Plug-Ins

      --audio_unit_plugindir       Target location for Audio Unit Plugins.

                                   Default:

                                   ~/Library/Audio/Plug-Ins/Components

      --vst_plugindir              Target location for VST Plugins. Default:

                                   ~/Library/Audio/Plug-Ins/VST

      --vst3_plugindir             Target location for VST3 Plugins. Default:

                                   ~/Library/Audio/Plug-Ins/VST3

      --screen_saverdir            Target location for Screen Savers. Default:

                                   ~/Library/Screen Savers

      --language                   Set language of the Cask to install. The

                                   first matching language is used, otherwise

                                   the default language on the Cask. The

                                   default value is the language of your

                                   system

  -q, --quiet                      Suppress any warnings.

  -h, --help                       Show this message.

Error: invalid option: --with-freetype

How does one fix this issue? I tried removing my gd and reinstalling and it doesn't seem to do much. 

Here is the code when I run a couple of important flags: 

(circos) Parnals-MacBook-Pro-2:~ parnalsinha$ cd Applications/circos/current

(circos) Parnals-MacBook-Pro-2:current parnalsinha$ which gdlib-config

/usr/local/bin/gdlib-config

(circos) Parnals-MacBook-Pro-2:current parnalsinha$ gdlib-config --all

GD library  2.0.33

includedir: /usr/local/include

cflags:     -I/usr/local/include

ldflags:     -L/usr/local/lib 

libs:       -ljpeg -lpng -lz  -liconv

libdir:     /usr/local/lib

features:   GD_JPEG GD_PNG GD_GIF


(circos) Parnals-MacBook-Pro-2:current parnalsinha$ circos -modules

ok       1.29 Carp

ok       0.36 Clone

ok       2.63 Config::General

ok       3.40 Cwd

ok      2.145 Data::Dumper

ok       2.52 Digest::MD5

ok       2.84 File::Basename

ok       3.40 File::Spec::Functions

ok       0.23 File::Temp

ok       1.51 FindBin

ok       0.39 Font::TTF::Font

ok       2.46 GD

ok        0.2 GD::Polyline

ok       2.39 Getopt::Long

ok       1.16 IO::File

ok       0.33 List::MoreUtils

ok       1.38 List::Util

ok       0.01 Math::Bezier

ok      1.998 Math::BigFloat

ok       0.06 Math::Round

ok       0.08 Math::VecStat

ok       1.03 Memoize

ok       1.32 POSIX

ok       1.08 Params::Validate

ok       1.61 Pod::Usage

ok       2.05 Readonly

ok 2013031301 Regexp::Common

ok       2.85 SVG

ok       1.19 Set::IntSpan

ok     1.6611 Statistics::Basic

ok       2.41 Storable

ok       1.17 Sys::Hostname

ok       2.02 Text::Balanced

ok       0.61 Text::Format

ok     1.9725 Time::HiRes


Parnal Sinha

unread,
Oct 26, 2020, 4:59:36 PM10/26/20
to Circos
Hello, 

For many who have this problem, this is my solution which is honestly the easiest method but also the most tedious method: 

1. Delete all compiled files; most of the perl modules can stay perfectly intact - I used:

$ > rm ~/software/circos

 BE CAREFUL USING RM  - I always had the -i flag on because it pretty much deletes the file completely and pretty much it's a goodbye. It doesn't go to trash either so proceed with caution. 

2. Delete the environment for Circos (if you had a conda env)

3. Delete any extra files you had downloaded like libpng, freetype, etc. 

4. Download circos as specified exactly from the website and ensure you link to the specified root path correctly - follow the instructions under 0.2 of the tutorials with the heading 
INSTALLING CIRCOS ON UNIX

5. DO NOT USE THE HOMEBREW METHOD TO DOWNLOAD GD - Obviously, if circos download worked for you via homebrew then you wouldn't be here anyways. 

6. Under 0.6, there is a whole section as to how to download GD - follow the steps mentioned exactly - I think the hardest thing for me was the multitude methods presented and honestly the tedious and long path was worth it because it compiled exactly how I wanted it to. 

A lot of this seems like basic knowledge and should be tried initially, but I tried to skirt installation and use a shortcut. Moral of the story - the method presented in the website is full-proof - no errors should pop up and installation shouldn't take more than an hour utilizing this method.

TIPS: Be careful for paths and naming - they should be exactly the SAME as the one which Martin had specified. 

Good luck and I hope installation work out for everyone!
Reply all
Reply to author
Forward
0 new messages