Bug 246676 - security/nss: fails to cross-build for armv7 using native-xtools
Summary: security/nss: fails to cross-build for armv7 using native-xtools
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: freebsd-gecko (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-23 13:27 UTC by Felix Palmen
Modified: 2020-05-30 00:32 UTC (History)
1 user (show)

See Also:
jbeich: maintainer-feedback+
jbeich: merge-quarterly+


Attachments
fix the build with native-xtools (533 bytes, patch)
2020-05-23 13:27 UTC, Felix Palmen
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Palmen freebsd_committer freebsd_triage 2020-05-23 13:27:56 UTC
Created attachment 214780 [details]
fix the build with native-xtools

When using native-xtools, cross-building the port fails for libraries not found:

ld: error: unable to find library -lplc4
ld: error: unable to find library -lplds4
ld: error: unable to find library -lnspr4

full log: http://home.palmen-it.de/testbuilder/data/13xarm7-default/2020-05-22_17h47m36s/logs/errors/nss-3.52.1.log

The port sets LIBRARY_PATH, and the linker seems to look there for libraries automatically, but the one from native-xtools doesn't. Thanks to RhodiumToad @#freebsd-ports for helping to analyze this!

The fix is to replace this with NSPR_LIB_DIR, which causes the build system to add an explicit -L flag, see attached patch.

A few test builds with the change applied:

11.3/i386: http://home.palmen-it.de/testbuilder/data/113i-default/2020-05-23_12h05m07s/logs/nss-3.52.1.log
13/amd64: http://home.palmen-it.de/testbuilder/data/13a-default/2020-05-23_12h01m03s/logs/nss-3.52.1.log
13/armv7-cross: http://home.palmen-it.de/testbuilder/data/13xarm7-default/2020-05-23_15h11m50s/logs/nss-3.52.1.log
Comment 1 commit-hook freebsd_committer freebsd_triage 2020-05-30 00:29:47 UTC
A commit references this bug:

Author: jbeich
Date: Sat May 30 00:29:35 UTC 2020
New revision: 537018
URL: https://svnweb.freebsd.org/changeset/ports/537018

Log:
  security/nss: unbreak cross builds on -CURRENT

  ld: error: unable to find library -lplc4
  ld: error: unable to find library -lplds4
  ld: error: unable to find library -lnspr4

  PR:		246676
  Submitted by:	Felix Palmen <felix@palmen-it.de>

Changes:
  head/security/nss/Makefile
Comment 2 commit-hook freebsd_committer freebsd_triage 2020-05-30 00:30:50 UTC
A commit references this bug:

Author: jbeich
Date: Sat May 30 00:30:00 UTC 2020
New revision: 537019
URL: https://svnweb.freebsd.org/changeset/ports/537019

Log:
  MFH: r537018

  security/nss: unbreak cross builds on -CURRENT

  ld: error: unable to find library -lplc4
  ld: error: unable to find library -lplds4
  ld: error: unable to find library -lnspr4

  PR:		246676
  Submitted by:	Felix Palmen <felix@palmen-it.de>
  Approved by:	ports-secteam blanket

Changes:
_U  branches/2020Q2/
  branches/2020Q2/security/nss/Makefile