Closed Bug 1899976 Opened 9 months ago Closed 9 months ago

error[E0425]: cannot find value `MAX_BUFFER_READ` in this scope

Categories

(Core :: IPC, defect)

defect

Tracking

()

RESOLVED FIXED
128 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox126 --- unaffected
firefox127 --- unaffected
firefox128 --- fixed

People

(Reporter: petr.sumbera, Assigned: gerard-majax, NeedInfo)

References

(Regression)

Details

(Keywords: regression)

Steps to reproduce:

Build on Solaris fails with:

18:02.59    Compiling l10nregistry v0.3.0 (/builds/psumbera/mozilla-central-build/intl/l10n/rust/l10nregistry-rs)
18:02.84 error[E0425]: cannot find value `MAX_BUFFER_READ` in this scope
18:02.84   --> toolkit/library/buildid_reader/src/reader.rs:42:30
18:02.84    |
18:02.84 42 |         let mut buffer = [0; MAX_BUFFER_READ];
18:02.84    |                              ^^^^^^^^^^^^^^^ not found in this scope
18:02.85 error[E0425]: cannot find value `MAX_BUFFER_READ` in this scope
18:02.85   --> toolkit/library/buildid_reader/src/reader.rs:44:109
18:02.85    |
18:02.85 44 |             error!("BuildIdReader::read_raw_build_id failed to read exact buffer of size {} with error {}", MAX_BUFFER_READ, e);
18:02.86    |                                                                                                             ^^^^^^^^^^^^^^^ not found in this scope

The first bad revision is:
changeset: 741001:55cc3acc9297
user: Alexandre Lissy <lissyx+mozillians@lissyx.dyndns.org>
date: Thu May 30 07:41:52 2024 -0700
description:
Bug 1876590 - Add buildid_reader crate r=afranchuk

Keywords: regression
Regressed by: 1876590

The Bugbug bot thinks this bug should belong to the 'Core::Internationalization' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Internationalization
Product: Firefox → Core

:gerard-majax, since you are the author of the regressor, bug 1876590, could you take a look?

For more information, please visit BugBot documentation.

Flags: needinfo?(lissyx+mozillians)

Unfortunately, i dont know Solaris, you will have to look into bug 1876590 and help me there ; do they use same Elf as linux or something else?

Flags: needinfo?(lissyx+mozillians) → needinfo?(petr.sumbera)

If it's just Elf, then you can just add , target_os = "solaris" in all the places where we have it in buildid_reader crate

This helps. But isn't there some generic UNIX/POSIX tareget? There are also for sure BSDs and maybe others?

--- a/toolkit/library/buildid_reader/src/reader.rs      Thu Oct 05 00:56:26 2023 -0700
+++ b/toolkit/library/buildid_reader/src/reader.rs      Fri May 31 01:58:23 2024 -0700
@@ -15,7 +15,7 @@

 use log::{error, trace};

-#[cfg(any(target_os = "android", target_os = "linux"))]
+#[cfg(any(target_os = "android", target_os = "linux", target_os = "solaris"))]
 const MAX_BUFFER_READ: usize = std::mem::size_of::<goblin::elf::header::Header>();

 #[cfg(target_os = "windows")]
@@ -126,7 +126,7 @@
 #[cfg(target_os = "windows")]
 pub mod windows;

-#[cfg(any(target_os = "android", target_os = "linux"))]
+#[cfg(any(target_os = "android", target_os = "linux", target_os = "solaris"))]
 pub mod linux;

 #[cfg(any(target_os = "macos", target_os = "ios"))]
Flags: needinfo?(petr.sumbera)

Can you verify mach gtest "BuildIDReader.*" after this?

Flags: needinfo?(petr.sumbera)

I'm afraid that mach gtest doesn't work on Solaris now.

Flags: needinfo?(petr.sumbera)

(In reply to Petr Sumbera from comment #7)

I'm afraid that mach gtest doesn't work on Solaris now.

too bad, I'll add your changed in my patches, i got backed out because breaking on universal binaries on macOS, so I have to reland anywway.

Do you know how much is broken for mach gtest on Solaris? I would feel better if we could verify this on that platform instead it's going to be a shot in the dark and it might fail at the worst moment for your users.

Flags: needinfo?(petr.sumbera)
Assignee: nobody → lissyx+mozillians

i tried building myself but there are many things to fix, including pkg install rust that installs a way too old version. I'm going to just default to Elf parsing and that should unblock, but i cannot unfortunately make sure this is all OK.

Component: Internationalization → IPC

Marking as fixed because the latest patch for bug 1876590 should properly fallback to Elf parsing on that platform and it should land in a matter of hours now, feel free to reopen.

Status: UNCONFIRMED → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Depends on: 1876590
No longer regressed by: 1876590

This bug has been marked as a regression. Setting status flag for Nightly to affected.

No longer depends on: 1876590
Regressed by: 1876590
Target Milestone: --- → 128 Branch

Set release status flags based on info from the regressing bug 1876590

gaston told me tests are broken also on openbsd, and it's because of https://github.com/quinn-rs/quinn/issues/1877 which you filed :)

You need to log in before you can comment on or make changes to this bug.