4 Jul 2025 |
WeetHet | It built fine | 08:08:02 |
WeetHet | nix-repl> lib.version
"25.11pre823951.d31a91c9b3be"
| 08:08:48 |
megmug | Sorry, i think i wasn't precise enough. The nix env works. But building the project results in this linker error | 08:09:09 |
WeetHet | Could you share the error as text | 08:09:44 |
WeetHet | My matrix doesn't want to download the file for some reason | 08:09:56 |
WeetHet | An error occurred while downloading this file
M_UNKNOWN: MatrixError: [500] Unexpected Error | 08:10:06 |
megmug | Undefined symbols for architecture arm64:
"REPLDriver<CloudClient>::add_action(std::1::basic_string<char, std::1::char_traits<char>, std::1::allocator<char>>, std::1::basic_string<char, std::1::char_traits<char>, std::1::allocator<char>>, void (CloudClient::)(std::1::basic_string<char, std::1::char_traits<char>, std::__1::allocator<char>>))", referenced from:
CloudClient::run(int) in libpir_app_lib.a(cloud.cxx.o)
"REPLDriver<CloudClient>::run()", referenced from:
CloudClient::run(int) in libpir_app_lib.a(cloud.cxx.o)
"REPLDriver<CloudClient>::REPLDriver(CloudClient)", referenced from:
CloudClient::run(int) in libpir_app_lib.a(cloud.cxx.o)
ld: symbol(s) not found for architecture arm64
clang-16: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: [CMakeFiles/pir_cloud.dir/build.make:111: pir_cloud] Fehler 1
make[1]: [CMakeFiles/Makefile2:961: CMakeFiles/pir_cloud.dir/all] Fehler 2
make: *** [Makefile:146: all] Fehler 2
Some of it is german: Fehler = Error | 08:10:42 |
megmug | (This, only on MacOS - on linux, it works, no linker error) | 08:11:26 |
megmug | But, we have only x86 linux machines to test | 08:12:04 |
WeetHet | Is REPLDriver<CloudClient> your type? | 08:12:07 |
WeetHet | Or library provided? | 08:12:13 |
megmug | so ARM + linux, don't know | 08:12:15 |
WeetHet | Because if it's your type it's likely just C++ template linking shenanigans working differently between different compilers and I won't be of much help here | 08:13:35 |
WeetHet | Without seeing the code at least | 08:13:42 |
megmug | It's a type from one of the header files that is part of the project | 08:14:10 |
WeetHet | Well then it probably has nothing to do with nix and everything to do with C++ | 08:14:36 |
megmug | I can definitely provide that if its of any use | 08:15:15 |
WeetHet | I'm not gonna debug C++ linking for you | 08:15:34 |
megmug | Meaning, it is not possible to "fix" or circumvent using the nix shell? | 08:15:48 |
WeetHet | It's not a nix issue | 08:15:55 |
WeetHet | It's an issue with how your project is built | 08:16:10 |
WeetHet | Or written idk | 08:16:14 |
megmug | understandable | 08:16:23 |
WeetHet | It just so happens to work out on linux | 08:16:25 |
WeetHet | That's my best guess | 08:17:40 |
megmug | Okay, thank you for having a look at it | 08:18:10 |
WeetHet | You can go over the .o files using nm and look for the mangled REPLDriver<CloudClient>::add_action | 08:18:34 |
K900 | My guess would be that it's instantiated in a .cpp file instead of a header | 08:19:17 |
K900 | So it's not linked correctly | 08:19:22 |
WeetHet | Yep, probably that | 08:19:34 |