SoftwareNetwork / sw

Software Manager. Build System, Build System Generator and Package Manager. C/C++ and other languages. Tools and libraries for Software Management.
https://software-network.org
Other
115 stars 23 forks source link

Exception when compile for Mac M1 #100

Open LoganWillaumez opened 1 year ago

LoganWillaumez commented 1 year ago

Hello I tried to compile on a Mac M1, but I received this message Error :

Exception in file /Users/egor/dev/sw/src/sw/driver/target/native.cpp:797, function findCompiler: Linker not found

I've had a similar issue with librarian not found, but it's ok after some tweaks.

The Json :

{
  "name": "win2android",
  "native": {
    "program": {
      "asm": "org.LLVM.clang",
      "c":
      {
        "package": "org.LLVM.clang",
        "command":
        {
          "do_not_add_target_argument": "1",
          "program": "/Users/loganwillaumez/Library/Android/sdk/ndk/25.0.8775105/toolchains/llvm/prebuilt/darwin-x86_64/bin/aarch64-linux-android21-clang"
        }
      },
      "cpp":
      {
        "package": "org.LLVM.clangpp",
        "command":
        {
          "do_not_add_target_argument": "1",
          "program": "/Users/loganwillaumez/Library/Android/sdk/ndk/25.0.8775105/toolchains/llvm/prebuilt/darwin-x86_64/bin/aarch64-linux-android21-clang++"
        }
      },
      "lib": "org.gnu.binutils.ar",
      "link":
      {
        "package": "org.LLVM.lld",
        "command":
        {
          "program": "/Users/loganwillaumez/Library/Android/sdk/ndk/25.0.8775105/toolchains/llvm/prebuilt/darwin-x86_64/bin/ld64.lld"
        }
      }
    },
    "stdlib": {
      "c": null,
      "compiler": null,
      "kernel": null,
      "cpp": null
    }
  },
  "os": {
    "arch": "aarch64",
    "version": "5.17",
    "kernel": "com.google.android"
  }
}

Do you have any idea of what's hapenning?

LoganWillaumez commented 1 year ago

In my windows, everything is fine, I am able to build on it without any problems. This problem only occurs on my Mac m1.

egorpugin commented 1 year ago

Tried this and that. Maybe some mac related android issue. Cannot figure out if it is sw issue or not.