[Bug 279199] cross-compile installworld fails attempting to copy vdso library

2024-05-21 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=279199

Bug ID: 279199
   Summary: cross-compile installworld fails attempting to copy
vdso library
   Product: Base System
   Version: 14.0-RELEASE
  Hardware: amd64
OS: Any
Status: New
  Severity: Affects Some People
  Priority: ---
 Component: bin
  Assignee: b...@freebsd.org
  Reporter: marksh...@aol.com
 Attachment #250855 text/plain
 mime type:

Created attachment 250855
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=250855&action=edit
console output from make installworld

Cross compiling on amd64 for powerpc64.  buildworld and buildkernel run fine.

installworld fails attempting to copy non-existent vdso library.

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 279199] cross-compile installworld fails attempting to copy vdso library

2024-05-21 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=279199

Brooks Davis  changed:

   What|Removed |Added

 CC||bro...@freebsd.org

--- Comment #1 from Brooks Davis  ---
What source version are you building?  This should have been fixed long ago
(the fixes were in the stable/14 when it was branched and MFC'd to stable/13). 
If you need to merge them to a local branch, here are the changes:

commit b3b462229f972e2ed24d450d7d2f8855cdd58a87
Author: Ed Maste 
Date:   Fri Apr 1 09:58:47 2022 -0400

installworld: handle ldd including preloaded objects

The installworld target makes a temporary copy of binaries to be used
during the install.  Libraries that they depend on are also included,
found by using `ldd`.

After commit 0913953c9ed0 ldd started listing preloaded objects,
including [vdso], under a [preloaded] header.  Skip ldd output that is
enclosed in square brackets.

Reviewed by:cy, kib [earlier version]
MFC after:  3 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D34734

and then I rewrote it to be zsh friendly with:

commit bda5d2a45c8dcc9bbeb71cddeef930ffa6a47f23
Author: Brooks Davis 
Date:   Fri Jul 1 08:33:16 2022 +0100

installworld: improve portability of ldd use

b3b462229f97 added a case statement to ignore lines containing strings
in square brackets such as "[vdso]" and "[preloaded]". On MacOS
Monterey where /bin/sh may be zsh, this fails with:

/bin/sh: -c: line 0: syntax error near unexpected token `;;'

Invoke grep in the pipeline to remove such lines instead.

Reviewed by:emaste
Sponsored by:   DARPA, AFRL
Differential Revision:  https://reviews.freebsd.org/D35618

diff --git a/Makefile.inc1 b/Makefile.inc1
index 20c537512273..12bb892dfd58 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -1368,12 +1368,8 @@ distributeworld installworld stageworld:
_installcheck_world .PHONY
fi; \
done); \
if [ -z "${CROSSBUILD_HOST}" ] ; then \
-   libs=$$(ldd -f "%o %p\n" -f "%o %p\n" $$progs 2>/dev/null |
sort -u | \
+   libs=$$(ldd -f "%o %p\n" -f "%o %p\n" $$progs 2>/dev/null |
sort -u | grep -Ev '\[.*]' | \
while read line; do \
-   case $$line in \
-   "["*"]") \
-   continue;; \
-   esac; \
set -- $$line; \
if [ "$$2 $$3" != "not found" ]; then \
echo $$2; \

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 279199] cross-compile installworld fails attempting to copy vdso library

2024-05-21 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=279199

--- Comment #2 from Mark Shank  ---
(In reply to Brooks Davis from comment #1)

I had checked out releng/13.0 in order to track down an issue for bug #271826
comment#20

Thank you for the quick response and the patch.

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 279199] cross-compile installworld fails attempting to copy vdso library

2024-05-21 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=279199

Brooks Davis  changed:

   What|Removed |Added

 Resolution|--- |Works As Intended
 Status|New |Closed

--- Comment #3 from Brooks Davis  ---
It's a little unfortunate that we can't cross build release/13.0 on 14.0
without patches, but ultimately there isn't much we can do.  I don't think it
would generally make sense to merge the changes back to old release branches.

-- 
You are receiving this mail because:
You are the assignee for the bug.