Unable to compile XULRunner with SVG extension



Toolkit Graveyard
13 years ago
2 years ago


(Reporter: kheo, Assigned: Benjamin Smedberg)


Bug Flags:
blocking1.8b2 +



(2 attachments)



13 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.7.6) Gecko/20050318 Firefox/1.0.2
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050416 Firefox/1.0+

Building XULRunner with the SVG support, make the compilation process fail.
When the compilation process reach the layout/svg/renderer directory,
/usr/bin/ld fail because it can't find some library like -lxpcom
Perhaps the svg renderer is compiled too soon, before the xpcom.

Here is my mozconfig file :

# See http://www.mozilla.org/build/ for build instructions.

. /usr/local/src/mozilla/xulrunner/config/mozconfig

# Options for client.mk.

mk_add_options MOZILLA_OFFICIAL=1
ac_add_options --enable-application=xulrunner

ac_add_options --disable-tests
ac_add_options --disable-debug
ac_add_options --enable-optimize

ac_add_options --enable-svg
ac_add_options --enable-svg-renderer-cairo


Reproducible: Always

Steps to Reproduce:
1.Get the CVS source
2.Set the enviroment MOZCONFIG on my mozconfig file given
3.make -f client.mk build
4.wait a little hour.

Actual Results:  
It breaks the compilation process with this error

c++ -I/usr/X11R6/include -fno-rtti -fno-exceptions -Wall -Wconversion
-Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy
-Wno-non-virtual-dtor -Wno-long-long -pedantic -fshort-wchar -pthread -pipe 
-DNDEBUG -DTRIMMED -O -I../../../../../dist/include/cairo  -DXTHREADS
-I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/X11R6/include
-I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/freetype2
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -fPIC -shared -Wl,-h
-Wl,libgksvgcairo.so -o libgksvgcairo.so  nsSVGRendererCairo.o
nsSVGCairoCanvas.o nsSVGCairoPathGeometry.o nsSVGCairoPathBuilder.o
nsSVGCairoRegion.o nsSVGCairoGlyphMetrics.o nsSVGCairoGlyphGeometry.o
nsSVGCairoGradient.o nsSVGCairoSurface.o       -Wl,--version-script
-Wl,-Bsymbolic -L../../../../../dist/bin -L../../../../../dist/lib -lgkgfx
../../../../../dist/lib/libunicharutil_s.a -lcairo -lpixman -lfreetype
-lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0
-lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0  
-L../../../../../dist/bin -Wl,-rpath-link,../../../../../dist/bin -lxpcom -lxul
 -L../../../../../dist/bin -L../../../../../dist/lib -lplds4 -lplc4 -lnspr4
-lpthread -ldl  -ldl -lm
/usr/bin/ld: ne peut trouver -lxpcom
collect2: ld a retourné 1 code d'état d'exécution
make[7]: *** [libgksvgcairo.so] Erreur 1
make[7]: Leaving directory `/usr/local/src/xulrunner/layout/svg/renderer/src/cairo'
make[6]: *** [libs] Erreur 2
make[6]: Leaving directory `/usr/local/src/xulrunner/layout/svg/renderer/src'
make[5]: *** [libs] Erreur 2
make[5]: Leaving directory `/usr/local/src/xulrunner/layout/svg/renderer'
make[4]: *** [libs] Erreur 2
make[4]: Leaving directory `/usr/local/src/xulrunner/layout/svg'
make[3]: *** [libs] Erreur 2
make[3]: Leaving directory `/usr/local/src/xulrunner/layout'
make[2]: *** [tier_9] Erreur 2
make[2]: Leaving directory `/usr/local/src/xulrunner'
make[1]: *** [default] Erreur 2
make[1]: Leaving directory `/usr/local/src/xulrunner'
make: *** [build] Erreur 2
zsh: exit 2     make -f client.mk build

And another time I got the same error but with -lxul

Expected Results:  
Pass through and compile the all XulRunner.

If we start compiling XulRunner without SVG support, and after recompile it with
SVG support it works. So I have to compile XulRunner in a normal mode in order
to have the -lxpcom and the -lxul created to build it with SVG support.

Comment 1

13 years ago
This problem occurs on my debian linux and when a I try to compile it under
cygwin for win32 platforms.

Comment 2

13 years ago
Should the SVG renderers be linked as part of libxul or not? Are there dynamic
linking dependencies (ELF) that need runtime resolution and may not be available?

We either need to move something from DIRS to TOOL_DIRS, or make something
LIBXUL_LIBRARY and add it to the toolkit/library link list.
Ever confirmed: true

Comment 3

13 years ago
I believe that the renderers are separate DSOs in order to fail gracefully when
some required system libraries are not available.

Comment 4

13 years ago
Created attachment 181032 [details] [diff] [review]
Build the SVG renderers later, after libxul is available, rev. 1


13 years ago
Assignee: nobody → benjamin
Attachment #181032 - Flags: second-review?(darin)
Attachment #181032 - Flags: first-review?(tor)

Comment 5

13 years ago
We want xulrunner 1.8b2 to have SVG support.
Assignee: benjamin → nobody
Flags: blocking1.8b2+


13 years ago
Assignee: nobody → benjamin


13 years ago
Attachment #181032 - Flags: second-review?(darin) → second-review+

Comment 6

13 years ago
I think libart needs to be left as DIRS, as it gets built into a static lib and
linked to gklayout.

Comment 7

13 years ago
The cairo svg renderer is about to be moved back to statically linking into
gklayout (bug 290835), so cairo will need to be DIRS too.

Comment 8

13 years ago
What's the status here. Is this critical for 1.8b2 and the Deer Park Alpha?

Comment 9

13 years ago
Yes, and the cairo linking situation might be stable enough that I can actually
prepare a patch. Tor, is gdiplus the only standalone piece now, and all of
gdiplusshim/cairo/libart are linked into gklayout?

Comment 10

13 years ago
Correct, only gdiplus is forced to be a shared library so that we can poke
around for gdi+ before loading it.

Comment 11

13 years ago
Created attachment 181898 [details] [diff] [review]
Build the gdi+ shim after libxul is available, rev. 2


13 years ago
Attachment #181898 - Flags: first-review?(tor)


13 years ago
Attachment #181898 - Flags: first-review?(tor) → first-review+

Comment 12

13 years ago
Comment on attachment 181898 [details] [diff] [review]
Build the gdi+ shim after libxul is available, rev. 2

a=asa for landing this. Time is short on 1.8b2 so the sooner the better.
Attachment #181898 - Flags: approval1.8b2+

Comment 13

13 years ago
I landed the "rev 2" patch on the trunk.  Marking FIXED.
Last Resolved: 13 years ago
Resolution: --- → FIXED


13 years ago
Attachment #181032 - Flags: first-review?(tor)
Product: Toolkit → Toolkit Graveyard
You need to log in before you can comment on or make changes to this bug.