Bug 225152 - misc/rumprun: add USES=gmake
Summary: misc/rumprun: add USES=gmake
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Tobias Kortkamp
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-14 06:29 UTC by Fabian Freyer
Modified: 2018-01-16 17:06 UTC (History)
2 users (show)

See Also:


Attachments
Add USES=gmake (451 bytes, text/plain)
2018-01-14 06:29 UTC, Fabian Freyer
no flags Details
Add USES=gmake and patch libunwind (1.50 KB, patch)
2018-01-14 23:22 UTC, Fabian Freyer
no flags Details | Diff
Add USES=gmake and patch libunwind, and fix pkg-plist (1.93 KB, patch)
2018-01-14 23:38 UTC, Fabian Freyer
no flags Details | Diff
Add USES=gmake and patch libunwind, fix man paths and pkg-plist (3.69 KB, patch)
2018-01-15 00:04 UTC, Fabian Freyer
no flags Details | Diff
rumprun.diff (129.22 KB, patch)
2018-01-15 12:51 UTC, Tobias Kortkamp
no flags Details | Diff
Add USES=gmake and patch libunwind, fix man paths and pkg-plist, fix build for i386 (129.35 KB, patch)
2018-01-15 20:23 UTC, Fabian Freyer
no flags Details | Diff
Add USES=gmake and patch libunwind, fix man paths and pkg-plist, fix build for i386 (66.81 KB, patch)
2018-01-15 20:25 UTC, Fabian Freyer
no flags Details | Diff
Add USES=gmake and patch libunwind, fix man paths and pkg-plist, fix build for i386 (129.70 KB, patch)
2018-01-15 20:40 UTC, Fabian Freyer
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 Tobias Kortkamp freebsd_committer freebsd_triage 2018-01-14 21:40:33 UTC
Even with USES=gmake it still fails to build in Poudriere on 11.1/amd64 for me.

