Bug 270959 - net-mgmt/netdata: fails to build when base built WITH_LLVM_BINUTILS
Summary: net-mgmt/netdata: fails to build when base built WITH_LLVM_BINUTILS
Status: Closed Not A Bug
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Ed Maste
URL:
Keywords:
Depends on:
Blocks: 258872
  Show dependency treegraph
 
Reported: 2023-04-20 18:13 UTC by Ed Maste
Modified: 2023-04-27 18:21 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Maste freebsd_committer freebsd_triage 2023-04-20 18:13:35 UTC
From exp-run PR 258872

https://pkg-status.freebsd.org/gohan05/data/mainamd64PR258872-default/2023-04-17_22h40m57s/logs/errors/netdata-1.38.1.log

=======================<phase: configure      >============================
===>  Missing "llvm-ranlib" to create a binary alias at "/wrkdirs/usr/ports/net-mgmt/netdata/work/.bin/ranlib"
*** Error code 1

llvm-ranlib should exist, and it appears this is configure failing to find it for some reason. See also PR270955 for a broadly similar issue (but CMake in that case).
Comment 1 Namkhai B. 2023-04-20 18:52:49 UTC
This is due to the Makefile using `BINARY_ALIAS=ar=llvm-ar ranlib=llvm-ranlib`, so it would seem it's actually a FreeBSD ports build system issue?
Comment 2 Ed Maste freebsd_committer freebsd_triage 2023-04-21 16:31:28 UTC
(In reply to Namkhai B. from comment #1)
It looks like it's actually a base system bug, see PR270955. I've grabbed this PR and will close once I've confirmed the fix.
Comment 3 commit-hook freebsd_committer freebsd_triage 2023-04-21 16:52:04 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=41df1d60e3237df2106dddf357e3205bf29f85d5

commit 41df1d60e3237df2106dddf357e3205bf29f85d5
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2023-04-21 13:11:45 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2023-04-21 16:49:05 +0000

    llvm: fix some llvm-* tool links when WITH_LLVM_BINUTILS is set

    A few Makefiles overrode LINKS and MLINKS when WITH_LLVM_BINUTILS was
    set, which caused some llvm- prefixed tools to disappear.  One such case
    was llvm-ranlib, which some ports invoke explicitly.

    Use += when adding to LINKS and MLINKS under WITH_LLVM_BINUTILS.

    PR:             270955, 270956, 270959
    Submitted by:   jbeich
    Reviewed by:    arichardson
    Fixes: 021385aba562 ("Add WITH_LLVM_BINUTILS to install LLVM binuti...")
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D39747

 usr.bin/clang/llvm-ar/Makefile         | 4 ++--
 usr.bin/clang/llvm-nm/Makefile         | 4 ++--
 usr.bin/clang/llvm-size/Makefile       | 4 ++--
 usr.bin/clang/llvm-symbolizer/Makefile | 4 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)
Comment 4 Ed Maste freebsd_committer freebsd_triage 2023-04-21 16:52:43 UTC
Apologies for the false alarm, this was indeed caused by the missing llvm-ranlib link and I've confirmed that net-mgmt/netdata builds on my test machine WITH_LLVM_BINUTILS enabled.
Comment 5 commit-hook freebsd_committer freebsd_triage 2023-04-27 18:21:05 UTC
A commit in branch stable/13 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=3b63f0b7067129ec7a75b9324acf4ded30d8fc44

commit 3b63f0b7067129ec7a75b9324acf4ded30d8fc44
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2023-04-21 13:11:45 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2023-04-27 17:03:26 +0000

    llvm: fix some llvm-* tool links when WITH_LLVM_BINUTILS is set

    A few Makefiles overrode LINKS and MLINKS when WITH_LLVM_BINUTILS was
    set, which caused some llvm- prefixed tools to disappear.  One such case
    was llvm-ranlib, which some ports invoke explicitly.

    Use += when adding to LINKS and MLINKS under WITH_LLVM_BINUTILS.

    PR:             270955, 270956, 270959
    Submitted by:   jbeich
    Reviewed by:    arichardson
    Fixes: 021385aba562 ("Add WITH_LLVM_BINUTILS to install LLVM binuti...")
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D39747

    (cherry picked from commit 41df1d60e3237df2106dddf357e3205bf29f85d5)

 usr.bin/clang/llvm-ar/Makefile         | 4 ++--
 usr.bin/clang/llvm-nm/Makefile         | 4 ++--
 usr.bin/clang/llvm-size/Makefile       | 4 ++--
 usr.bin/clang/llvm-symbolizer/Makefile | 4 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)