Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 May 2022 23:52:23 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 264195] [cross] Cross-building from macOS improvements for newversh.sh and SDK identification
Message-ID:  <bug-264195-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D264195

            Bug ID: 264195
           Summary: [cross] Cross-building from macOS improvements for
                    newversh.sh and SDK identification
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: misc
          Assignee: bugs@FreeBSD.org
          Reporter: shantonusen@me.com

Created attachment 234167
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D234167&action=
=3Dedit
macOS cross build improvements

I'm trying to follow the directions at
<https://wiki.freebsd.org/BuildingOnNonFreeBSD>;

With

$ MAKEOBJDIRPREFIX=3D$HOME/Documents/freebsd/obj tools/build/make.py --debug
TARGET=3Damd64  TARGET_ARCH=3Damd64  --bootstrap-toolchain buildworld

On my particular setup, I noticed two things:

/Users/shantonu/Documents/freebsd/src/sys/conf/newvers.sh: line 138: return:
can only `return' from a function or sourced script
/Applications/Xcode.app/Contents/Developer/usr/bin/make: invalid option -- V
Usage: make [options] [target] ...
Options:
...
bmake[2]: "/Users/shantonu/Documents/freebsd/src/tools/build/Makefile" line=
 37:
You must install the macOS SDK (try xcode-select --install)

bmake[2]: stopped in /Users/shantonu/Documents/freebsd/src/tools/build
*** Error code 1


The first issue looks like non-POSIX shell usage which adds a bunch of nois=
e at
the top of the build log. The second issue might be a me-specific issue that
can be improved  through the use of "xcrun -sdk macosx -show-sdk-path" to f=
ind
the macOS SDK, instead of having to hardcode paths for the command-line too=
ls
install vs. Xcode from the Mac App Store.

I've attached a diff that fixes both these issues.

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-264195-227>