1

First of all I would like to mention that I am not a programmer and neither do I have an english mother tongue, but I will try to do my best :-)

I was looking for a way to create some nice circular visualizations (chord graphs) and stumped across Circos (http://circos.ca), which seemed to fit my needs.

The installation was smooth until the last step, where I've encountered a problem with GD and running in circles while trying to fix it.

Here some details:

  • MacBook Air (Retina, 13-inch, 2020)
  • macOS Monterey Version 12.0.1 (21A559)
  • Circos 0.69-9
  • Perl v5.34.0

And a bunch of perl different modules I've managed to install successfully :-)

If the perl modules are checked using circos -modules there are two missing and that's where the problem starts:

ok       1.52 Carp
ok       0.45 Clone
ok       2.63 Config::General
ok       3.80 Cwd
ok      2.179 Data::Dumper
ok       2.58 Digest::MD5
ok       2.85 File::Basename
ok       3.80 File::Spec::Functions
ok     0.2311 File::Temp
ok       1.52 FindBin
ok       0.39 Font::TTF::Font
missing            GD
missing            GD::Polyline
ok       2.52 Getopt::Long
ok       1.46 IO::File
ok      0.430 List::MoreUtils
ok       1.55 List::Util
ok       0.01 Math::Bezier
ok   1.999818 Math::BigFloat
ok       0.07 Math::Round
ok       0.08 Math::VecStat
ok    1.03_01 Memoize
ok       1.97 POSIX
ok       1.30 Params::Validate
ok       2.01 Pod::Usage
ok       2.05 Readonly
ok 2017060201 Regexp::Common
ok       2.84 SVG
ok       1.19 Set::IntSpan
ok     1.6611 Statistics::Basic
ok       3.23 Storable
ok       1.23 Sys::Hostname
ok       2.04 Text::Balanced
ok       0.61 Text::Format
ok     1.9767 Time::HiRes

I tried various methods and googled extensively but I'm unable to get those two GD perl modules working.

When I use brew to install GD it seems to install nicely, but when checking using circos -modules I get:

dyld[14230]: missing symbol called

After uninstalling using brew uninstall --ignore-dependencies gd and checking again circos -modules the two missing modules are reported again and the dyld error is not shown anymore.

So I tried something I didn't quite know what I was doing :-)

... and downloaded GD 2.73 and compiled it...

perl Makefile.PL --ignore_missing_gd

Where is libgd installed? [/usr/lib] /usr/local/Cellar/

Please choose the features that match how libgd was built:
Build JPEG support? [y] y
Build PNG support? [y] y
Build FreeType support? [y] y
Build GIF support? [y] n
Build XPM support? [y] n

If you experience compile problems, please check the @INC, @LIBPATH and @LIBS
arrays defined in Makefile.PL and manually adjust, if necessary.

Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for GD
Writing MYMETA.yml and MYMETA.json

So I was encouraged to run the make command, but unfortunately a ton of warnings have been reported so that I decided not to continue with sudo make install

Now when checking with circos -modules I get the same error again :-(

After repeating brew uninstall --ignore-dependencies gd the same modules missing are reported again and I'm back at the beginning of the loop.

Here I'm stuck and running in circles any hint or little help would be very much appreciated.

Thanks and have a nice day!


In the mean time I've followed the link @Håkon Hægland posted

missing GD while installing circos on Mac OS Big Sur Version 11.0.1

So I did the following:

brew install pkg-config
Running `brew update --preinstall`...
==> Auto-updated Homebrew!
Updated Homebrew from cf4848b17 to e76dce1ae.
Updated 1 tap (homebrew/core).
==> Updated Formulae
Updated 16 formulae.
Warning: pkg-config 0.29.2_3 is already installed and up-to-date.
To reinstall 0.29.2_3, run:
  brew reinstall pkg-config

brew install libgd
==> Downloading https://ghcr.io/v2/homebrew/core/gd/manifests/2.3.3_1
Already downloaded: /Users/dirk/Library/Caches/Homebrew/downloads/fb430dd3c55c9f1f523cb280513372f2cc630661b0adf7c78e40dbbb040fe81c--gd-2.3.3_1.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/gd/blobs/sha256:8976ef6710a704e27557e1ad9c2b3aecf9b0b3dc266b212922a6ac22
Already downloaded: /Users/dirk/Library/Caches/Homebrew/downloads/641ee2beaa19a84d66e7e62cb57a1b792eb02fb05306fbfe9ee15b4741649622--gd--2.3.3_1.monterey.bottle.tar.gz
==> Pouring gd--2.3.3_1.monterey.bottle.tar.gz
  /usr/local/Cellar/gd/2.3.3_1: 33 files, 1.4MB
==> Running `brew cleanup gd`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).

cpanm GD
GD is up to date. (2.73)

But then when rerun circos -modules, I get again the following error:

dyld[3534]: missing symbol called
zsh: abort      circos -modules

Still running in circles, it's just to despair and now about time to sleep, tomorrow is a new day...

Thanks to all for the help and good night :-)

