3 Jul 2025 |
Austin Horstman | Might do that later | 17:40:54 |
Austin Horstman | emily and i had talked about trying to find a good way to centralize the logic though for all the darwin stuff instead of having to copy stuff around.. | 17:42:32 |
| Vassil Mladenov joined the room. | 21:15:47 |
Vassil Mladenov | Redacted or Malformed Event | 21:17:22 |
Vassil Mladenov | Redacted or Malformed Event | 21:18:13 |
4 Jul 2025 |
| megmug joined the room. | 06:14:38 |
megmug | Download shell.nix | 07:49:33 |
megmug | Download linker-error.txt | 07:49:35 |
megmug | Hello there, we are using Nix in our uni course team project, because the supervisor can't be bothered to provide a workable dev environment for his students to use. It's essentially "it works for me - you might need to install some stuff". "some stuff" is some pretty insane customized libraries in c++ cruft relating to cryptography. With the help of chatgpt and my limited knowledge about nix, we we able to piece together a shell.nix that works perfectly for both of us Linux users, but the user on MacOS user always gets a weird linker error when compiling with cmake. I would be very thankful if someone here could hint me at the right direction why this fails
| 07:50:11 |
megmug | * Hello there, we are using Nix in our uni course team project, because the supervisor can't be bothered to provide a workable dev environment for his students to use. It's essentially "it works for me - you might need to install some stuff". "some stuff" is pretty insane customized c++ libraries relating to cryptography. With the help of chatgpt and my limited knowledge about nix, we we able to piece together a shell.nix that works perfectly for both of us Linux users, but the user on MacOS user always gets a weird linker error when compiling with cmake. I would be very thankful if someone here could hint me at the right direction why this fails
| 07:50:59 |
megmug | * Hello there, we are using Nix in our uni course team project, because the supervisor can't be bothered to provide a workable dev environment for his students to use. It's essentially "it works for me - you might need to install some stuff". "some stuff" is pretty insane customized c++ libraries relating to cryptography. With the help of chatgpt and my limited knowledge about nix, we we able to piece together a shell.nix that works perfectly for both of us Linux users, but the user on MacOS always gets a weird linker error when compiling with cmake. I would be very thankful if someone here could hint me at the right direction why this fails. | 07:52:52 |
megmug | I should also note that we had the same approach for earlier crypto projects in the same course, and they had simpler shell.nix files which curiously worked even on MacOS. Of course judging from the linker error, he is using a newer ARM Mac, and i guess it has to do with the fact that we on linux are compiling with gcc while he is compiling with clang, but since it worked with simpler shell.nix's, i don't really know where to start | 07:58:51 |
megmug | * I should also note that we had the same approach for earlier crypto projects in the same course, and they required simpler shell.nix files which curiously worked even on MacOS. Of course judging from the linker error, he is using a newer ARM Mac, and i guess it has to do with the fact that we on linux are compiling with gcc while he is compiling with clang, but since it worked with simpler shell.nix's, i don't really know where to start | 07:59:13 |
WeetHet | I ran this with my local nixpkgs instance | 08:07:38 |
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 |