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
URL:
Keywords:
Depends on:
Blocks:
 
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)


Attachments
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

Stop.
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 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.

Thanks!
Comment 4 mikael.urankar 2016-04-22 17:30:02 UTC
Thanks for testing.
I've sent a pull request
https://github.com/seanbruno/qemu-bsd-user/pull/20
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

Log:
  Fix arguments for renameat() to resolve issues with building certain
  ports.

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

Changes:
  head/emulators/qemu-sbruno/Makefile
  head/emulators/qemu-sbruno/distinfo
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

Log:
  Update qemu-sbruno to track upstream at version 2.5.93.

  Fix aarch64 bsd-user by aligning the stack properly.  (andy turner).
  https://github.com/seanbruno/qemu-bsd-user/commit/743fbfffc13f5717a8611e7a128c39dd9e3495d7

  Fix bsd-user syscall implementation of renameat.  (mikael urankar).
  https://github.com/seanbruno/qemu-bsd-user/pull/20/commits/aa90a1b960f96738ae80778ac13b95508b83842a

  Fix bsd-user log_file argument handling now that handling of NULL isn't
  being done by the called functions.
  https://github.com/seanbruno/qemu-bsd-user/commit/e3d069e8b149b7a1027837cce81b9fe68de85bf1

  PR:		208952

Changes:
  head/emulators/qemu-sbruno/Makefile
  head/emulators/qemu-sbruno/distinfo
  head/emulators/qemu-sbruno/pkg-plist