Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 496780 - dev-lisp/ecls-13.5.1 with dev-libs/boehm-gc-7.4.0 - .../work/ecl-13.5.1/src/c/alloc_2.d:1093: undefined reference to `GC_start_call_back'
Summary: dev-lisp/ecls-13.5.1 with dev-libs/boehm-gc-7.4.0 - .../work/ecl-13.5.1/src/c...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Common Lisp Bugs
URL:
Whiteboard:
Keywords:
: 499162 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-01-02 15:35 UTC by Martin von Gagern
Modified: 2014-01-24 20:55 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build log (dev-lisp:ecls-13.5.1:20140102-135527.log,140.83 KB, text/plain)
2014-01-02 15:35 UTC, Martin von Gagern
Details
Fix from ecl upstream (6b754564f1d1a2d320b1fd46f0c0da2e623862c1.patch,2.98 KB, patch)
2014-01-02 16:03 UTC, Martin von Gagern
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin von Gagern 2014-01-02 15:35:50 UTC
Created attachment 366780 [details]
build log

# ldd -r /usr/lib64/libecl.so > /dev/null
undefined symbol: GC_start_call_back    (/usr/lib64/libecl.so)
undefined symbol: GC_print_stats        (/usr/lib64/libecl.so)

It seems the set of symbols exporte by libgc.so got reduced. The trigger for this appears to be the following commit, which adds -fvisibility=hidden to CFLAGS: https://github.com/ivmai/bdwgc/commit/d6f15183b4064af11ce78cbf8a55edb04ad4a672

Remerging fails:
libeclmin.a(alloc_2.o): In function `init_alloc':
/var/tmp/portage/dev-lisp/ecls-13.5.1/work/ecl-13.5.1/src/c/alloc_2.d:1093: undefined reference to `GC_start_call_back'
libeclmin.a(alloc_2.o): In function `si_gc_stats':
/var/tmp/portage/dev-lisp/ecls-13.5.1/work/ecl-13.5.1/src/c/alloc_2.d:1216: undefined reference to `GC_print_stats'
/var/tmp/portage/dev-lisp/ecls-13.5.1/work/ecl-13.5.1/src/c/alloc_2.d:1239: undefined reference to `GC_print_stats'
/var/tmp/portage/dev-lisp/ecls-13.5.1/work/ecl-13.5.1/src/c/alloc_2.d:1232: undefined reference to `GC_print_stats'
collect2: error: ld returned 1 exit status
Makefile:79: recipe for target 'ecl_min' failed

https://github.com/ivmai/bdwgc/commit/86a4ee915f3dcd4241882e4ff9b8564b56714451 looks like we should rather use a setter function to set GC_start_call_back.

GC_print_stats is controlled by an environment variable, and I see no setter function for that. So I can think of several solutions:

1. Add a setter function to boehm-gc sources
2. Mark the symbol as exported in boehm-gc source code
3. Drop the --disable-static configure option in the boehm-gc ebuild
4. Modify boehm-gc configure script to omit that compiler flag in all cases
5. Declare the external symbol weak in ecls to avoid linker errors
6. Find some other way to not rely on that symbol in ecls

Option 3 provides a workaround for now: USE=static-libs emerge -1 boehm-gc
Comment 1 Martin von Gagern 2014-01-02 16:03:48 UTC
Created attachment 366784 [details, diff]
Fix from ecl upstream

Upstream has already committed a fix for these issues:
http://sourceforge.net/p/ecls/ecl/ci/6b754564f1d1a2d320b1fd46f0c0da2e623862c1/
It applies cleanly to ecl 13.5.1. I suggest including this in a revbumped ebuild. Since the setter function used to distinguish the cases has been around quite some time, it should produce a package even if ecls is built against an older boehm-gc and boehm-gc is updated afterwards.
Comment 2 Andrey Grozin gentoo-dev 2014-01-11 14:04:30 UTC
*ecls-13.5.1-r1 (11 Jan 2014)

  11 Jan 2014; Andrey Grozin <grozin@gentoo.org> +ecls-13.5.1-r1.ebuild,
  +files/13.5.1-gc74.patch:
  Upstream fix for building with boehm-gc-7.4, bug #496780
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2014-01-24 20:55:13 UTC
*** Bug 499162 has been marked as a duplicate of this bug. ***