Open quantumsheep opened 3 years ago
Running a dry-run using make run-noaccel -n
, here's the concerned command:
echo "LD /Users/qtmsheep/Development/nanos/output/platform/pc/boot/bin/stage2.elf"; x86_64-elf-ld -L/usr/local/opt/ncurses/lib -L/usr/local/opt/qt/lib -L/usr/local/opt/gstreamer/lib -L/usr/local/opt/gst-plugins-base/lib -L/usr/local/opt/freeglut/lib -L/usr/local/opt/openssl/lib --gc-sections -n --undefined=_start -T linker_script --gc-sections -n -T linker_script /Users/qtmsheep/Development/nanos/output/platform/pc/boot/platform/pc/boot/stage2.o /Users/qtmsheep/Development/nanos/output/platform/pc/boot/platform/pc/boot/service32.o /Users/qtmsheep/Development/nanos/output/platform/pc/boot/src/drivers/ata.o /Users/qtmsheep/Development/nanos/output/platform/pc/boot/src/kernel/elf.o /Users/qtmsheep/Development/nanos/output/platform/pc/boot/src/kernel/kvm_platform.o /Users/qtmsheep/Development/nanos/output/platform/pc/boot/src/kernel/pagecache.o /Users/qtmsheep/Development/nanos/output/platform/pc/boot/src/runtime/buffer.o /Users/qtmsheep/Development/nanos/output/platform/pc/boot/src/runtime/extra_prints.o /Users/qtmsheep/Development/nanos/output/platform/pc/boot/src/runtime/format.o /Users/qtmsheep/Development/nanos/output/platform/pc/boot/src/runtime/memops.o /Users/qtmsheep/Development/nanos/output/platform/pc/boot/src/runtime/range.o /Users/qtmsheep/Development/nanos/output/platform/pc/boot/src/runtime/rbtree.o /Users/qtmsheep/Development/nanos/output/platform/pc/boot/src/runtime/runtime_init.o /Users/qtmsheep/Development/nanos/output/platform/pc/boot/src/runtime/pqueue.o /Users/qtmsheep/Development/nanos/output/platform/pc/boot/src/runtime/sg.o /Users/qtmsheep/Development/nanos/output/platform/pc/boot/src/runtime/symbol.o /Users/qtmsheep/Development/nanos/output/platform/pc/boot/src/runtime/table.o /Users/qtmsheep/Development/nanos/output/platform/pc/boot/src/runtime/timer.o /Users/qtmsheep/Development/nanos/output/platform/pc/boot/src/runtime/tuple.o /Users/qtmsheep/Development/nanos/output/platform/pc/boot/src/runtime/merge.o /Users/qtmsheep/Development/nanos/output/platform/pc/boot/src/runtime/string.o /Users/qtmsheep/Development/nanos/output/platform/pc/boot/src/x86_64/page.o /Users/qtmsheep/Development/nanos/output/platform/pc/boot/src/x86_64/serial.o /Users/qtmsheep/Development/nanos/output/platform/pc/boot/src/tfs/tfs.o /Users/qtmsheep/Development/nanos/output/platform/pc/boot/src/tfs/tlog.o -o /Users/qtmsheep/Development/nanos/output/platform/pc/boot/bin/stage2.elf
As we can see we have two -T linker_script
in the same command:
--undefined=_start -T linker_script --gc-sections -n -T linker_script
I got it building by changing LDFLAGS+=
to LDFLAGS=
here:
https://github.com/nanovms/nanos/blob/430a9fe3c97abed247ee50ccfecf3217eadf34b2/platform/pc/boot/Makefile#L39
It will need further reviewing as it doesn't seem like a great way of solving the issue 🙃
What's your version of OS X? I haven't seen this on 10.14.
@sanderssj Big Sur 11.4
I tried to build on a Big Sur machine and still can't duplicate. Can you give me the output of these commands?
pkgutil --pkg-info=com.apple.pkg.CLTools_Executables
pkgutil --pkg-info=com.apple.pkg.CLTools_SDK_macOS110
xcode-select -p
which make
make --version
No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.
No receipt for 'com.apple.pkg.CLTools_SDK_macOS110' found at '/'.
/Applications/Xcode.app/Contents/Developer
/usr/bin/make
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for i386-apple-darwin11.3.0
Thanks for the information. I'm still not able to duplicate the problem, and I'm not sure where a second expansion would be happening. Would you mind trying to install the xcode command line tools and switching to those and trying to build a freshly cloned repo?
xcode-select --install
sudo xcode-select -s /Library/Developer/CommandLineTools
I'm having this error when building on macOS: