Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 608190 - =dev-scheme/guile-2.0.13-r1 fails to build with CFLAGS="-O1 -ggdb3": libguile/bitvectors.x:2:0: error: conflicting types for 'scm_i_array_mem'
Summary: =dev-scheme/guile-2.0.13-r1 fails to build with CFLAGS="-O1 -ggdb3": libguile...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Scheme Project
URL: http://debbugs.gnu.org/cgi/bugreport....
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-04 10:05 UTC by Sergei Trofimovich (RETIRED)
Modified: 2017-04-22 14:41 UTC (History)
0 users

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


Attachments
build.log.gz (build.log.gz,116.81 KB, application/gzip)
2017-02-04 10:10 UTC, Sergei Trofimovich (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sergei Trofimovich (RETIRED) gentoo-dev 2017-02-04 10:05:14 UTC
CFLAGS=-ggdb2 is fine
CFLAGS=-ggdb3 fails

Tried both on gcc-5.4.0 and 6.3.0.

My guess is -ggdb3 injects something into preprocessor
output that makes guile-snarf shell script incorrectly
strip source when it generates .x files.
Comment 1 Sergei Trofimovich (RETIRED) gentoo-dev 2017-02-04 10:10:29 UTC
Created attachment 462418 [details]
build.log.gz
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2017-02-04 10:39:56 UTC
$ x86_64-pc-linux-gnu-gcc -E alist.c -DHAVE_CONFIG_H -DBUILDING_LIBGUILE=1 -I.. -I.. -I../lib -I../lib -I/usr/lib64/libffi-3.2.1/include -I/dev/shm/portage/dev-scheme/guile-2.0.13-r1/work/guile-2.0.13 -O1 -ggdb3 > alist.ggdb3

$ x86_64-pc-linux-gnu-gcc -E alist.c -DHAVE_CONFIG_H -DBUILDING_LIBGUILE=1 -I.. -I.. -I../lib -I../lib -I/usr/lib64/libffi-3.2.1/include -I/dev/shm/portage/dev-scheme/guile-2.0.13-r1/work/guile-2.0.13 -O1 -ggdb2 > alist.ggdb2

$ diff -U1 alist.ggdb2 alist.ggdb3

That shows a lot of #defines left (i guess for debugging purposes):

--- alist.ggdb2 2017-02-04 10:16:59.302577748 +0000
+++ alist.ggdb3 2017-02-04 10:16:54.598566885 +0000
@@ -3,4 +3,267 @@
 # 1 "<built-in>"
+#define __STDC__ 1
+#define __STDC_VERSION__ 201112L
+#define __STDC_UTF_16__ 1
+#define __STDC_UTF_32__ 1
+#define __STDC_HOSTED__ 1
...

As a result post -snarf files change output by containing type declarations:

$ ../libguile/guile-snarf -o alist.x.ggdb3 alist.c -DHAVE_CONFIG_H -DBUILDING_LIBGUILE=1 -I.. -I.. -I../lib -I../lib -I/usr/lib64/libffi-3.2.1/include -I/dev/shm/portage/dev-scheme/guile-2.0.13-r1/work/guile-2.0.13  -O1 -ggdb3

$ ../libguile/guile-snarf -o alist.x.ggdb2 alist.c -DHAVE_CONFIG_H -DBUILDING_LIBGUILE=1 -I.. -I.. -I../lib -I../lib -I/usr/lib64/libffi-3.2.1/include -I/dev/shm/portage/dev-scheme/guile-2.0.13-r1/work/guile-2.0.13  -O1 -ggdb2

--- alist.x.ggdb2<----->2017-02-04 10:37:13.286006316 +0000
+++ alist.x.ggdb3<----->2017-02-04 10:36:58.929014223 +0000
@@ -1,3 +1,3 @@
-/* cpp arguments: alist.c -DHAVE_CONFIG_H -DBUILDING_LIBGUILE=1 -I.. -I.. -I../lib -I../lib -I/usr/lib64/libffi-3.2.1/include -I/dev/shm/portage/dev-scheme/guile-2.0.13-r1/
-scm_acons__name = scm_string_to_symbol (scm_acons__name_string);
+/* cpp arguments: alist.c -DHAVE_CONFIG_H -DBUILDING_LIBGUILE=1 -I.. -I.. -I../lib -I../lib -I/usr/lib64/libffi-3.2.1/include -I/dev/shm/portage/dev-scheme/guile-2.0.13-r1/
+enum scm_t_foreign_type   {
 scm_acons__raw_objtable[2] = scm_acons__subr_foreign; scm_acons__raw_objtable[3] = scm_acons__name; (((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(volatile SCM *)0=((sc
Comment 3 Sergei Trofimovich (RETIRED) gentoo-dev 2017-02-04 10:44:12 UTC
One of workarounds would be to downgrade debugging level:

diff --git a/dev-scheme/guile/guile-2.0.13-r1.ebuild b/dev-scheme/guile/guile-2.0.13-r1.ebuild
index ab7f9c651b..7c70ffa47e 100644
--- a/dev-scheme/guile/guile-2.0.13-r1.ebuild
+++ b/dev-scheme/guile/guile-2.0.13-r1.ebuild
@@ -44,2 +44,5 @@ src_configure() {

+       # see bug #608190
+       replace-flags -ggdb3 -ggdb2
+
        econf \
Comment 5 Amy Liffey gentoo-dev 2017-02-19 21:42:40 UTC
It is not resolved you changed only:

diff --git a/dev-scheme/guile/guile-2.0.14.ebuild b/dev-scheme/guile/guile-2.0.14.ebuild
index ab7f9c6..87f2621 100644
--- a/dev-scheme/guile/guile-2.0.14.ebuild
+++ b/dev-scheme/guile/guile-2.0.14.ebuild
@@ -42,6 +42,9 @@ src_configure() {
 	# see bug #178499
 	filter-flags -ftree-vectorize
 
+	# see bug #608190
+	replace-flags -ggdb[3-9] -ggdb2
+
 	econf \
 		--disable-error-on-warning \
 		--disable-rpath \
Comment 6 Sergei Trofimovich (RETIRED) gentoo-dev 2017-02-19 22:19:34 UTC
Reverted as: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c67a520c832e9021889d428669e4002df03e702d

The plan is to get upstream fix first.
Comment 7 Sergei Trofimovich (RETIRED) gentoo-dev 2017-02-19 23:04:04 UTC
Filed http://debbugs.gnu.org/cgi/bugreport.cgi?bug=25803 upstream.
Comment 8 Sergei Trofimovich (RETIRED) gentoo-dev 2017-04-19 21:14:31 UTC
Upstream applied patch as: http://git.savannah.gnu.org/cgit/guile.git/commit/?id=f775ab3654357fcaad294b95efb0b1c16de1eda8
Comment 9 Amy Liffey gentoo-dev 2017-04-22 14:41:27 UTC
commit 76de3d3b5ee141070edc5af750d6cd9f7281aec6
Author: Amy Liffey <amynka@gentoo.org>
Date:   Sat Apr 22 16:36:14 2017 +0200

    dev-scheme/guile: add upstream patch bug #608190


Good job!

Thanks