Summary: | dev-scheme/guile makes debugging information from dev-libs/boehm-gc available to programs written in scheme and hence fails to compile when they aren't available | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Dirk Tilger <dirk> |
Component: | Current packages | Assignee: | Scheme Project <scheme> |
Status: | UNCONFIRMED --- | ||
Severity: | normal | CC: | parona |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | Patch against dev-scheme/guile ebuild to force-enable the "debug" USE flag in boehm-gc |
Shouldn't debugging be enabled by default in boehm-gc? You would have to explicitly disable it with -Ddisable_gc_debug in cmake. The gentoo ebuild doesn't do this nor does it have a debug use flag to reflect such a choice. If you are using a repository with that adds such a use flag (and decides to disable by default for some reason) and then it should be debug(+) to reflect the fact that if the use flag is missing then its enabled. Also it would be a good idea to include full logs and emerge --info even if you don't think they are required. It just makes it clearer for everyone what is going on. ================================================================= Package Settings ================================================================= dev-libs/boehm-gc-8.2.4::gentoo was built with the following: USE="large threads -cxx -static-libs" ABI_X86="(32) (64) (-x32)" CFLAGS="-O3 -march=znver2 -pipe -flto=auto -fuse-linker-plugin" CXXFLAGS="-O3 -march=znver2 -pipe -flto=auto -fuse-linker-plugin" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live config-protect-if-modified distlocks ebuild-locks fail-clean fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict strict-keepdir unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync warn-on-large-env xattr" LDFLAGS="-Wl,-O1 -Wl,--as-needed -O3 -march=znver2 -pipe -flto=auto -fuse-linker-plugin" $ objdump -T /usr/lib64/libgc.so | grep GC_dump 000000000000ea00 g DF .text 00000000000002a0 Base GC_dump_regions 0000000000017ab0 g DF .text 00000000000001b0 Base GC_dump_finalization 000000000001bac0 g DF .text 000000000000062d Base GC_dump_named 000000000001c0f0 g DF .text 0000000000000077 Base GC_dump (In reply to Alfred Wingate from comment #1) > Shouldn't debugging be enabled by default in boehm-gc? You would have to > explicitly disable it with -Ddisable_gc_debug in cmake. The gentoo ebuild > doesn't do this nor does it have a debug use flag to reflect such a choice. Apologies. So the debug flag must have slipped in when I was analysing BugĀ #790767. > If you are using a repository with that adds such a use flag (and decides to > disable by default for some reason) and then it should be debug(+) to > reflect the fact that if the use flag is missing then its enabled. Fair enough. I'm actually fetching the main Gentoo repository using git merging it with local modifications. I usually submit my bugs whenever I have time so that eventually the state of my local repository becomes in sync with the main Gentoo repository again. If boehm-gc doesn't have a debug flag, please reject this bug please. |
Created attachment 878445 [details, diff] Patch against dev-scheme/guile ebuild to force-enable the "debug" USE flag in boehm-gc dev-scheme/guile makes debugging information from dev-libs/boehm-gc available to programs written in scheme. Debugging information in boehm-gc is only available when the "debug" USE flag is enabled, however. If it isn't, the following error occurs during compilation: libtool: link: x86_64-pc-linux-gnu-gcc -std=gnu11 -Wall -Wmissing-prototypes -Wdeclaration-after-statement -Wpointer-arith -Wswitch-enum -fno-strict-aliasing -fwrapv -fvisibility=hidden -march=haswell -mabm -maes -O2 -pipe -Wl,-O1 -Wl,--as-needed -o .libs/guile guile-guile.o ./.libs/libguile-2.2.so -latomic_ops -lgc -lpthread -ldl -lffi -lunistring -lgmp //usr/lib64/libltdl.so -lcrypt -lm/usr/libexec/gcc/x86_64-pc-linux-gnu/ld: ./.libs/libguile-2.2.so: undefined reference to `GC_dump' collect2: error: ld returned 1 exit status make[3]: *** [Makefile:2564: guile] Error One solution is to force-enable the "debug" USE flag in boehm-gc (see attached patch). A better solution is to #ifdef-wrap the respective parts and simply only make the boehm-gc debugging information available in guile when boehm-gc has been compiled with the debug flag on. However, then this same sort of problem would appear a level higher when scheme applications try to access this type of information because they'd expect it to be available. So the Gentoo fix IMHO is to simply explicitly express in the portage build system what implicitly has already been assumed by the guile build system.