Last Comment Bug 717906 - Flash does not work under Linux since bug 708570 landed
: Flash does not work under Linux since bug 708570 landed
Status: VERIFIED FIXED
[qa!]
: regression
Product: Core
Classification: Components
Component: Build Config (show other bugs)
: Trunk
: x86 Linux
: -- major (vote)
: mozilla12
Assigned To: Mike Hommey [:glandium]
:
:
Mentors:
http://www.adobe.com/software/flash/a...
Depends on:
Blocks: 708570
  Show dependency treegraph
 
Reported: 2012-01-13 06:19 PST by Bill Gianopoulos [:WG9s]
Modified: 2012-03-01 12:44 PST (History)
13 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
verified


Attachments
Errors from attempt to use flash (1.88 KB, text/plain)
2012-01-13 06:21 PST, Bill Gianopoulos [:WG9s]
no flags Details
Workaround (655 bytes, patch)
2012-01-13 08:01 PST, Bill Gianopoulos [:WG9s]
no flags Details | Diff | Splinter Review
Allow to enable NSS lowhash API without requiring FREEBL_NO_DEPEND [checked in] (3.24 KB, patch)
2012-01-13 10:03 PST, Mike Hommey [:glandium]
rrelyea: review+
Details | Diff | Splinter Review
Enable NSS lowhash API so that Mozilla builds work on Fedora (937 bytes, patch)
2012-01-13 10:04 PST, Mike Hommey [:glandium]
no flags Details | Diff | Splinter Review
Enable NSS lowhash API so that Mozilla builds work on Fedora (950 bytes, patch)
2012-01-16 14:19 PST, Mike Hommey [:glandium]
rrelyea: review+
blassey.bugs: approval‑mozilla‑aurora+
Details | Diff | Splinter Review
Allow to enable NSS lowhash API without requiring FREEBL_NO_DEPEND - for aurora (7.22 KB, patch)
2012-01-25 08:56 PST, Mike Hommey [:glandium]
mh+mozilla: review+
blassey.bugs: approval‑mozilla‑aurora+
Details | Diff | Splinter Review

Description Bill Gianopoulos [:WG9s] 2012-01-13 06:19:10 PST
Flash no longer works correctly in Linux Nightly builds.

Oddly enough, an hg bisect identified bug 708570 as the cause

The first bad revision is:
changeset:   83783:d208399b9194
user:        Mike Hommey <mh+mozilla@glandium.org>
date:        Tue Jan 10 09:10:53 2012 +0100
summary:     Bug 708570 - Make libfreebl depend on nspr. r=ted

I had to do clobber builds for each bisect attempt to actually track this down.
Comment 1 Bill Gianopoulos [:WG9s] 2012-01-13 06:21:53 PST
Created attachment 588400 [details]
Errors from attempt to use flash

This was the stdout/stderr output created by attempting to load the page in the URL field of this bug.
Comment 2 Bill Gianopoulos [:WG9s] 2012-01-13 06:50:18 PST
Evidently without the patch for bug 708570 Firefox is able to load canberra-gtk-module just fine.

In case it is important in duplicating, this is occurring under fedora 16 running the GNOME3 desktop (which is the fedora 16 default).
Comment 3 Bill Gianopoulos [:WG9s] 2012-01-13 08:01:44 PST
Created attachment 588421 [details] [diff] [review]
Workaround

For the purposes of my own builds, rather than backing out bug 708570, I applied this workaround as I use the same source tree to build Linux and Android.

Android bug 712284 depends on the patch for bug 708570, and this way I did not have to back that out as well.
Comment 4 Mike Hommey [:glandium] 2012-01-13 08:39:09 PST
Flash works perfectly fine on Linux with a nightly for me on Debian. There must be something fishy with fedora.
Comment 5 Mike Hommey [:glandium] 2012-01-13 09:38:00 PST
So, the problem is that fedora system libraries are depending on libfreebl3.so, and more than that, expect the NSSRAWHASH_3.12.3 symbol version to be there. This is completely unrelated to the requirement of freebl to be using nspr stubs or not, but nss mixes both: disabling one disables both.

