Skip to content

px4-dev fails to build on M1 (Rosetta) macOS: "Can't find boost headers" during asio@1.10.8 configure step #98

@pawelpetruch

Description

@pawelpetruch

Hi PX4 team

Following steps from: https://docs.px4.io/main/en/dev_setup/dev_env_mac

on M1 Pro, macOS Sequoia 15.6.1 (24G90) running under Rosetta (Intel/x86_64), brew install px4-dev consistently fails when building the asio@1.10.8 dependency. The error is that Boost headers cannot be found, even though boost@1.85 is installed in /usr/local/opt/boost@1.85.

System details:

macOS: Sequoia 15.6.1 (Intel via Rosetta on Apple Silicon)

Homebrew prefix (Intel): /usr/local

Boost: boost@1.85 installed at /usr/local/opt/boost@1.85

Failure log (tail of 02.configure.log):

checking for boost/noncopyable.hpp... no
Can't find boost headers. Please check the location of the boost
distribution and rerun configure using the --with-boost=DIR option.

Expected:
asio@1.10.8 should detect Boost headers located at:
/usr/local/opt/boost@1.85/include/boost/noncopyable.hpp

.zshrc content

# --- Architecture switchers ---
alias arm="env /usr/bin/arch -arm64 /bin/zsh --login"
alias intel="env /usr/bin/arch -x86_64 /bin/zsh --login"

# --- Auto-select Homebrew ---
if [[ "$(arch)" == "arm64" ]]; then
  # Native Apple Silicon brew
  export PATH="/opt/homebrew/bin:/opt/homebrew/sbin:$PATH"
  export HOMEBREW_PREFIX="/opt/homebrew"
  alias brew="/opt/homebrew/bin/brew"
else
  # Rosetta / Intel brew
  export PATH="/usr/local/bin:/usr/local/sbin:$PATH"
  export HOMEBREW_PREFIX="/usr/local"
  alias brew="/usr/local/bin/brew"
fi

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