Skip to content

bootstrapping on mac m1 #93

Description

@smurfd

im trying to bootstrap (after installing the binary https://pkgsrc.joyent.com/install-on-osx/, i wanted the whole source tree to build stuff).

Running : sudo ./bootstrap --prefix /opt/pkgsrc --prefer-pkgsrc yes --make-jobs 4 will end like this (exchanged the actual path with $HOME so its like /Users/user/...):

--- main.o ---
cc -isystem /usr/include -DHAVE_CONFIG_H -I$HOME/pkgsrc/bootstrap/work/libnbcompat -I$HOME/pkgsrc/bootstrap/work/libarchive/libarchive -I. -I. -I../lib -DBOOTSTRAP -g -O2 -c main.c
--- perform.o ---
cc -isystem /usr/include -DHAVE_CONFIG_H -I$HOME/pkgsrc/bootstrap/work/libnbcompat -I$HOME/pkgsrc/bootstrap/work/libarchive/libarchive -I. -I. -I../lib -DBOOTSTRAP -g -O2 -c perform.c
--- show.o ---
cc -isystem /usr/include -DHAVE_CONFIG_H -I$HOME/pkgsrc/bootstrap/work/libnbcompat -I$HOME/pkgsrc/bootstrap/work/libarchive/libarchive -I. -I. -I../lib -DBOOTSTRAP -g -O2 -c show.c
--- pkg_info ---
cc -isystem /usr/include -L$HOME/pkgsrc/bootstrap/work/libnbcompat -L../lib -o pkg_info main.o perform.o show.o -linstall  -lnbcompat
===> running: /bin/sh $HOME/pkgsrc/bootstrap/work/bin/install-sh -c -o root -g wheel -m 755 $HOME/pkgsrc/bootstrap/work/pkg_install/add/pkg_add $HOME/pkgsrc/bootstrap/work/sbin/pkg_add
===> running: /bin/sh $HOME/pkgsrc/bootstrap/work/bin/install-sh -c -o root -g wheel -m 755 $HOME/pkgsrc/bootstrap/work/pkg_install/admin/pkg_admin $HOME/pkgsrc/bootstrap/work/sbin/pkg_admin
===> running: /bin/sh $HOME/pkgsrc/bootstrap/work/bin/install-sh -c -o root -g wheel -m 755 $HOME/pkgsrc/bootstrap/work/pkg_install/create/pkg_create $HOME/pkgsrc/bootstrap/work/sbin/pkg_create
===> running: /bin/sh $HOME/pkgsrc/bootstrap/work/bin/install-sh -c -o root -g wheel -m 755 $HOME/pkgsrc/bootstrap/work/pkg_install/info/pkg_info $HOME/pkgsrc/bootstrap/work/sbin/pkg_info
===> running: (cd $HOME/pkgsrc/pkgtools/cwrappers && $HOME/pkgsrc/bootstrap/work/bin/bmake  MAKE_JOBS=4 PKG_COMPRESSION=none PKGSRC_KEEP_BIN_PKGS=no MAKECONF=$HOME/pkgsrc/bootstrap/work/mk.conf install)
ERROR: This package has set PKG_FAIL_REASON:
ERROR: No suitable Xcode SDK or Command Line Tools installed.
*** Error code 1

Stop.
bmake: stopped in $HOME/pkgsrc/pkgtools/cwrappers
===> exited with status 1
pkgsrc/bootstrap} uname -a
Darwin HOST 20.6.0 Darwin Kernel Version 20.6.0: Mon Aug 30 06:12:20 PDT 2021; root:xnu-7195.141.6~3/RELEASE_ARM64_T8101 arm64

pkgsrc/bootstrap} xcode-select -v                                                     
xcode-select version 2384.
pkgsrc/bootstrap} xcodebuild -showsdks                                                
macOS SDKs:
	macOS 12.0                    	-sdk macosx12.0

AFAIK the latest Xcode Beta should be enough. Do you need to run Beta macOS aswell?
Have not really dug into things thought i might ask to see if someone else had run into this problem?

thanks in advance

Activity

  1. jperkin commented on Sep 15, 2021

    @jperkin
    Collaborator

    We don't currently support ad-hoc installations of XCode, we look for specific SDKs depending on the OS. The code that does that is here:

    https://github.com/NetBSD/pkgsrc/blob/trunk/mk/platform/Darwin.mk#L100-L130

    What you can do is set your own OSX_SDK_PATH in mk.conf pointing at wherever the actual SDK is installed on your system.

  2. smurfd commented on Sep 15, 2021

    @smurfd
    Author

    Thanks for super quick answer!
    yes that worked and also this :

    sudo OSX_SDK_PATH=`/usr/bin/xcrun --sdk macosx --show-sdk-path` ./bootstrap --prefix /opt/pkgsrc1 --prefer-pkgsrc yes --make-jobs 4
    
  3. added a commit that references this issue on Nov 27, 2021
  4. added a commit that references this issue on Feb 20, 2022
  5. added a commit that references this issue on Apr 20, 2022
  6. added a commit that references this issue on May 29, 2022
  7. added a commit that references this issue on Apr 1, 2023
  8. added a commit that references this issue on Apr 30, 2023
  9. 113 remaining items

  10. added a commit that references this issue on May 21, 2026
  11. added a commit that references this issue on Jun 12, 2026
  12. added a commit that references this issue on Jul 26, 2026
  13. added a commit that references this issue on Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions