Closed
      
        Bug 87582
      
      
        Opened 24 years ago
          Closed 24 years ago
      
        
    
  
Xlib-toolkit Mozilla crashes while printing via Xprint
Categories
(Core Graveyard :: Printing: Xprint, defect)
Tracking
(Not tracked)
        VERIFIED
        FIXED
        
    
  
        
            mozilla0.9.3
        
    
  
People
(Reporter: roland.mainz, Assigned: roland.mainz)
References
Details
Attachments
(2 files)
| 1.47 KB,
          patch         | Details | Diff | Splinter Review | |
| 1.91 KB,
          patch         | Details | Diff | Splinter Review | 
Xlib-toolkit Mozilla5 crashes while printing via Xprint module due shared use of
xlibrgb.so - two modules are overwriting global variables in that module...
Sharing xlibrgb.so between two modules is currently not possible as it has
global variables which cannot be shared between two modules (bug 85527 ("Turn
xlibrgb into a shared library") will fix that by introducing a new API which
uses a "handle" to reference these global variables - this allows to share the
xlibrgb.so library by using different handles for different ${DISPLAY}s ...).
|   | Assignee | |
| Comment 1•24 years ago
           | ||
Swapping QA<-->bug owner...
Assignee: katakai → Roland.Mainz
QA Contact: Roland.Mainz → katakai
Target Milestone: --- → mozilla0.9.3
|   | Assignee | |
| Comment 3•24 years ago
           | ||
|   | Assignee | |
| Comment 4•24 years ago
           | ||
Attached patch for mozilla/gfx/src/xprint/Makefile.in - this patch solves this
issue and adds a warning (for _me_) to that file to avoid that mistake a 3rd
time...
Requesting r=cls@seawood.org
|   | Assignee | |
| Comment 6•24 years ago
           | ||
CC:'ing mkaply for checkin into tree...
| Comment 7•24 years ago
           | ||
Fix checked in
| Comment 8•24 years ago
           | ||
No really, I checked it in.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
| Comment 9•24 years ago
           | ||
This broke on HPUX. Here is the error:
aCC -ext +p +DA1.1 +DS2.0    -DNDEBUG -DTRIMMED -I/opt/gtk+/include 
-I/opt/glib/lib/glib/include -I/opt/glib/include -I/usr/include/X11R6 -b -Wl,+s 
-L../../../dist/bin -o libgfxxprint.sl  xlibrgb.o xprintutil.o 
xprintutil_printtofile.o nsDeviceContextXP.o nsFontMetricsXlib.o 
nsRenderingContextXP.o nsGfxFactoryXP.o nsXPrintContext.o nsRegionXlib.o 
nsGCCache.o    -lXp -lXext -lX11 -L../../../dist/bin -lxpcom -L../../../dist/bin 
-L/builds/tinderbox/SeaMonkey/HP-UX_B.10.20_Clobber/mozilla/dist/lib -lplds4 
-lplc4 -lnspr4    -Wl,-Bsymbolic -L../../../dist/bin -L../../../dist/lib -lgkgfx 
-L../../../dist/bin -lxpcom -L../../../dist/bin 
-L/builds/tinderbox/SeaMonkey/HP-UX_B.10.20_Clobber/mozilla/dist/lib -lplds4 
-lplc4 -lnspr4   -lm -lc_r    
aCC: error 1913: `xlibrgb.o' does not exist or cannot be read
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
|   | Assignee | |
| Comment 10•24 years ago
           | ||
OK... I do not understand this. Why does every platform except HP-UX find that
xlibrgb.o ??
CC:'ing jdunn as the HP-UX guru - and as a _cry_ for help...
|   | ||
| Comment 11•24 years ago
           | ||
You use VPATH for xlibrgb, and in config/rules.mk they mention
that VPATH doesn't work on all platforms.  I am looking now
but can't figure out why HP doesn't like it.  If I find anything 
I will let u know
|   | ||
| Comment 12•24 years ago
           | ||
oops ignore that last comment.  I am looking at this
|   | ||
| Comment 13•24 years ago
           | ||
Ok, I still don't fully understand what is going on, but maybe
one of you will.
When we make, we go into xlibrgb and xlibrgb.o is created.
We then go into xprint and based on VPATH we check to see
if xlibrgb.o is up to date... since it was just built in
../xlibrgb it is so we don't rebuild it.  We then go to link
and aCC can't find xlibrgb.o because it wasn't made in ./
Now if you delete ../xlibrgb/xlibrgb.o and do a gmake in xprint
xlibrgb.o is NOT up to date, it rebuilds xlibrgb but it does
it in the xprint directory and then the lib is linked correctly.
So that is it in a nutshell but don't ask me why it isn't
doing what you guys want it to do.
|   | Assignee | |
| Comment 14•24 years ago
           | ||
jdunn wrote:
> We then go into xprint and based on VPATH we check to see
> if xlibrgb.o is up to date... since it was just built in
> ../xlibrgb it is so we don't rebuild it
Ohh... yes... BING!! :-)
This is the problem. It should never gmake in xlibrgb/ unless Xprint uses
xlibrgb.so (e.g. xlibrgb shared library). Very tricky... ;-(
cls - do you have any idea how to avoid that gmake looks into the "wrong" (e.g.
xlibrgb/) dir instead of the "right" (xprint/) dir for *.o files ?
|   | Assignee | |
| Comment 15•24 years ago
           | ||
|   | Assignee | |
| Comment 16•24 years ago
           | ||
Attached a new patch. This time I am using ../xlibrgb/xlibrgb.c instead of
xlibrgb.c+VPATH
This is only a workaround until bug 85527 get's implemented or someone finds a
solution for this linker-picks-wrong-*.o-file-via-VPATH-issue...
Requesting r=cls or r=jdunn
|   | ||
| Comment 17•24 years ago
           | ||
This works for me (on hpux)... r=jdunn@netscape.com
The only thing I am going to ask (cuz I don't know) is,
should xprint/Makefile.in be something like...
CSRCS =\
          $(srcdir)/../xlibrgb/xlibrgb.c \
          ^^^^^^^^^^
Probably not, but just thought I would ask
|   | ||
| Comment 18•24 years ago
           | ||
sr=cls for lack of a better alternative.  I still don't like the patch and I
think  that xlib's use of global symbols needs to be fixed independent of
becoming a shared lib.
jdunn,  the additional $(srcdir) is not necessary (and can cause problems) as
it's really the OBJS that we care about (CSRCS with a .o suffix) and the .o will
always be relative to the current build directory. 
|   | Assignee | |
| Comment 19•24 years ago
           | ||
cls:
Thanks !!
I agree with you - this is a hack until I'll "land" a better solution for this
issue. This is the next item on my list after I am "done" with MathML-support in
Xlib-toolkit/Xprint(=soon, ~~ next week)...
| Comment 20•24 years ago
           | ||
OK fix is in again
Status: REOPENED → RESOLVED
Closed: 24 years ago → 24 years ago
Resolution: --- → FIXED
| Comment 21•23 years ago
           | ||
I've succeeded to build Mozilla with xlib...
Verified today.
Status: RESOLVED → VERIFIED
| Updated•17 years ago
           | 
Product: Core → Core Graveyard
          You need to log in
          before you can comment on or make changes to this bug.
        
Description
•