Bug 203353 - devel/nspr: Needs arm64 support
Summary: devel/nspr: Needs arm64 support
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm64 Any
: --- Affects Only Me
Assignee: Andrew Turner
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2015-09-25 20:14 UTC by Ed Maste
Modified: 2016-02-03 12:29 UTC (History)
2 users (show)

See Also:
koobs: maintainer-feedback+


Attachments
Patch to build on arm64 (4.42 KB, patch)
2015-11-04 12:49 UTC, Andrew Turner
jbeich: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Maste freebsd_committer freebsd_triage 2015-09-25 20:14:04 UTC
The build fails with a #error "Unknown CPU architecture"
http://dirty.ysv.freebsd.org/data/11aarch64-default/2015-09-08_16h44m01s/logs/errors/nspr-4.10.9.log

gmake[4]: Entering directory '/wrkdirs/usr/ports/devel/nspr/work/nspr-4.10.9/nspr/build/pr/src/io'
/nxb-bin/usr/bin/cc -o prfdcach.o -c -fvisibility=hidden    -O2 -pipe  -fno-strict-aliasing  -ansi -Wall -fPIC  -UDEBUG -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DNDEBUG=1 -DHAVE_VISIBILITY_HIDDEN_ATTRIBUTE=1 -DHAVE_VISIBILITY_PRAGMA=1 -DXP_UNIX=1 -DFREEBSD=1 -DHAVE_BSD_FLOCK=1 -DHAVE_SOCKLEN_T=1 -DHAVE_DLADDR=1 -DHAVE_LCHOWN=1 -DHAVE_SETPRIORITY=1 -DHAVE_STRERROR=1 -DHAVE_SYSCALL=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DFORCE_PR_LOG -D_PR_PTHREADS -UHAVE_CVAR_BUILT_ON_SEM -D_NSPR_BUILD_ -I../../../dist/include/nspr -I/wrkdirs/usr/ports/devel/nspr/work/nspr-4.10.9/nspr/pr/include -I/wrkdirs/usr/ports/devel/nspr/work/nspr-4.10.9/nspr/pr/include/private  /wrkdirs/usr/ports/devel/nspr/work/nspr-4.10.9/nspr/pr/src/io/prfdcach.c
In file included from /wrkdirs/usr/ports/devel/nspr/work/nspr-4.10.9/nspr/pr/src/io/prfdcach.c:6:
In file included from /wrkdirs/usr/ports/devel/nspr/work/nspr-4.10.9/nspr/pr/include/private/primpl.h:39:
In file included from ../../../dist/include/nspr/nspr.h:9:
In file included from ../../../dist/include/nspr/pratom.h:14:
In file included from ../../../dist/include/nspr/prtypes.h:26:
../../../dist/include/nspr/prcpucfg.h:499:2: error: "Unknown CPU architecture"
#error "Unknown CPU architecture"
Comment 1 Andrew Turner freebsd_committer freebsd_triage 2015-11-04 12:49:36 UTC
Created attachment 162769 [details]
Patch to build on arm64

The attached patch, based on https://bugzilla.mozilla.org/show_bug.cgi?id=827271. lets me build nspr.
Comment 2 Andrew Turner freebsd_committer freebsd_triage 2015-11-19 15:22:42 UTC
Are there any issues with this patch? I'd like to commit it to allow us to build more ports on arm64.
Comment 3 Jan Beich freebsd_committer freebsd_triage 2015-11-20 01:57:14 UTC
Comment on attachment 162769 [details]
Patch to build on arm64

