Bug 208952 - math/mpfr broken on arm
Summary: math/mpfr broken 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 Only Me
Assignee: Alex Dupre
Depends on:
Reported: 2016-04-21 10:37 UTC by otacilio.neto
Modified: 2016-04-28 21:01 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (ale)

poudriere build log. (6.87 KB, text/plain)
2016-04-21 10:37 UTC, otacilio.neto
no flags Details
qemu-sbruno patch (987 bytes, patch)
2016-04-22 09:04 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 otacilio.neto 2016-04-21 10:37:26 UTC
Created attachment 169516 [details]
poudriere build log.

The port math/mpfr compiling is failing for arm with message: 

===>  Patching for mpfr-3.1.4
===>  Applying distribution patches for mpfr-3.1.4
/usr/local/bin/gpatch: **** Can't rename file ./PATCHES.o2r7t7X to PATCHES : Bad address
*** Error code 2

make: stopped in /usr/ports/math/mpfr

Attached is the poudriere build log.
Comment 1 Alex Dupre freebsd_committer 2016-04-21 14:29:01 UTC
No idea how to fix it, it seems a gpatch issue on arm, completely unrelated to mpfr.
Comment 2 Mikael Urankar freebsd_committer 2016-04-22 09:04:58 UTC
Created attachment 169555 [details]
qemu-sbruno patch

The bug is in emulators/qemu-sbruno, the attached patch works for me, can you give it a shot (you need to apply it on emulators/qemu-sbruno and build emulators/qemu-user-static)? Don't forget to update qemu-arm-static in your poudrière jails:

zfs destroy tank/poudriere/jails/101armv6@clean
cp -f work/stage/usr/local/bin/qemu-arm-static /usr/local/poudriere/jails/101armv6/usr/local/bin/qemu-arm-static
zfs snapshot tank/poudriere/jails/101armv6@clean

I will send a pull request to sbruno@ if it's ok for you
Comment 3 otacilio.neto 2016-04-22 14:50:24 UTC
The patch works for me also, except by the fact that I have to inform the file to patch (bsd-user/bsd-file.h). After inform the path, reinstall, etc  and run poudriere math/mpfr compiles again.

Comment 4 Mikael Urankar freebsd_committer 2016-04-22 17:30:02 UTC
Thanks for testing.
I've sent a pull request
Comment 5 commit-hook freebsd_committer 2016-04-25 15:38:26 UTC
A commit references this bug:

Author: sbruno
Date: Mon Apr 25 15:38:14 UTC 2016
New revision: 414009
URL: https://svnweb.freebsd.org/changeset/ports/414009

  Fix arguments for renameat() to resolve issues with building certain

  PR:	208952
  Submitted by:	Mikael Urankar <mikhael.urankar@gmail.com>

Comment 6 commit-hook freebsd_committer 2016-04-28 21:01:51 UTC
A commit references this bug:

Author: sbruno
Date: Thu Apr 28 21:01:45 UTC 2016
New revision: 414239
URL: https://svnweb.freebsd.org/changeset/ports/414239

  Update qemu-sbruno to track upstream at version 2.5.93.

  Fix aarch64 bsd-user by aligning the stack properly.  (andy turner).

  Fix bsd-user syscall implementation of renameat.  (mikael urankar).

  Fix bsd-user log_file argument handling now that handling of NULL isn't
  being done by the called functions.

  PR:		208952