zsh: segmentation fault circos

371 views
Skip to first unread message

Dirk Krienbühl

unread,
Jan 12, 2022, 3:07:47 PM1/12/22
to Circos

Hello,

I've just installed Circos using the following command:

brew install brewsci/bio/circos

During installation no errors have occurred, but nevertheless I get an error when trying to run circos.

zsh: segmentation fault  circos

I also tried to test the installation using brew test circos, I’ve listed the response at the end.

Running:

- macOS Monterey Version 12.0.1

- Homebrew 3.3.10

- perl v5.30.3

- circos v0.69-9

 Many thanks in advance for any hint and helping me tracing down the problem.

Regards,

Dirk

 

 

########### ERROR ############

brew test circos

 

Fetching gem metadata from https://rubygems.org/.........

Using concurrent-ruby 1.1.9

Using minitest 5.15.0

Using zeitwerk 2.5.3

Using public_suffix 4.0.6

Using ast 2.4.2

Using bindata 2.4.10

Using msgpack 1.4.2

Using bundler 1.17.3

Using byebug 11.1.3

Using connection_pool 2.2.5

Using did_you_mean 1.6.1

Using diff-lcs 1.5.0

Using docile 1.4.0

Using unf_ext 0.0.8

Using regexp_parser 2.2.0

Using hana 1.3.7

Using hpricot 0.8.6

Using uri_template 0.7.0

Using mime-types-data 3.2022.0105

Using racc 1.6.0

Using net-http-digest_auth 1.4.1

Using rubyntlm 0.6.3

Using webrobots 0.1.2

Using mustache 1.1.1

Using parallel 1.21.0

Using plist 3.6.0

Using rack 2.2.3

Using mini_portile2 2.7.1

Using rdiscount 2.2.0.2

Using rexml 3.2.5

Using rspec-support 3.10.3

Using ruby-progressbar 1.11.0

Using unicode-display_width 2.1.0

Using ruby-macho 2.5.1

Using simplecov-html 0.12.3

Using simplecov_json_formatter 0.1.3

Using sorbet-runtime-stub 0.2.0

Using warning 1.2.1

Using i18n 1.8.11

Using tzinfo 2.0.4

Using addressable 2.8.0

Using webrick 1.7.0

Using unf 0.1.4

Fetching rainbow 3.1.1

Fetching bootsnap 1.9.4

Using ecma-re-validator 0.3.0

Using elftools 1.1.3

Using net-http-persistent 4.0.1

Using parser 3.1.0.0

Using mime-types 3.4.1

Using activesupport 6.1.4.4

Using nokogiri 1.13.0 (x86_64-darwin)

Using parallel_tests 3.7.3

Using ronn 0.7.3

Using rspec-core 3.10.1

Using rspec-expectations 3.10.1

Using rspec-mocks 3.10.2

Using simplecov 0.21.2

Using domain_name 0.5.20190701

Using json_schemer 0.2.18

Using http-cookie 1.0.4

Using patchelf 1.3.0

Using rspec 3.10.0

Using rspec-github 2.3.1

Using rspec-its 1.3.0

Using rspec-retry 0.6.2

Using rspec_junit_formatter 0.5.1

Using rubocop-ast 1.15.1

Using simplecov-cobertura 2.1.0

Using mechanize 2.8.3

Using rspec-wait 0.0.9

Installing rainbow 3.1.1

Installing bootsnap 1.9.4 with native extensions

Using rubocop 1.24.1

Using rubocop-performance 1.13.1

Using rubocop-rspec 2.7.0

Using rubocop-sorbet 0.6.5

Using rubocop-rails 2.13.1

Bundle complete! 34 Gemfile dependencies, 76 gems now installed.

Bundled gems are installed into `../Homebrew/Library/Homebrew/vendor/bundle`

Removing bootsnap (1.9.3)

Removing rainbow (3.0.0)

==> Testing brewsci/bio/circos

==> /usr/local/Cellar/circos/0.69-9/bin/circos -conf /usr/local/Cellar/circos/0.69-9/libexec/example/etc/circos.conf -debug_group summary,timer

