apache / nuttx

Apache NuttX is a mature, real-time embedded operating system (RTOS)
https://nuttx.apache.org/
Apache License 2.0
2.87k stars 1.17k forks source link

[BUG] macOS CI: `sim:lua` doesn't link with pipe2() #14773

Open lupyuen opened 3 days ago

lupyuen commented 3 days ago

Description / Steps to reproduce the issue

sim:lua in macOS CI doesn't link with pipe2(). Is there something special about the Lua Build that fails with pipe2()? We may need to disable the build for macOS CI because NuttX Mirror Build is failing twice daily:

From sim-02 macOS Log: https://github.com/NuttX/nuttx/actions/runs/11825497334/job/32949471137

Configuration/Tool: sim/lua
ld: Undefined symbols:
  _pipe2, referenced from:
      _main in nuttx.rel
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [nuttx] Error 1
make: *** [nuttx] Error 2
make: Target `all' not remade because of errors.

On which OS does this issue occur?

[OS: Mac]

What is the version of your OS?

macOS x64 at GitHub Actions

NuttX Version

master

Issue Architecture

[Arch: simulator]

Issue Area

[Area: Build System]

Verification

xiaoxiang781216 commented 3 days ago

please try CONFIG_PIPES=y, @lupyuen

lupyuen commented 2 days ago

@xiaoxiang781216 Yep it compiles OK on macOS Arm64 yay! But wonder if it's supposed to Seg Fault?

https://gist.github.com/lupyuen/a4a6351912ebb49fc8d9db37667465e1

$ tools/configure.sh sim:lua
$ kconfig-tweak --enable CONFIG_PIPES
$ grep CONFIG_PIPES .config
CONFIG_PIPES=y
$ make olddefconfig
$ make
LD:  nuttx
Pac SIM with dynamic libs..
/bin/bash: ldd: command not found
/bin/bash: readelf: command not found
SIM elf with dynamic libs archive in nuttx.tgz

$ ./nuttx
[1]    79532 segmentation fault  ./nuttx
simbit18 commented 2 days ago

macOS also doesn't like this

Pac SIM with dynamic libs..
/bin/bash: ldd: command not found
/bin/bash: readelf: command not found
SIM elf with dynamic libs archive in nuttx.tgz

define POSTBUILD $(Q)echo "Pac SIM with dynamic libs.."; @ rm -rf sim-pac; @ mkdir -p sim-pac/libs; @ cp nuttx sim-pac/nuttx; @ ldd sim-pac/nuttx | grep "=> /" | awk '{print $$3}' | xargs -I '{}' cp -v '{}' sim-pac/libs; @ readelf -l nuttx | grep "program interpreter" | awk -F':' '{print $$2}'| cut -d"]" -f1 | xargs -I '{}' cp -v '{}' sim-pac; @ cp $(TOPDIR)/tools/simlaunch.sh sim-pac; @ tar -czf nuttx.tgz sim-pac; $(Q)echo "SIM elf with dynamic libs archive in nuttx.tgz" @ rm -rf sim-pac; endef

xiaoxiang781216 commented 2 days ago

@xuxin930 please skip pack on macOS.

xuxin930 commented 2 days ago

macOS also doesn't like this

hi @simbit18 could you please try this https://github.com/apache/nuttx/pull/14800 ?

simbit18 commented 1 day ago

hi @xuxin930 the skip pack is ok.