Bug 200124 - x11-wm/blackbox 0.70.1_4 does not build on ARM
Summary: x11-wm/blackbox 0.70.1_4 does not build on ARM
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm Any
: --- Affects Some People
Assignee: Michael Moll
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2015-05-11 10:02 UTC by Ulrich Grey
Modified: 2015-12-06 12:47 UTC (History)
5 users (show)

See Also:
A.J.Caines: maintainer-feedback+
mmoll: merge-quarterly-


Attachments
fix armv6 build (787 bytes, patch)
2015-05-11 14:58 UTC, Mikael Urankar
no flags Details | Diff
correct previous patch (782 bytes, patch)
2015-05-11 16:09 UTC, Mikael Urankar
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ulrich Grey 2015-05-11 10:02:30 UTC
It's a native build running FreeBSD 11.0-CURRENT #0 r282366M on a Wandboard-Quad.

--- Toolbar.o ---
Toolbar.cc:47:11: error: no matching function for call to 'max'
  return (std::max(1000l, ((((resolution - (now.tv_sec % resolution)) * 1000l))
          ^~~~~~~~
/usr/include/c++/v1/algorithm:2654:1: note: candidate template ignored: deduced conflicting types for parameter '_Tp' ('long' vs. 'long long')
max(const _Tp& __a, const _Tp& __b)
^
/usr/include/c++/v1/algorithm:2646:1: note: candidate function template not viable: requires 3 arguments, but 2 were provided
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
^
1 error generated.
*** [Toolbar.o] Error code 1

make[3]: stopped in /usr/local/DEVEL/ports/x11-wm/blackbox/work/blackbox-0.70.1/src
--- Window.o ---
Window.cc:3524:14: warning: '&&' within '||' [-Wlogical-op-parentheses]
             && (event->state & Button1Mask
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Window.cc:3524:14: note: place parentheses around the '&&' expression to silence this warning
             && (event->state & Button1Mask
             ^
1 warning generated.
1 error

make[3]: stopped in /usr/local/DEVEL/ports/x11-wm/blackbox/work/blackbox-0.70.1/src
*** [all-recursive] Error code 1
Comment 1 Mikael Urankar freebsd_committer freebsd_triage 2015-05-11 14:58:52 UTC
Created attachment 156657 [details]
fix armv6 build

Can you try the attached patch?
Comment 2 Ulrich Grey 2015-05-11 15:26:17 UTC
The patch doesn't work. I think, it's because of the suffix '.orig' of 
files/extra-patch-src_Toolbar.cc.orig?

=> SHA256 Checksum OK for blackbox-0.70.1.tar.gz.
===>  Patching for blackbox-0.70.1_4
===>  Applying extra patch /usr/local/DEVEL/ports/x11-wm/blackbox/files/extra-patch-src_Toolbar.cc
cat: /usr/local/DEVEL/ports/x11-wm/blackbox/files/extra-patch-src_Toolbar.cc: No such file or directory
  I can't seem to find a patch in there anywhere.
*** Error code 2
Comment 3 Ulrich Grey 2015-05-11 15:49:31 UTC
ls files/* shows:
extra-patch-src_Toolbar.cc.orig
extra-patch-src_Toolbar.cc.orig.orig
...

If I do:
mv extra-patch-src_Toolbar.cc.orig extra-patch-src_Toolbar.cc
the build finished sucessfully and blackbox works!
Thank you for the patch.
Comment 4 Mikael Urankar freebsd_committer freebsd_triage 2015-05-11 16:09:43 UTC
Created attachment 156659 [details]
correct previous patch
Comment 5 Andrew J. Caines 2015-05-11 22:04:57 UTC
Thank you, Ulrich and Mikael.
Comment 6 gmbroome 2015-09-21 14:27:19 UTC
(In reply to mikael.urankar from comment #4)

I can confirm that this patch does, in fact, correct the issue, which I also encountered verbatim just a few minutes ago.
Comment 7 commit-hook freebsd_committer freebsd_triage 2015-11-29 21:53:52 UTC
A commit references this bug:

Author: mmoll
Date: Sun Nov 29 21:53:13 UTC 2015
New revision: 402631
URL: https://svnweb.freebsd.org/changeset/ports/402631

Log:
  x11-wm/blackbox: fix build on arm

  PR:		200124
  Submitted by:	Mikael Urankar <mikael.urankar@gmail.com>
  Approved by:	maintainer (timeout)

Changes:
  head/x11-wm/blackbox/Makefile
  head/x11-wm/blackbox/files/extra-patch-src_Toolbar.cc
Comment 8 Michael Moll freebsd_committer freebsd_triage 2015-11-29 21:54:06 UTC
commited, thanks!
Comment 9 Kubilay Kocak freebsd_committer freebsd_triage 2015-11-30 01:32:27 UTC
Assign to committer that resolved.

@Michael, should this be merged (MFH) to the quarterly branch? I believe this change would come under blanket approval.
Comment 10 Michael Moll freebsd_committer freebsd_triage 2015-11-30 01:51:35 UTC
It could be MFHed under the "fixes build" blanket, but I'm unsure if this port is really widely used, especially on arm, so I don't know if that's justified.
Comment 11 Andrew J. Caines 2015-11-30 02:37:30 UTC
It's very rarely used, unmaintained for a decade this month, effectively abandoned at SourceForge* and almost no-one looks for support including contacting me or asking on #blackbox on FreeNode IRC.

On the other hand, there is an community supported Arch Linux package for Arm[1].

Developer Brad Hughes has moved it to GitHub[2] and has updated some files since the last release, but AFAIK is not developing it or planning another release.


[1] http://archlinuxarm.org/packages?arch=&search=blackbox
[2] https://github.com/bradleythughes/blackbox
Comment 12 Michael Moll freebsd_committer freebsd_triage 2015-11-30 13:09:46 UTC
IMHO it would be super helpful then, if you could submit the rest of the patches (if there are any) to the github repo and change the port to USE_GITHUB. But I also have no problem with the current situation. :)
Comment 13 Andrew J. Caines 2015-11-30 15:25:41 UTC
If blackbox is resurrected from its decade-long slumber and there's a new release, then I'll update the port accordingly, but until then there's no clear advantage.
Comment 14 Michael Moll freebsd_committer freebsd_triage 2015-12-06 12:47:03 UTC
Personally I'm always glad to delete patches from our ports tree, but as said, the current situation is also fine. As the impact is rather small, not MFHing and closing again.