Hacker News new | ask | show | jobs
by 1718627440 276 days ago
Upon researching that, I got some questions.

Why does kefir use the shell to invoke itself?

Why does it look for its library under /usr/local/bin/../lib/tls/x86_64/x86_64/libkefir.so ? Shouldn't it know where its supposed to be from the build configuration? Is it intended, that it access a file after trying to unlink it?

    unlink("/tmp/kefir-154946-hu9HGw")      = -1 EISDIR (Is a directory)
    rmdir("/tmp/kefir-154946-hu9HGw")       = 0
    access("/tmp/kefir-154946-hu9HGw/object-file.0.ivTxnw", F_OK) = -1 ENOENT (No such file or directory)
1 comments

Kefir build artifact is fully portable and agnostic to installation location. DESTDIR, prefix, etc are simply interpolated into launch script (template is here: https://git.sr.ht/~jprotopopov/kefir/tree/master/item/script...). So, no kefir binary itself does not know or care where it is installed, it gathers the information the environment variables provided by launch script.

The reason is that kefir supports portable builds which could be unpacked anywhere, so these path might even be relative.