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 1606599 - ucblogo: FTBFS in Fedora rawhide
Summary: ucblogo: FTBFS in Fedora rawhide
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: ucblogo
Version: 29
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Gérard Milmeister
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F29FTBFS
TreeView+ depends on / blocked
 
Reported: 2018-07-20 20:47 UTC by Mohan Boddu
Modified: 2019-11-27 18:07 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-11-27 18:07:21 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
build.log (10.48 KB, text/plain)
2018-07-20 20:47 UTC, Mohan Boddu
no flags Details
root.log (32.00 KB, text/plain)
2018-07-20 20:47 UTC, Mohan Boddu
no flags Details
state.log (615 bytes, text/plain)
2018-07-20 20:47 UTC, Mohan Boddu
no flags Details
Patch to get it to build (3.52 KB, patch)
2019-08-30 17:14 UTC, Josh Cogliati
no flags Details | Diff
Patch to get it to build with wxGTK3 (6.93 KB, patch)
2019-08-30 17:55 UTC, Josh Cogliati
no flags Details | Diff
example of XOR not working with wxGTK (7.14 KB, image/png)
2019-09-02 02:07 UTC, Josh Cogliati
no flags Details

Description Mohan Boddu 2018-07-20 20:47:26 UTC
ucblogo failed to build from source in Fedora rawhide

https://koji.fedoraproject.org/koji/taskinfo?taskID=28237879


For details on the mass rebuild see:

https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Please fix ucblogo at your earliest convenience and set the bug's status to
ASSIGNED when you start fixing it. If the bug remains in NEW state for 8 weeks,
ucblogo will be orphaned. Before branching of Fedora 30,
ucblogo will be retired, if it still fails to build.

For more details on the FTBFS policy, please visit:
https://fedoraproject.org/wiki/Fails_to_build_from_source

Comment 1 Mohan Boddu 2018-07-20 20:47:36 UTC
Created attachment 1468733 [details]
build.log

Comment 2 Mohan Boddu 2018-07-20 20:47:41 UTC
Created attachment 1468734 [details]
root.log

file root.log too big, will only attach last 32768 bytes

Comment 3 Mohan Boddu 2018-07-20 20:47:43 UTC
Created attachment 1468735 [details]
state.log

Comment 4 Igor Raits 2018-07-23 11:04:02 UTC
Matches:
make: gcc: Command not found

Suggested fix:
BuildRequires:  gcc

Comment 5 Jan Kurik 2018-08-14 08:50:13 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 29 development cycle.
Changing version to '29'.

Comment 6 Josh Cogliati 2019-08-30 17:14:45 UTC
Created attachment 1609940 [details]
Patch to get it to build

I could get it to build by removing wxGTK 2 (which is no longer packaged)  and matherr which is deprecated in glibc.  I'll see if I can get it to build with a wxGTK 3.

Comment 7 Josh Cogliati 2019-08-30 17:55:35 UTC
Created attachment 1609944 [details]
Patch to get it to build with wxGTK3

This patch gets ucblogo to build with Fedora 30 by fixing some compiling errors with the switch from wxGTK 2 to wxGTK 3.  However, it has some drawing errors (the turtle doesn't display with logo-wx) and it throws the errors:

(logo:24738): Gtk-WARNING **: 11:42:03.530: drawing failure for widget 'wxPizza': invalid matrix (not invertible)

(logo:24738): Gtk-WARNING **: 11:42:03.530: drawing failure for widget 'GtkBox': invalid matrix (not invertible)

(logo:24738): Gtk-WARNING **: 11:42:03.530: drawing failure for widget 'GtkWindow': invalid matrix (not invertible)

So this fixes the fails to build, but still needs some work before logo-wx works.  However, logo (that is, with x instead of wx) works fine.

Comment 8 Josh Cogliati 2019-08-30 23:04:56 UTC
The errors were because it was bliting a rectangle with zero width.  Fixed with:
--- ucblogo-6.0wx/wxTerminal.cpp        2019-08-30 11:40:02.061790995 -0600
+++ ucblogo-6.0wx3/wxTerminal.cpp       2019-08-30 16:40:39.664086823 -0600
@@ -1883,7 +1883,9 @@
     //  return;
     //}
   }
