!ZFqvHUjUqgONNObpSJ:matrix.org

cross-rs

258 Members
Development of the Cross cross-compilation tool https://github.com/cross-rs/cross30 Servers

Load older messages


SenderMessageTime
22 Jul 2024
@emilgardis:matrix.orgemilgardisif it's needed at compiletime, then add it to the cross.toml10:46:12
@emilgardis:matrix.orgemilgardis * if it's needed at compiletime, then add it to the Cross.toml10:46:18
@redeexpressos:matrix.orgredeexpressos
In reply to @emilgardis:matrix.org
if it's needed at compiletime, then add it to the Cross.toml
but does cross find the Cross.toml from the other crate?
15:18:41
@redeexpressos:matrix.orgredeexpressos my build is failing bcuz it cant find protobuf-compiler, even tho my crate has a Cross.toml 15:19:01
@redeexpressos:matrix.orgredeexpressos * my build is failing bcuz it cant find protobuf-compiler, even tho my crate has a Cross.toml (that installs needed deps) 15:19:06
@emilgardis:matrix.orgemilgardisthere's only ever one config file15:19:08
@redeexpressos:matrix.orgredeexpressos my program A depends on a crate B that uses a package.
do i need to install the package in A's Cross.toml or B's?
15:19:56
@emilgardis:matrix.orgemilgardiscross is just a fancy way to invoke a container, with cross.toml you're telling us what to do with that container, like say install dependencies etc15:20:46
@emilgardis:matrix.orgemilgardis so, when you do cross build --target <target> we lookup the config to use, and that config either lives in the manifest workspace.metadata.cross, package.metadata.cross or in Cross.toml 15:21:50
@emilgardis:matrix.orgemilgardis there's no Cross.toml for crate A or B, only one config 15:22:12
@emilgardis:matrix.orgemilgardis * there's no Cross.toml for crate A or B, only one config, for both A and B 15:22:36
@emilgardis:matrix.orgemilgardis

your pre-build should look something like this

pre-build = [
    "apt-get update && apt-get install protobuf-compiler"
]
15:24:24
23 Jul 2024
@actually_happening:matrix.orgactually_happening I've tried to use cross to build a package that has path dependencies in folders about that crate I am trying to build 08:00:38
@actually_happening:matrix.orgactually_happening * I've tried to use cross to build a package that has path dependencies in folders above that crate I am trying to build 08:00:48
@actually_happening:matrix.orgactually_happeningThis didn't work, is there an officially supported way of changing which folders are synced with the internal docker container used to build my final binary?08:01:16
@actually_happening:matrix.orgactually_happening I tried something like cross build --package=ymap-website --bin=ymap-website --release --no-default-features --features=ssr,production --target x86_64-unknown-linux-gnu --manifest-path ./website/Cargo.toml but I get really weird build errors from a leptonic build script saying it can't find /Cargo.toml 08:03:44
@actually_happening:matrix.orgactually_happening Also, is there a good reason why a custom logging 'framework' was built instead of using tracing? 08:23:59
@actually_happening:matrix.orgactually_happeningFor my own sanity I might add detailed logging, but not soon (other stuff going on)08:24:57
@emilgardis:matrix.orgemilgardis actually_happening: to mount another directory you can use .env, see https://github.com/cross-rs/cross/blob/main/docs/config_file.md#buildenv 20:19:32
@emilgardis:matrix.orgemilgardisAs for the logging situation, I can't remember why we didn't go with tracing, but I'd be open to use it20:20:04
@emilgardis:matrix.orgemilgardisalso, https://github.com/cross-rs/cross/issues/797 might be interesting20:23:41
24 Jul 2024
@actually_happening:matrix.orgactually_happeningAbout the logging, I was thinking finding/implementing my own tracing subscriber that outputs in the style of cargo logs (i.e. ignoring extra fields and outputting with "warning: My message"08:04:22
@actually_happening:matrix.orgactually_happeningAnd about the volumes, I read the documentation and don't fully understand how/what the volumes mount does [build.env] volumes = ["VOL1_ARG", "VOL2_ARG=/path/to/volume"]08:05:07
@actually_happening:matrix.orgactually_happeningWhat does the file system look like inside the docker container? I'm relatively new to docker and can't find a way of inspecting the running container since it appears to exit after the command is finished Can some documentation exist for the filesystem layout inside the docker container? It would help with picturing how my build works with cross08:06:24
@actually_happening:matrix.orgactually_happening And how would I solve my current problem, where the path required is .. or the parent directory using volume mounts? 08:07:18
26 Jul 2024
@yowftwu:matrix.orgyowftwu (IDF)the day before yesterday I was still able to build my project with cross for target=aarch64-unknown-linux-gnu without adding openssl with features = ["vendored"]. Today I tried again and now I get the "error: could not find system library 'openssl' required by the 'openssl-sys' crate"19:38:18
@yowftwu:matrix.orgyowftwu (IDF) * the day before yesterday I was still able to build my project with cross for target=aarch64-unknown-linux-gnu without adding openssl with features = ["vendored"]. Today I tried again and now I get the "error: could not find system library 'openssl' required by the 'openssl-sys' crate" I can workaround the problem by explicitly adding the openssl crate as dependency with features = ["vendored"], but it annoys me a bit because it blows up my release binary size from 1.4mb to 6.2mb 19:42:11
@yowftwu:matrix.orgyowftwu (IDF) * the day before yesterday I was still able to build my project with cross for target=aarch64-unknown-linux-gnu without adding openssl with features = ["vendored"]. Today I tried again and now I get the "error: could not find system library 'openssl' required by the 'openssl-sys' crate" I can workaround the problem by explicitly adding the openssl crate as dependency with features = ["vendored"], but it annoys me a bit because that blows up my release binary size from 1.4mb to 6.2mb 19:42:30
@yowftwu:matrix.orgyowftwu (IDF) * the day before yesterday I was still able to build my project with cross for target=aarch64-unknown-linux-gnu without adding openssl with features = ["vendored"]. Today I tried again and now I get the "error: could not find system library 'openssl' required by the 'openssl-sys' crate" I can workaround the problem by explicitly adding the openssl crate as dependency with features = ["vendored"], but it annoys me a bit because that blows up my release binary size from 1.4mb to 6.2mb UPDATE: debugged the problem a bit more and found the cause was in some changes in my dependencies that used openssl, thought I always had those, but turns out I removed it before and now readded it. 19:53:59
@yowftwu:matrix.orgyowftwu (IDF) * the day before yesterday I was still able to build my project with cross for target=aarch64-unknown-linux-gnu without adding openssl with features = ["vendored"]. Today I tried again and now I get the "error: could not find system library 'openssl' required by the 'openssl-sys' crate" I can workaround the problem by explicitly adding the openssl crate as dependency with features = ["vendored"], but it annoys me a bit because that blows up my release binary size from 1.4mb to 6.2mb UPDATE: debugged the problem a bit more and found the cause was in some changes in my dependencies that used openssl, thought I always had those, but turns out I removed it before and now readded it. But still I'd like to be able to build my project in a way that just makes use of the openssl-lib installed on my target system instead of shipping my own copy of it. Can somebody give me instructions on how to achieve that? 19:55:08

There are no newer messages yet.


Back to Room ListRoom Version: 6