Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Jul 2012 11:21:13 +1000
From:      Jan Beich <jbeich@tormail.org>
To:        ajtiM <lumiwa@gmail.com>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: firefox 14.0.1 and flash
Message-ID:  <1SvIC7-0007rH-R8@internal.tormail.org>
References:  <201207281026.30596.lumiwa@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--=-=-=
Content-Type: text/plain

ajtiM <lumiwa@gmail.com> writes:

> Hi!
>
> On my FreeBSD 9.0 Release, KDE 4.8.4, Firefox 14.0.1 stooped working with 
> linuxflashplugin 11. There is no problem with Opera.

First, try firefox package and show pkg_info -aE output. Blame pointyhat
tardiness if the package (for 14.0.1) is not available yet.

Second, try to disable dom.ipc.plugins.enabled in about:config.
If it helps try the first attached patch, then remove patch-bug753046
and try the second patch.

If neither helps try collecting debug info

  # NSPR_LOG_MODULES output depends on LOGGING option
  
  $ NSPR_LOG_MODULES=plugin:5 firefox -ProfileManager -no-remote
  $ NSPR_LOG_MODULES=all:5 NSPR_LOG_FILE=$HOME/nspr.log firefox -P <test-profile> -no-remote
  $ NPW_DEBUG=1 NPW_LOG=$HOME/npw.log firefox -P <test-profile> -no-remote

and see how far it got by comparing output with previous version.
  
Also, QT4 is known to be broken with plugins.


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment; filename=revert_libevent2.diff

diff --git Mk/bsd.gecko.mk Mk/bsd.gecko.mk
index 5bc445a..c7d6957 100644
--- Mk/bsd.gecko.mk
+++ Mk/bsd.gecko.mk
@@ -559,7 +559,7 @@ cairo_EXTRACT_AFTER_ARGS=	--exclude mozilla*/gfx/cairo
 
 dbm_EXTRACT_AFTER_ARGS=		--exclude mozilla*/dbm
 
-event_LIB_DEPENDS=	event-2.0:${PORTSDIR}/devel/libevent2
+event_LIB_DEPENDS=	event-1.4:${PORTSDIR}/devel/libevent
 event_MOZ_OPTIONS=	--with-system-libevent=${LOCALBASE}
 event_EXTRACT_AFTER_ARGS=	--exclude mozilla*/ipc/chromium/src/third_party/libevent
 
diff --git www/firefox/files/patch-ipc-chromium-Makefile.in www/firefox/files/patch-ipc-chromium-Makefile.in
index bba9d01..d7fb326 100644
--- www/firefox/files/patch-ipc-chromium-Makefile.in
+++ www/firefox/files/patch-ipc-chromium-Makefile.in
@@ -22,7 +22,7 @@
 -# message_pump_libevent.cc includes third_party/libevent/event.h,
 -# which we put in $(DIST), see export rule below
 -LOCAL_INCLUDES += -I$(DIST)
-+LOCAL_INCLUDES += $(filter %/compat, $(MOZ_LIBEVENT_INCLUDES))
++LOCAL_INCLUDES += $(MOZ_LIBEVENT_INCLUDES)
  endif # }
  
  vpath %.cc \

--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment; filename=revert_bsdipc.diff

diff --git www/firefox/Makefile www/firefox/Makefile
index aefbf2d..5cd78ef 100644
--- www/firefox/Makefile
+++ www/firefox/Makefile
@@ -21,6 +21,7 @@
 		sqlite3>=3.7.11:${PORTSDIR}/databases/sqlite3 \
 		cairo>=1.10.2_1,1:${PORTSDIR}/graphics/cairo \
 		unzip:${PORTSDIR}/archivers/unzip
+LIB_DEPENDS=	execinfo.1:${PORTSDIR}/devel/libexecinfo
 
 CONFLICTS_BUILD=	spidermonkey-*
 
@@ -105,6 +106,9 @@
 		<${FILESDIR}/firefox.desktop.in >${WRKDIR}/${MOZILLA}.desktop
 
 post-patch:
+	@${GREP} -Flr \"/proc ${WRKSRC}/ipc/chromium/src/base | ${XARGS} ${REINPLACE_CMD} \
+		-e 's|/proc/self/fd|/dev/fd|' \
+		-e 's|/proc["/]|/compat/linux&|'
 	@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
 		${WRKSRC}/browser/app/nsBrowserApp.cpp
 
diff --git www/firefox/files/patch-ipc-chromium-src-base-dir_reader_linux.h www/firefox/files/patch-ipc-chromium-src-base-dir_reader_linux.h
deleted file mode 100644
index 3c53d08..0000000
--- /dev/null
+++ www/firefox/files/patch-ipc-chromium-src-base-dir_reader_linux.h
@@ -0,0 +1,45 @@
+--- ipc/chromium/src/base/dir_reader_linux.h.orig	2011-12-16 21:29:22.000000000 +0100
++++ ipc/chromium/src/base/dir_reader_linux.h	2011-12-19 21:00:27.000000000 +0100
+@@ -9,6 +9,7 @@
+ #include <errno.h>
+ #include <fcntl.h>
+ #include <stdint.h>
++#include <sys/dirent.h>
+ #include <sys/syscall.h>
+ #include <unistd.h>
+ 
+@@ -19,6 +20,8 @@
+ 
+ namespace base {
+ 
++#define linux_dirent struct dirent
++#if 0
+ struct linux_dirent {
+   uint64_t        d_ino;
+   int64_t         d_off;
+@@ -26,11 +29,16 @@
+   unsigned char   d_type;
+   char            d_name[0];
+ };
++#endif
+ 
+ class DirReaderLinux {
+  public:
+   explicit DirReaderLinux(const char* directory_path)
++#ifdef O_DIRECTORY
+       : fd_(open(directory_path, O_RDONLY | O_DIRECTORY)),
++#else
++      : fd_(open(directory_path, O_RDONLY)),
++#endif
+         offset_(0),
+         size_(0) {
+     memset(buf_, 0, sizeof(buf_));
+@@ -57,7 +65,7 @@
+     if (offset_ != size_)
+       return true;
+ 
+-    const int r = syscall(__NR_getdents64, fd_, buf_, sizeof(buf_));
++    const int r = syscall(SYS_getdents, fd_, buf_, sizeof(buf_));
+     if (r == 0)
+       return false;
+     if (r == -1) {
diff --git www/firefox/files/patch-ipc-chromium-src-base-file_util_linux.cc www/firefox/files/patch-ipc-chromium-src-base-file_util_linux.cc
deleted file mode 100644
index 82241b6..0000000
--- /dev/null
+++ www/firefox/files/patch-ipc-chromium-src-base-file_util_linux.cc
@@ -0,0 +1,11 @@
+--- ipc/chromium/src/base/file_util_linux.cc~
++++ ipc/chromium/src/base/file_util_linux.cc
+@@ -28,7 +29,7 @@ bool GetShmemTempDir(FilePath* path) {
+ #ifdef ANDROID
+   return GetTempDir(path);
+ #else
+-  *path = FilePath("/dev/shm");
++  *path = FilePath("/tmp");
+   return true;
+ #endif
+ }
diff --git www/firefox/files/patch-ipc-chromium-src-base-file_util_posix.cc www/firefox/files/patch-ipc-chromium-src-base-file_util_posix.cc
deleted file mode 100644
index 90249bb..0000000
--- /dev/null
+++ www/firefox/files/patch-ipc-chromium-src-base-file_util_posix.cc
@@ -0,0 +1,11 @@
+--- ipc/chromium/src/base/file_util_posix.cc~
++++ ipc/chromium/src/base/file_util_posix.cc
+@@ -31,7 +31,7 @@
+ #include "base/time.h"
+ 
+ // FreeBSD/OpenBSD lacks stat64, but its stat handles files >2GB just fine
+-#if defined(OS_FREEBSD) || defined(OS_OPENBSD)
++#if defined(__FreeBSD__) || defined(OS_OPENBSD)
+ #define stat64 stat
+ #endif
+ 
diff --git www/firefox/files/patch-ipc-chromium-src-base-platform_thread_posix.cc www/firefox/files/patch-ipc-chromium-src-base-platform_thread_posix.cc
deleted file mode 100644
index 0b527d3..0000000
--- /dev/null
+++ www/firefox/files/patch-ipc-chromium-src-base-platform_thread_posix.cc
@@ -0,0 +1,25 @@
+--- ipc/chromium/src/base/platform_thread_posix.cc~
++++ ipc/chromium/src/base/platform_thread_posix.cc
+@@ -11,6 +11,7 @@
+ #include <mach/mach.h>
+ #elif defined(OS_LINUX)
+ #include <sys/syscall.h>
++#include <pthread_np.h>
+ #include <unistd.h>
+ #endif
+ 
+@@ -34,7 +35,13 @@ PlatformThreadId PlatformThread::Current
+ #if defined(OS_MACOSX)
+   return mach_thread_self();
+ #elif defined(OS_LINUX)
+-  return syscall(__NR_gettid);
++#if __FreeBSD_version > 900030
++  return pthread_getthreadid_np();
++#else
++  long tid;
++  syscall(SYS_thr_self, &tid);
++  return tid;
++#endif
+ #endif
+ }
+ 
diff --git www/firefox/files/patch-ipc-chromium-src-base-third_party-nspr-prcpucfg.h www/firefox/files/patch-ipc-chromium-src-base-third_party-nspr-prcpucfg.h
deleted file mode 100644
index 75bf9d8..0000000
--- /dev/null
+++ www/firefox/files/patch-ipc-chromium-src-base-third_party-nspr-prcpucfg.h
@@ -0,0 +1,11 @@
+--- ipc/chromium/src/base/third_party/nspr/prcpucfg.h~
++++ ipc/chromium/src/base/third_party/nspr/prcpucfg.h
+@@ -34,7 +34,7 @@
+ #include "base/third_party/nspr/prcpucfg_win.h"
+ #elif defined(__APPLE__)
+ #include "base/third_party/nspr/prcpucfg_mac.h"
+-#elif defined(__linux__) || defined(ANDROID)
++#elif defined(__FreeBSD__) || defined(ANDROID)
+ #include "base/third_party/nspr/prcpucfg_linux.h"
+ #else
+ #error Provide a prcpucfg.h appropriate for your platform
diff --git www/firefox/files/patch-ipc-chromium-src-build-build_config.h www/firefox/files/patch-ipc-chromium-src-build-build_config.h
deleted file mode 100644
index 2ee0de7..0000000
--- /dev/null
+++ www/firefox/files/patch-ipc-chromium-src-build-build_config.h
@@ -0,0 +1,11 @@
+--- ipc/chromium/src/build/build_config.h~
++++ ipc/chromium/src/build/build_config.h
+@@ -17,7 +17,7 @@
+ // A set of macros to use for platform detection.
+ #if defined(__APPLE__)
+ #define OS_MACOSX 1
+-#elif defined(__linux__) || defined(ANDROID)
++#elif defined(__linux__) || defined(ANDROID) || defined(__FreeBSD__)
+ #define OS_LINUX 1
+ #elif defined(__OpenBSD__)
+ #define OS_OPENBSD 1
diff --git www/firefox/files/patch-toolkit_library_Makefile.in www/firefox/files/patch-toolkit_library_Makefile.in
deleted file mode 100644
index 9e9d395..0000000
--- /dev/null
+++ www/firefox/files/patch-toolkit_library_Makefile.in
@@ -0,0 +1,11 @@
+--- toolkit/library/Makefile.in.orig	2010-01-11 12:13:08.000000000 -0500
++++ toolkit/library/Makefile.in	2010-01-11 12:15:05.000000000 -0500
+@@ -181,7 +181,7 @@
+ export:: $(RDF_UTIL_SRC_CPPSRCS) $(INTL_UNICHARUTIL_UTIL_CPPSRCS)
+ 	$(INSTALL) $^ .
+ 
+-EXTRA_DSO_LDOPTS += $(LIBS_DIR) $(EXTRA_DSO_LIBS)
++EXTRA_DSO_LDOPTS += $(LIBS_DIR) $(EXTRA_DSO_LIBS) -lexecinfo
+ 
+ ifdef MOZ_ENABLE_LIBXUL
+ include $(srcdir)/libxul-rules.mk

--=-=-=--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1SvIC7-0007rH-R8>