Closed Bug 1391126 Opened 7 years ago Closed 7 years ago

toolkit/components/backgroundhangmonitor/HangStack.cpp:2:10: fatal error: shared-libraries.h: No such file or directory

Categories

(Toolkit :: General, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox-esr52 --- unaffected
firefox55 --- unaffected
firefox56 --- unaffected
firefox57 --- fixed

People

(Reporter: jbeich, Assigned: nika)

References

Details

(Keywords: regression)

Attachments

(1 file)

On Tier3 platforms without GeckoProfiler (iOS, Linux non-x86, BSDs, Solaris) the build is broken due to usage of implementation-specific header. Until bug 1371159 is fixed to reproduce on Tier1 platforms one has to add `return None` to gecko_profiler() in toolkit/moz.configure.

In file included from objdir/toolkit/components/backgroundhangmonitor/Unified_cpp_ackgroundhangmonitor0.cpp:20:
toolkit/components/backgroundhangmonitor/HangStack.cpp:2:10: fatal error:
      'shared-libraries.h' file not found
#include "shared-libraries.h"
         ^~~~~~~~~~~~~~~~~~~~
1 error generated.

http://searchfox.org/mozilla-central/rev/5ce320a16f69/tools/profiler/moz.build#16
http://searchfox.org/mozilla-central/rev/5ce320a16f69/toolkit/moz.configure#26
Component: XPCOM → General
Product: Core → Toolkit
Note, reproducing on Try maybe shadowed by bug 1378312 and bug 1384423.
Jan, is there a way to make the build succeed anyway on the affected platforms?
If it's by adding 'return None' to to gecko_profiler() in toolkit/moz.configure then I have failed to find the right spot.
Any help (even a temporary band-aid patch) would be greatly appreciated.
Flags: needinfo?(jbeich)
I'd also welcome a real fix commited before the next branch merge, otherwise we'll have to fix this in beta.
By 'return None' do you mean changing gecko_profiler() ? 

To me :

    if target.os == 'Android':
        return target.cpu in ('aarch64', 'arm', 'x86')
    elif target.kernel == 'Linux':
        return target.cpu in ('x86', 'x86_64')
    return target.os in ('OSX', 'WINNT')

On BSDs, this should already return None (or false)?
Aaah now i get it, it was 'to reproduce on tier1 you need to add return None' - sorry, not enough coffee. Clearing ni?
Flags: needinfo?(jbeich)
mystor, since that's your implem of bug 1367406 that caused the regression, any idea which way to fix this ?
Flags: needinfo?(michael)
(In reply to Landry Breuil (:gaston) from comment #6)
> mystor, since that's your implem of bug 1367406 that caused the regression,
> any idea which way to fix this ?

The imports from shared-libraries.h in that file should only be used in the HangStack::ReadModuleInformation method. Perhaps guard that function's implementation and the shared-libraries.h header in a `#ifdef MOZ_GECKO_PROFILER` (which I believe corresponds to the header being implemented) block? It's OK for that function to be a no-op on unsupported platforms.
Flags: needinfo?(michael)
I think this should work, although I don't have a convenient non-tier-1 platform to build on.
Attachment #8908122 - Flags: review?(nfroyd)
Comment on attachment 8908122 [details] [diff] [review]
Guard use of shared-libraries.h in HangStack.cpp behind MOZ_GECKO_PROFILER

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

If this works for Jan (or anybody else who wants to try it), it works for me.
Attachment #8908122 - Flags: review?(nfroyd)
Attachment #8908122 - Flags: review+
Attachment #8908122 - Flags: feedback?(jbeich)
Comment on attachment 8908122 [details] [diff] [review]
Guard use of shared-libraries.h in HangStack.cpp behind MOZ_GECKO_PROFILER

Definitely helps here, i'm at the linking libxul step with that diff.
Attachment #8908122 - Flags: feedback+
Pushed by michael@thelayzells.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/bad8adc4d1de
Guard use of shared-libraries.h in HangStack.cpp behind MOZ_GECKO_PROFILER, r=froydnj
I'm giving it a try on Fedora/ppc64le ...
(In reply to Dan Horák from comment #12)
> I'm giving it a try on Fedora/ppc64le ...

libxul.so got created, so this issue is fixed, it failed later due another issue, I'll file a separate report for it
Comment on attachment 8908122 [details] [diff] [review]
Guard use of shared-libraries.h in HangStack.cpp behind MOZ_GECKO_PROFILER

inbound + autoland merged locally builds fine without patches. Thank you!
Attachment #8908122 - Flags: feedback?(jbeich) → feedback+
https://hg.mozilla.org/mozilla-central/rev/bad8adc4d1de
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
And it went in right before the m-c -> m-b merge, so no need to request uplift \o/
Assignee: nobody → nika
You need to log in before you can comment on or make changes to this bug.