Bug 1307308

Summary: agistudio: FTBFS in rawhide
Product: [Fedora] Fedora Reporter: Fedora Release Engineering <releng>
Component: agistudioAssignee: Gwyn Ciesla <gwync>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: gwync, yselkowi
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-24 14:49:20 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1305208    
Attachments:
Description Flags
build.log
none
root.log
none
state.log none

Description Fedora Release Engineering 2016-02-13 20:59:55 UTC
Your package agistudio failed to build from source in current rawhide.

http://koji.fedoraproject.org/koji/taskinfo?taskID=12805668

For details on mass rebuild see https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

Comment 1 Fedora Release Engineering 2016-02-13 20:59:58 UTC
Created attachment 1123994 [details]
build.log

Comment 2 Fedora Release Engineering 2016-02-13 20:59:59 UTC
Created attachment 1123995 [details]
root.log

Comment 3 Fedora Release Engineering 2016-02-13 21:00:00 UTC
Created attachment 1123996 [details]
state.log

Comment 4 Yaakov Selkowitz 2016-02-23 19:02:07 UTC
bpicture.cpp: In member function 'void BPicture::plotPattern(byte, byte)':
bpicture.cpp:428:3: error: narrowing conversion of '128' from 'int' to 'char' inside { } [-Wnarrowing]
bpicture.cpp:428:3: error: narrowing conversion of '252' from 'int' to 'char' inside { } [-Wnarrowing]
[snip]

Looks like this needs to be unsigned char[].

Comment 5 Gwyn Ciesla 2016-02-23 20:01:35 UTC
When I patch as follows it builds, but:

