Closed Bug 1128161 Opened 9 years ago Closed 9 years ago

Build error: undefined reference to mozilla::DumpTimeRanges

Categories

(Core :: DOM: Core & HTML, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Tracking Status
firefox36 --- wontfix
firefox37 --- fixed
firefox38 --- fixed

People

(Reporter: bjackson0971, Assigned: cajbir)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0
Build ID: 20150128174643

Steps to reproduce:

Building Firefox trunk from source on Linux with GCC 4.9.2 fails with a link error


Actual results:

../../dom/media/mediasource/Unified_cpp_media_mediasource0.o: In function `mozilla::MediaSourceReader::GetMozDebugReaderData(nsAString_internal&)':
/home/bsjacks/mozilla/dom/media/mediasource/MediaSourceReader.cpp:992: undefined reference to `mozilla::DumpTimeRanges(mozilla::dom::TimeRanges*)'
/home/bsjacks/mozilla/dom/media/mediasource/MediaSourceReader.cpp:1006: undefined reference to `mozilla::DumpTimeRanges(mozilla::dom::TimeRanges*)'
/bin/ld: libxul.so: hidden symbol `_ZN7mozilla14DumpTimeRangesEPNS_3dom10TimeRangesE' isn't defined
/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
/home/bsjacks/mozilla/config/rules.mk:812: recipe for target 'libxul.so' failed
make[5]: *** [libxul.so] Error 1



Expected results:

Lines containing calls to DumpTimeRanges() should be inside #if defined(PR_LOGGING) like the method source
same here in fedora 21 .confirm reproduce
if modifiy MediaSourceReader::GetMozDebugReaderData inside  #ifdef PR_LOGGING
another error occur.

../../dom/media/mediasource/Unified_cpp_media_mediasource0.o: In function `mozilla::dom::MediaSource::GetMozDebugReaderData(ns
AString_internal&)':
Unified_cpp_media_mediasource0.cpp:(.text._ZN7mozilla3dom11MediaSource21GetMozDebugReaderDataER18nsAString_internal+0x12): und
efined reference to `mozilla::MediaSourceReader::GetMozDebugReaderData(nsAString_internal&)'
/bin/ld: libxul.so: hidden symbol `_ZN7mozilla17MediaSourceReader21GetMozDebugReaderDataER18nsAString_internal' isn't defined
/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
/home/reandr/firebuild/mysrc/config/rules.mk:812: recipe for target 'libxul.so' failed
make[5]: *** [libxul.so] Error 1
Odd that I don't get this and that it builds fine on the build machines. Do you have something different in your .mozconfig?
Assignee: nobody → cajbir.bugzilla
I think I have --disable-logging in mine.
(In reply to Brad Jackson from comment #4)
> I think I have --disable-logging in mine.

Ok thanks, that does it. Preparing fix now.
DumpTimeRanges used to be use in logging only. With bug 1112424 it is used in non-logging code. Attachment removes the conditional code that included it for logging only.
Attachment #8558154 - Flags: review?(ajones)
Attachment #8558154 - Flags: review?(ajones) → review+
maybe cajbir`s fix not work in my fedora 21.

   INPUT("../../gfx/skia/Unified_cpp_gfx_skia9.o")
    INPUT("StaticXULComponentsEnd/StaticXULComponentsEnd.o")

../../dom/media/mediasource/Unified_cpp_media_mediasource0.o: In function `mozilla::MediaSourceReader::GetMozDebugReaderData(nsAString_internal&)':
Unified_cpp_media_mediasource0.cpp:(.text._ZN7mozilla17MediaSourceReader21GetMozDebugReaderDataER18nsAString_internal+0x21c): undefined reference to `mozilla::DumpTimeRanges(mozilla::dom::TimeRanges*)'
Unified_cpp_media_mediasource0.cpp:(.text._ZN7mozilla17MediaSourceReader21GetMozDebugReaderDataER18nsAString_internal+0x424): undefined reference to `mozilla::DumpTimeRanges(mozilla::dom::TimeRanges*)'
/bin/ld: libxul.so: hidden symbol `_ZN7mozilla14DumpTimeRangesEPNS_3dom10TimeRangesE' isn't defined
/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
/home/reandr/firebuild/mysrc/config/rules.mk:812: recipe for target 'libxul.so' failed
make[5]: *** [libxul.so] Error 1
make[5]: Leaving directory '/home/reandr/firebuild/mybuild/toolkit/library'
/home/reandr/firebuild/mysrc/config/recurse.mk:74: recipe for target 'toolkit/library/target' failed
Did you manually apply the patch? It hasn't landed yet. I've tested with --disable-logging, before the patch applied and it fails to build. With the patch applied it builds.
ok, manully i will try to patch it. sorry i think you already push your patch.
https://hg.mozilla.org/integration/mozilla-inbound/rev/c356043c10b0
Status: UNCONFIRMED → NEW
Ever confirmed: true
 builds ok and runs ok. thanks for quick fix
https://hg.mozilla.org/mozilla-central/rev/c356043c10b0
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 38
Can I request that this be uplifted to the same branches that bug 1112424 was uplifted to (looks like beta and aurora)?
Can this be uplifted per comment 14?
Flags: needinfo?(giles)
Depends on: 1112424
Comment on attachment 8558154 [details] [diff] [review]
Include DumpTimeRanges even if PR_LOGGING disabled

Yes, this should go in.

Approval Request Comment
[Feature/regressing bug #]: MSE
[User impact if declined]: Build problems with logging disabled.
[Describe test coverage new/current, TreeHerder]: Landed on m-c.
[Risks and why]: Minimal. Just conditionalizes debug-only code.
[String/UUID change made/needed]: None.
Flags: needinfo?(giles)
Attachment #8558154 - Flags: approval-mozilla-beta?
Attachment #8558154 - Flags: approval-mozilla-aurora?
Comment on attachment 8558154 [details] [diff] [review]
Include DumpTimeRanges even if PR_LOGGING disabled

MSE won't ship in 36.
Attachment #8558154 - Flags: approval-mozilla-beta?
Attachment #8558154 - Flags: approval-mozilla-beta-
Attachment #8558154 - Flags: approval-mozilla-aurora?
Attachment #8558154 - Flags: approval-mozilla-aurora+
Component: Untriaged → DOM
Product: Firefox → Core
Target Milestone: Firefox 38 → ---
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: