Build error: undefined reference to mozilla::DumpTimeRanges

RESOLVED FIXED

Status

()

defect
RESOLVED FIXED
4 years ago
a month ago

People

(Reporter: bjackson0971, Assigned: cajbir)

Tracking

Trunk
x86_64
Linux
Points:
---

Firefox Tracking Flags

(firefox36 wontfix, firefox37 fixed, firefox38 fixed)

Details

Attachments

(1 attachment)

(Reporter)

Description

4 years ago
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

Comment 1

4 years ago
same here in fedora 21 .confirm reproduce

Comment 2

4 years ago
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
(Assignee)

Comment 3

4 years ago
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
(Reporter)

Comment 4

4 years ago
I think I have --disable-logging in mine.
(Assignee)

Comment 5

4 years ago
(In reply to Brad Jackson from comment #4)
> I think I have --disable-logging in mine.

Ok thanks, that does it. Preparing fix now.
(Assignee)

Comment 6

4 years ago
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+

Comment 7

4 years ago
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
(Assignee)

Comment 8

4 years ago
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.

Comment 9

4 years ago
ok, manully i will try to patch it. sorry i think you already push your patch.
(Assignee)

Comment 10

4 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/c356043c10b0
Status: UNCONFIRMED → NEW
Ever confirmed: true

Comment 11

4 years ago
 builds ok and runs ok. thanks for quick fix
https://hg.mozilla.org/mozilla-central/rev/c356043c10b0
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 38
Duplicate of this bug: 1129259
Can I request that this be uplifted to the same branches that bug 1112424 was uplifted to (looks like beta and aurora)?
(Assignee)

Comment 15

4 years ago
Can this be uplifted per comment 14?
Flags: needinfo?(giles)
(Assignee)

Updated

4 years ago
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
Product: Core → Core
You need to log in before you can comment on or make changes to this bug.