Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable builds for armv6 target #560

Open
rahul-thakoor opened this issue Apr 24, 2024 · 1 comment
Open

Enable builds for armv6 target #560

rahul-thakoor opened this issue Apr 24, 2024 · 1 comment

Comments

@rahul-thakoor
Copy link
Contributor

We currently build for

        aarch64-unknown-linux-gnu,
        armv7-unknown-linux-gnueabihf,
        x86_64-unknown-linux-gnu,
        i686-unknown-linux-gnu

I tried to enable armv6 builds, using target arm-unknown-linux-gnueabihf

Cross compiling libdbus fails. As per instructions here I added

[target.arm-unknown-linux-gnueabihf.env]
passthrough = ["RUSTFLAGS=-L /usr/arm-linux-gnueabihf/lib/ -L /usr/lib/arm-linux-gnueabihf/", "PKG_CONFIG_PATH=/usr/lib/arm-linux-gnueabihf/pkgconfig/","PKG_CONFIG_ALLOW_CROSS=true"]

but Flowzone build fails in the Publish step with :

Compiling wifi-connect v4.11.38 (/project)
     Running `rustc --crate-name wifi_connect src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C opt-level=3 -C lto -C metadata=2b3a8d67df011610 -C extra-filename=-2b3a8d67df011610 --out-dir /target/arm-unknown-linux-gnueabihf/release/deps --target arm-unknown-linux-gnueabihf -C linker=arm-unknown-linux-gnueabihf-gcc -L dependency=/target/arm-unknown-linux-gnueabihf/release/deps -L dependency=/target/release/deps --extern clap=/target/arm-unknown-linux-gnueabihf/release/deps/libclap-1fc5a8f8b647bd63.rlib --extern env_logger=/target/arm-unknown-linux-gnueabihf/release/deps/libenv_logger-8ffd08e5a27961c7.rlib --extern error_chain=/target/arm-unknown-linux-gnueabihf/release/deps/liberror_chain-756e7fcd699e1ec1.rlib --extern iron=/target/arm-unknown-linux-gnueabihf/release/deps/libiron-f44288b333742354.rlib --extern iron_cors=/target/arm-unknown-linux-gnueabihf/release/deps/libiron_cors-037231c07bde4d0a.rlib --extern log=/target/arm-unknown-linux-gnueabihf/release/deps/liblog-5ca2f0517caaf135.rlib --extern mount=/target/arm-unknown-linux-gnueabihf/release/deps/libmount-a113c6e0a1459beb.rlib --extern network_manager=/target/arm-unknown-linux-gnueabihf/release/deps/libnetwork_manager-0bded0b8b9176299.rlib --extern nix=/target/arm-unknown-linux-gnueabihf/release/deps/libnix-5bec8111479cc868.rlib --extern params=/target/arm-unknown-linux-gnueabihf/release/deps/libparams-4e183d770ec1db4a.rlib --extern persistent=/target/arm-unknown-linux-gnueabihf/release/deps/libpersistent-fb28a16d6c776729.rlib --extern router=/target/arm-unknown-linux-gnueabihf/release/deps/librouter-7cbae9fe3b9d325d.rlib --extern serde=/target/arm-unknown-linux-gnueabihf/release/deps/libserde-988a08d2dde734ac.rlib --extern serde_derive=/target/release/deps/libserde_derive-3911f2c984408e78.so --extern serde_json=/target/arm-unknown-linux-gnueabihf/release/deps/libserde_json-fef308203ef5d039.rlib --extern staticfile=/target/arm-unknown-linux-gnueabihf/release/deps/libstaticfile-98284c1a32ce0904.rlib -L /usr/arm-linux-gnueabihf/lib/ -L /usr/lib/arm-linux-gnueabihf/ -L native=/usr/lib/arm-linux-gnueabihf`