Looks good as long as you avoid touching a patch submitted upstream. |make makepatch| even with ports r401709 currently cannot handle ../ in paths, so use a plain editor (see diffutils unified format).
Comment 4 Andrew Turner freebsd_committer freebsd_triage 2015-11-20 14:30:44 UTC
(In reply to Jan Beich from comment #3)
I don't understand this comment.
Comment 5 Jan Beich freebsd_committer freebsd_triage 2015-11-21 04:41:40 UTC
Comment on attachment 162769 [details]
Patch to build on arm64

>Index: devel/nspr/files/patch-bug782109
>===================================================================
>--- devel/nspr/files/patch-bug782109	(revision 400734)
>+++ devel/nspr/files/patch-bug782109	(working copy)
>@@ -1,20 +1,3 @@
>---- ../pr/include/md/_freebsd.h~
>-+++ ../pr/include/md/_freebsd.h
>-@@ -47,6 +47,14 @@
>- #define _PR_HAVE_LARGE_OFF_T
>- 
>- #if defined(_PR_PTHREADS)
>-+#if __FreeBSD_version >= 602000
>-+#define _PR_HAVE_GETPROTO_R
>-+#define _PR_HAVE_5_ARG_GETPROTO_R
>-+#endif
>-+#if __FreeBSD_version >= 700016
>-+#define _PR_HAVE_GETHOST_R
>-+#define _PR_HAVE_GETHOST_R_INT
>-+#endif
>- #if __FreeBSD_version >= 400008
>- /*
>-  * libc_r before this version of FreeBSD doesn't have poll().

This change is unrelated to aarch64. Remove.

>Index: devel/nspr/files/patch-pr-include-md-freebsd.h
>===================================================================
>--- devel/nspr/files/patch-pr-include-md-freebsd.h	(nonexistent)
>+++ devel/nspr/files/patch-pr-include-md-freebsd.h	(working copy)
>@@ -0,0 +1,26 @@
>+--- ../pr/include/md/_freebsd.h.orig	2015-08-19 15:32:22.000000000 +0000
>++++ ../pr/include/md/_freebsd.h	2015-11-04 11:38:01.257876000 +0000
[...]
>+@@ -57,6 +59,14 @@
>+ #define _PR_HAVE_LARGE_OFF_T
>+ 
>+ #if defined(_PR_PTHREADS)
>++#if __FreeBSD_version >= 602000
>++#define _PR_HAVE_GETPROTO_R
>++#define _PR_HAVE_5_ARG_GETPROTO_R
>++#endif
>++#if __FreeBSD_version >= 700016
>++#define _PR_HAVE_GETHOST_R
>++#define _PR_HAVE_GETHOST_R_INT
>++#endif
>+ #if __FreeBSD_version >= 400008
>+ /*
>+  * libc_r before this version of FreeBSD doesn't have poll().

This change is unrelated to aarch64. Remove.
Comment 6 commit-hook freebsd_committer freebsd_triage 2015-11-22 10:26:35 UTC
A commit references this bug:

Author: andrew
Date: Sun Nov 22 10:26:23 UTC 2015
New revision: 402224
URL: https://svnweb.freebsd.org/changeset/ports/402224

Log:
  devel/nspr: Add support for arm64.

  PR:		203353
  Approved by:	jbeich

Changes:
  head/devel/nspr/files/patch-pr-include-md-freebsd.cfg
  head/devel/nspr/files/patch-pr-include-md-freebsd.h
Comment 7 Ed Maste freebsd_committer freebsd_triage 2015-11-27 19:52:22 UTC
Is anything further required by this PR?
Comment 8 Ed Maste freebsd_committer freebsd_triage 2015-12-21 21:26:18 UTC
In discussion with andrew@ from our (arm64) perspective there's no need for this bug to remain open. The maintainer may want to merge to the quarterly branch (if it helps future merges, for example).
Comment 9 Jan Beich freebsd_committer freebsd_triage 2016-02-03 00:33:57 UTC
(In reply to Ed Maste from comment #7)
Closing bugs is usually done by whoever lands or the reporter.

(In reply to Ed Maste from comment #8)
> may want to merge to the quarterly branch

pkg-fallout@ only builds -quaterly packages for Tier1 platforms.
Comment 10 Kubilay Kocak freebsd_committer freebsd_triage 2016-02-03 05:12:18 UTC
Assign to Committer that resolved
Comment 11 Kubilay Kocak freebsd_committer freebsd_triage 2016-02-03 12:29:20 UTC
Was supposed to keep maintainer (gecko) cc'd, not gnome@