Last 15 lines from /Users/dirk/Library/Logs/Homebrew/circos/test.01.circos:

2022-01-12 15:10:03 +0100

 

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

-conf

/usr/local/Cellar/circos/0.69-9/libexec/example/etc/circos.conf

-debug_group

summary,timer

 

Error: brewsci/bio/circos: failed

An exception occurred within a child process:

  BuildError: Failed executing: /usr/local/Cellar/circos/0.69-9/bin/circos -conf /usr/local/Cellar/circos/0.69-9/libexec/example/etc/circos.conf -debug_group summary,timer

/usr/local/Homebrew/Library/Homebrew/formula.rb:2308:in `block in system'

/usr/local/Homebrew/Library/Homebrew/formula.rb:2244:in `open'

/usr/local/Homebrew/Library/Homebrew/formula.rb:2244:in `system'

/usr/local/Homebrew/Library/Taps/brewsci/homebrew-bio/Formula/circos.rb:39:in `block in <class:Circos>'

/usr/local/Homebrew/Library/Homebrew/formula.rb:2108:in `block (3 levels) in run_test'

/usr/local/Homebrew/Library/Homebrew/utils.rb:588:in `with_env'

/usr/local/Homebrew/Library/Homebrew/formula.rb:2107:in `block (2 levels) in run_test'

/usr/local/Homebrew/Library/Homebrew/formula.rb:948:in `with_logging'

/usr/local/Homebrew/Library/Homebrew/formula.rb:2106:in `block in run_test'

/usr/local/Homebrew/Library/Homebrew/mktemp.rb:63:in `block in run'

/usr/local/Homebrew/Library/Homebrew/mktemp.rb:63:in `chdir'

/usr/local/Homebrew/Library/Homebrew/mktemp.rb:63:in `run'

/usr/local/Homebrew/Library/Homebrew/formula.rb:2359:in `mktemp'

/usr/local/Homebrew/Library/Homebrew/formula.rb:2100:in `run_test'

/usr/local/Homebrew/Library/Homebrew/test.rb:43:in `block in <main>'

/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/timeout.rb:93:in `block in timeout'

/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/timeout.rb:33:in `block in catch'

/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/timeout.rb:33:in `catch'

/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/timeout.rb:33:in `catch'

/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/timeout.rb:108:in `timeout'