-  dc.Blit( t_x, t_y, w, h, &dc, t_x, t_y, wxINVERT);
+  if (w > 0 && h > 0) {
+    dc.Blit( t_x, t_y, w, h, &dc, t_x, t_y, wxINVERT);
+  }
 }
 

Still working on figuring out why logo-wx doesn't show a turtle.

Comment 9 Josh Cogliati 2019-09-02 02:07:42 UTC
Created attachment 1610606 [details]
example of XOR not working with wxGTK

The basic reason that the turtle does not work is that it uses XOR to draw and erase the turtle, and XOR is either poorly documented or broken in wxGTK.  

I tried to figure out how to use wxXOR for lines.  I took a test case from the sample at https://wiki.wxwidgets.org/WxDC ):
//draw.h

#ifndef _drawPane_
#define _drawPane_

#include "wx/wx.h"
#include "wx/glcanvas.h"

class BasicDrawPane : public wxPanel
{
    
public:
	BasicDrawPane(wxFrame* parent);
    
	void render(wxPaintEvent& evt);
    
	// events
	void mouseMoved(wxMouseEvent& event);
	void mouseDown(wxMouseEvent& event);
	void mouseWheelMoved(wxMouseEvent& event);
	void mouseReleased(wxMouseEvent& event);
	void rightClick(wxMouseEvent& event);
	void mouseLeftWindow(wxMouseEvent& event);
	void keyPressed(wxKeyEvent& event);
	void keyReleased(wxKeyEvent& event);
    
	DECLARE_EVENT_TABLE()
};

#endif 


//draw.cpp

#include "wx/wx.h"
#include "wx/sizer.h"
#include "draw.h"

class MyApp: public wxApp
{
    virtual bool OnInit();

    wxFrame *frame;
    BasicDrawPane * drawPane;
public:
      
};

IMPLEMENT_APP(MyApp)


bool MyApp::OnInit()
{
    wxBoxSizer* sizer = new wxBoxSizer(wxHORIZONTAL);
    frame = new wxFrame((wxFrame *)NULL, -1,  wxT("Hello wxDC"), wxPoint(50,50), wxSize(400,200));
	
    drawPane = new BasicDrawPane( (wxFrame*) frame );
    sizer->Add(drawPane, 1, wxEXPAND);
	
    frame->SetSizer(sizer);
    frame->SetAutoLayout(true);
	
    frame->Show();
    return true;
} 

BEGIN_EVENT_TABLE(BasicDrawPane, wxPanel)
EVT_MOTION(BasicDrawPane::mouseMoved)
EVT_LEFT_DOWN(BasicDrawPane::mouseDown)
EVT_LEFT_UP(BasicDrawPane::mouseReleased)
EVT_RIGHT_DOWN(BasicDrawPane::rightClick)
EVT_LEAVE_WINDOW(BasicDrawPane::mouseLeftWindow)
EVT_KEY_DOWN(BasicDrawPane::keyPressed)
EVT_KEY_UP(BasicDrawPane::keyReleased)
EVT_MOUSEWHEEL(BasicDrawPane::mouseWheelMoved)
EVT_PAINT(BasicDrawPane::render)
END_EVENT_TABLE()


// some useful events to use
void BasicDrawPane::mouseMoved(wxMouseEvent& event) {}
void BasicDrawPane::mouseDown(wxMouseEvent& event) {}
void BasicDrawPane::mouseWheelMoved(wxMouseEvent& event) {}
void BasicDrawPane::mouseReleased(wxMouseEvent& event) {}
void BasicDrawPane::rightClick(wxMouseEvent& event) {}
void BasicDrawPane::mouseLeftWindow(wxMouseEvent& event) {}
void BasicDrawPane::keyPressed(wxKeyEvent& event) {}
void BasicDrawPane::keyReleased(wxKeyEvent& event) {}