--- src/bpicture.cpp~	2003-04-13 07:02:23.000000000 -0400
+++ src/bpicture.cpp	2016-02-23 14:50:28.152225845 -0500
@@ -415,7 +415,7 @@
 **************************************************************************/
 void BPicture::plotPattern(byte x, byte y)
 { 
-  static char circles[][15] = { /* agi circle bitmaps */
+  static unsigned char circles[][15] = { /* agi circle bitmaps */
     {0x80},
     {0xfc},
     {0x5f, 0xf4},


It then fails differently:


helpwindow.cpp: In constructor 'HelpWindow::HelpWindow(const QString&, const QString&, QWidget*, const char*)':
helpwindow.cpp:113:40: error: expected primary-expression before '(' token
     forwardId = go->insertItem( QPixmap(forward),
                                        ^
helpwindow.cpp:113:41: error: reference to 'forward' is ambiguous
     forwardId = go->insertItem( QPixmap(forward),
                                         ^~~~~~~
In file included from helpwindow.cpp:47:0:
forward.xpm:2:20: note: candidates are: const char* forward [22]
 static const char *forward[] = {
                    ^~~~~~~
In file included from /usr/include/c++/6.0.0/bits/stl_pair.h:59:0,
                 from /usr/include/c++/6.0.0/utility:70,
                 from /usr/include/c++/6.0.0/algorithm:60,
                 from /usr/include/QtCore/qglobal.h:68,
                 from /usr/include/QtCore/qnamespace.h:45,
                 from /usr/include/QtCore/qobjectdefs.h:45,
                 from /usr/include/QtGui/qwindowdefs.h:45,
                 from /usr/include/QtGui/qpaintdevice.h:45,
                 from /usr/include/QtGui/qpixmap.h:45,
                 from /usr/include/Qt3Support/q3textbrowser.h:45,
                 from helpwindow.h:14,
                 from helpwindow.cpp:17:
/usr/include/c++/6.0.0/bits/move.h:87:5: note:                 template<class _Tp> constexpr _Tp&& std::forward(typename std::remove_reference<_From>::type&&)
     forward(typename std::remove_reference<_Tp>::type&& __t) noexcept
     ^~~~~~~
/usr/include/c++/6.0.0/bits/move.h:76:5: note:                 template<class _Tp> constexpr _Tp&& std::forward(typename std::remove_reference<_From>::type&)
     forward(typename std::remove_reference<_Tp>::type& __t) noexcept
     ^~~~~~~
helpwindow.cpp:155:38: error: expected primary-expression before '(' token
     button = new QToolButton( QPixmap(forward), "Forward", "", browser, SLOT(forward()), toolbar );
                                      ^
helpwindow.cpp:155:39: error: reference to 'forward' is ambiguous
     button = new QToolButton( QPixmap(forward), "Forward", "", browser, SLOT(forward()), toolbar );
                                       ^~~~~~~
In file included from helpwindow.cpp:47:0:
forward.xpm:2:20: note: candidates are: const char* forward [22]
 static const char *forward[] = {
                    ^~~~~~~
In file included from /usr/include/c++/6.0.0/bits/stl_pair.h:59:0,
                 from /usr/include/c++/6.0.0/utility:70,
                 from /usr/include/c++/6.0.0/algorithm:60,
                 from /usr/include/QtCore/qglobal.h:68,
                 from /usr/include/QtCore/qnamespace.h:45,
                 from /usr/include/QtCore/qobjectdefs.h:45,
                 from /usr/include/QtGui/qwindowdefs.h:45,
                 from /usr/include/QtGui/qpaintdevice.h:45,
                 from /usr/include/QtGui/qpixmap.h:45,
                 from /usr/include/Qt3Support/q3textbrowser.h:45,
                 from helpwindow.h:14,
                 from helpwindow.cpp:17:
/usr/include/c++/6.0.0/bits/move.h:87:5: note:                 template<class _Tp> constexpr _Tp&& std::forward(typename std::remove_reference<_From>::type&&)
     forward(typename std::remove_reference<_Tp>::type&& __t) noexcept
     ^~~~~~~
/usr/include/c++/6.0.0/bits/move.h:76:5: note:                 template<class _Tp> constexpr _Tp&& std::forward(typename std::remove_reference<_From>::type&)
     forward(typename std::remove_reference<_Tp>::type& __t) noexcept
     ^~~~~~~
In file included from helpwindow.cpp:47:0:
forward.xpm: At global scope:
forward.xpm:2:20: warning: 'forward' defined but not used [-Wunused-variable]
 static const char *forward[] = {
                    ^~~~~~~
Makefile:514: recipe for target 'helpwindow.o' failed
make: *** [helpwindow.o] Error 1

Comment 6 Yaakov Selkowitz 2016-02-23 20:14:19 UTC
(In reply to Jon Ciesla from comment #5)
> When I patch as follows it builds, but:
> It then fails differently:

This is a separate issue, the first build just didn't get far enough to expose it yet.

> helpwindow.cpp: In constructor 'HelpWindow::HelpWindow(const QString&, const
> QString&, QWidget*, const char*)':
> helpwindow.cpp:113:40: error: expected primary-expression before '(' token
>      forwardId = go->insertItem( QPixmap(forward),
>                                         ^
> helpwindow.cpp:113:41: error: reference to 'forward' is ambiguous
>      forwardId = go->insertItem( QPixmap(forward),
>                                          ^~~~~~~
> In file included from helpwindow.cpp:47:0:
> forward.xpm:2:20: note: candidates are: const char* forward [22]
>  static const char *forward[] = {
>                     ^~~~~~~
> /usr/include/c++/6.0.0/bits/move.h:87:5: note:                
> template<class _Tp> constexpr _Tp&& std::forward(typename
> std::remove_reference<_From>::type&&)
>      forward(typename std::remove_reference<_Tp>::type&& __t) noexcept
>      ^~~~~~~
> /usr/include/c++/6.0.0/bits/move.h:76:5: note:                
> template<class _Tp> constexpr _Tp&& std::forward(typename
> std::remove_reference<_From>::type&)
>      forward(typename std::remove_reference<_Tp>::type& __t) noexcept
>      ^~~~~~~

std::forward is new in C++11, which is turned on *by default* for the first time in GCC 6.  Is something "using namespace std;"?  You would have to rename forward[] in forward.xpm (and whatever references it), or remove the using namespace std and use explicit std:: where required, or (since this appears to be an older code base) try adding -std=gnu++98 to CXXFLAGS instead.

Comment 7 Jan Kurik 2016-02-24 14:33:04 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle.
Changing version to '24'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase

Comment 8 Gwyn Ciesla 2016-02-24 14:49:20 UTC
Ah, that did it, thanks!  It is indeed an old base base but one I use. :)

Comment 9 Yaakov Selkowitz 2016-02-24 14:53:52 UTC
This doesn't respect Fedora's optflags, this needs to be:

-CXXFLAGS="$CXXFLAGS -std=gnu++98 -fPIC"
+CXXFLAGS="$RPM_OPT_FLAGS -std=gnu++98 -fPIC"

Comment 10 Gwyn Ciesla 2016-02-24 18:19:58 UTC
Quite correct, remedied.