Samuel Liew
  • 76,741
  • 107
  • 159
  • 260
deekee
  • 41
  • 7
  • Are you using the system `perl` (please show the output of `which perl`) ? Can you try with [perlbrew](https://perlbrew.pl/) ? – Håkon Hægland Jan 21 '22 at 08:14
  • See also [this](https://stackoverflow.com/q/65281630/2173773) question – Håkon Hægland Jan 21 '22 at 08:25
  • Re "*Now when checking with circos -modules I get the same error again :-("*, Well yeah, you didn't install anything. – ikegami Jan 21 '22 at 14:23
  • Re "*I decided not to continue with `sudo make install`*", The next step would have been `make test`. – ikegami Jan 21 '22 at 14:25
  • Re "*After repeating `brew uninstall --ignore-dependencies gd`*", I'm baffled why you think uninstalling something will help with missing modules. – ikegami Jan 21 '22 at 14:28
  • I'm not exactly familiar with this, but it seems extremely unwise to install GD on a system without `gd`, which is what `--ignore_missing_gd` seems to allow? – ikegami Jan 21 '22 at 14:32
  • @håkon-hægland the output of which perl is /usr/local/bin/perl – deekee Jan 21 '22 at 16:06
  • @deekee I am not sure if `/usr/local/bin/perl` is the system `perl`, I am on macOS 12.0.1 (same as you) and my system `perl` is installed in `/usr/bin/perl` (note the missing `local` part). What is the output of `perl --version` ? – Håkon Hægland Jan 21 '22 at 16:22
  • @dekee Sorry I see from your question that you using perl version 5.34, then this is definitively not the system perl, as the system perl that comes with macOS 12.0.1 is version 5.30.3, can you confirm that by running the command `/usr/bin/perl --version` ? – Håkon Hægland Jan 21 '22 at 16:26
  • @håkon-hægland, well, perlbrew failed :-( Test Summary Report ------------------- ../ext/GDBM_File/t/gdbm.t (Wstat: 65280 Tests: 5 Failed: 0) Non-zero exit status: 255 Parse errors: No plan found in TAP output Files=2676, Tests=1185585, 1254 wallclock secs (138.80 usr 26.78 sys + 787.67 cusr 141.38 csys = 1094.63 CPU) Result: FAIL make: *** [test_harness] Error 1 ##### Brew Failed ##### Running perl version v5.30.3 – deekee Jan 21 '22 at 18:26
  • perl --version = v5.34.0 resp. /usr/bin/perl --version = v5.30.3 – deekee Jan 21 '22 at 18:28
  • @deekee *"well, perlbrew failed"* Interesting, which perl version did you try to install with perlbrew? Can you upload the complete output somewhere, e.g. pastebin.com. Then, I can have a look at it and try to reproduce the error. Or, alternatively post a new question here showing your attempt to install perlbrew with more details. – Håkon Hægland Jan 21 '22 at 20:27
  • @deekee *"/usr/bin/perl --version = v5.30.3"* Yes this is the system perl. How did you install the other perl in `/usr/local/bin/perl` ? – Håkon Hægland Jan 21 '22 at 20:28
  • @håkon-hægland, to be honest I've already uninstalled perlbrew and I also dont remember how I installed the other perl in /usr/local/bin/perl :-) – deekee Jan 21 '22 at 21:09
  • @deekee Ok.. well we can try work a little bit more with that `perl` and see what happens then.. Can you try again from the folder where you downloaded GD 2.73, and run the following commands `perl Makefile.PL`, then `make` and then `make test` and please upload the complete output of those commads to e.g. `pastebin.com`. That will help us understand better what is the issue. – Håkon Hægland Jan 21 '22 at 21:14
  • @håkon-hægland, unfortunately I could not paste everything as the size is limited to 512kb, see the first part here https://pastebin.com/H9bWwyS0 – deekee Jan 21 '22 at 21:52
  • @deekee Ok, from the log output you linked I only see warnings no errors so far, though there seems like you have multiple installations of `libgd` on your machine that could confuse the installation process. Could you also show the last part of the output ? And also the output from `make test` – Håkon Hægland Jan 21 '22 at 21:56
  • Here is the last part https://pastebin.com/FU5CnqFg – deekee Jan 21 '22 at 21:59
  • @deekee Yes I see a failed test (output you show for `make test`) for `t/GD.t` this has been reported [here](https://rt.cpan.org/Public/Bug/Display.html?id=139399) and is due to a recent change in `libgd`. I can reproduce this error on my machine and will try to submit a patch for that later.. – Håkon Hægland Jan 21 '22 at 22:04
  • @deekee In the meantime, since the failed test only applies to the image formats `.gd` and `.gd2`, you could try to install the module despite the failed test and see what happens. Maybe it will work. So try run `make install`, and then check if it works by running `circos -modules` – Håkon Hægland Jan 21 '22 at 22:11
  • You're my hero :-) I tried to make install, but I get dyld[3534]: missing symbol called zsh: abort circos -modules, see my answer below – deekee Jan 21 '22 at 22:16
  • Hmm.. there might also be other issues.. I wonder if `circos` uses the same perl that you installed `GD` with. Just to make sure, what is the output of `which circos` ? I want to know the installation path so we can check the shebang line in `circos` command – Håkon Hægland Jan 21 '22 at 22:19
  • @deekee Can you also try to load `GD` manually by running `perl -MGD -E'say $GD::VERSION'`. Does it produce the same error ? – Håkon Hægland Jan 21 '22 at 22:24
  • @deekee I tried to download `circos` from http://circos.ca/software/download/ and it seems to work fine here. Here is a log of my installation steps: https://pastebin.com/zXPaULVc – Håkon Hægland Jan 21 '22 at 22:48
  • 1
    @håkon-hægland, many thanks for your help, the problem is finally solved, I just had to change the following line in circos to point to the correct perl version: #!/bin/bash PERL5LIB="/usr/local/bin/perl" exec "/usr/local/Cellar/circos/0.69-9/libexec/bin/circos" "$@" # PERL5LIB="/usr/local/Cellar/circos/0.69-9/libexec/lib/perl5" exec "/usr/local/Cellar/circos/0.69-9/libexec/bin/circos" "$@" – deekee Jan 22 '22 at 10:41
  • @deekee Great that you solved the issue! I have added a patch for the failed test, see https://github.com/lstein/Perl-GD/pull/40 – Håkon Hægland Jan 22 '22 at 20:41

1 Answers1

1

The problem could be finally solved with the help of @håkon-hægland

I just needed to point to the correct perl version in the following file:

/usr/local/Cellar/circos/0.69-9/bin/circos

Changed the following line to:

#!/bin/bash

# PERL5LIB="/usr/local/Cellar/circos/0.69-9/libexec/lib/perl5" exec "/usr/local/Cellar/circos/0.69-9/libexec/bin/circos" "$@"

PERL5LIB="/usr/local/bin/perl" exec "/usr/local/Cellar/circos/0.69-9/libexec/bin/circos" "$@"

Many thanks again to @håkon-hægland and have a nice weekend :-)

deekee
  • 41
  • 7