/usr/local/Homebrew/Library/Homebrew/test.rb:48:in `<main>'

Martin Krzywinski

unread,
Jan 12, 2022, 6:57:05 PM1/12/22
to circos-data-...@googlegroups.com
Ugh, segmentation faults in Perl are hard to track down. To be honest, I've seen so few that I don't know how to debug them.

Does it fault when you run the script without asking it to generate an image? For example, 

circos -h

will dump a help page and exit. If this seg faults, then there's probably something wrong with one of the 3rd party modules. I'm going to assume that the Perl interpreter is intact and not at issue here.

m

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 view this discussion on the web visit https://groups.google.com/d/msgid/circos-data-visualization/432b96f5-27c9-4c82-b369-6385ea1ff115n%40googlegroups.com.

Dirk Krienbühl

unread,
Jan 12, 2022, 7:34:24 PM1/12/22
to Circos
It even fails with a segmentation fault if I just run circos -debug!

Martin Krzywinski

unread,
Jan 12, 2022, 7:57:32 PM1/12/22
to circos-data-...@googlegroups.com
If you run 

circos -debug

it's actually going to load a default config file. Well, it may do that depending on how you've installed it. 

Let's see whether one of the modules is the culprit.

Run this script (calling whatever your Perl interpreter is on the first line) and see if it seg faults.

---
#!/usr/bin/env perl

use strict;
use warnings;
use Carp;
use Clone;
use Config::General;
use Cwd;
use Data::Dumper;
use Digest::MD5;
use File::Basename;
use File::Spec::Functions;
use File::Temp;
use FindBin;
use Font::TTF::Font;
use GD;
use GD::Polyline;
use Getopt::Long;
use IO::File;
use List::MoreUtils;
use List::Util;
use Math::Bezier;
use Math::BigFloat;
use Math::Round;
use Math::VecStat;
use Memoize;
use POSIX;
use Params::Validate;
use Pod::Usage;
use Readonly;
use Regexp::Common;
use SVG;
use Set::IntSpan;
use Statistics::Basic;
use Storable;
use Sys::Hostname;
use Text::Balanced;
use Text::Format;
use Time::HiRes;
---



Martin Krzywinski
science + art


Dirk Krienbühl

unread,
Jan 14, 2022, 4:53:27 AM1/14/22
to Circos

Unfortunately the command env perl returns nothing, but env alone gives me the following:

TERM_PROGRAM=Apple_Terminal

SHELL=/bin/zsh

TERM=xterm-256color

TMPDIR=/var/folders/5n/kh2gl3tj7h7bn8dhrq72ksj00000gn/T/

TERM_PROGRAM_VERSION=443

TERM_SESSION_ID=6D9F1C5E-C61B-4498-BD4D-40BF052157A9

USER=dirk

SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.3GzfnyBDOY/Listeners

PATH=/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/3.8/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Apple/usr/bin:/Applications/Wireshark.app/Contents/MacOS

LaunchInstanceID=32D76BBF-E715-4767-95FE-3BAFC9D74325

__CFBundleIdentifier=com.apple.Terminal

PWD=/usr/bin

XPC_FLAGS=0x0

XPC_SERVICE_NAME=0

SHLVL=1

HOME=/Users/dirk

LOGNAME=dirk

DISPLAY=/private/tmp/com.apple.launchd.39MWzsw8B9/org.macosforge.xquartz:0

SECURITYSESSIONID=19183

OLDPWD=/Users/dirk/Desktop/2020_PYTHON/lnd

LANGUAGE=en_US.UTF-8

LC_ALL=en_US.UTF-8

LANG=en_US.UTF-8

LC_CTYPE=UTF-8

Martin Krzywinski

unread,
Jan 14, 2022, 7:48:48 AM1/14/22
to circos-data-...@googlegroups.com
You need to run that file as an executable script.

/usr/bin/env perl

will run the perl interpreter.

I think on Macs this is where 'env' is, check with

which env

Martin Krzywinski
science + art


Dirk Krienbühl

unread,
Jan 14, 2022, 12:46:25 PM1/14/22
to Circos
Just made my first perl script :-) and "Hello World!" prints fine but if I add "/usr/bin/env perl" I get the following error:

Can't locate object method "env" via package "perl" (perhaps you forgot to load "perl"?) at myfirstperlscript.pl line 3.

Contents of script:
#!/usr/bin/perl
print "Hello World!\n";
env perl

:-) Dirk


Martin Krzywinski

unread,
Jan 19, 2022, 3:07:30 AM1/19/22
to circos-data-...@googlegroups.com
Sorry, I wasn't very clear.

You want the following (the env call is useful in the #! line when you don't know where the executable is and you're asking the system to look it up in your PATH).

---
#!/usr/bin/perl

Dirk Krienbühl

unread,
Jan 19, 2022, 12:33:52 PM1/19/22
to Circos
I think that to have messed up everything, as I get another error message by now :-(

What would be the best approach you think, reinstall everything?

Please find below the new error message I get when testing the brew install:

dirk@dirks-macbook-air ~ % brew test circos                            

==> Testing brewsci/bio/circos
==> /usr/local/Cellar/circos/0.69-9/bin/circos -conf /usr/local/Cellar/circos/0.69-9/libexec/example/etc/circos.conf -debug_group summary,timer
Last 15 lines from /Users/dirk/Library/Logs/Homebrew/circos/test.01.circos:
2022-01-19 18:29:26 +0100


/usr/local/Cellar/circos/0.69-9/bin/circos
-conf
/usr/local/Cellar/circos/0.69-9/libexec/example/etc/circos.conf
-debug_group
summary,timer

dyld[1676]: missing symbol called

Error: brewsci/bio/circos: failed
An exception occurred within a child process:
  BuildError: Failed executing: /usr/local/Cellar/circos/0.69-9/bin/circos -conf /usr/local/Cellar/circos/0.69-9/libexec/example/etc/circos.conf -debug_group summary,timer
/usr/local/Homebrew/Library/Homebrew/formula.rb:2309:in `block in system'
/usr/local/Homebrew/Library/Homebrew/formula.rb:2245:in `open'
/usr/local/Homebrew/Library/Homebrew/formula.rb:2245:in `system'

/usr/local/Homebrew/Library/Taps/brewsci/homebrew-bio/Formula/circos.rb:39:in `block in <class:Circos>'
/usr/local/Homebrew/Library/Homebrew/formula.rb:2109:in `block (3 levels) in run_test'
/usr/local/Homebrew/Library/Homebrew/utils.rb:588:in `with_env'
/usr/local/Homebrew/Library/Homebrew/formula.rb:2108:in `block (2 levels) in run_test'
/usr/local/Homebrew/Library/Homebrew/formula.rb:948:in `with_logging'
/usr/local/Homebrew/Library/Homebrew/formula.rb:2107:in `block in run_test'

/usr/local/Homebrew/Library/Homebrew/mktemp.rb:63:in `block in run'
/usr/local/Homebrew/Library/Homebrew/mktemp.rb:63:in `chdir'
/usr/local/Homebrew/Library/Homebrew/mktemp.rb:63:in `run'
/usr/local/Homebrew/Library/Homebrew/formula.rb:2360:in `mktemp'
/usr/local/Homebrew/Library/Homebrew/formula.rb:2101:in `run_test'

/usr/local/Homebrew/Library/Homebrew/test.rb:43:in `block in <main>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/timeout.rb:93:in `block in timeout'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/timeout.rb:33:in `block in catch'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/timeout.rb:33:in `catch'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/timeout.rb:33:in `catch'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/timeout.rb:108:in `timeout'
/usr/local/Homebrew/Library/Homebrew/test.rb:48:in `<main>'

Dirk Krienbühl

unread,
Jan 20, 2022, 2:37:34 AM1/20/22
to Circos
If I uninstall GD using brew with the following command, 

"brew uninstall --ignore-dependencies GD"

circos -modules reports:

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

But as soon I install GD again using brew I get the same error

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

So, it seems I've definitely a problem with GD

Martin Krzywinski

unread,
Jan 20, 2022, 3:50:48 PM1/20/22
to circos-data-...@googlegroups.com
Oof, GD is such a pain.

Do you have the option to install an older version?

m

Martin Krzywinski
science + art


Dirk Krienbühl

unread,
Jan 21, 2022, 4:03:46 AM1/21/22
to Circos
Unfortunately the is no way of installing earlier versions of GD anymore when using brew :-(

Martin Krzywinski

unread,
Jan 21, 2022, 5:03:23 PM1/21/22
to circos-data-...@googlegroups.com
Unfortunately, I don't use brew, so I can't be of help here.

It's not clear whether GD doesn't work because brew messed up its install, or some of the dependencies are broken, or what. But if it's a brew+GD issue, then others presumably have similar issues -- worth a Google.

You can try to install GD directly, which you can download from


and jump to older versions.

m

Martin Krzywinski
science + art


Message has been deleted
Message has been deleted

Dirk Krienbühl

unread,
Jan 22, 2022, 5:51:50 AM1/22/22
to Circos

The problem could be finally solve 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 :-)

Alexandra Grote

unread,
Feb 4, 2022, 1:43:56 PM2/4/22
to Circos
Hi,

I'm having the same problem it appears you were having with getting GD installed. I'm afraid I don't understand your solution though... which line of /usr/local/Cellar/circos/0.69-9/bin/circos are you changing? And how did that fix the fact the GD is missing from the modules?

And apologies in advance, I'm not very good at this stuff! 

Sincerely,

Alex

Dirk Krienbühl

unread,
Feb 4, 2022, 7:17:13 PM2/4/22
to Circos
It's the file which is run when executing circos, in my case it's located in the folder /usr/local/Cellar/circos/0.69-9/bin, it depends on how you installed circos, I used brew on my mac and just changed where perl is located.

#!/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" "$@"
Reply all
Reply to author
Forward
0 new messages