Git Product home page Git Product logo

geckodriver-arm-binaries's Introduction

Unofficial geckodriver-arm-binaries

NOTE: These are unofficial binaries. They are not provided by Mozilla but instead compiled and built independently. Use at your own risk. If you have concerns, please follow the steps below to build the binaries yourself. See geckodriver source code and license for more details.

NOTE: Mozilla has released geckodriver for linux-aarch64. Please use their official aarch64 release instead of the unofficial one here. In the meantime, I have build linux-aarch64 to help make the transition easier. I will continue to build geckodriver linux-armv7.

See mozilla/geckodriver releases to download the official linux-aarch64 geckodriver binary.


This repo contains the following unofficial geckodriver arm binaries:

You may download the ones provided. Otherwise, see the below instructions to build it on arm64 or armhf hardware using a container image.

Build Container Image

$ docker build --build-arg GECKODRIVER_VERSION=0.32.0 -t local/geckodriver-arm-builder .

Build geckodriver ARM64 binary

Release build

$ docker run --rm -it -v $PWD/artifacts:/media/host -w /opt/geckodriver --name geckodriver-arm-builder local/geckodriver-arm-builder

Debug build

$ docker run --rm -it -v $PWD/artifacts:/media/host -w /opt/geckodriver --name geckodriver-arm-builder local/geckodriver-arm-builder bash -c "sh build-geckodriver-arm.sh debug"

Building with QEMU emulation

If you're not on an arm64 platform or wish to build for another platform, such as armv7, or arm64 if you're on x86_64, you can use QEMU emulation to build the driver:

First, unregister any platforms already registered:

$ docker run --rm -it --privileged aptman/qus -- -r

Next, re-register the emulated architectures:

$ docker run --rm -it --privileged aptman/qus -s -- -p

Then, build the container image with buildx:

$ docker buildx build --platform linux/arm/v7 --build-arg GECKODRIVER_VERSION=0.32.0 -t local/geckodriver-arm-builder .

Then build the geckodriver binary. Here's an example building geckodriver for armhf with QEMU:

docker run --rm -it --platform linux/arm/v7 -v $PWD/artifacts:/media/host -w /opt/geckodriver --name geckodriver-arm-builder local/geckodriver-arm-builder

Building with cross-compilation

It's also possible to build a geckodriver binary on one host architecture that targets another architecture. This information is adapted from Mozilla's developer documentation on Self Serving an ARM build.

armv7l/armhf

If you don’t have Rust installed:

# curl https://sh.rustup.rs -sSf | sh

Install cross-compiler toolchain:

# apt install gcc-arm-linux-gnueabihf libc6-armhf-cross libc6-dev-armhf-cross

Create a new shell, or to reuse the existing shell:

source $HOME/.cargo/env

Install rustc target toolchain:

% rustup target install armv7-unknown-linux-gnueabihf

Put this in testing/geckodriver/.cargo/config:

[target.armv7-unknown-linux-gnueabihf]
linker = "arm-linux-gnueabihf-gcc"

Build geckodriver from testing/geckodriver:

% cd testing/geckodriver
% cargo build --release --target armv7-unknown-linux-gnueabihf

aarch64/arm64

Install cross-compiler toolchain:

$ apt install gcc-aarch64-linux-gnu libc6-arm64-cross libc6-dev-arm64-cross

Create a new shell, or to reuse the existing shell:

$ source $HOME/.cargo/env

Install rustc target toolchain:

$ rustup target install aarch64-unknown-linux-gnu

Put this in testing/geckodriver/.cargo/config:

[target.aarch64-unknown-linux-gnu]
linker = "aarch64-linux-gnu-gcc"

Build geckodriver from testing/geckodriver:

$ cargo build --release --target aarch64-unknown-linux-gnu

Additional information

The binary is copied to $PWD/artifacts. If you're using podman-machine or running Docker in a VM, then you'll need to copy the binary from Podman or the VM via scp or by mounting a shared volume.

geckodriver source code and license

geckodriver is made available under the Mozilla Public License and is a product of Mozilla.

Its source code can be found in mozilla-central under testing/geckodriver. This unofficial GitHub repository is only used for building geckodriver for ARM and is not affiliated with Mozilla. See mozilla/geckodriver for issue tracking and official Mozilla geckodriver releases.

geckodriver-arm-binaries's People

Contributors

jamesmortensen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

xu3s randmental

geckodriver-arm-binaries's Issues

geckodriver: /lib/aarch64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by geckodriver) geckodriver: /lib/aarch64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by geckodriver)

Hi i am gettimg this error when trying to run, i have tried to update my libc6 on my device but 2.31 is the latest , any solution you can help me?

geckodriver: /lib/aarch64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by geckodriver) geckodriver: /lib/aarch64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by geckodriver)

warning: trailing semicolon in macro used in expression position

Thanks for helping me compiling, it works...

cargo --version

cargo 1.59.0 (49d8809dc 2022-02-10)

rustc --version

rustc 1.59.0 (9d1b2106e 2022-02-23)

warning: trailing semicolon in macro used in expression position
--> src/main.rs:118:63
|
118 | return Err(FatalError::Usage(format!($fmt, $($arg)+)));
| ^
...
154 | Err(e) => usage!("invalid --port: {}: {}", e, s),
| -------------------------------------- in this macro invocation
|
= note: #[warn(semicolon_in_expressions_from_macros)] on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #79813 https://github.com/rust-lang/rust/issues/79813
= note: this warning originates in the macro usage (in Nightly builds, run with -Z macro-backtrace for more info)

warning: trailing semicolon in macro used in expression position
--> src/main.rs:118:63
|
118 | return Err(FatalError::Usage(format!($fmt, $($arg)+)));
| ^
...
159 | Err(e) => usage!("{}: {}:{}", e, host, port),
| ---------------------------------- in this macro invocation
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #79813 https://github.com/rust-lang/rust/issues/79813
= note: this warning originates in the macro usage (in Nightly builds, run with -Z macro-backtrace for more info)

warning: trailing semicolon in macro used in expression position
--> src/main.rs:118:63
|
118 | return Err(FatalError::Usage(format!($fmt, $($arg)+)));
| ^
...
162 | / usage!(
163 | | "invalid --host: {}. Must be a local loopback interface",
164 | | host
165 | | )
| |_________- in this macro invocation
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #79813 https://github.com/rust-lang/rust/issues/79813
= note: macro invocations at the end of a block are treated as expressions
= note: to ignore the value produced by the macro, add a semicolon after the invocation of usage
= note: this warning originates in the macro usage (in Nightly builds, run with -Z macro-backtrace for more info)

warning: trailing semicolon in macro used in expression position
--> src/main.rs:118:63

|

118 | return Err(FatalError::Usage(format!($fmt, $($arg)+)));
| ^
...
177 | Err(e) => usage!("invalid --marionette-port: {}", e),
| ------------------------------------------ in this macro invocation
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a fu
ture release!
= note: for more information, see issue #79813 https://github.com/rust-lang/rust/issues/79813
= note: this warning originates in the macro usage (in Nightly builds, run with -Z macro-backtrace for more info)

warning: trailing semicolon in macro used in expression position
--> src/main.rs:118:63
|
118 | return Err(FatalError::Usage(format!($fmt, $($arg)+)));
| ^
...
187 | Err(e) => usage!("invalid --websocket-port: {}", e),
| ----------------------------------------- in this macro invocation
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #79813 https://github.com/rust-lang/rust/issues/79813
= note: this warning originates in the macro usage (in Nightly builds, run with -Z macro-backtrace for more info)

Hello Sir

Can you add gecko 0.34 for arm7 please

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.