rust-lang / crates-build-env Goto Github PK
View Code? Open in Web Editor NEWBuild environment for third-party Rust crates
License: MIT License
Build environment for third-party Rust crates
License: MIT License
Hello,
I am writing a Rust wrapper around the Gmsh SDK, a tool used for CAD and mesh generation.
http://gmsh.info/
Documentation builds fail since the libgmsh
library isn't installed by default:
https://docs.rs/crate/gmsh-sys/0.1.0/builds/186306
I believe this image is based on Stretch, but libgmsh
only started exposing this stable API after version 4, and I think the Stretch version won't work since it's too old (v2.15)
In Buster, this library is here: https://packages.debian.org/buster/libgmsh4.1
Would it be possible to include a compatible libgmsh
version in this container?
Thank you very much for your time.
Max Orok
This is meant to be an ongoing tracking issue. If anyone observes a crate failing to build due to a missing dependency, post it here.
Libraries should be added to vc-packages.txt
and will be automatically installed via vcpkg
. Executables should be installed via choco-packages.txt
.
freetype
(required by jjjjw.rust_elmish_rocket
)pkgconfig
(required by curl-sys
)libgit2
libmysql
(mysqlclient
required by astaupb.wp_posts_api
)libsndfile
libusb
(required by libusb-sys
)opencl
(required by ocl
)portaudio
(required by weresocool-0.1.0
)SDL2-image
(required by ruscur.phase
)python
(3, named python.exe
) (required by shaderc-sys
)clang
(required by wepoll-sys-1.0.3
)curl
cmake
(required by shaderc-sys
)libsodium
libssh2
libpq
ninja
(required by shaderc-sys
)openal
(required by Tethik.beepr
)openssl
(required by rust-openssl
)portmidi
(required by diaschisma.mimi
)sdl2
(required by Ade-AWD.Foxxy
)sqlite3
Building a crate with a dependency to the libhandy crate fails on docs.rs: https://docs.rs/crate/gstore/0.2.4/builds/358169
Affected crates: gstore
Ubuntu 20.04 packages to install: libhandy-1-0
The pkg_config
utility is nominally cross-platform, so successfully building crates which use it--usually via a utility crate like pkg-config-rs
--should be feasible. However, such crates don't currently build (e.g. tcod-sys
). This will probably not be as simple as installing pkg_config
via a package manager, but that is a good start.
The actual issue is that older versions of the gcc
crate did not emit the /Fo
flag to tell cl.exe
where to put object files created during compilation, and thus object files are created in the working directory. These object files are cleaned up after compilation, so this usually doesn't matter, but since the working directory (which contains the crate's source code) is mounted read-only in the container, cl.exe
can't create them. Curiously, this only results in an error when the linker goes looking for the object file, not when cl.exe
tries to write it.
I don't think there's a good work-around besides mounting the working directory as read/write instead of read-only. I think this is probably not worth it, but I'll let @pietroalbini have the final word.
Affected crates: tauri
Ubuntu 20.04 packages to install: mono-complete (requires adding an HTTPS repository)
The tauri
crate uses webview2-com and it needs mono to cross compile. I wanted to make a PR for this but since it involves adding a new repository, I wanted to check the policy and if you would allow that.
Maybe a bit too "nit-picky", but when i added packages for #66, and applied sort packages.txt > out.txt
, and then copy-pasted contents of that file into the old one, my VCS diff showed a lot more packages being shuffled around than i was expected.
Maybe add this pre-requisite step into the project's CI? To check if the file has been sorted correctly, to also avoid duplicates and the like.
The current file is pseudo-hand-sorted, which may not be useful when the actual goal is to have a sorted file.
Affected crates: lottieconv, rlottie, rlottie-sys
Ubuntu 22.04 packages to install: librlottie-dev
Affected crates: libvpx-native-sys, env-libvpx-sys, vpx-encode, encode-webm-video-frames
Ubuntu 20.04 packages to install: libvpx-dev
Affected crates: trivialdb
Ubuntu 22.04 packages to install: libtdb-dev
Affected crates: clingo-sys
Ubuntu 18.04 packages to install: bison, re2c
Can you add libelektra-dev
to the system dependencies?
This is for the Rust bindings for libelektra, specifically for the elektra and elektra-sys crates. elektra-sys
uses rust-bindgen
to generate the bindings from the header file in the above mentioned package. If it's not present then documentation for the elektra
crate won't build.
I ran the docker image as suggested in the blog post and installed the package. The documentation then built sucessfully.
Thanks!
When trying to run the top 100 "crypto" crates, there are two crates that fail to build due to external dependencies, rust_sodium-sys and gpgme-sys which need libsodium and gnupg respectively.
We should consider adding these to the build environment for Windows. Both are made available on Linux.
Building crate vncserver failed.
[INFO] [stderr] thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Failure { command: "\"pkg-config\" \"--libs\"
\"--cflags\" \"libvncserver\"", output: Output { status: ExitStatus(ExitStatus(256)), stdout: "", stderr: "Package libvncserver was not
found in the pkg-config search path.\nPerhaps you should add the directory containing `libvncserver.pc\'\nto the
PKG_CONFIG_PATH environment variable\nNo package \'libvncserver\' found\n" } }', build.rs:9:65
Missing libvncserver-dev
Affected crates: vncserver
Ubuntu 20.04 packages to install: libvncserver-dev
Affected crates: libstatgrab-sys
Ubuntu 20.04 packages to install: libstatgrab-dev
Affected crates: quickjs-wasm-sys, quickjs-wasm-rs, javy, javy-apis
The four crates above need access to a WASI SDK to compile some vendored C source code to the wasm32-wasi target. Unfortunately I can't find an Ubuntu package for the WASI SDK. There is a wasi-libc
package but that's not sufficient since Clang also requires an additional runtime archive file to be installed and that archive file is not part of an Ubuntu package.
From https://github.com/WebAssembly/wasi-sdk:
One could also use a standard Clang installation, build a sysroot from the sources mentioned above, and compile with --target=wasm32-wasi --sysroot=/path/to/sysroot. In this scenario, one would also need the libclang_rt.builtins-wasm32.a objects available separately in the release downloads which must be extracted into $CLANG_INSTALL_DIR/$CLANG_VERSION/lib/wasi/.
The compiled WASI SDK is also too large to vendor given cargo's size limits on crates.
I'm not sure how to proceed.
Unfortunately, the version of the Nettle cryptographic library shipped with Ubuntu 18.04 is too old (3.4) to build our Nettle bindings:
https://docs.rs/crate/nettle/6.0.0/builds/220957
We require at least version 3.4.1. The oldest Ubuntu release that ships that version is 19.04:
https://packages.ubuntu.com/disco/libnettle6
As an alternative, Debian 10 also ships 3.4.1:
opencv and all the crates using it could use libopencv-dev
to make DocTest work.
Affected crates: opencv, realsense-rust, rust_drone_follow, abow, cv-convert, nokhwa, podo-std-eye, eorst, printimg, arc_lib, checkerboard, dlib-face-recognition-cv, f-trak, tangram-vision-sdk, softmount, shutter and my own libstacker
They also needs already installed.clang
and libclang-dev
but I assume those packages are already installed.
Failed build log.
Ubuntu 20.04 packages to install: libopencv-dev
Affected crates: kde_frameworks
Ubuntu 20.04 packages to install: libkf5kdelibs4support5-bin
It seems the action using Azure Pipelines is failing because
An image label with the label win1803 does not exist.
Earlier faillure gave the more verbose message
This job was blocked because it uses a Microsoft hosted agent (win1803) that was removed on March 23rd, 2020. See https://aka.ms/blocked-hosted-agent for more information.
Affected crates: uapi
- fails to cross-compile to x86_64-unknown-linux-musl
Ubuntu 18.04 packages to install: musl-tools
Currently it's documented that the images are built using Ubuntu 20.04, which is the most recent Ubuntu LTS. It would be good to have the upgrade policy for this clarified, is the intent to track Ubuntu LTS', or if someone put in the effort to do an upgrade would moving to newer non-LTS versions be acceptable?
This affects crates that rely on more modern system dependencies, e.g. rust-lang/docs.rs#1198, 20.04 is only shipping libcapstone3
while 21.04 has upgraded to libcapstone4
. If we wait till the next LTS release then it's going to be another year till it's possible to build the documentation for falcon
.
https://docs.rs/crate/tx5-go-pion-sys/0.0.1-alpha.1/builds/723243
[INFO] [stderr] thread 'main' panicked at 'go executable version must be >= 1.19, got: 1.13', build.rs:42:5
The vast majority of crates use the cc
crate for building native libraries. However, a few want the compiler and/or linker on the PATH
(see https://github.com/blt/mond). This seems pretty standard coming from the UNIX world, but the normal workflow on Windows seems to be sourcing a vcvars.bat
file before you build something. I'm not sure if this should be the crate's responsibility or ours. This is complicated by the fact that powershell doesn't have a source
equivalent, so one has to do a contrived workaround to permanently save the configuration in vcvars.bat
.
I am attempting to add a package to the linux image.
During the process of building the image (with libc++-dev and libc++abi-dev added to packages.txt), I get an error saying:
#6 302.5 Some packages could not be installed. This may mean that you have
#6 302.5 requested an impossible situation or if you are using the unstable
#6 302.5 distribution that some required packages have not yet been created
#6 302.5 or been moved out of Incoming.
#6 302.5 The following information may help to resolve the situation:
#6 302.5
#6 302.5 The following packages have unmet dependencies:
#6 302.6 libunwind-14-dev : Breaks: libunwind-dev
#6 302.6 E: Unable to correct problems, you have held broken packages.
I have seen on a thread on some other forum that Ubuntu 22.04 has issues with libunwind-14
Please advise on what action is needed, I am a bit lost...
Affected crates: evdev, evdev-sys
Ubuntu 18.04 packages to install: libevdev-dev
See also: issue filed in that repository: ndesh26/evdev-rs#36
Affected crates: libical, libical-sys
Ubuntu 18.04 packages to install: libical-dev
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.