BasicDrawPane::BasicDrawPane(wxFrame* parent) :
wxPanel(parent)
{
}


void BasicDrawPane::render( wxPaintEvent& evt )
{
    wxPaintDC dc(this); // only to be used in paint events. use wxClientDC to paint outside the paint event
    wxPen myPen = wxPen( wxT("blue"), 5, wxSOLID);
    dc.DrawText(wxT("Testing"), 40, 60);
    dc.SetPen(myPen);
    dc.SetBrush(*wxTRANSPARENT_BRUSH);
    dc.SetLogicalFunction(wxXOR);
    dc.DrawLine(10, 20, 30, 40);
    dc.DrawLine(30, 20, 10, 40);
}

The code I added to the existing example is:

    wxPen myPen = wxPen( wxT("blue"), 5, wxSOLID);
    dc.SetPen(myPen);
    dc.SetBrush(*wxTRANSPARENT_BRUSH);
    dc.SetLogicalFunction(wxXOR);
    dc.DrawLine(10, 20, 30, 40);
    dc.DrawLine(30, 20, 10, 40);


On Fedora linux (with wxWidgets  wxGTK3-3.0.4-8.fc30.x86_64) I compile it with:
g++ draw.cpp -Wall `wx-config-3.0 --cxxflags --libs` -Wall -o draw

I attached the image.

If XOR was working as I expected it to, the lines would be drawn in yellow ( 0xffffff ^ 0x0000ff = 0xffff00) and the center of the X would be back to white.  Instead I get a black X as in the picture.

So, basically, XOR with wxGTK is not working as either I or the original author of ucblogo expects it to, and that is causing the turtle not to show up.  It is possible that using XOR requires something special to be done and that I misunderstand how to do this.

I will try and get assistance with this problem from wxWidgets.

As for Fedora and ucblogo, I am happy to work with either an existing maintainer to resolve the FTBFS (I can get ucblogo to build on Fedora 30, and the X11 version works and the wxGTK version partially works) or to take over maintainership of ucblogo.

Comment 10 Josh Cogliati 2019-09-02 12:58:49 UTC
I made a pull request of my fixes at https://src.fedoraproject.org/rpms/ucblogo/pull-request/1

Comment 11 Josh Cogliati 2019-09-05 02:44:42 UTC
FYI, the bug preventing the turtle from showing up is https://trac.wxwidgets.org/ticket/18050

(And is there something I need to do to get the pull request reviewed/koji building starting? Thanks.)

Comment 12 Josh Cogliati 2019-09-12 02:37:35 UTC
I emailed Gérard Milmeister and Gérard Milmeister would like someone to take over this package. 

I think besides fixing the FTBFS problem, after reading the fedora packaging guidelines I think the following things need to be done:
1. Put the patches in the sourceforge page https://sourceforge.net/p/ucblogo/bugs/
2. Add a desktop file for logo-wx
3. Add a man page for logo and logo-wx
I am willing to take over the package and fix those issues.

Comment 13 Josh Cogliati 2019-09-13 20:45:49 UTC
All the things I can think of are fixed (including putting the patches upstream to sourceforge).  I think this is ready to review.
FYI, it has been marked as a dead package for about 9 months.

Comment 14 Josh Cogliati 2019-09-17 11:51:30 UTC
FYI, the review request is: Bug 1752139

Comment 15 Ben Cotton 2019-10-31 18:50:09 UTC
This message is a reminder that Fedora 29 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 29 on 2019-11-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '29'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 29 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 16 Josh Cogliati 2019-11-01 02:53:45 UTC
This bug is actually fixed, it just needs a maintainer to approve the merge request.

Comment 17 Fedora Update System 2019-11-22 16:02:23 UTC
FEDORA-2019-48d0f2a0d0 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-48d0f2a0d0

Comment 18 Fedora Update System 2019-11-23 03:21:46 UTC
ucblogo-6.0-27.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-48d0f2a0d0

Comment 19 Ben Cotton 2019-11-27 18:07:21 UTC
Fedora 29 changed to end-of-life (EOL) status on 2019-11-26. Fedora 29 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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