Can you check whether the following works for you:

diff --git a/security/nss/lib/freebl/Makefile b/security/nss/lib/freebl/Makefile
--- a/security/nss/lib/freebl/Makefile
+++ b/security/nss/lib/freebl/Makefile
@@ -71,16 +71,19 @@ ifdef USE_64
 endif
 
 ifdef USE_ABI32_FPU
 	DEFINES += -DNSS_USE_ABI32_FPU
 endif
 
 ifeq ($(FREEBL_NO_DEPEND),1)
 	DEFINES += -DFREEBL_NO_DEPEND
+endif
+
+ifndef FOOBAR
 	LOWHASH_SRCS = stubs.c nsslowhash.c
 	LOWHASH_EXPORTS = nsslowhash.h
 	MAPFILE_SOURCE = freebl_hash.def
 else
 	MAPFILE_SOURCE = freebl.def
 endif
 
 # FREEBL_USE_PRELINK

Obviously, we'll need to replace FOOBAR with something nicer.
Comment 6 Mike Hommey [:glandium] 2012-01-13 10:03:54 PST
Created attachment 588445 [details] [diff] [review]
Allow to enable NSS lowhash API without requiring FREEBL_NO_DEPEND [checked in]

The rationale here is that we don't need the nspr stubs in mozilla builds. However, fedora system libs depend on nss, and when ours don't contain the lowhash API, that breaks. There's no reason this should be bound to being dependent on nspr or not, so this patch decouples both. It however doesn't change defaults, but allows for an override.
Comment 7 Mike Hommey [:glandium] 2012-01-13 10:04:38 PST
Created attachment 588447 [details] [diff] [review]
Enable NSS lowhash API so that Mozilla builds work on Fedora

This enables the lowhash API
Comment 8 Mike Hommey [:glandium] 2012-01-13 10:05:48 PST
Bill, can you try the two patches I just attaches, instead of the semi-broken one I posted earlier? (you will need both)
Comment 9 Bill Gianopoulos [:WG9s] 2012-01-13 12:17:49 PST
(In reply to Mike Hommey [:glandium] from comment #8)
> Bill, can you try the two patches I just attaches, instead of the
> semi-broken one I posted earlier? (you will need both)

Works fine for me with those 2 patches applied.
Comment 10 Robert Relyea 2012-01-16 13:58:40 PST
Comment on attachment 588445 [details] [diff] [review]
Allow to enable NSS lowhash API without requiring FREEBL_NO_DEPEND [checked in]

r+ rrelyea
Comment 11 Robert Relyea 2012-01-16 14:01:15 PST
Comment on attachment 588447 [details] [diff] [review]
Enable NSS lowhash API so that Mozilla builds work on Fedora

Isn't the sense of these flags wrong? I thought the problem was a freebl no depend issue. The lowhash issue shouldn't generate a problem since neither mozilla nor flash uses it.

bob
Comment 12 Mike Hommey [:glandium] 2012-01-16 14:07:55 PST
The problem is fedora system libraries using NSSRAWHASH versioned symbols, which are only there if building with lowhash. Since firefox loads its own NSS, for good reason, system libraries end up linked against firefox's NSS, and since it doesn't contain the NSSRAWHASH symbols, that breaks. Enabling lowhash fixes the issue.
Comment 13 Robert Relyea 2012-01-16 14:13:55 PST
OK. Does the build only turn on the rawhash  for Linux? If so I'll r+. It shouldn't be turned on for other platforms.

bob
Comment 14 Mike Hommey [:glandium] 2012-01-16 14:19:27 PST
Created attachment 589009 [details] [diff] [review]
Enable NSS lowhash API so that Mozilla builds work on Fedora

The previous version enabled it on all platforms. This one enables on Linux only.
Comment 15 Robert Relyea 2012-01-16 15:52:24 PST
Comment on attachment 589009 [details] [diff] [review]
Enable NSS lowhash API so that Mozilla builds work on Fedora

r+ rrelyea.

Thanks!
Comment 16 Ian Neal 2012-01-17 17:06:13 PST
These patches also fix an issue with playing sound on Fedora 16.
Comment 17 Bill Gianopoulos [:WG9s] 2012-01-17 18:14:08 PST
(In reply to Ian Neal from comment #16)
> These patches also fix an issue with playing sound on Fedora 16.

I suspect it is a general plug-in issue.  Just flash was the only one I had installed.
Comment 18 Mike Hommey [:glandium] 2012-01-17 23:41:20 PST
It's probably not only a plug-in issue.
Comment 19 Kai Engert (:kaie) 2012-01-18 09:22:05 PST
Comment on attachment 588445 [details] [diff] [review]
Allow to enable NSS lowhash API without requiring FREEBL_NO_DEPEND [checked in]

I've checked in the NSS portion of this bug for NSS 3.13.2

Checking in security/coreconf/Linux.mk;
/cvsroot/mozilla/security/coreconf/Linux.mk,v  <--  Linux.mk
new revision: 1.50; previous revision: 1.49
done
Checking in security/nss/lib/freebl/Makefile;
/cvsroot/mozilla/security/nss/lib/freebl/Makefile,v  <--  Makefile
new revision: 1.119; previous revision: 1.118
done
Checking in security/nss/lib/freebl/manifest.mn;
/cvsroot/mozilla/security/nss/lib/freebl/manifest.mn,v  <--  manifest.mn
new revision: 1.62; previous revision: 1.61
done
Checking in security/nss/lib/freebl/nsslowhash.c;
/cvsroot/mozilla/security/nss/lib/freebl/nsslowhash.c,v  <--  nsslowhash.c
new revision: 1.7; previous revision: 1.6
done
Comment 22 Mike Hommey [:glandium] 2012-01-25 08:56:11 PST
Created attachment 591489 [details] [diff] [review]
Allow to enable NSS lowhash API without requiring FREEBL_NO_DEPEND - for aurora

[Approval Request Comment]
Regression caused by bug 708570.
User impact if declined: Breaks flash and other random things on Fedora Linux if we take bug 708570.
Comment 24 Wan-Teh Chang 2012-02-10 17:22:47 PST
Comment on attachment 588445 [details] [diff] [review]
Allow to enable NSS lowhash API without requiring FREEBL_NO_DEPEND [checked in]

In security/coreconf/Linux.mk:

> ifeq (2.6,$(firstword $(sort 2.6 $(OS_RELEASE))))
> ifndef FREEBL_NO_DEPEND
> FREEBL_NO_DEPEND = 1
>+FREEBL_LOWHASH = 1
> endif
> endif

We should set FREEBL_LOWHASH to 1 for all versions of Linux,
and even when FREEBL_NO_DEPEND is set to 0 in the environment.

This will allow some system programs to work on Fedora when
LD_LIBRARY_PATH is set to point to a regular build of NSS.
Comment 25 Wan-Teh Chang 2012-02-10 17:25:10 PST
Comment on attachment 589009 [details] [diff] [review]
Enable NSS lowhash API so that Mozilla builds work on Fedora

In security/manager/Makefile.in:

> DEFAULT_GMAKE_FLAGS += FREEBL_NO_DEPEND=0
>+ifeq ($(OS_TARGET),Linux)
>+DEFAULT_GMAKE_FLAGS += FREEBL_LOWHASH=1
>+endif

This should be set in security/coreconf/Linux.mk instead,
as I noted above.
Comment 26 Mike Hommey [:glandium] 2012-02-10 22:57:34 PST
(In reply to Wan-Teh Chang from comment #24)
> We should set FREEBL_LOWHASH to 1 for all versions of Linux,
> and even when FREEBL_NO_DEPEND is set to 0 in the environment.
> 
> This will allow some system programs to work on Fedora when
> LD_LIBRARY_PATH is set to point to a regular build of NSS.

You should file a new bug.
Comment 27 Anthony Hughes (:ashughes) [GFX][QA][Mentor] 2012-03-01 12:44:12 PST
No problems here with Firefox 11.0b5 on Fedora 16 x64 -- marking verified.

Note You need to log in before you can comment on or make changes to this bug.