Lukas Gradl <lgr...@openmailbox.org> writes: > So the flags -I, -L, -l for zlib are all there for both dynamic and > static linking. But still no store reference.
I think the reason why there is no reference is that msgpack uses zbuffer only for tests. Before compilation, the file only references the name "zlib" and does not mention the hash in the path of zlib in the store. During compilation (during "check"), this mere name "zlib" gets somehow resolved to the path of zlib in the store. The binary file resulting from compiling zbuffer should therefore contain a reference to zlib, which should be detectable by guix gc --references. I think however, that this binary file does not get installed as it is only used for tests. All the files that do get installed in the output path of msgpack in the store do not contain the hash part of the store-path of zlib. They only refer to zlib by name. IIUC this can not be detected by guix gc --references since it only searches for the hash part of the store-path of zlib. This is what I grasp from looking at libstore/references.cc and libstore/store-api.cc. I am not sure about this though. Best, Lukas