See https://pkg.tobik.me/logs/rumprun-g20180105.log.gz
Comment 2 Tobias Kortkamp freebsd_committer freebsd_triage 2018-01-14 21:49:10 UTC
(In reply to Tobias Kortkamp from comment #1)
It now fails at:

#   compile  libunwind/libunwind.o
/wrkdirs/usr/ports/misc/rumprun/work/rumprun-8fe40c8/objdir/rumptools/bin/x86_64--netbsd-c++ -frandom-seed=cb6dc495 -O2 -g -mno-red-zone -Wall -Wextra -Wno-unused-parameter -fno-stack-protector -Werror  -D__NetBSD__ -U__FreeBSD__ --sysroot=/wrkdirs/usr/ports/misc/rumprun/work/rumprun-8fe40c8/objdir/rumptools/dest -isystem =/usr/include  -isystem /wrkdirs/usr/ports/misc/rumprun/work/rumprun-8fe40c8/objdir/rumptools/dest/usr/include/c++ -I/wrkdirs/usr/ports/misc/rumprun/work/rumprun-8fe40c8/objdir/include  -c  -std=c++0x  -funwind-tables -fno-rtti -fno-exceptions -fvisibility=hidden -Wno-old-style-cast  -I/wrkdirs/usr/ports/misc/rumprun/work/rumprun-8fe40c8/src-netbsd/sys/lib/libunwind /wrkdirs/usr/ports/misc/rumprun/work/rumprun-8fe40c8/src-netbsd/sys/lib/libunwind/libunwind.cxx -o libunwind.o
In file included from /wrkdirs/usr/ports/misc/rumprun/work/rumprun-8fe40c8/src-netbsd/sys/lib/libunwind/UnwindCursor.hpp:19:0,
                 from /wrkdirs/usr/ports/misc/rumprun/work/rumprun-8fe40c8/src-netbsd/sys/lib/libunwind/libunwind.cxx:18:
/wrkdirs/usr/ports/misc/rumprun/work/rumprun-8fe40c8/src-netbsd/sys/lib/libunwind/AddressSpace.hpp: In member function '__int64_t _Unwind::LocalAddressSpace::getSLEB128(_Unwind::LocalAddressSpace::pint_t&, _Unwind::LocalAddressSpace::pint_t)':
/wrkdirs/usr/ports/misc/rumprun/work/rumprun-8fe40c8/src-netbsd/sys/lib/libunwind/AddressSpace.hpp:143:27: error: left shift of negative value [-Werror=shift-negative-value]
       result |= (-1LL) << bit;
                           ^~~
cc1plus: all warnings being treated as errors

*** Failed target:  libunwind.o
*** Failed command: /wrkdirs/usr/ports/misc/rumprun/work/rumprun-8fe40c8/objdir/rumptools/bin/x86_64--netbsd-c++ -frandom-seed=cb6dc495 -O2 -g -mno-red-zone -Wall -Wextra -Wno-unused-parameter -fno-stack-protector -Werror -D__NetBSD__ -U__FreeBSD__ --sysroot=/wrkdirs/usr/ports/misc/rumprun/work/rumprun-8fe40c8/objdir/rumptools/dest -isystem =/usr/include -isystem /wrkdirs/usr/ports/misc/rumprun/work/rumprun-8fe40c8/objdir/rumptools/dest/usr/include/c++ -I/wrkdirs/usr/ports/misc/rumprun/work/rumprun-8fe40c8/objdir/include -c -std=c++0x -funwind-tables -fno-rtti -fno-exceptions -fvisibility=hidden -Wno-old-style-cast -I/wrkdirs/usr/ports/misc/rumprun/work/rumprun-8fe40c8/src-netbsd/sys/lib/libunwind /wrkdirs/usr/ports/misc/rumprun/work/rumprun-8fe40c8/src-netbsd/sys/lib/libunwind/libunwind.cxx -o libunwind.o
*** Error code 1

Stop.
nbmake[3]: stopped in /wrkdirs/usr/ports/misc/rumprun/work/rumprun-8fe40c8/lib/libunwind

*** Failed target:  dependall
*** Failed command: cd "/wrkdirs/usr/ports/misc/rumprun/work/rumprun-8fe40c8/lib/libunwind"; /wrkdirs/usr/ports/misc/rumprun/work/rumprun-8fe40c8/objdir/rumptools/bin/nbmake realall
*** Error code 1

Stop.
nbmake[2]: stopped in /wrkdirs/usr/ports/misc/rumprun/work/rumprun-8fe40c8/lib/libunwind
gmake[1]: *** [../Makefile.inc:80: /wrkdirs/usr/ports/misc/rumprun/work/rumprun-8fe40c8/objdir/lib/libunwind/libunwind.a] Error 1
gmake[1]: Leaving directory '/wrkdirs/usr/ports/misc/rumprun/work/rumprun-8fe40c8/platform/hw'
*** Error code 1
Comment 3 Fabian Freyer 2018-01-14 23:22:41 UTC
Created attachment 189724 [details]
Add USES=gmake and patch libunwind

Ah yes, it seems like I was building with an oder GCC version for some reason. This is bug is fixed upstream in llvm/libunwind[1], the fix was merged [2] into NetBSD HEAD not that long ago. However, upstream rumprun doesn't use this NetBSD source tree yet. There is an upstream bug [3] that tracks this.

I see the following possible ways forward until this is fixed upstream:
1) add a patch in files/ to patch the signedness issue
2) check out current NetBSD HEAD and use the -s parameter [4] on build-rr.sh
3) use an older GCC in USE_GCC

Personally, I'm inclined to go with option 1) for now, and have updated the patch accordingly.

[1] https://bugs.llvm.org/show_bug.cgi?id=33358
[2] http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/lib/libunwind/AddressSpace.hpp.diff?r1=1.8&r2=1.9&only_with_tag=MAIN
[3] https://github.com/rumpkernel/rumprun/issues/86
[4] https://github.com/rumpkernel/rumprun/blob/685f4ab3b74b6f1e1b40bdd3d2c42efa44bf385d/build-rr.sh#L51
Comment 4 Fabian Freyer 2018-01-14 23:38:56 UTC
Created attachment 189727 [details]
Add USES=gmake and patch libunwind, and fix pkg-plist

