Compilation on Linux ARM is broken

RESOLVED FIXED in mozilla14

Status

()

Core
Build Config
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: romaxa, Assigned: gaston)

Tracking

Trunk
mozilla14
ARM
Linux
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 1 obsolete attachment)

(Reporter)

Description

5 years ago
mozilla/Telemetry.h:47: fatal error: shared-libraries.h: No such file or directory

http://mxr.mozilla.org/mozilla-central/source/configure.in#2177
here we have check for Linux/X86, and disable MOZ_ENABLE_PROFILER_SPS profiler for other Linux systems, like MAEMO (Linux/Arm)

and Telemetry.h does not have MOZ_ENABLE_PROFILER_SPS ifdefs.
(Reporter)

Updated

5 years ago
Blocks: 712109
No longer blocks: 683229
(Reporter)

Comment 1

5 years ago
Created attachment 605518 [details] [diff] [review]
Possible fix
Assignee: nobody → romaxa
Status: NEW → ASSIGNED
Attachment #605518 - Flags: review?(ehsan)
Comment on attachment 605518 [details] [diff] [review]
Possible fix

This will merely hide the problem on linux arm. Having quickly taken a look at the sps code when i did that MOZ_ENABLE_PROFILER_SPS stuff, I'm afraid SPS doesn't actually work there, because it kind of relies on android == arm. So enabling it is not the right solution. The right solution is to make the telemetry stuff not use SPS when it's not enabled.
Attachment #605518 - Flags: review?(ehsan) → review-
(In reply to Mike Hommey [:glandium] from comment #2)
> Comment on attachment 605518 [details] [diff] [review]
> Possible fix
> 
> This will merely hide the problem on linux arm.

... and leave it for non x86, non arm linux.
(Reporter)

Comment 4

5 years ago
That was my first assumption, to cover Telemetry.h/cpp code with SPS ifdefs.. but later I got info that it probably easier fix compilation by adding define.. (at least it compiles and works)

but did not check profiler itself
(Assignee)

Comment 5

5 years ago
Created attachment 605816 [details] [diff] [review]
Dont use SharedLibraryInfo on platforms where sps is not enabled

This quick patch allows me to build m-c on OpenBSD, where SPS is not enabled. Note that it's a rather large hammer in some places, and i reused REPORT_CHROME_HANGS in xpcom/threads/HangMonitor.cpp (on an unrelated not, why does that file has windows-style line endings ?)
Assignee: romaxa → landry
Attachment #605816 - Flags: review?(mh+mozilla)
Attachment #605816 - Flags: review?(mh+mozilla) → review?(vdjeric)
Comment on attachment 605816 [details] [diff] [review]
Dont use SharedLibraryInfo on platforms where sps is not enabled

>diff --git a/xpcom/threads/HangMonitor.cpp b/xpcom/threads/HangMonitor.cpp
>@@ -213,17 +213,19 @@ ThreadMain(void*)
>   Telemetry::HangStack hangStack;
>+#ifdef REPORT_CHROME_HANGS
>   SharedLibraryInfo hangModuleMap;
>+#endif

nitpick: put the ifdef around both declarations

Also, please modify the REPORT_CHROME_HANGS define in HangMonitor.cpp to be conditional on MOZ_ENABLE_PROFILER_SPS in addition to MOZ_PROFILING & XP_WIN.
Attachment #605816 - Flags: review?(vdjeric) → review-
(Assignee)

Comment 7

5 years ago
Created attachment 605928 [details] [diff] [review]
Dont use SharedLibraryInfo on platforms where sps is not enabled

Sure, here you are..
Attachment #605816 - Attachment is obsolete: true
Attachment #605928 - Flags: review?(vdjeric)
Attachment #605928 - Flags: review?(vdjeric)
Attachment #605928 - Flags: review?(ehsan)
Attachment #605928 - Flags: review+
Comment on attachment 605928 [details] [diff] [review]
Dont use SharedLibraryInfo on platforms where sps is not enabled

Review of attachment 605928 [details] [diff] [review]:
-----------------------------------------------------------------

::: xpcom/threads/HangMonitor.cpp
@@ +50,5 @@
>  #ifdef XP_WIN
>  #include <windows.h>
>  #endif
>  
> +#if defined(MOZ_ENABLE_PROFILER_SPS) && defined(MOZ_PROFILING) && defined(XP_WIN)

MOZ_ENABLE_PROFILER_SPS implies XP_WIN, but I assume that's fine.
Attachment #605928 - Flags: review?(ehsan) → review+
Blocks: 735861
(Reporter)

Comment 9

5 years ago
Can we check it in?
Keywords: checkin-needed
https://hg.mozilla.org/integration/mozilla-inbound/rev/f2c6c1e25b18
Keywords: checkin-needed
Target Milestone: --- → mozilla14
https://hg.mozilla.org/mozilla-central/rev/f2c6c1e25b18
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.