Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1402577 - trojita FTBFS on ppc64 and ppc64le
Summary: trojita FTBFS on ppc64 and ppc64le
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: trojita
Version: rawhide
Hardware: ppc64
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Kevin Kofler
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: FE-ExcludeArch-ppc64, F-ExcludeArch-ppc64 1450505
TreeView+ depends on / blocked
 
Reported: 2016-12-07 20:56 UTC by Raphael Groner
Modified: 2020-07-23 02:48 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1402580 (view as bug list)
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1401716 0 unspecified CLOSED trojita: FTBFS in Fedora Rawhide 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1402580 0 unspecified CLOSED trojita FTBFS on aarch64 and armv7hl 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1423680 0 unspecified CLOSED gpick: FTBFS in rawhide 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1450505 0 unspecified POST trojita FTBFS on s390x 2021-02-22 00:41:40 UTC

Internal Links: 1401716 1402580 1423680 1450505

Description Raphael Groner 2016-12-07 20:56:28 UTC
Description of problem:
trojita FTBFS on ppc64 and ppc64le
 
/builddir/build/BUILD/trojita-0.7/src/Imap/Parser/Rfc5322HeaderParser.cpp:2238:3: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]

Version-Release number of selected component (if applicable):
0.7-5

How reproducible:
yes

Steps to Reproduce:
1. koji build --scratch rawhide trojita-0.7-5.srpm
2.
3.

Actual results:
build.log has many times of the above mentioned error message.

Expected results:
builds successfully

Additional info:

Comment 1 Raphael Groner 2016-12-07 20:58:12 UTC
Temporarily solved by adding ExcludeArch.

Comment 2 Dan Horák 2016-12-07 22:21:52 UTC
adding -fsigned-char to CFLAGS should help, proper fix is to change the variable from char to either int or explicit "signed char"

Comment 3 Jan Kundrát 2016-12-08 00:40:38 UTC
Yeah, this is exactly why Trojita ships a pregenerated .cpp file created by a patched [1] Ragel in our git.

Unfortunately, Ragel upstream closed their git tree [2] with a funny explanation. I sent that patch upstream years ago, but I don't remember where exactly that communication went. I recall that they had a new, rewritten version in the making at that time.

[1] http://repo.or.cz/ragel-jkt.git/commitdiff/dc238e78cd3024889b6fb2618fe5bbc20179a132
[2] http://www.colm.net/news/2014/10/24/ragel-now-maintained-by-colm-networks.html

Comment 4 Raphael Groner 2016-12-08 17:56:27 UTC
(In reply to Jan Kundrát from comment #3)
> Yeah, this is exactly why Trojita ships a pregenerated .cpp file created by
> a patched [1] Ragel in our git.

Do you mean bug #1402582?
trojita FTBFS on armv7hl because ragel core dumps

Comment 5 Dan Horák 2017-02-20 13:20:41 UTC
I suggest to use something like

diff --git a/trojita.spec b/trojita.spec
index fdb33d6..6bb1a1f 100644
--- a/trojita.spec
+++ b/trojita.spec
@@ -11,7 +11,7 @@ Release:        0.7.%{gitdate}git%(c=%{commit0}; echo ${c:0:7} )%{?dist}.1
 Source0:        %{srcurl}/archive/%{commit0}.tar.gz#/%{name}-%{commit0}.tar.gz
 %else
 Version:        0.7
-Release:        7%{?dist}
+Release:        8%{?dist}
 Source0:        %{srcurl}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
 %endif
 # manually generated manpage with help2man
@@ -42,9 +42,6 @@ License:        GPLv2+
 Summary:        IMAP e-mail client
 URL:            http://%{name}.flaska.net
 
-# rhbz#1402577 FIXME: src/Imap/Parser/Rfc5322HeaderParser.cpp:2238:3:
-# error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
-ExcludeArch:    ppc64 ppc64le aarch64
 # rhbz#1402582 FIXME: ragel core dumps
 ExcludeArch:    armv7hl
 
@@ -73,8 +70,13 @@ Requires:       qt5-qtsvg
 BuildRequires:  pkgconfig(zlib)
 BuildRequires:  qtkeychain-qt5-devel
 %if 0%{?fedora}
+# rhbz#1402577 FIXME: src/Imap/Parser/Rfc5322HeaderParser.cpp:2238:3:
+# error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
+# use prebuilt file on non-x86
+%ifarch %{ix86} x86_64
 BuildRequires:  ragel
 %endif
+%endif
 
 # (optional) support for GPG and S/MIME
 BuildRequires:  gnupg2-smime

because it makes very little sense to depend on ragel that is known to produce incorrect code, but rather use the pregenerated, but correct, source file.

And remove the ExcludeArch: arm too ...

Comment 6 Fedora End Of Life 2017-02-28 10:44:34 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.

Comment 7 Raphael Groner 2017-03-01 19:23:55 UTC
Hi Dan,

thanks for your contribution. Are you interested to become co-maintainer, at least for ppc64? From my side, I don't use ppc64 at all, so I must trust what koji tells me about success with builds and executed available unit tests.

Comment 8 Raphael Groner 2017-03-01 19:37:35 UTC
(In reply to Dan Horák from comment #5)
…
> because it makes very little sense to depend on ragel that is known to
> produce incorrect code, but rather use the pregenerated, but correct, source
> file.

No.
https://fedoraproject.org/wiki/Packaging:Guidelines#Use_of_pregenerated_code
 
> And remove the ExcludeArch: arm too ...

Why? There's another blocked bug for aarch64, see bug #1402580. Should I close as a duplication? I thought it's better to open that bug to difference the trackers.
https://fedoraproject.org/wiki/Packaging:Guidelines#Architecture_Build_Failures

Comment 9 Daniel Black 2017-12-18 00:22:16 UTC
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf 6.2.5(3) 

"If any other character is stored in a char object, the resulting value is implementation-defined"

Correct solution is to used "signed char" for whenever implementations rely on -ve values. This is going to solve all architecture bugs on this. This obviously applies to other bugs of similar form.

Comment 11 Daniel Black 2020-03-13 04:14:42 UTC
FYI Ragel repo, or at least a dominate subset, is public again https://github.com/adriandt/ragel

Comment 12 Raphael Groner 2020-07-22 06:39:20 UTC
Hi Kevin,
what do you think how we can proceed with the trojita package? 
Ragel should imho. be stable enough to allow any quality package of trojita, my suggestion is to reassign this bug to ragel then.

Comment 13 Kevin Kofler 2020-07-22 08:20:55 UTC
To be honest, I need this bug for tracking purposes only (as required for any ExcludeArch/ExclusiveArch). I don't really care about whether Trojitá works on non-x86 architectures, because I need x86_64 only.

Comment 14 Raphael Groner 2020-07-22 12:54:54 UTC
Do you mean qt5-webengine related? This bug is about ragel that has nothing to do with qt5-webengine.
BTW ExcludeArch for qt5-webengine is fixed.

Comment 15 Kevin Kofler 2020-07-22 13:02:22 UTC
Trojitá doesn't even use QtWebEngine, it (still) uses QtWebKit.

I mean that I generally do not care about non-x86 architectures. If the package does not build there, then so be it.

Comment 16 Raphael Groner 2020-07-22 14:32:33 UTC
Kevin, thanks for the open words. I orphaned this package, please feel free to pick.

Comment 17 Fedora Admin user for bugzilla script actions 2020-07-23 02:48:58 UTC
This package has changed maintainer in the Fedora.
Reassigning to the new maintainer of this component.


Note You need to log in before you can comment on or make changes to this bug.