theos / sdks

Patched sdks that include private framework tbds
Other
585 stars 205 forks source link

Error compiling library on Debian #73

Closed slayy2357 closed 4 months ago

slayy2357 commented 4 months ago

What are the steps to reproduce this issue?

  1. Create library template with $THEOS/bin/nic.pl
  2. Add "#import <Foundation/Foundation.h>" to .m file or any headers
  3. Run "make"

What happens? Error and no dylib build

What were you expecting to happen? A dylib build

Any logs, error output, etc? https://gist.github.com/slayy2357/f47f7c00f865d0cf6c1c98bdbe321242

What versions of software are you using?

Operating System: Debian

Toolchain Version: unknow

SDK Version: 16.5

L1ghtmann commented 4 months ago

Hey! Thanks for reporting this. The NSString format errors are a result of the current swift toolchain being outdated. You can install an up-to-date one by running

rm -rf $THEOS/toolchain/*
curl -sL https://github.com/kabiroberai/swift-toolchain-linux/releases/download/v2.3.0/swift-5.8-ubuntu20.04.tar.xz | tar -xJvf - -C $THEOS/toolchain/

This is slated for upstream in https://github.com/theos/theos/pull/770

slayy2357 commented 4 months ago

Tysm for the reply, it work great now. I just have a warning when I compile my library : ld: warning: object file /home/unknow/a/.theos/obj/debug/arm64e/a.m.9d6d33c7.o was built with an incompatible arm64e ABI compiler but maybe this is nothing

Luki120 commented 4 months ago

There’s nothing you can do about that

L1ghtmann commented 4 months ago

Tysm for the reply, it work great now. I just have a warning when I compile my library : ld: warning: object file /home/unknow/a/.theos/obj/debug/arm64e/a.m.9d6d33c7.o was built with an incompatible arm64e ABI compiler but maybe this is nothing

That is a symptom of the "unstable" arm64e ABI and can be ignored as of now. For reference: https://github.com/tpoechtrager/cctools-port/tree/master/cctools/ld64/src/ld/Resolver.cpp#L531

slayy2357 commented 4 months ago

Thanks !