Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 678026

Summary: sys-apps/groff-1.22.4 - In file included from ./src/include/driver.h:27, from src/devices/grodvi/dvi.cpp:20: ./lib/math.h:2877:1: error: ‘int signbit(float)’ conflicts with a previous declaration
Product: Gentoo Linux Reporter: Sven Müller <musv>
Component: Current packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: normal CC: alexey.ugnichev, arm, kinbot, nemunaire, sam
Priority: Normal    
Version: unspecified   
Hardware: ARM   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 704420    
Attachments: build.log
emerge --info
emerge --info
sys-apps/groff-1.22.4 build.log
sys-apps/groff-1.22.4 with no-fast-math build.log

Description Sven Müller 2019-02-14 19:09:36 UTC
Created attachment 565408 [details]
build.log

The package builds fine on x86_64. The error only occurs on my ARM NAS.

In file included from ./src/include/driver.h:27,
                 from src/devices/grodvi/dvi.cpp:20:
./lib/math.h:2877:1: error: ‘int signbit(float)’ conflicts with a previous declaration
 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit)


groff-1.22.3 builds fine. Hence, I don't think, the error relates on any updated dependencies.
Comment 1 Sven Müller 2019-02-14 19:10:17 UTC
Created attachment 565410 [details]
emerge --info
Comment 2 Sven Müller 2019-02-14 19:12:17 UTC
Btw. I need groff on my NAS only as a dependency for mandb. Therefore only the needed requirements for that package are installed.
Comment 3 Sebastian Krupa 2020-05-01 20:51:28 UTC
I can confirm that on A20 (armv7 or cortex-a7)
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-05-25 14:09:30 UTC
(In reply to Sebastian Krupa from comment #3)
> I can confirm that on A20 (armv7 or cortex-a7)

I wonder if trying the patch here would help: https://lists.gnu.org/archive/html/bug-gnulib/2019-08/msg00078.html

Could you let us know if it helps?
Comment 5 Julien 2020-06-09 17:03:46 UTC
Same bug on amd64, gcc 9.3.0

Workaround with using -std=c++98.

echo "CXXFLAGS="${CXXFLAGS} --std=c++98" > /etc/portage/env/std-cxx98.conf
echo "sys-apps/groff std-cxx98.conf" >> /etc/portage/package.env
Comment 6 Ray 2020-06-14 19:45:11 UTC
-fno-fast-math works for me
Comment 7 tonemgub 2020-10-15 14:18:17 UTC
This bug also occurs in crossdev armv6j. -fno-fast-math did not work for me, but -std=c++98 did.
Comment 8 Philipp Psurek 2020-12-22 17:01:08 UTC
Created attachment 679230 [details]
emerge --info
Comment 9 Philipp Psurek 2020-12-22 17:01:50 UTC
Created attachment 679233 [details]
sys-apps/groff-1.22.4 build.log
Comment 10 Philipp Psurek 2020-12-22 17:02:27 UTC
Created attachment 679236 [details]
sys-apps/groff-1.22.4 with no-fast-math build.log
Comment 11 Philipp Psurek 2020-12-22 17:09:25 UTC
I confirm that emerging the package with fast math does not work on armv7l processor (rev 4 (v7l), Allwinner sun7i A20)

-fno-fast-math solves the problem, thanks Ray. Is it because I emerged gcc also without -ffast-math? Maybe …

unfortunately I could not verify emerging sys-apps/groff-1.22.3 with fast-math because its out of tree.
Comment 12 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-12-28 01:11:28 UTC
Has anyone actually tried the patch?
Comment 13 thaewrapt 2021-01-20 16:46:03 UTC
Adding '-fsigned-zeros' to CFLAGS/CXXFLAGS fixes it, just a clarification what causes this issue in particular.
Comment 14 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-08-30 02:02:47 UTC
In the musl overlay, we have https://gitweb.gentoo.org/proj/musl.git/tree/sys-apps/groff/files/groff-1.22.4-musl.patch?id=a60cc3b8a9fa05d80aed4fb3aac02dc7679a7a2c, modifying the m4 isn't great for a core package.

Let's feed in the cache variable instead on musl.
Comment 15 Larry the Git Cow gentoo-dev 2021-08-30 02:03:05 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3d9ac4116142cf74cd8a37906d70a778bdd82569

commit 3d9ac4116142cf74cd8a37906d70a778bdd82569
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-08-30 02:01:02 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-08-30 02:01:02 +0000

    sys-apps/groff: fix build failure on musl
    
    Give configure a hint for now until a release of groff
    is made with updated gnulib upstream.
    
    Closes: https://bugs.gentoo.org/678026
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-apps/groff/groff-1.22.4.ebuild | 8 ++++++++
 1 file changed, 8 insertions(+)
Comment 16 Larry the Git Cow gentoo-dev 2021-08-30 02:06:15 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/musl.git/commit/?id=117bc03336b9512438a02e324c34d55dc41d9271

commit 117bc03336b9512438a02e324c34d55dc41d9271
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-08-30 02:05:40 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-08-30 02:05:43 +0000

    sys-apps/groff: treeclean
    
    See: 3d9ac4116142cf74cd8a37906d70a778bdd82569 in ::gentoo.
    Bug: https://bugs.gentoo.org/678026
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-apps/groff/Manifest                            |   1 -
 .../files/groff-1.19.2-man-unicode-dashes.patch    |  24 -----
 sys-apps/groff/files/groff-1.22.4-musl.patch       |  52 ----------
 sys-apps/groff/groff-1.22.4.ebuild                 | 105 ---------------------
 sys-apps/groff/metadata.xml                        |  11 ---
 5 files changed, 193 deletions(-)