error: linking with `arm-unknown-linux-gnueabihf-gcc` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/rust/lib/rustlib/x86_64-unknown-linux-gnu/bin:/x-tools/arm-unknown-linux-gnueabihf/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/rust/bin" VSLANG="1033" "arm-unknown-linux-gnueabihf-gcc" "/tmp/rustc2PNj5B/symbols.o" "/target/arm-unknown-linux-gnueabihf/release/deps/wifi_connect-2b3a8d67df011610.wifi_connect.ce89b739002be5e2-cgu.11.rcgu.o" "-Wl,--as-needed" "-L" "/target/arm-unknown-linux-gnueabihf/release/deps" "-L" "/target/release/deps" "-L" "/usr/arm-linux-gnueabihf/lib/" "-L" "/usr/lib/arm-linux-gnueabihf/" "-L" "/usr/lib/arm-linux-gnueabihf" "-L" "/rust/lib/rustlib/arm-unknown-linux-gnueabihf/lib" "-Wl,-Bstatic" "/rust/lib/rustlib/arm-unknown-linux-gnueabihf/lib/libcompiler_builtins-76bc871ffb0f557c.rlib" "-Wl,-Bdynamic" "-ldbus-1" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/rust/lib/rustlib/arm-unknown-linux-gnueabihf/lib" "-o" "/target/arm-unknown-linux-gnueabihf/release/deps/wifi_connect-2b3a8d67df011610" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-nodefaultlibs"
  = note: /x-tools/arm-unknown-linux-gnueabihf/lib/gcc/arm-unknown-linux-gnueabihf/8.3.0/../../../../arm-unknown-linux-gnueabihf/bin/ld: warning: libsystemd.so.0, needed by /usr/lib/arm-linux-gnueabihf//libdbus-1.so, not found (try using -rpath or -rpath-link)
          /x-tools/arm-unknown-linux-gnueabihf/lib/gcc/arm-unknown-linux-gnueabihf/8.3.0/../../../../arm-unknown-linux-gnueabihf/bin/ld: /usr/lib/arm-linux-gnueabihf//libdbus-1.so: undefined reference to `sd_listen_fds@LIBSYSTEMD_209'
          /x-tools/arm-unknown-linux-gnueabihf/lib/gcc/arm-unknown-linux-gnueabihf/8.3.0/../../../../arm-unknown-linux-gnueabihf/bin/ld: /usr/lib/arm-linux-gnueabihf//libdbus-1.so: undefined reference to `sd_is_socket@LIBSYSTEMD_209'
          collect2: error: ld returned 1 exit status
          
  = note: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
  = note: use the `-l` flag to specify native libraries to link
  = note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-libkindname)

error: could not compile `wifi-connect` (bin "wifi-connect") due to 1 previous error

Caused by:
  process didn't exit successfully: `rustc --crate-name wifi_connect src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C opt-level=3 -C lto -C metadata=2b3a8d67df011610 -C extra-filename=-2b3a8d67df011610 --out-dir /target/arm-unknown-linux-gnueabihf/release/deps --target arm-unknown-linux-gnueabihf -C linker=arm-unknown-linux-gnueabihf-gcc -L dependency=/target/arm-unknown-linux-gnueabihf/release/deps -L dependency=/target/release/deps --extern clap=/target/arm-unknown-linux-gnueabihf/release/deps/libclap-1fc5a8f8b647bd63.rlib --extern env_logger=/target/arm-unknown-linux-gnueabihf/release/deps/libenv_logger-8ffd08e5a27961c7.rlib --extern error_chain=/target/arm-unknown-linux-gnueabihf/release/deps/liberror_chain-756e7fcd699e1ec1.rlib --extern iron=/target/arm-unknown-linux-gnueabihf/release/deps/libiron-f44288b333742354.rlib --extern iron_cors=/target/arm-unknown-linux-gnueabihf/release/deps/libiron_cors-037231c07bde4d0a.rlib --extern log=/target/arm-unknown-linux-gnueabihf/release/deps/liblog-5ca2f0517caaf135.rlib --extern mount=/target/arm-unknown-linux-gnueabihf/release/deps/libmount-a113c6e0a1459beb.rlib --extern network_manager=/target/arm-unknown-linux-gnueabihf/release/deps/libnetwork_manager-0bded0b8b9176299.rlib --extern nix=/target/arm-unknown-linux-gnueabihf/release/deps/libnix-5bec8111479cc868.rlib --extern params=/target/arm-unknown-linux-gnueabihf/release/deps/libparams-4e183d770ec1db4a.rlib --extern persistent=/target/arm-unknown-linux-gnueabihf/release/deps/libpersistent-fb28a16d6c776729.rlib --extern router=/target/arm-unknown-linux-gnueabihf/release/deps/librouter-7cbae9fe3b9d325d.rlib --extern serde=/target/arm-unknown-linux-gnueabihf/release/deps/libserde-988a08d2dde734ac.rlib --extern serde_derive=/target/release/deps/libserde_derive-3911f2c984408e78.so --extern serde_json=/target/arm-unknown-linux-gnueabihf/release/deps/libserde_json-fef308203ef5d039.rlib --extern staticfile=/target/arm-unknown-linux-gnueabihf/release/deps/libstaticfile-98284c1a32ce0904.rlib -L /usr/arm-linux-gnueabihf/lib/ -L /usr/lib/arm-linux-gnueabihf/ -L native=/usr/lib/arm-linux-gnueabihf` (exit status: 1)
  
@ryanrolds
Copy link

I'm looking at this too, but unable to get Flowzone to run a build in my fork. I'm having to move away from it and rewrite the Dockerfile to actually do the build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants