Closed mharradon closed 1 year ago
I confirmed the segfault reproduces in the local docker build for graphviz-feedstock. I believe I fixed the issue by building statically here: #120 . I'm not sure if this is a good solution.
I suggest that #120 is closed in favor of #123 unless there are other issues with those flags.
Any update on this? Would it be possible to accept #123? If gvpack is tested it segfaults in the current recipe build on Linux. The simple compiler flag changes used in the Anaconda build (#123) fix it.
Hello @mharradon, thank you for reporting this issue and providing a potential workaround.
I spent some time digging to find out why this is happening. The actual problem lies with the conda-forge build of ligbts
. It should be having libm.so
as a dependency, but currently it isn't:
$ ldd /path/to/env/lib/libgts-0.7.so.5
linux-vdso.so.1 (0x00007ff9e6fac000)
libglib-2.0.so.0 => /path/to/env/lib/./libglib-2.0.so.0 (0x00007ff9e6dfb000)
libc.so.6 => /lib64/libc.so.6 (0x00007ff9e6bf2000)
libiconv.so.2 => /path/to/env/lib/././libiconv.so.2 (0x00007ff9e6b09000)
librt.so.1 => /lib64/librt.so.1 (0x00007ff9e6b04000)
libpcre2-8.so.0 => /path/to/env/lib/././libpcre2-8.so.0 (0x00007ff9e6a64000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007ff9e6a5f000)
/lib64/ld-linux-x86-64.so.2 (0x00007ff9e6fae000)
$ nm /path/to/env/lib/libgts-0.7.so.5 | grep sincos
U sincos
To confirm my hunch, I forcefully added a dependency and the issue went away:
$ patchelf --add-needed /lib64/libm.so.6 /path/to/env/ib/libgts-0.7.so.5
Adding LDFLAGS=-L$PREFIX/lib
during graphviz's seems to fix this issue because it ends up removing: --Wl,--as-needed
from $LDFLAGS
. This comes from the default flags set by the compiler activation package. This removal changes the ordering of dependencies, thereby hiding the actual issue.
I've reported this issue at https://github.com/conda-forge/gts-feedstock/issues/5 and also provided a patch to fix their build. Once a new build is installed, the issue with gvpack
will resolve automatically.
Thank you!
The new build of gts
is out. And it resolves the issue:
(/root/dev) root@1fd19801e0b7:~# conda list gts
# packages in environment at /root/dev:
#
# Name Version Build Channel
gts 0.7.6 h64030ff_2 conda-forge
(/root/dev) root@1fd19801e0b7:~# objdump -p ./dev/lib/libgts.so | grep NEEDED
NEEDED libglib-2.0.so.0
NEEDED libc.so.6
(/root/dev) root@1fd19801e0b7:~# gvpack --help
gvpack: Relink `/root/dev/bin/../lib/graphviz/../libgts-0.7.so.5' with `/lib/x86_64-linux-gnu/libm.so.6' for IFUNC symbol `cos'
Segmentation fault
(/root/dev) root@1fd19801e0b7:~# conda update gts -c conda-forge
Collecting package metadata (current_repodata.json): done
Solving environment: done
## Package Plan ##
environment location: /root/dev
added / updated specs:
- gts
The following packages will be UPDATED:
gts 0.7.6-h64030ff_2 --> 0.7.6-h977cf35_4
Proceed ([y]/n)?
Downloading and Extracting Packages
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
(/root/dev) root@1fd19801e0b7:~# objdump -p ./dev/lib/libgts.so | grep NEEDED
NEEDED libglib-2.0.so.0
NEEDED libm.so.6
NEEDED libc.so.6
(/root/dev) root@1fd19801e0b7:~# gvpack --help
gvpack: option -- unrecognized
Usage: gvpack [-gnuv?] [-m<margin>] {-array[_rc][n]] [-o<outf>] <files>
-n - use node granularity
-g - use graph granularity
-array* - pack as array of graphs
-G<n>=<v> - attach name/value attribute to output graph
-m<n> - set margin to <n> points
-s<gname> - use <gname> for name of root graph
-o<outfile> - write output to <outfile>
-u - no packing; just combine graphs
-v - verbose
-? - print usage
If no files are specified, stdin is used
Solution to issue cannot be found in the documentation.
Issue
Hello,
I'm currently seeing a segfault when running
gvpack
inside an Ubuntu 18.04.6 docker container:I see the same result in a much larger environment with a newer conda version as well.
Thanks in advance! Apologies if I'm sharing this in the wrong place.
Installed packages
Environment info