| 8 Dec 2025 |
emily | hehe | 17:49:17 |
emily | shion:~/Downloads/llama-b7325
❭ otool -l libllama.0.0.7325.dylib | rg -A 5 LC_ID_DYLIB
cmd LC_ID_DYLIB
cmdsize 48
name @rpath/libllama.0.dylib (offset 24)
time stamp 1 Thu Jan 1 01:00:01 1970
current version 0.0.255
compatibility version 0.0.0
| 17:49:19 |
Ihar Hrachyshka | oh | 17:49:48 |
emily | so the version in their library has been getting truncated for approximately the past 100 years. | 17:49:55 |
emily | the only difference is… | 17:50:15 |
Ihar Hrachyshka | we can set it to 255 then and forget about it 😎 | 17:50:26 |
emily | ld64 barfs on 0.0.7299 and ld-prime accepts it | 17:50:28 |
emily | but 0.0.256 truncates to 0.0.255 with both | 17:50:34 |
emily | yes, but only in https://github.com/ggml-org/llama.cpp/blob/bde188d60f58012ada0725c6dd5ba7c69fe4dd87/src/CMakeLists.txt#L140 and similar, please, not the actual version variable | 17:51:01 |
emily | since LLAMA_INSTALL_VERSION is used elsewhere | 17:51:03 |
emily | https://github.com/search?q=repo%3Aggml-org%2Fllama.cpp%20LLAMA_INSTALL_VERSION&type=code | 17:51:17 |
emily | substituteInPlace src/CMakeLists.txt \
--replace-fail 'VERSION ${LLAMA_INSTALL_VERSION}' 'VERSION 0.0.255'
substituteInPlace tools/mtmd/CMakeLists.txt \
--replace-fail 'VERSION ${LLAMA_INSTALL_VERSION}' 'VERSION 0.0.255'
only on Darwin
| 17:51:57 |
emily | but, yes, it would actually be best to fix this upstream then | 17:52:06 |
emily | since their version is just useless | 17:52:10 |
Ihar Hrachyshka | I will update the issue they have later with the above, really cool stuff | 17:52:24 |
emily | I suggest replacing LLAMA_INSTALL_VERSION with LLAMA_BUILD_NUMBER upstream | 17:52:26 |
emily | that's a two line diff | 17:52:34 |
Ihar Hrachyshka | would take me a lot longer, appreciate it | 17:52:37 |
emily | and in fact we could just vendor this patch locally while waiting for upstream | 17:52:47 |
emily | only infelicity is that if they ever do actual versions the ordering will be weird | 17:52:58 |
emily | but I doubt anything actually cares about the value | 17:53:09 |
emily | that will start failing when they go over 65536 commits too fwiw | 17:53:49 |
emily | or well, start truncating | 17:53:54 |
emily | I'm not convinced anything actually cares about the "current version" field of a library though | 17:54:29 |
Randy Eckenrode | Many times projects just set junk versions. The versions for llbuild’s framework are 1 and 1. | 17:54:31 |
emily | yeah | 17:54:48 |
emily | so just dropping VERSION … would be another option | 17:54:54 |
emily | but it'll change the filenames used on Linux | 17:54:58 |
emily | well, and on macOS too | 17:55:05 |
emily | -rwxr-xr-x@ 1 emily staff 608K 8 Dec 16:09 libmtmd.0.0.7325.dylib*
lrwxr-xr-x@ 1 emily staff 22B 8 Dec 16:09 libmtmd.0.dylib@ -> libmtmd.0.0.7325.dylib
| 17:55:11 |