Closed
Bug 124006
Opened 23 years ago
Closed 22 years ago
Hack for using static libflashplayer.so (Flash 5.0) and Java under gcc-3 system
Categories
(Core Graveyard :: Plug-ins, defect)
Tracking
(Not tracked)
VERIFIED
DUPLICATE
of bug 154206
mozilla1.2alpha
People
(Reporter: kernd, Assigned: srgchrpv)
References
()
Details
Sorry, couldn't find a better place to do this... Many people have had problems
using the current Macromedia Flash plugin with mozilla when running under a
gcc-3.0.x system. In addition, I've heard a similar/same problem regarding the
java plugin.
This will affect anyone who is running under the new libstdc++v3, and does not
have multiple gcc's installed.
The problem manifests itself as a browser crash, caused by libflashplayer.so
failing to dynamically load. The libflashplayer.so binary depends on
__builtin_vec_new and __builtin_vec_delete which has been removed/moved/mangled
(hopefully temporarily) in libstdc++v3.
To fix, it is necessary to make the needed functions available to the plugin.
Start a new file, libc++mem.c, containing the following:
///
void *__builtin_new(int size)
{
return (void*)malloc(size)
}
void *__builtin_vec_new(int size)
{
return __builtin_new(size)
}
void *__builtin_delete(void *ptr)
{
free(ptr);
}
void *__builtin_vec_delete(void *ptr)
{
__builtin_delete(ptr)
}
///EOF
Compile and link with the following:
gcc -shared -fPIC -o libc++mem.so libc++mem.c
Copy the resulting libc++mem.so file into /usr/local/lib (or other any other
location).
Before starting mozilla with libflashplayer.so installed set
LD_PRELOAD=/usr/local/lib/libc++mem.so
This is obviously a hack, but it works - once Macromedia releases a binary
linked against the new libstdc++, this will be unneeded.
Please forward this to the maintainer of your help tips - there are alot of
people still trying to get this to work who probably don't like the idea of
downgrading to gcc-2.
Thanks,
David L. Kern, Jr.
Lead Developer
Streamedia Productions, LLC
Assignee | ||
Comment 3•23 years ago
|
||
yes, it works, at least I can say it about flash plugin.
No longer blocks: 91470
Target Milestone: --- → mozilla1.0
Comment 4•23 years ago
|
||
I have compiled mozilla with gcc-3.0.3 with -O3 and with this hack.
For me, Flash works, but Java plugin from.
ftp://ftp.netscape.com/pub/netscape6/english/6.2/unix/linux22/plugins/jre131i.xpi
fails:
undefined symbols:
__vt_17nsGetServiceByCID
if I create stub function, I get another missing ref:
__vt_16nsQueryInterface
assign_from_helper__13nsCOMPtr_baseRC15nsCOMPtr_helperRC4nsID
_._13nsCOMPtr_base
etc.
Assignee | ||
Comment 5•23 years ago
|
||
undefined symbol: __vt_17nsGetServiceByCID bug 116444
Comment 6•23 years ago
|
||
Moving Netscape owned 0.9.9 and 1.0 bugs that don't have an nsbeta1, nsbeta1+,
topembed, topembed+, Mozilla0.9.9+ or Mozilla1.0+ keyword. Please send any
questions or feedback about this to adt@netscape.com. You can search for
"Moving bugs not scheduled for a project" to quickly delete this bugmail.
Target Milestone: mozilla1.0 → mozilla1.2
Comment 7•23 years ago
|
||
*** Bug 124499 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 8•23 years ago
|
||
*** Bug 115721 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 9•23 years ago
|
||
*** Bug 130782 has been marked as a duplicate of this bug. ***
Comment 10•23 years ago
|
||
I must be doing something wrong- is that *all* that is needed of this hack file?
I get this error when I try exactly what it says to do:
---------
libc++mem.c: In function `__builtin_new':
libc++mem.c:4: parse error before '}' token
libc++mem.c: In function `__builtin_vec_new':
libc++mem.c:8: parse error before '}' token
libc++mem.c: In function `__builtin_vec_delete':
libc++mem.c:16: parse error before '}' token
---------
Is the file missing some includes or something?
Comment 11•22 years ago
|
||
; are missing from line 4, 8 and 16
correct code is :
void *__builtin_new(int size)
{
return (void*)malloc(size);
}
void *__builtin_vec_new(int size)
{
return __builtin_new(size),
}
void *__builtin_delete(void *ptr)
{
free(ptr);
}
void *__builtin_vec_delete(void *ptr)
{
__builtin_delete(ptr);
}
Assignee | ||
Comment 12•22 years ago
|
||
*** Bug 144977 has been marked as a duplicate of this bug. ***
Comment 13•22 years ago
|
||
A bug has been raised with Sun w.r.t. their JRE (Bug Id: 4689085). The problem
is more generic though as it also occurs with Blackdown. I have yet to try the
IBM JRE. I've seen a few places where errors like:
LoadPlugin: failed to initialize shared library
/usr/java/j2sdk1.4.0/jre/plugin/i386/ns610/libjavaplugin_oji140.so
[/usr/java/j2sdk1.4.0/jre/plugin/i386/ns610/libjavaplugin_oji140.so: undefined
symbol: GetGlobalServiceManager__16nsServiceManagerPP17nsIServiceManager]
Are appearing in newgroups and mailing lists. Perhaps a pointer in the mozilla
release notes/faq to gcc incompatabilities when running a browser and plugins
compiled by different gccs would at least give people an idea of what is going on.
Comment 14•22 years ago
|
||
Now raised as Bug 4687814 with Sun (Make Java 1.4 plugin work with gcc3 compiled
mozilla). See http://developer.java.sun.com/developer/bugParade/bugs/4687814.html
Comment 15•22 years ago
|
||
Sun turned down the request rather bluntly :-(
'we do not support Mozilla'. Way to go, Sun...
Comment 16•22 years ago
|
||
Sun of a gun ;)
Comment 17•22 years ago
|
||
I noticed this issue is discussed in bug 116444 as well. I think a dependency
should be added.
Comment 18•22 years ago
|
||
*** Bug 145207 has been marked as a duplicate of this bug. ***
Comment 19•22 years ago
|
||
*** Bug 150132 has been marked as a duplicate of this bug. ***
Comment 20•22 years ago
|
||
This bug is also related to bug #124815 (Evangelism bug to ask Macromedia to
release a Flash plugin which works with recent C++ libraries).
I can't see an obvious blocks / depends on relationship though.
Comment 21•22 years ago
|
||
Same for RealPlayer plugin (but the workaround does not help):
LoadPlugin: failed to initialize shared library /usr/lib/mozilla/plugins/rpnp.so
[/usr/lib/mozilla/plugins/rpnp.so: undefined symbol: __pure_virtual]
Comment 22•22 years ago
|
||
Serge: try adding this:
void __pure_virtual(void) {
extern void __cxa_pure_virtual(void);
__cxa_pure_virtual();
}
Comment 23•22 years ago
|
||
It seems to be ok, at least for startup - no error messages. about:plugins shows
the presence of the RealPlayer plugin.
Comment 24•22 years ago
|
||
Yeah, it works too. See also bug 154206, which has a lot of overlap with this
one. There's a patch there containing these workarounds and one more, almost
ready to land.
Comment 25•22 years ago
|
||
Since bug 154206 should land soon for Flash and Real plugins, and we've already
got bug 116444 for Java, I'm gonna mark this as a DUP of 154206. If this is a
dumb idea, feel free to re-open, etc.
*** This bug has been marked as a duplicate of 154206 ***
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
Comment 26•22 years ago
|
||
mass duplicate verifications . For filtering purposes, pls use keywd
"massdupverification"
Status: RESOLVED → VERIFIED
Updated•2 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•