You are not logged in.

#1 2008-04-15 23:02:50

TheAmigo
Member
Registered: 2008-04-08
Posts: 68

[solved] error building fluxbox from PKGBUILD

I should preface my post with this note:  this is the first time I've run abs, so I may be doing something wrong.

After running abs, I went into extra/x11/fluxbox and ran makepkg --asroot
It ran through the configure script, but when it started to compile, it exited with the error:

main.cc: In function 'void showInfo(std::ostream&)':
main.cc:71: error: 'strlen' was not declared in this scope

Without much hope, I added "#include <string.h>" to main.cc.  Much to my surprise, I could then run make and it compiled successfully.

Out of curiosity, I downloaded the source to fluxbox in another dir and tried to compile it... same problem.

So my questions are:
- is this really such a simple and obvious bug in fluxbox's source?
- how did the binary package get built for the arch repos when the PKGBUILD doesn't patch it?
- or am I just missing something that would make it compile as-is?

Last edited by TheAmigo (2008-04-16 17:50:03)

Offline

#2 2008-04-15 23:11:54

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: [solved] error building fluxbox from PKGBUILD

This error is triggered  by gcc 4.3. The fluxbox package in the repo was built before the gcc update so it compiled fine.

BTW, the correct fix is:
#include <cstring>

Also, it's not recommended to use the  --asroot option. Use fakeroot instead.

Offline

#3 2008-04-15 23:25:19

TheAmigo
Member
Registered: 2008-04-08
Posts: 68

Re: [solved] error building fluxbox from PKGBUILD

I hadn't paid any attention to what version of gcc I had... interesting to see the problems it can cause.

Many years ago I had a C++ class, but I've never used it... <cstring> is triggering some faint memories, thanks for the tip.

I hadn't heard of fakeroot, I'll keep that in mind.  For now, I'm running on a VM that has no non-root accounts.  I use it mainly for testing and compiling.  I'm not worried about screwing it up since it's got an undoable disk (under VMware ESX).  But if there's something different about packages built with --asroot that's not desirable, then I'll go through the trouble of creating a user to build packages.

Offline

#4 2008-04-16 17:51:33

TheAmigo
Member
Registered: 2008-04-08
Posts: 68

Re: [solved] error building fluxbox from PKGBUILD

The reason I built fluxbox from source is that I wanted to patch it so that double-clicking the titlebar of windows would toggle maximizing rather than shading the window.

Would such a patch + PKGBUILD be appropriate to submit to AUR?

Offline

#5 2008-04-17 03:06:15

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: [solved] error building fluxbox from PKGBUILD

Isn't there a config option to do that? I don't use fluxbox so I can't tell.

Offline

#6 2008-04-17 04:07:51

TheAmigo
Member
Registered: 2008-04-08
Posts: 68

Re: [solved] error building fluxbox from PKGBUILD

One would expect.

I did a bit of searching before resorting to patching the source...
Config instructions - no mention of such a feature
Release notes - no mention of such a feature
Changelog - no mention of such a feature

I found the hints for patching in this fluxbox-wiki page.  Which is for 0.9.14 and need some minor adjustments for 1.0.0:

--- src/Window.cc.orig  2007-09-09 10:46:50.000000000 -0500
+++ src/Window.cc       2008-04-15 18:26:39.000000000 -0500
@@ -3963,6 +3963,7 @@
     CommandRef raise_and_focus_cmd(new WindowCmd(*this, &FluxboxWindow::raiseAndFocus));
     CommandRef stick_cmd(new WindowCmd(*this, &FluxboxWindow::stick));
     CommandRef show_menu_cmd(new WindowCmd(*this, &FluxboxWindow::popupMenu));
+    CommandRef maximize_cmd(new WindowCmd(*this, &FluxboxWindow::maximizeFull));
 
     typedef FbTk::Resource<vector<WinButton::Type> > WinButtonsResource;
 
@@ -4021,7 +4022,7 @@
 
     // setup titlebar
     frame().setOnClickTitlebar(raise_and_focus_cmd, 1, false, true); // on press with button 1
-    frame().setOnClickTitlebar(shade_cmd, 1, true); // doubleclick with button 1
+    frame().setOnClickTitlebar(maximize_cmd, 1, true); // doubleclick with button 1
     frame().setOnClickTitlebar(show_menu_cmd, 3); // on release with button 3
     frame().setOnClickTitlebar(lower_cmd, 2); // on release with button 2

It's a frustratingly small patch for something that should arguably be a feature (granted, it's hard to argue for more config options in a WM whose goal is to be small).

I suppose the counter-argument for submitting this is:  how many AUR packages should there be?  one for every possible combination of desirable features that aren't configurable?

Maybe it's better if I just make notes in the Arch wiki on how to patch it.  I'm still trying to get a feel for the Arch community, so I don't know the best way to go with this.

Offline

Board footer

Powered by FluxBB