Bug 244439 - devel/llvm* makes wrong assumption that LOCALBASE/llvm and LOCALBASE/bin must reside on same file system
Summary: devel/llvm* makes wrong assumption that LOCALBASE/llvm and LOCALBASE/bin must...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Brooks Davis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-26 19:30 UTC by Eugene Grosbein
Modified: 2021-09-27 22:28 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Grosbein freebsd_committer freebsd_triage 2020-02-26 19:30:00 UTC
Hi!

Suppose we need to install very big port like llvm80 (about 800MB) as dependency for something like samba410 to the system that has no enought space inside /usr/local file system but has plenty of free space at another UFS file system, so we create symlink /usr/local/llvm80 -> /data/llvm80 before installing. Also, we define WRKDIRPREFIX pointing to /data/tmp.

The port builds and stages just fine but installation fails:

===>   Registering installation for llvm80-8.0.1_3 as automatic
Installing llvm80-8.0.1_3...
pkg-static: Fail to create hardlink: /usr/local/llvm80/bin/.pkgtemp.FileCheck.S4KfobBEtZNB:Cross-device link
*** Error code 70

Stop.
make[5]: stopped in /usr/ports/devel/llvm80
*** Error code 1

It should not fail.
Comment 1 Baptiste Daroussin freebsd_committer freebsd_triage 2020-10-01 04:06:24 UTC
This bug should imho be addressed to llvm maintainers and not to pkg as pkg install what it has been asked to installed here a hardlink.

For this situation to be supported, it needs to be a symlink

I fail to see what pkg can/should do here.
That said, I can be convinced otherwise
Comment 2 Eugene Grosbein freebsd_committer freebsd_triage 2020-10-01 06:45:36 UTC
I don't see anything in this port insisting on creation of hardlinks, please elaborate.
Comment 3 Baptiste Daroussin freebsd_committer freebsd_triage 2021-08-18 09:47:48 UTC
in the package bin/FileCheckWW is a hardlink to llvmXX/bin/FileCheck

hence it cannot work in your situation
Comment 4 Baptiste Daroussin freebsd_committer freebsd_triage 2021-08-18 09:48:18 UTC
over to llvm maintainer
Comment 5 Eugene Grosbein freebsd_committer freebsd_triage 2021-08-18 10:15:13 UTC
(In reply to Baptiste Daroussin from comment #4)

Thank you, now I see it.
Comment 6 Brooks Davis freebsd_committer freebsd_triage 2021-08-18 21:39:44 UTC
Good news: it's an easy fix

Bad news: everyone gets to rebuild all the LLVMs
Comment 7 commit-hook freebsd_committer freebsd_triage 2021-08-18 22:18:06 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c71f5b34dc5ac3b38acf9256b560ad3dfb46a3fb

commit c71f5b34dc5ac3b38acf9256b560ad3dfb46a3fb
Author:     Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2021-08-18 22:14:35 +0000
Commit:     Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2021-08-18 22:15:30 +0000

    devel/llvm-devel: new snapshot post 13 branch

    Update to a new snapshot after the branch point for the 13.0.0 release.

    This snapshot includes a new scanbuild written in python.  I've not
    tested it and it likely requires further refinement.

    Allow LOCALBASE/llvm-devel and LOCALBASE/bin to be on different file
    systems. [0]

    PR:             244439 [0]
    Reported by:    eugen [0]
    Sponsored by:   DARPA

 devel/llvm-devel/Makefile                       |  20 +-
 devel/llvm-devel/Makefile.COMMANDS              |   8 +-
 devel/llvm-devel/Makefile.snapshot              |   6 +-
 devel/llvm-devel/distinfo                       |   6 +-
 devel/llvm-devel/files/gen-Makefile.snapshot.sh |   2 +-
 devel/llvm-devel/pkg-plist                      | 240 ++++++++++++++++++------
 6 files changed, 213 insertions(+), 69 deletions(-)
Comment 8 commit-hook freebsd_committer freebsd_triage 2021-08-24 17:45:43 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=088b99d471a50a5cf041fa18a8cd21a63ed98ebf

commit 088b99d471a50a5cf041fa18a8cd21a63ed98ebf
Author:     Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2021-08-24 17:44:55 +0000
Commit:     Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2021-08-24 17:44:55 +0000

    devel/llvm-devel: fix build without OPENMP

    Some files were not correctly tagged as being part of the OpenMP
    build.[0]

    Fix symlinks to lit and FileCheck.  They improperly included
    STAGEDIR.[1]

    PR:             257947 [0], 244439 [1]
    Sponsored by:   DARPA

 devel/llvm-devel/Makefile          | 32 +++++++++++++++++---------------
 devel/llvm-devel/Makefile.COMMANDS |  4 +++-
 devel/llvm-devel/pkg-plist         |  6 +++---
 3 files changed, 23 insertions(+), 19 deletions(-)
Comment 9 commit-hook freebsd_committer freebsd_triage 2021-09-23 23:42:13 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=150e5ca73f3ea7c84c9eabece43ec5315233f3d9

commit 150e5ca73f3ea7c84c9eabece43ec5315233f3d9
Author:     Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2021-09-23 23:39:45 +0000
Commit:     Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2021-09-23 23:39:45 +0000

    devel/llvm13: update to RC3

    Fix the link to FileCheck

    PR:             244439
    Sponsored by:   DARPA

 devel/llvm13/Makefile                              |   6 +-
 devel/llvm13/distinfo                              |   6 +-
 .../files/patch-lld-be-compressed-debug (gone)     | 154 ---------------------
 ...omptarget_plugins_amdgpu_impl_system.cpp (gone) |  18 ---
 4 files changed, 6 insertions(+), 178 deletions(-)
Comment 10 commit-hook freebsd_committer freebsd_triage 2021-09-27 22:25:08 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=6911dd4091d50c0ea29a40e2366f38db0f775c37

commit 6911dd4091d50c0ea29a40e2366f38db0f775c37
Author:     Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2021-09-27 22:23:57 +0000
Commit:     Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2021-09-27 22:23:57 +0000

    devel/llvm*: avoid crossdir links

    Avoid hardlinks between PREFIX/bin and PREFIX/llvm##.  This permits
    them be on different filesystems.

    PR:             244439

 devel/llvm10/Makefile | 19 ++++++++++---------
 devel/llvm11/Makefile | 21 +++++++++++----------
 devel/llvm12/Makefile | 21 +++++++++++----------
 devel/llvm70/Makefile | 17 +++++++++--------
 devel/llvm80/Makefile | 19 ++++++++++---------
 devel/llvm90/Makefile | 17 +++++++++--------
 6 files changed, 60 insertions(+), 54 deletions(-)
Comment 11 Brooks Davis freebsd_committer freebsd_triage 2021-09-27 22:28:14 UTC
All llvm ports have now been fixed. I don't currently plan to MFH as 2021Q4 is coming in a few days.