openthread / ot-br-posix

OpenThread Border Router, a Thread border router for POSIX-based platforms.
https://openthread.io/
BSD 3-Clause "New" or "Revised" License
420 stars 232 forks source link

Building error otbr on the mac. #1860

Open ejunu opened 1 year ago

ejunu commented 1 year ago

Describe the bug A clear and concise description of what the bug is. On MacOS 11.7.6 platform, script/setup failed.

To Reproduce Information to reproduce the behavior, including:

  1. Git commit id https://github.com/openthread/ot-br-posix/commit/91583a2eb9359f7a1c2ac0cb0181d27d96b35621
  2. IEEE 802.15.4 hardware platform
  3. Build steps ./script/bootstrap ./script/setup
  4. Network topology

Expected behavior A clear and concise description of what you expected to happen.

Console/log output If applicable, add console/log output to help explain your problem.

$ ./script/setup 
+++ dirname ./script/setup
++ cd ./script/..
++ [[ ! -n '' ]]
++ grep -s 'BeagleBone Black' /sys/firmware/devicetree/base/model
++ case "${OSTYPE}" in
++ PLATFORM=macOS
++ echo 'Current platform is macOS'
Current platform is macOS
++ with BORDER_ROUTING
++ local value
+++ printenv BORDER_ROUTING
++ value=
++ [[ -z '' ]]
++ [[ -f examples/platforms/macOS/default ]]
++ [[ '' == 1 ]]
++ with BORDER_ROUTING
++ local value
+++ printenv BORDER_ROUTING
++ value=
++ [[ -z '' ]]
++ [[ -f examples/platforms/macOS/default ]]
++ [[ '' == 1 ]]
++ STAGE_DIR=/Users/kimkyuongtae/git/ot-br-posix/stage
++ BUILD_DIR=/Users/kimkyuongtae/git/ot-br-posix/build
++ [[ -d /Users/kimkyuongtae/git/ot-br-posix/stage ]]
++ [[ -d /Users/kimkyuongtae/git/ot-br-posix/build ]]
++ export PATH=/Users/kimkyuongtae/git/ot-br-posix/stage/usr/bin:/Users/kimkyuongtae/git/ot-br-posix/stage/usr/sbin:/Library/Frameworks/Python.framework/Versions/3.10/bin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Apple/usr/bin:/Applications/Wireshark.app/Contents/MacOS
++ PATH=/Users/kimkyuongtae/git/ot-br-posix/stage/usr/bin:/Users/kimkyuongtae/git/ot-br-posix/stage/usr/sbin:/Library/Frameworks/Python.framework/Versions/3.10/bin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Apple/usr/bin:/Applications/Wireshark.app/Contents/MacOS
+++ basename ./script/setup
++ TASKNAME=setup
++ BEFORE_HOOK=examples/platforms/macOS/before_setup
++ AFTER_HOOK=examples/platforms/macOS/after_setup
++ [[ ! -f examples/platforms/macOS/before_setup ]]
++ BEFORE_HOOK=/dev/null
++ [[ ! -f examples/platforms/macOS/after_setup ]]
++ AFTER_HOOK=/dev/null
+ . script/_border_routing
++ INFRA_IF_NAME=wlan0
++ readonly INFRA_IF_NAME
++ SYSCTL_ACCEPT_RA_FILE=/etc/sysctl.d/60-otbr-accept-ra.conf
++ readonly SYSCTL_ACCEPT_RA_FILE
++ DHCPCD_CONF_FILE=/etc/dhcpcd.conf
++ readonly DHCPCD_CONF_FILE
++ DHCPCD_CONF_BACKUP_FILE=/etc/dhcpcd.conf.orig
++ readonly DHCPCD_CONF_BACKUP_FILE
+ . script/_otbr
++ OTBR_TOP_BUILDDIR=/Users/kimkyuongtae/git/ot-br-posix/build/otbr
++ readonly OTBR_TOP_BUILDDIR
++ OTBR_OPTIONS=
++ readonly OTBR_OPTIONS
++ REFERENCE_DEVICE=0
++ readonly REFERENCE_DEVICE
+ . script/_ipforward
++ SYSCTL_IP_FORWARD=/etc/sysctl.d/60-otbr-ip-forward.conf
+ . script/_nat64
++ NAT64_SERVICE=openthread
++ TAYGA_DEFAULT=/etc/default/tayga
++ TAYGA_CONF=/etc/tayga.conf
++ TAYGA_IPV4_ADDR=192.168.255.1
++ TAYGA_IPV6_ADDR=fdaa:bb:1::1
++ TAYGA_TUN_V6_ADDR=fdaa:bb:1::2
++ NAT64_PREFIX=64:ff9b::/96
++ DYNAMIC_POOL=192.168.255.0/24
++ NAT44_SERVICE=/etc/init.d/otbr-nat44
++ WLAN_IFNAMES=wlan0
+ . script/_dns64
++ BIND_CONF_OPTIONS=/etc/bind/named.conf.options
++ NAT64_PREFIX=64:ff9b::/96
++ DNS64_NAMESERVER_ADDR=127.0.0.1
+++ echo 64:ff9b::/96
+++ tr '"/"' '"/"'
++ DNS64_CONF='dns64 64:ff9b::/96 { clients { thread; }; recursive-only yes; };'
++ without NAT64
++ with NAT64
++ local value
+++ printenv NAT64
++ value=
++ [[ -z '' ]]
++ [[ -f examples/platforms/macOS/default ]]
++ [[ '' == 1 ]]
++ '[' macOS = raspbian ']'
++ '[' macOS = beagleboneblack ']'
++ '[' macOS = ubuntu ']'
+ . script/_dhcpv6_pd
++ '[' macOS = ubuntu ']'
++ WAN_INTERFACE=eth0
++ WLAN_INTERFACE=wlan0
++ WPAN_INTERFACE=wpan0
++ DHCPCD_CONF=/etc/dhcpcd.conf
++ DHCPCD_CONF_BACKUP=/etc/dhcpcd.conf.orig
++ NCP_STATE_NOTIFIER=/usr/sbin/ncp_state_notifier
++ NCP_STATE_DISPATCHER=/etc/ncp_state_notifier/dispatcher.d
++ NCP_STATE_NOTIFIER_SERVICE_NAME=ncp_state_notifier.service
++ NCP_STATE_NOTIFIER_SERVICE=/etc/systemd/system/ncp_state_notifier.service
++ DHCPCD_RELOADER=/etc/ncp_state_notifier/dispatcher.d/dhcpcd_reloader
++ without DHCPV6_PD
++ with DHCPV6_PD
++ local value
+++ printenv DHCPV6_PD
++ value=
++ [[ -z '' ]]
++ [[ -f examples/platforms/macOS/default ]]
++ [[ '' == 1 ]]
+ . script/_network_manager
++ AP_CONN=BorderRouter-AP
++ ETH_CONN=BorderRouter-Eth
++ AP_HELPER_SCRIPT=/etc/NetworkManager/dispatcher.d/ap-helper
++ DHCPV6_HELPER_SCRIPT=/etc/NetworkManager/dispatcher.d/dhcpv6-helper
+ . script/_rt_tables
+ . script/_swapfile
++ SWAP_REQUIRED=false
++ SWAP_FILENAME=/swapfile
++ SWAP_BLOCK_SIZE=1M
++ SWAP_BLOCK_CNT=1024
+ . script/_sudo_extend
++ ETC_SUDOERS=/etc/sudoers
++ SUDO_EXTEND_TIME=false
++ SUDO_EXTEND_TIME_AMOUNT=120
+ . script/_disable_services
+ . script/_firewall
++ FIREWALL_SERVICE=/etc/init.d/otbr-firewall
++ sudo modprobe ip6table_filter
sudo: modprobe: command not found
++ true
+ main
+ . /dev/null
+ extend_sudo_timeout
+ local _why
+ _why=Disabled
+ false
+ false
+ echo 'sudo-timeout: Not extending, Disabled'
sudo-timeout: Not extending, Disabled
+ setup_swapfile
+ false
+ echo 'Swapfile: not required'
Swapfile: not required
+ disable_services
+ case $PLATFORM in
+ echo 'Nothing to disable'
+ otbr_uninstall
+ have systemctl
+ command -v systemctl
+ sudo killall otbr-web otbr-agent
No matching processes were found
+ true
+ cd /Users/kimkyuongtae/git/ot-br-posix/build/otbr
script/_otbr: line 52: cd: /Users/kimkyuongtae/git/ot-br-posix/build/otbr: No such file or directory
+ have systemctl
+ command -v systemctl
+ border_routing_uninstall
+ with BORDER_ROUTING
+ local value
++ printenv BORDER_ROUTING
+ value=
+ [[ -z '' ]]
+ [[ -f examples/platforms/macOS/default ]]
+ [[ '' == 1 ]]
+ return 0
+ network_manager_uninstall
+ with NETWORK_MANAGER
+ local value
++ printenv NETWORK_MANAGER
+ value=
+ [[ -z '' ]]
+ [[ -f examples/platforms/macOS/default ]]
+ [[ '' == 1 ]]
+ return 0
+ dhcpv6_pd_uninstall
+ with DHCPV6_PD
+ local value
++ printenv DHCPV6_PD
+ value=
+ [[ -z '' ]]
+ [[ -f examples/platforms/macOS/default ]]
+ [[ '' == 1 ]]
+ return 0
+ nat64_uninstall
+ with NAT64
+ local value
++ printenv NAT64
+ value=
+ [[ -z '' ]]
+ [[ -f examples/platforms/macOS/default ]]
+ [[ '' == 1 ]]
+ return 0
+ dns64_uninstall
+ with NAT64
+ local value
++ printenv NAT64
+ value=
+ [[ -z '' ]]
+ [[ -f examples/platforms/macOS/default ]]
+ [[ '' == 1 ]]
+ return 0
+ rt_tables_uninstall
+ with BACKBONE_ROUTER
+ local value
++ printenv BACKBONE_ROUTER
+ value=
+ [[ -z '' ]]
+ [[ -f examples/platforms/macOS/default ]]
+ [[ '' == 1 ]]
+ return 0
+ ipforward_uninstall
+ test '!' -f /etc/sysctl.d/60-otbr-ip-forward.conf
+ firewall_uninstall
+ firewall_stop
+ with DOCKER
+ local value
++ printenv DOCKER
+ value=
+ [[ -z '' ]]
+ [[ -f examples/platforms/macOS/default ]]
+ [[ '' == 1 ]]
+ have systemctl
+ command -v systemctl
+ have systemctl
+ command -v systemctl
+ have update-rc.d
+ command -v update-rc.d
+ test '!' -f /etc/init.d/otbr-firewall
+ firewall_install
+ sudo cp script/otbr-firewall /etc/init.d/otbr-firewall
cp: /etc/init.d/otbr-firewall: No such file or directory

Additional context Add any other context about the problem here.

If otbr is not supported on mac, there is any schedule supporting mac? I need to develope otbr using mac.

jwhui commented 1 year ago

OTBR is not currently supported on macOS. However, contributions to add macOS support are welcome!