Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 task done
lupyuen opened this issue Nov 14, 2024 · 6 comments
Open
1 task done

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

lupyuen opened this issue Nov 14, 2024 · 6 comments
Labels
Arch: simulator Issues related to the SIMulator Area: Build system OS: Mac Issues related to MacOS (building system, etc) Type: Bug Something isn't working

Comments

@lupyuen
Copy link
Member

lupyuen commented Nov 14, 2024

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

  • I have verified before submitting the report.
@lupyuen lupyuen added the Type: Bug Something isn't working label Nov 14, 2024
@github-actions github-actions bot added Arch: simulator Issues related to the SIMulator Area: Build system OS: Mac Issues related to MacOS (building system, etc) labels Nov 14, 2024
@lupyuen lupyuen changed the title [BUG] macOS CI: sim:libcxxtest doesn't link with pipe2() [BUG] macOS CI: sim:lua doesn't link with pipe2() Nov 14, 2024
@xiaoxiang781216
Copy link
Contributor

please try CONFIG_PIPES=y, @lupyuen

@lupyuen
Copy link
Member Author

lupyuen commented Nov 14, 2024

@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
Copy link
Contributor

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
Copy link
Contributor

@xuxin930 please skip pack on macOS.

@xuxin930
Copy link
Contributor

macOS also doesn't like this

hi @simbit18 could you please try this #14800 ?

@simbit18
Copy link
Contributor

simbit18 commented Nov 15, 2024

hi @xuxin930 the skip pack is ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arch: simulator Issues related to the SIMulator Area: Build system OS: Mac Issues related to MacOS (building system, etc) Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants