Bug 233650 - www/node: fix on powerpc64
Summary: www/node: fix on powerpc64
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: Bradley T. Hughes
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-29 23:58 UTC by Piotr Kubaj
Modified: 2019-03-14 17:29 UTC (History)
2 users (show)

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


Attachments
patch (2.05 KB, patch)
2018-11-29 23:58 UTC, Piotr Kubaj
no flags Details | Diff
v2 (1.54 KB, patch)
2018-12-06 15:21 UTC, Piotr Kubaj
no flags Details | Diff
v3 (2.35 KB, patch)
2019-01-25 21:14 UTC, Piotr Kubaj
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Kubaj freebsd_committer 2018-11-29 23:58:59 UTC
Created attachment 199677 [details]
patch

There are two issues with this port on powerpc64:
1. DTRACE is enabled by default, but it doesn't work on powerpc64,
2. GCC7 from ports is used, but links to base libstdc++.

Tested on power64 and amd64.

Hardware sponsored by IntegriCloud.
Comment 1 Piotr Kubaj freebsd_committer 2018-12-06 15:21:12 UTC
Created attachment 199898 [details]
v2

Replace COMPILER_TYPE with CHOSEN_COMPILER_TYPE.
Comment 2 Piotr Kubaj freebsd_committer 2019-01-25 21:14:40 UTC
Created attachment 201400 [details]
v3

Add --openssl-no-asm only when BUNDLED_SSL is selected.
Comment 3 Piotr Kubaj freebsd_committer 2019-02-12 11:08:37 UTC
I can see my Makefile changes were partially committed, but extra-patch-common.gypi wasn't. Do you want me to modify my patch?
Comment 4 Bradley T. Hughes freebsd_committer 2019-02-18 05:30:16 UTC
Hi Piotr,

I have been wondering if it would be possible to add the extra linker options for PowerPC using MAKE_ENV+=LDFLAGS.target="-Wl,..." instead of adding an extra patch? If I cooked up an alternative patch, could you give it a try to see if it works for you?
Comment 5 Piotr Kubaj freebsd_committer 2019-02-18 06:16:32 UTC
(In reply to Bradley T. Hughes from comment #4)
Sure, I can try it.
Comment 6 Bradley T. Hughes freebsd_committer 2019-02-19 19:18:30 UTC
I uploaded the patch to Phabricator: https://reviews.freebsd.org/D19250
Comment 7 commit-hook freebsd_committer 2019-03-12 21:06:35 UTC
A commit references this bug:

Author: bhughes
Date: Tue Mar 12 21:05:40 UTC 2019
New revision: 495525
URL: https://svnweb.freebsd.org/changeset/ports/495525

Log:
  www/node: set environment variables for host build

  The Node.js build system supports cross-compilation via node-gyp, which
  picks up CC, CXX, LINK, C*FLAGS, and LDFLAGS from the environment for the
  target build, but not for the host. We need to set the environment variables
  for the "host" build.

  This unbreaks the build on powerpc64.

  PR:		233650
  Reported by:	Piotr Kubaj <pkubaj@anongoth.pl>
  Sponsored by:	Miles AS
  Differential Revision:	https://reviews.freebsd.org/D19250

Changes:
  head/www/node/Makefile
Comment 8 Bradley T. Hughes freebsd_committer 2019-03-12 21:10:07 UTC
I've committed the change. Thanks for the report :)
Comment 9 commit-hook freebsd_committer 2019-03-14 17:29:14 UTC
A commit references this bug:

Author: feld
Date: Thu Mar 14 17:28:12 UTC 2019
New revision: 495723
URL: https://svnweb.freebsd.org/changeset/ports/495723

Log:
  MFH: r494851 r495525

  www/node: Update 11.10.1 -> 11.11.0

  https://nodejs.org/en/blog/release/v11.11.0/

  Sponsored by:	Miles AS

  www/node: set environment variables for host build

  The Node.js build system supports cross-compilation via node-gyp, which
  picks up CC, CXX, LINK, C*FLAGS, and LDFLAGS from the environment for the
  target build, but not for the host. We need to set the environment variables
  for the "host" build.

  This unbreaks the build on powerpc64.

  PR:		233650
  Reported by:	Piotr Kubaj <pkubaj@anongoth.pl>
  Sponsored by:	Miles AS
  Differential Revision:	https://reviews.freebsd.org/D19250

Changes:
_U  branches/2019Q1/
  branches/2019Q1/www/node/Makefile
  branches/2019Q1/www/node/distinfo