There's still an issue with the plist, which is fixed in this patch. Poudriere testport now runs successfully.
Comment 5 Tobias Kortkamp freebsd_committer freebsd_triage 2018-01-14 23:49:00 UTC
(In reply to Fabian Freyer from comment #4)
Ok, the build succeeds now.

But is there a reason the man pages have to go into ${PREFIX}/share/man?
Normally they should go into ${PREFIX}/man on FreeBSD.
Comment 6 Fabian Freyer 2018-01-15 00:04:49 UTC
Created attachment 189728 [details]
Add USES=gmake and patch libunwind, fix man paths and pkg-plist

You are absolutely right, I fixed that too.
Comment 7 Tobias Kortkamp freebsd_committer freebsd_triage 2018-01-15 12:51:33 UTC
Created attachment 189746 [details]
rumprun.diff

It still fails to build on i386.

I've attempted to fix it, but it still fails to build.

/usr/bin/strip /wrkdirs/usr/ports/misc/rumprun/work/stage/usr/local/libexec/rumprun-i486-hw/i486--netbsd-c++
/usr/bin/strip: '/wrkdirs/usr/ports/misc/rumprun/work/stage/usr/local/libexec/rumprun-i486-hw/i486--netbsd-c++': No such file

It seem the binaries are named irregularly when built on different architectures.
E.g. i486--netbsdelf-c++

I'm also removed the pre-rendered man pages in man/cat*. I don't
think they're very useful on a modern system.
Comment 8 Tobias Kortkamp freebsd_committer freebsd_triage 2018-01-15 12:52:10 UTC
(In reply to Tobias Kortkamp from comment #7)
Log for 10.3/i386: https://pkg.tobik.me/logs/rumprun-g20180105-i386.log.gz
Comment 9 Fabian Freyer 2018-01-15 20:23:08 UTC
Created attachment 189764 [details]
Add USES=gmake and patch libunwind, fix man paths and pkg-plist, fix build for i386

Thanks for your work!

Unfortunately, your patch didn't apply for me, so I took the liberty to recreate it.

It seems the ABI part of the toolchain tuple is `netbsd` for x86_64, but `netbsdelf` on i386. I've fixed this too now.
Comment 10 Fabian Freyer 2018-01-15 20:25:18 UTC
Created attachment 189765 [details]
Add USES=gmake and patch libunwind, fix man paths and pkg-plist, fix build for i386

I uploaded the wrong patch, I'm sorry.
Comment 11 Fabian Freyer 2018-01-15 20:40:10 UTC
Created attachment 189766 [details]
Add USES=gmake and patch libunwind, fix man paths and pkg-plist, fix build for i386

My apologies again, I should really read the patches I submit before I upload them.
Comment 12 Tobias Kortkamp freebsd_committer freebsd_triage 2018-01-16 17:01:28 UTC
LGTM.
Comment 13 commit-hook freebsd_committer freebsd_triage 2018-01-16 17:05:31 UTC
A commit references this bug:

Author: tobik
Date: Tue Jan 16 17:04:40 UTC 2018
New revision: 459195
URL: https://svnweb.freebsd.org/changeset/ports/459195

Log:
  misc/rumprun: Add missing USES=gmake and fix build

  make[1]: "/wrkdirs/usr/ports/misc/rumprun/work/rumprun-8fe40c8/app-tools/Makefile" line 1: Missing dependency operator
  make[1]: "/wrkdirs/usr/ports/misc/rumprun/work/rumprun-8fe40c8/app-tools/Makefile" line 2: Need an operator
  ...
  make[1]: "../../global.mk" line 1: Missing dependency operator
  make[1]: "../../global.mk" line 2: Need an operator
  ...
  Variable MACHINE_GNU_PLATFORM is recursive.

  - Patch bundled libunwind to build with newer GCC versions
  - Fix man page install location
  - Fix build on i386
  - The port will only build on amd64 and i386 so use ONLY_FOR_ARCHS to
    list the architectures it builds on instead of all architectures it
    doesn't build on

  PR:		225152
  Submitted by:	Fabian Freyer <fabian.freyer@physik.tu-berlin.de> (maintainer)

Changes:
  head/misc/rumprun/Makefile
  head/misc/rumprun/files/patch-src-netbsd_sys_lib_libunwind_AddressSpace.hpp
  head/misc/rumprun/pkg-plist
Comment 14 Tobias Kortkamp freebsd_committer freebsd_triage 2018-01-16 17:06:57 UTC
Committed.  Thanks!