egui icon indicating copy to clipboard operation
egui copied to clipboard

Windows build with xbuild failing when http feature is enabled.

Open SolidTux opened this issue 1 year ago • 1 comments

Describe the bug

When the http feature is enabled and the image loaders are registered, the linking fails when building for windows with xbuild from Linux (tested under Debian and Fedora). There are many similar errors to this, all in ring:

rust-lld: error: undefined symbol: _mm_setzero_si128
>>> referenced by /home/daniel/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ring-0.17.8/crypto/poly1305/poly1305_vec.c:129
>>>               libring-99d4b686355d1f30.rlib(123d8a351a02283d-poly1305_vec.o):(ring_core_0_17_8_CRYPTO_poly1305_init)
>>> referenced by /home/daniel/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ring-0.17.8/crypto/poly1305/poly1305_vec.c:130
>>>               libring-99d4b686355d1f30.rlib(123d8a351a02283d-poly1305_vec.o):(ring_core_0_17_8_CRYPTO_poly1305_init)
>>> referenced by /home/daniel/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ring-0.17.8/crypto/poly1305/poly1305_vec.c:131
>>>               libring-99d4b686355d1f30.rlib(123d8a351a02283d-poly1305_vec.o):(ring_core_0_17_8_CRYPTO_poly1305_init)
>>> referenced 2 more times

Full log: build.log

Is this a ring or an egui bug?

To Reproduce Steps to reproduce the behavior:

main.rs

use eframe::egui::Context;
use egui_extras::install_image_loaders;

fn main() {
    install_image_loaders(&Context::default());
}

Cargo.toml

[package]
name = "ring-test"
version = "0.1.0"
edition = "2021"

[dependencies]
eframe = { git = "https://github.com/emilk/egui", branch = "master" }
egui_extras = { git = "https://github.com/emilk/egui", branch = "master", features = [
    "http",
] }

Install xbuild:

cargo install xbuild

Then run

x build --platform windows --arch x64

Expected behavior

Build succeeds

Desktop (please complete the following information):

  • OS: Fedora 41
  • xbuild 0.2.0

SolidTux avatar Dec 18 '24 20:12 SolidTux

Most likely a ring issue. The undefined symbol is an sse2 instruction: https://doc.rust-lang.org/beta/core/arch/x86_64/fn._mm_setzero_si128.html

oscargus avatar Nov 29 '25 20:11 oscargus