On Thu, Jun 04, 2015 at 08:54:55AM +0100, Stuart Henderson wrote:
> undefined reference to `mozilla::AudioQueueMemoryFunctor::MallocSizeOf(void
> const*)'
>
> Could this be related to the gcc 4.9 switchover? Other mozillas are ok.
>
> /usr/obj/ports/thunderbird-31.7.0/build-i386/mozilla/_virtualenv/bin/python
> /usr/obj/ports/thunderbird-31.7.0/comm-esr31/mozilla/config/expandlibs_exec.py
> --depend .deps/plugin-container.pp --target plugin-container --uselist --
> c++ -o plugin-container -I/usr/X11R6/include -Wall -Wpointer-arith
> -Woverloaded-virtual -Werror=return-type -Werror=int-to-pointer-cast
> -Wtype-limits -Wempty-body -Wsign-compare -Wno-invalid-offsetof -Wcast-align
> -O2 -pipe -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections
> -fdata-sections -fno-exceptions -fno-math-errno -std=gnu++0x -pthread -pipe
> -DNDEBUG -DTRIMMED -fno-omit-frame-pointer MozillaRuntimeMain.o -pthread
> -Wl,--no-keep-memory -Wl,-z,noexecstack -Wl,-z,text
> -Wl,-rpath-link,/usr/obj/ports/thunderbird-31.7.0/build-i386/mozilla/dist/bin
> -Wl,-rpath-link,/usr/local/lib -Wl,-rpath-link,/usr/X11R6/lib
> -L../../dist/bin -L../../dist/lib
> /usr/obj/ports/thunderbird-31.7.0/build-i386/mozilla/dist/bin/libxul.a
> /usr/obj/port!
s/!
> thunderbird-31.7.0/build-i386/mozilla/dist/bin/libmozalloc.a -liconv
> -L/usr/local/lib -lplds4 -lplc4 -lnspr4 -pthread -lc -Wl,--whole-archive
> /usr/obj/ports/thunderbird-31.7.0/build-i386/mozilla/dist/lib/libmozglue.a
> -Wl,--no-whole-archive -rdynamic -lkvm
> Executing: c++ -o plugin-container -I/usr/X11R6/include -Wall -Wpointer-arith
> -Woverloaded-virtual -Werror=return-type -Werror=int-to-pointer-cast
> -Wtype-limits -Wempty-body -Wsign-compare -Wno-invalid-offsetof -Wcast-align
> -O2 -pipe -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections
> -fdata-sections -fno-exceptions -fno-math-errno -std=gnu++0x -pthread -pipe
> -DNDEBUG -DTRIMMED -fno-omit-frame-pointer
> /usr/obj/ports/thunderbird-31.7.0/build-i386/mozilla/ipc/app/tmpkWL_r4.list
> -pthread -Wl,--no-keep-memory -Wl,-z,noexecstack -Wl,-z,text
> -Wl,-rpath-link,/usr/obj/ports/thunderbird-31.7.0/build-i386/mozilla/dist/bin
> -Wl,-rpath-link,/usr/local/lib -Wl,-rpath-link,/usr/X11R6/lib
> -L../../dist/bin -L../../dist/lib ../../dist/bin/libxul.so.29.0
> ../../dist/bin/libmozalloc.so.29.0 -liconv -L/usr/local/lib -lplds4 -lplc4
> -lnspr4 -pthread -lc -Wl,--whole-archive ../../dist/lib/libmozglue.a
> -Wl,--no-whole-archive -rdynamic -lkvm
> /usr/obj/ports/thunderbird-31.7.0/build-i386/mozilla/ipc/app/tmpkWL_r4.list:
> INPUT("MozillaRuntimeMain.o")
>
> ../../dist/bin/libxul.so.29.0: warning: warning: random() may return
> deterministic values, is that what you want?
> ../../dist/bin/libxul.so.29.0: warning: warning: stpcpy() is dangerous; do
> not use it
> ../../dist/bin/libxul.so.29.0: warning: warning: strcpy() is almost always
> misused, please use strlcpy()
> ../../dist/bin/libxul.so.29.0: warning: warning: rand() may return
> deterministic values, is that what you want?
> ../../dist/bin/libxul.so.29.0: warning: warning: strcat() is almost always
> misused, please use strlcat()
> ../../dist/bin/libxul.so.29.0: warning: warning: sprintf() is often misused,
> please use snprintf()
> /usr/local/lib/libglib-2.0.so.4200.1: warning: warning: vsprintf() is often
> misused, please use vsnprintf()
> ../../dist/bin/libxul.so.29.0: undefined reference to
> `mozilla::AudioQueueMemoryFunctor::MallocSizeOf(void const*)'
> collect2: error: ld returned 1 exit status
It is due to the switch to GCC 4.9. I sent a diff to Landry and you quite
awhile ago to prep for GCC 4.9,
but no response. It has been fixed in newer Firefox but hasn't trickled down to
the Thunderbird tree yet.
Index: Makefile
===================================================================
RCS file: /home/cvs/ports/mail/mozilla-thunderbird/Makefile,v
retrieving revision 1.203
diff -u -p -u -p -r1.203 Makefile
--- Makefile 28 May 2015 10:17:24 -0000 1.203
+++ Makefile 4 Jun 2015 08:01:36 -0000
@@ -13,6 +13,8 @@ MOZILLA_CODENAME = mail
MULTI_PACKAGES = -main -lightning
PKGNAME-main = ${PKGNAME}
PKGNAME-lightning = lightning-3.3.7
+REVISION-main = 0
+REVISION-lightning = 0
EPOCH-lightning = 0
REVISION-lightning = 0
REVISION-main = 0
Index: patches/patch-mozilla_content_media_MediaData_cpp
===================================================================
RCS file: patches/patch-mozilla_content_media_MediaData_cpp
diff -N patches/patch-mozilla_content_media_MediaData_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-mozilla_content_media_MediaData_cpp 4 Jun 2015 08:00:51
-0000
@@ -0,0 +1,24 @@
+$OpenBSD$
+
+Fix build with GCC 4.9.
+https://bugzilla.mozilla.org/show_bug.cgi?id=999496
+
+--- mozilla/content/media/MediaData.cpp.orig Fri Nov 28 02:35:51 2014
++++ mozilla/content/media/MediaData.cpp Fri Nov 28 02:36:54 2014
+@@ -38,6 +38,16 @@ AudioData::EnsureAudioBuffer()
+ }
+ }
+
++size_t
++AudioData::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const
++{
++ size_t size = aMallocSizeOf(this) + aMallocSizeOf(mAudioData);
++ if (mAudioBuffer) {
++ size += mAudioBuffer->SizeOfIncludingThis(aMallocSizeOf);
++ }
++ return size;
++}
++
+ static bool
+ ValidatePlane(const VideoData::YCbCrBuffer::Plane& aPlane)
+ {
Index: patches/patch-mozilla_content_media_MediaData_h
===================================================================
RCS file: patches/patch-mozilla_content_media_MediaData_h
diff -N patches/patch-mozilla_content_media_MediaData_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-mozilla_content_media_MediaData_h 4 Jun 2015 08:00:51
-0000
@@ -0,0 +1,22 @@
+$OpenBSD$
+
+Fix build with GCC 4.9.
+https://bugzilla.mozilla.org/show_bug.cgi?id=999496
+
+--- mozilla/content/media/MediaData.h.orig Fri Nov 28 02:35:41 2014
++++ mozilla/content/media/MediaData.h Fri Nov 28 02:36:30 2014
+@@ -80,13 +80,7 @@ class AudioData : public MediaData { (public)
+ MOZ_COUNT_DTOR(AudioData);
+ }
+
+- size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const {
+- size_t size = aMallocSizeOf(this) + aMallocSizeOf(mAudioData);
+- if (mAudioBuffer) {
+- size += mAudioBuffer->SizeOfIncludingThis(aMallocSizeOf);
+- }
+- return size;
+- }
++ size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const;
+
+ // If mAudioBuffer is null, creates it from mAudioData.
+ void EnsureAudioBuffer();
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.