cargo-c icon indicating copy to clipboard operation
cargo-c copied to clipboard

add library file soversion symlink in target directory when `cargo cbuild` is performed

Open radhermit opened this issue 3 years ago • 6 comments

I haven't looked deeply into the code yet, but it seems like it's only created when doing cargo cinstall and not cargo cbuild.

Allowing for creation under cargo cbuild would help simplify development instructions such as those for pkgcraft-bash that ask the user to create the requisite symlink themselves when building projects for development purposes without installing them.

radhermit avatar Dec 24 '21 10:12 radhermit

cargo-c provides -uninstalled.pc files for that purpose, they have to be used explicitly as --static thought.

lu-zero avatar Dec 24 '21 14:12 lu-zero

If you want to support uninstalled with shared library it requires to install the dylibs in a local path and patch the rpaths (in particular for macos)

lu-zero avatar Dec 26 '21 12:12 lu-zero

cargo-c provides -uninstalled.pc files for that purpose, they have to be used explicitly as --static thought.

Well it didn't seem like it needed that since things still built, at least on linux. :smile:

However, the temporary path install works fine too, thanks.

radhermit avatar Dec 27 '21 06:12 radhermit

It is the cleanest way that works for every platform, on macOS I'd have to invoke install_name_tool and patch up the binary to add the correct rpaths since there is no other way to set it externally (the env variable is disregarded due to security concerns)

lu-zero avatar Dec 27 '21 13:12 lu-zero

Sounds fair, you can close this if you want then.

radhermit avatar Dec 27 '21 20:12 radhermit

I'll keep it open and try to document better how things should work.

lu-zero avatar Jan 16 '22 15:01 lu-zero