RIOT cannot compile with the latest version of macOS (10.14) and Xcode 10

Created on 7 Oct 2018  路  9Comments  路  Source: RIOT-OS/RIOT

Description

RIOT cannot compile with the latest version of macOS.

Steps to reproduce the issue

Compile the example/hello_world with default configuration (native).

Expected results

No errors.

Actual results

ld: warning: The i386 architecture is deprecated for macOS (remove from the Xcode build setting: ARCHS)
ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd, missing required architecture i386 in file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd
ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/lib/libdl.tbd, missing required architecture i386 in file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/lib/libdl.tbd
Undefined symbols for architecture i386:
  "_strndup", referenced from:
      _tty_uart_setup in periph.a(uart.o)
  "_sigaltstack$UNIX2003", referenced from:
      _native_interrupt_init in cpu.a(irq_cpu.o)
...
...
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Versions

Operating system: Mac OSX
Build environment:
native gcc: Apple LLVM version 10.0.0 (clang-1000.11.45.2)
clang: Apple LLVM version 10.0.0 (clang-1000.11.45.2)

toolchain Mac OS X bug

All 9 comments

It looks like you need an older xcode version.
https://forums.developer.apple.com/thread/108704

Future MacOS releases may drop 32 bit support for applications though, so RIOT would have to add support for building as a 64 bit binary to continue supporting MacOS.

It looks like you need an older xcode version.
https://forums.developer.apple.com/thread/108704

A downgrade is always not the best choice :-(
Hope RIOT team can handle this issue as soon as possible since new macOS has been revealed for some time.

(I added triple ticks to the log so it formats better)

Before I even get the linker error above, I needed to add

CFLAGS += -isystem /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include

to my Makefile, so the headers are being found.

MacOS is not supported as RIOT native does not run on 64Bit CPUs (yet)

Hence, this can be closed

Weellll, this _could_ become a problem in Ubuntu as well...

Are there any news about this?

There is https://github.com/RIOT-OS/RIOT/pull/13009, but development on that seems to be stalled.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jcarrano picture jcarrano  路  5Comments

silkeh picture silkeh  路  5Comments

nikosft picture nikosft  路  6Comments

jdavid picture jdavid  路  5Comments

kaspar030 picture kaspar030  路  3Comments