Closed
Bug 86291
Opened 23 years ago
Closed 23 years ago
Xprint duplicates symbols from some widgets
Categories
(Core Graveyard :: Printing: Xprint, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: cls, Assigned: roland.mainz)
References
Details
Attachments
(4 files)
10.34 KB,
patch
|
Details | Diff | Splinter Review | |
10.34 KB,
patch
|
Details | Diff | Splinter Review | |
4.01 KB,
patch
|
Details | Diff | Splinter Review | |
32.88 KB,
patch
|
Details | Diff | Splinter Review |
I attempted to create a static build from the STATIC_BUILD_20010612_BRANCH tag and the final link of mozilla-bin failed with the following error: ../../dist/lib/components/libgfx_gtk.a(nsFontMetricsGTK.o): In function `nsFontStretch::SortSizes(void)': nsFontMetricsGTK.o(.text+0x2f54): multiple definition of `nsFontStretch::SortSizes(void)' ../../dist/lib/components/libgfxxprint.a(nsFontMetricsXP.o)(.text+0x2bcc): first defined here ../../dist/lib/components/libgfx_gtk.a(nsFontMetricsGTK.o): In function `nsFontWeight::FillStretchHoles(void)': nsFontMetricsGTK.o(.text+0x2f78): multiple definition of `nsFontWeight::FillStretchHoles(void)' ../../dist/lib/components/libgfxxprint.a(nsFontMetricsXP.o)(.text+0x2bf0): first defined here /usr/bin/ld: Warning: size of symbol `nsFontWeight::FillStretchHoles(void)' changed from 467 to 463 in nsFontMetricsGTK.o ../../dist/lib/components/libgfx_gtk.a(nsFontMetricsGTK.o): In function `nsFontStyle::FillWeightHoles(void)': nsFontMetricsGTK.o(.text+0x3148): multiple definition of `nsFontStyle::FillWeightHoles(void)' ../../dist/lib/components/libgfxxprint.a(nsFontMetricsXP.o)(.text+0x2dc4): first defined here ../../dist/lib/components/libgfx_gtk.a(nsFontMetricsGTK.o): In function `nsFontNode::FillStyleHoles(void)': nsFontMetricsGTK.o(.text+0x3328): multiple definition of `nsFontNode::FillStyleHoles(void)' ../../dist/lib/components/libgfxxprint.a(nsFontMetricsXP.o)(.text+0x2fa4): first defined here collect2: ld returned 1 exit status make[1]: *** [mozilla-bin] Error 1 make[1]: Leaving directory `/usr/cls/moz/static-20010612/obj-bigball/xpfe/bootstrap' make: *** [install] Error 2
Blocks: 46775
Keywords: mozilla0.9.2
Assignee | ||
Comment 3•23 years ago
|
||
cls: 1. I am going to reuse nsFontMetricsXlib.cpp in the near future. nsFontMetricsXP.cpp is more or less obsolete. Both sources are ~98% identical except s/Xp/Xlib/ and some minor other things(=~2% ... :-) 2. Is there no way except renaming all classes ? 3. If [2] is unavoidable the same changes should be "made" to the nsFontMetrics(GTK|Xlib).(cpp|h) files, too - to keep class naming consistently (hi pocemit/timecop !)... Swapping QA<-->bug owner as usual...
Assignee: katakai → Roland.Mainz
QA Contact: Roland.Mainz → katakai
Summary: xprint duplicates symbols from some widgets → Xprint duplicates symbols from some widgets
No, there is no other way except renaming all of the classes. How you do it is up to you, however. You can either copy the file and duplicate the classes line for line and change the name of the class that way. Or you can modify the original file to use macros that will automatically change the name of the class if a certain define is used. You'll have to run the latter situation by the Xlib owner. Either way, this needs to be done ASAP as the static build code is going to land tomorrow.
Assignee | ||
Comment 5•23 years ago
|
||
OK OK... as a quick&dirty solution I suggest a #define for these classes as a workaround - otherwise my current patches in work are for --> trashcan...
Assignee | ||
Comment 6•23 years ago
|
||
1. Accepting bug 2. ToDo: bug 83242 has a comment about a build issue, fix: -- snip -- add " $(srcdir)/../xlib " to VPATH and remove the ../xlib/ from the files in CPPSRCS -- snip --
Status: NEW → ASSIGNED
Depends on: 83242
Assignee | ||
Comment 7•23 years ago
|
||
ToDo: Somehow something changed which breaks linking of Xlib-toolkit-based mozilla-bin (see bug 84482): -- snip -- BUILD_OFFICIAL=1 ./configure --prefix=%{_prefix} --enable-optimize \ --disable-debug \ --with-default-mozilla-five-home=/usr/lib/mozilla \ --enable-strip-libs --disable-tests --disable-short-wchar \ --enable-nspr-autoconf --with-extensions --without-mng \ --enable-crypto \ --enable-toolkit=xlib but it tailed at the end with:nsWindowCreator.cpp nsSigHandlers.cpp showOSAlert.cpp nsAppRunner.o: In function `InitializeProfileService(nsICmdLineService *)': nsAppRunner.o(.text+0x1fe6): undefined reference to `nsMPFileLocProvider::nsMPFileLocProvider(void)' ../../dist/bin/libxlibrgb.so: undefined reference to `NS_ERROR' collect2: ld returned 1 exit status make[1]: *** [mozilla-bin] Error 1 make: *** [install] Error 2 -- snip -- Seems I am blind, I do not see why it fails... I'll disable the NS_ERROR stuff in xlibrgb.c for now as a workaround - maybe this works... ;-(
Assignee | ||
Comment 8•23 years ago
|
||
Assignee | ||
Comment 9•23 years ago
|
||
Filed prototype patch to adress the issues lited here. Patch requires checkin of patch in bug 83242 first. I have used #define to rename the classes - this is a _hack_ solution to keep the patch small for now. cls: 1. Wanna test this patch and check if the all duplicate symbols in Xprint module land are "gone" ? 2. change to mozilla/gfx/src/Makefile.in contains a small flaw: xlibrgb is added twice to DIRS when Mozilla is build with Xlib-toolkit... any idea how to fix this more cleanly ? I'll file a final patch (where classes have been renamed itself, no #define hack) if it works for StaticBuild stuff... It would be nice if we could rename classes in GTK+ toolkit, too - for consistency&correctness...
Assignee | ||
Comment 10•23 years ago
|
||
Assignee | ||
Comment 11•23 years ago
|
||
Filed new patch. After looking a 3rd time over the patch I see two issues: 1. Bad blank: -- snip -- # Build xlibrgb only for X toolkits -ifneq (,$(filter motif xlib,$(MOZ_WIDGET_TOOLKIT))$(MOZ_ENABLE_XLIB)) +ifneq (,$(filter motif xlib,$(MOZ_WIDGET_TOOLKIT))$(MOZ_ENABLE_XLIB) $(MOZ_ENABLE_XPRINT)) -- snip -- 2. Unneccesary VPATH stuff (Xlib-toolkit _links_ against xlibrgb.so instead of importing sources (I wasn't aware that this has been changed recently... ;-( )): -- snip -- diff -r -u mozilla_original/gfx/src/xlib/Makefile.in mozilla/gfx/src/xlib/Makefile.in --- mozilla_original/gfx/src/xlib/Makefile.in Wed Jun 20 19:21:26 2001 +++ mozilla/gfx/src/xlib/Makefile.in Wed Jun 20 17:24:22 2001 @@ -22,13 +22,13 @@ DEPTH = ../../.. topsrcdir = @top_srcdir@ srcdir = @srcdir@ -VPATH = @srcdir@ +VPATH = @srcdir@:@srcdir@/../xlibrgb include $(DEPTH)/config/autoconf.mk -- snip -- Dauphin/cls - do you see more issues ?
Reporter | ||
Comment 12•23 years ago
|
||
Patch was checked in with the exception of the changes that rely upon bug 83242 as they are independent.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 13•23 years ago
|
||
Does that mean that patch in bug 83242 is busted ?
Assignee | ||
Comment 14•23 years ago
|
||
cls: This patch is useless without patch in bug 83242. Requesting backout of that patch, please. Current StaticBuild stuff works with patched nsFontMetricsXP.(cpp|h), patching nsFontMetricsXlib.(cpp|h) is _only_ neccesary _after_ patch in bug 83242 has been checked-in...
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Reporter | ||
Comment 15•23 years ago
|
||
Why back it out so that you can reapply it after 83242 is checked in? Applying the patch in 83242 to the current tree has one small easily fixed conflict in nsFontMetricsXlib.cpp and 3 easily fixed conflicts in xprint/Makefile.in . Backing out this patch doesn't make any sense unless you're not going to check in 83242 at all.
Status: REOPENED → RESOLVED
Closed: 23 years ago → 23 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 16•23 years ago
|
||
No, wrong. You are patching the sources in the wrong order. This bug has a explicit dependicy on bug 83242... see "view bug activity"... see "attachment comments", see comments in "description" of this bug... I marked the dependicy _everywhere_...
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 17•23 years ago
|
||
More ToDo stuff: Rename class |nsGCCache| to |nsGCCacheXlib|
Reporter | ||
Comment 18•23 years ago
|
||
static build errors after applying patch from 83242 ../../dist/lib/components/libgfx_gtk.a(nsFontMetricsGTK.o)(.data+0xc34): multiple definition of `FLG_WESTERN' ../../dist/lib/components/libgfxxprint.a(nsFontMetricsXlib.o)(.data+0x4cc): first defined here ../../dist/lib/components/libgfx_gtk.a(nsFontMetricsGTK.o)(.data+0xc3c): multiple definition of `FLG_ZHCN' ../../dist/lib/components/libgfxxprint.a(nsFontMetricsXlib.o)(.data+0x4d4): first defined here ../../dist/lib/components/libgfx_gtk.a(nsFontMetricsGTK.o)(.data+0xc44): multiple definition of `FLG_ZHTW' ../../dist/lib/components/libgfxxprint.a(nsFontMetricsXlib.o)(.data+0x4dc): first defined here ../../dist/lib/components/libgfx_gtk.a(nsFontMetricsGTK.o)(.data+0xc4c): multiple definition of `FLG_JA' ../../dist/lib/components/libgfxxprint.a(nsFontMetricsXlib.o)(.data+0x4e4): first defined here ../../dist/lib/components/libgfx_gtk.a(nsFontMetricsGTK.o)(.data+0xc54): multiple definition of `FLG_KO' ../../dist/lib/components/libgfxxprint.a(nsFontMetricsXlib.o)(.data+0x4ec): first defined here ../../dist/lib/components/libgfx_gtk.a(nsFontMetricsGTK.o)(.data+0xc5c): multiple definition of `FLG_NONE' ../../dist/lib/components/libgfxxprint.a(nsFontMetricsXlib.o)(.data+0x4f4): first defined here ../../dist/lib/components/libgfx_gtk.a(nsGCCache.o)(.data+0x0): multiple definition of `nsGCCache::copyRegion' ../../dist/lib/components/libgfxxprint.a(nsGCCache.o)(.data+0x0): first defined here ../../dist/lib/components/libgfx_gtk.a(nsGCCache.o): In function `nsGCCache::nsGCCache(void)': nsGCCache.o(.text+0x0): multiple definition of `nsGCCache::nsGCCache(void)' ../../dist/lib/components/libgfxxprint.a(nsGCCache.o)(.text+0x0): first defined here ../../dist/lib/components/libgfx_gtk.a(nsGCCache.o): In function `nsGCCache::move_cache_entry(PRCListStr *)': nsGCCache.o(.text+0x58): multiple definition of `nsGCCache::move_cache_entry(PRCListStr *)' ../../dist/lib/components/libgfxxprint.a(nsGCCache.o)(.text+0x58): first defined here ../../dist/lib/components/libgfx_gtk.a(nsGCCache.o): In function `nsGCCache::free_cache_entry(PRCListStr *)': nsGCCache.o(.text+0x88): multiple definition of `nsGCCache::free_cache_entry(PRCListStr *)' ../../dist/lib/components/libgfxxprint.a(nsGCCache.o)(.text+0x88): first defined here /usr/bin/ld: Warning: size of symbol `nsGCCache::free_cache_entry(PRCListStr *)' changed from 127 to 107 in nsGCCache.o ../../dist/lib/components/libgfx_gtk.a(nsGCCache.o): In function `nsGCCache::~nsGCCache(void)': nsGCCache.o(.text+0xf4): multiple definition of `nsGCCache::~nsGCCache(void)' ../../dist/lib/components/libgfxxprint.a(nsGCCache.o)(.text+0x108): first defined here /usr/bin/ld: Warning: size of symbol `nsGCCache::~nsGCCache(void)' changed from 134 to 138 in nsGCCache.o ../../dist/lib/components/libgfx_gtk.a(nsGCCache.o): In function `nsGCCache::ReportStats(void)': nsGCCache.o(.text+0x180): multiple definition of `nsGCCache::ReportStats(void)' ../../dist/lib/components/libgfxxprint.a(nsGCCache.o)(.text+0x190): first defined here ../../dist/lib/components/libgfx_gtk.a(nsGCCache.o): In function `nsGCCache::Flu
Assignee | ||
Comment 19•23 years ago
|
||
cls: Thanks for fixing these issues. AFAIK we can close this bug now (and file a new one to replace the hack in nsGCCache.(cpp|h) with a real s/nsGCCache/nsGCCacheXlib/-thingie...)... Is that OK for you ?
Comment 20•23 years ago
|
||
Is this related? Red Hat Linux release 20010619 (Rawhide) (XFree86-4.1.0) 20010622xx (nigthly whithout any patches) BUILD_OFFICIAL=1 ./configure --prefix=%{_prefix} --enable-optimize \ --disable-debug \ --with-default-mozilla-five-home=/usr/lib/mozilla \ --enable-strip-libs --disable-tests --disable-short-wchar \ --enable-nspr-autoconf --with-extensions --without-mng \ --enable-crypto \ --enable-toolkit=xlib ... nsGCCache.cpp xprintutil.c xprintutil.c: In function `XpuGetPrinter2': xprintutil.c:99: warning: comparison between pointer and integer xprintutil.c: In function `XpuGetPrinter': xprintutil.c:134: warning: assignment makes integer from pointer without a cast .deps/xprintutil.pp: no such file or directory xprintutil.c: In function `XpuSetContentOrientation': xprintutil.c:313: warning: control reaches end of non-void function In the directory /usr/src/redhat/BUILD/mozilla/gfx/src/xprint The following command failed to execute properly: gcc -o xprintutil.o -c -DOSTYPE="Linux2.4.5-0" -DOSARCH="Linux" -DOJI -D_IMPL_NS_GFXONXP -DUSE_MOZILLA_TYPES -DUSE_XPRINT -D_IMPL_NS_XPRINT -D_BSD_SOURCE -I../../../dist/include -I../../../dist/include -I/usr/src/redhat/BUILD/mozilla/dist/include/nspr -I./../gtk -I./../xlib -I./../xlibrgb -I./../xprint -I/usr/X11R6/include -fPIC -I/usr/X11R6/include -Wall -W -Wno-unused -Wpointer-arith -Wcast-align -pedantic -Wno-long-long -pipe -fshort-wchar -pthread -O -DNDEBUG -DTRIMMED -I/usr/X11R6/include -I/usr/X11R6/include -include ../../../config-defs.h -DMOZILLA_CLIENT -Wp,-MD,.deps/xprintutil.pp xprintutil.c make[3]: *** [xprintutil.o] Error 1 make[2]: *** [install] Error 2 make[1]: *** [install] Error 2 make: *** [install] Error 2
Comment 21•23 years ago
|
||
the issue with broken dependencies (comment above) is in bug 87422
Assignee | ||
Comment 22•23 years ago
|
||
Marking bug as "FIXED"... AFAIK all StaticBuild issues in Xprint module have been fixed for now... :-)
Status: REOPENED → RESOLVED
Closed: 23 years ago → 23 years ago
Resolution: --- → FIXED
Comment 23•23 years ago
|
||
I'm now verifying the Xprt bugs, however, I'm not sure how to verify this bug. Roland, could you give the exact instruction how to verify this problem. Is it OK when I can compile with the following? BUILD_OFFICIAL=1 ./configure --prefix=%{_prefix} --enable-optimize \ --disable-debug \ --with-default-mozilla-five-home=/usr/lib/mozilla \ --enable-strip-libs --disable-tests --disable-short-wchar \ --enable-nspr-autoconf --with-extensions --without-mng \ --enable-crypto \ --enable-toolkit=xlib
Assignee | ||
Comment 24•23 years ago
|
||
katakai: "StaticBuild" means that all components are put into one single monster binary You have to add the options "--enable-static --disable-shared" to "configure" to get a static build (but be prepared that this needs more compilation time - and the final link step may need insane abouts of swap) ... cls: Can you VERIFY this one for us, please ?
Comment 26•23 years ago
|
||
cls, Thank you for veritication.
Updated•16 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•