Closed Bug 1674408 Opened 5 years ago Closed 5 years ago

updater fails to build on OpenBSD (no stat64 struct)

Categories

(Toolkit :: Application Update, defect, P5)

Unspecified
OpenBSD
defect

Tracking

()

RESOLVED FIXED
87 Branch
Tracking Status
firefox-esr78 --- wontfix
firefox85 --- wontfix
firefox86 --- wontfix
firefox87 --- fixed

People

(Reporter: gaston, Assigned: nalexander)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

regular builds of releases/beta on OpenBSD use --disable-updater, so this was hidden..

trying to build m-c without options fails:

25:55.40 /home/landry/src/m-c/toolkit/mozapps/update/updater/updater.cpp:4078:19: error: variable has incomplete type 'struct stat64'
25:55.40     struct stat64 st_buf;
25:55.40                   ^
25:55.40 /home/landry/src/m-c/toolkit/mozapps/update/updater/updater.cpp:4078:12: note: forward declaration of 'stat64'
25:55.40     struct stat64 st_buf;
25:55.40            ^
25:55.58 1 error generated.

pretty sure the updater was previously enabled by default only on tier1 platforms ?

I'm not aware of any recent changes that would have enabled the updater on OpenBSD. Could you run mach configure on an older tree and see if MOZ_UPDATER would have been set then in <objdir>/config.status?

If it turns out this isn't a regression in configuration, I agree it sounds like a good idea to disable the updater for platforms where it is unsupported. I don't know quite what the logic for that would look like, though.

Would mozilla-central with the updater enabled have built successfully before bug 1157850?

Flags: needinfo?(landry)

i hadn't built m-c since a while (some months ? dont really remember, but i think it was post bug 1157850) but im pretty sure i didnt have --disable-updater in my .mozconfig.. maybe the switch to bundling autoconf ? mike, any idea?

Flags: needinfo?(landry) → needinfo?(mh+mozilla)

TTBOMK, this code hasn't changed.

Flags: needinfo?(mh+mozilla)

The severity field is not set for this bug.
:nalexander, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(nalexander)

S4 since this is OpenBSD specific. P5 'cuz we'd gladly take a patch to address it -- always happy to help :gaston keep Firefox building on OpenBSD. Seems like the approach from this patch might Just Work.

Severity: -- → S4
Flags: needinfo?(nalexander)
Priority: -- → P5

wanted to try the following patch

--- a/toolkit/mozapps/update/updater/updater.cpp
+++ b/toolkit/mozapps/update/updater/updater.cpp
@@ -99,16 +99,20 @@ struct UpdateServerThreadArgs {
 #endif
 
 // We want to use execv to invoke the callback executable on platforms where
 // we were launched using execv.  See nsUpdateDriver.cpp.
 #if defined(XP_UNIX) && !defined(XP_MACOSX)
 #  define USE_EXECV
 #endif
 
+#if defined(XP_OPENBSD)
+#  define stat64 stat
+#endif
+
 #if defined(MOZ_VERIFY_MAR_SIGNATURE) && !defined(XP_WIN) && !defined(XP_MACOSX)
 #  include "nss.h"
 #  include "prerror.h"
 #endif

but sadly i updated m-c before my build and its now broken because of bug 1680772 so i dunno if that patch would fix the issue

finally managed to build m-c with the patch above, which works. As i have a deep allergy for moz-phab and all that contraption, can you land that ? thanks !

Flags: needinfo?(nalexander)
Assignee: nobody → nalexander
Status: NEW → ASSIGNED
Pushed by nalexander@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9e8b817a4f80 Define `stat64` as `stat` on OpenBSD. r=application-update-reviewers,bytesized
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 87 Branch

It took a long time, but I finally landed this. Sorry for the delay, :gaston.

Flags: needinfo?(nalexander)

Did you want this nominated for ESR backport too?

Flags: needinfo?(landry)

not a big deal, since the updater is disabled in our package builds for end-users, that really only affects me when building from hg (as i try as much as possible to build the default config unpatched), and i never build esr mercurial branches either. But many thanks for asking ;)

Flags: needinfo?(landry)
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: