MGlolenstine / gtk4-cross

A Docker container for cross-compiling gtk4 programs to Windows.
57 stars 12 forks source link

Please update the documentation #10

Closed piegamesde closed 2 years ago

piegamesde commented 2 years ago

I am trying to get this to work, but I'm really struggling. (Also, this is my first time using Docker so I may be dumber than your average user)


I finally got things to work, the only missing step is that my application fails to link after compiling:

          /usr/bin/ld: cannot find -lpangowin32-1.0
          /usr/bin/ld: cannot find -lpangocairo-1.0
          /usr/bin/ld: cannot find -lpango-1.0
          /usr/bin/ld: cannot find -lharfbuzz
          /usr/bin/ld: cannot find -lgdk_pixbuf-2.0
          /usr/bin/ld: cannot find -lcairo-gobject
          /usr/bin/ld: cannot find -lcairo
          /usr/bin/ld: cannot find -lgraphene-1.0
          /usr/bin/ld: cannot find -lintl
          /usr/bin/ld: cannot find -lgtk-4
          /usr/bin/ld: cannot find -lpangowin32-1.0
          /usr/bin/ld: cannot find -lpangocairo-1.0
          /usr/bin/ld: cannot find -lpango-1.0
          /usr/bin/ld: cannot find -lharfbuzz
          /usr/bin/ld: cannot find -lgdk_pixbuf-2.0
          /usr/bin/ld: cannot find -lcairo-gobject
          /usr/bin/ld: cannot find -lcairo
          /usr/bin/ld: cannot find -lgraphene-1.0
          /usr/bin/ld: cannot find -lintl
          /usr/bin/ld: cannot find -lgraphene-1.0
          /usr/bin/ld: cannot find -lintl
          /usr/bin/ld: cannot find -lgtk-4
          /usr/bin/ld: cannot find -lpangowin32-1.0
          /usr/bin/ld: cannot find -lpangocairo-1.0
          /usr/bin/ld: cannot find -lpango-1.0
          /usr/bin/ld: cannot find -lharfbuzz
          /usr/bin/ld: cannot find -lgdk_pixbuf-2.0
          /usr/bin/ld: cannot find -lcairo-gobject
          /usr/bin/ld: cannot find -lcairo
          /usr/bin/ld: cannot find -lgraphene-1.0
          /usr/bin/ld: cannot find -lintl
          /usr/bin/ld: cannot find -lgdk_pixbuf-2.0
          /usr/bin/ld: cannot find -lintl
          /usr/bin/ld: cannot find -lpango-1.0
          /usr/bin/ld: cannot find -lintl
          /usr/bin/ld: cannot find -lharfbuzz
          /usr/bin/ld: cannot find -lcairo-gobject
          /usr/bin/ld: cannot find -lcairo
          /usr/bin/ld: cannot find -lintl
          /usr/bin/ld: cannot find -lintl
          /usr/bin/ld: cannot find -lintl
          /usr/bin/ld: cannot find -lintl
          collect2: error: ld returned 1 exit status

I don't know why it can't find those, I tried installing cairo and it said that it was already installed.

MGlolenstine commented 2 years ago

Thanks for the report, the documentation really is lacking and I was thinking of improving it. Thanks for the details, I'll look into it later today.

piegamesde commented 2 years ago

I tried switching to rootless podman and now run into weird file system issues, not sure if related

STEP 12/15: RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
info: downloading installer
info: profile set to 'default'
info: default host triple is x86_64-unknown-linux-gnu
warning: Updating existing toolchain, profile choice will be ignored
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: latest update on 2022-04-07, rust version 1.60.0 (7737e0b5c 2022-04-04)
info: downloading component 'rust-std' for 'x86_64-pc-windows-gnu'
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
info: downloading component 'rust-std'
info: downloading component 'rustc'
info: downloading component 'rustfmt'
info: removing previous version of component 'rust-std' for 'x86_64-pc-windows-gnu'
info: rolling back changes
error: could not rename component file from '/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/self-contained' to '/root/.rustup/tmp/wh9cc98konfm1ose_dir/bk': Invalid cross-device link (os error 18)
Error: error building at STEP "RUN curl https://sh.rustup.rs -sSf | sh -s -- -y": error while running runtime: exit status 1

Edit: Resolved by purging all old data and by commenting out the RUN curl https://sh.rustup.rs -sSf | sh -s -- -y line, since rustup is already installed in the base image.

piegamesde commented 2 years ago

Also, all shell scripts should start with set -euo pipefail and pass https://shellcheck.net/

MGlolenstine commented 2 years ago

I have added some improvements and pushed them to the new branch documentation_script_rewrite and can be seen in #11 .

Could you test it out and give feedback?

MGlolenstine commented 2 years ago

Should be fixed by #11 .