Trouble compiling Celtx from source (canvas)

Developer tutorials and discussion forum

Moderators: Sharkey, David Shute, ntay

Trouble compiling Celtx from source (canvas)

Postby ReaphSharc » Tue Feb 05, 2008 7:37 am

Hi, been trying to compile Celtx from source (on a 32-bits system), but no luck yet...
I do:
Code: Select all
# cp mozconfig-nodebug-linux .mozconfig
# make distclean
# make -f client.mk build

I get:
Code: Select all
/home/gerritjo/AURBUILD/celtx/src/celtx-0997-src/mozilla/content/canvas/src/nsCanvasRenderingContext2D.cpp:2779:   instantiated from here
../../../dist/include/xpcom/nsAutoPtr.h:505: warning: dereferencing type-punned pointer will break strict-aliasing rules
/home/gerritjo/AURBUILD/celtx/src/celtx-0997-src/mozilla/content/canvas/src/nsCanvasRenderingContext2D.cpp: At global scope:
/home/gerritjo/AURBUILD/celtx/src/celtx-0997-src/mozilla/content/canvas/src/nsCanvasRenderingContext2D.cpp:198: warning: ‘PRBool FloatValidate(double, double, double)’ defined but not used
make[5]: *** [nsCanvasRenderingContext2D.o] Error 1
make[5]: Leaving directory `/home/gerritjo/AURBUILD/celtx/src/celtx-0997-src/objdir/content/canvas/src'
make[4]: *** [libs] Error 2
make[4]: Leaving directory `/home/gerritjo/AURBUILD/celtx/src/celtx-0997-src/objdir/content/canvas'
make[3]: *** [libs] Error 2
make[3]: Leaving directory `/home/gerritjo/AURBUILD/celtx/src/celtx-0997-src/objdir/content'
make[2]: *** [tier_9] Error 2
make[2]: Leaving directory `/home/gerritjo/AURBUILD/celtx/src/celtx-0997-src/objdir'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/home/gerritjo/AURBUILD/celtx/src/celtx-0997-src/objdir'
make: *** [build] Error 2

Most compiles I try, including ones where I don't use the mozconfig file and ./configure by hand with my own flags and options seem to choke on 'canvas'.

Suggestions and solutions are welcomed :wink:
ReaphSharc
 
Posts: 7
Joined: Tue Feb 05, 2008 7:26 am

Postby tony » Tue Feb 05, 2008 1:12 pm

Hi ReaphSharc,

Is it possible you have -Werror set by default for your compiler? Neither of those messages ("type-punned pointer" and "defined but not used") are errors, they are simply warnings, and shouldn't interrupt the build unless gcc is set to treat warnings as errors.

Is there more of that build log you can post, perhaps another 20-40 lines? It's possible there's an actual error message further up and the warning messages are just red herrings.

Tony
tony
 
Posts: 666
Joined: Sun Feb 27, 2005 4:03 pm
Location: St. John's, Newfoundland, Canada

Postby ReaphSharc » Tue Feb 05, 2008 3:36 pm

Don't think -Werror set by default. But here's a few extra lines:
Code: Select all
In file included from /usr/include/gtk-2.0/gdk/gdkcairo.h:25,
                 from /usr/include/gtk-2.0/gdk/gdk.h:30,
                 from ../../../dist/include/system_wrappers/gdk/gdk.h:3,
                 from /home/gerritjo/AURBUILD/celtx/src/celtx-0997-src/mozilla/content/canvas/src/nsCanvasRenderingContext2D.cpp:147:
/usr/include/pango-1.0/pango/pangocairo.h: At global scope:
/usr/include/pango-1.0/pango/pangocairo.h:71: error: ‘cairo_font_type_t’ was not declared in this scope
/usr/include/pango-1.0/pango/pangocairo.h:73: error: ‘cairo_font_type_t’ does not name a type
/home/gerritjo/AURBUILD/celtx/src/celtx-0997-src/mozilla/content/canvas/src/nsCanvasRenderingContext2D.cpp: In member function ‘virtual nsresult nsCanvasRenderingContext2D::Render(nsIRenderingContext*)’:
/home/gerritjo/AURBUILD/celtx/src/celtx-0997-src/mozilla/content/canvas/src/nsCanvasRenderingContext2D.cpp:943: warning: dereferencing type-punned pointer will break strict-aliasing rules
/home/gerritjo/AURBUILD/celtx/src/celtx-0997-src/mozilla/content/canvas/src/nsCanvasRenderingContext2D.cpp: In member function ‘nsresult nsCanvasRenderingContext2D::DrawNativeSurfaces(nsIDrawingSurface*, nsIDrawingSurface*, const nsIntSize&, nsIRenderingContext*)’:
/home/gerritjo/AURBUILD/celtx/src/celtx-0997-src/mozilla/content/canvas/src/nsCanvasRenderingContext2D.cpp:2787: warning: dereferencing type-punned pointer will break strict-aliasing rules
../../../dist/include/xpcom/nsAutoPtr.h: In member function ‘void** nsAutoArrayPtr<T>::begin_assignment() [with T = unsigned char]’:
../../../dist/include/xpcom/nsAutoPtr.h:650:   instantiated from ‘T** nsAutoArrayPtr<T>::StartAssignment() [with T = unsigned char]’
../../../dist/include/xpcom/nsAutoPtr.h:725:   instantiated from ‘nsAutoArrayPtrGetterTransfers<T>::operator T**() [with T = unsigned char]’
/home/gerritjo/AURBUILD/celtx/src/celtx-0997-src/mozilla/content/canvas/src/nsCanvasRenderingContext2D.cpp:2779:   instantiated from here
../../../dist/include/xpcom/nsAutoPtr.h:505: warning: dereferencing type-punned pointer will break strict-aliasing rules
/home/gerritjo/AURBUILD/celtx/src/celtx-0997-src/mozilla/content/canvas/src/nsCanvasRenderingContext2D.cpp: At global scope:
/home/gerritjo/AURBUILD/celtx/src/celtx-0997-src/mozilla/content/canvas/src/nsCanvasRenderingContext2D.cpp:198: warning: ‘PRBool FloatValidate(double, double, double)’ defined but not used
make[5]: *** [nsCanvasRenderingContext2D.o] Error 1
make[5]: Leaving directory `/home/gerritjo/AURBUILD/celtx/src/celtx-0997-src/objdir/content/canvas/src'
make[4]: *** [libs] Error 2
make[4]: Leaving directory `/home/gerritjo/AURBUILD/celtx/src/celtx-0997-src/objdir/content/canvas'
make[3]: *** [libs] Error 2
make[3]: Leaving directory `/home/gerritjo/AURBUILD/celtx/src/celtx-0997-src/objdir/content'
make[2]: *** [tier_9] Error 2
make[2]: Leaving directory `/home/gerritjo/AURBUILD/celtx/src/celtx-0997-src/objdir'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/home/gerritjo/AURBUILD/celtx/src/celtx-0997-src/objdir'
make: *** [build] Error 2

Hmmmm, looks like a few errors with a pangocairo library?
ReaphSharc
 
Posts: 7
Joined: Tue Feb 05, 2008 7:26 am

Postby tony » Tue Feb 05, 2008 5:21 pm

Hi ReaphSharc,

You could try adding "ac_add_options --enable-system-cairo" to your .mozconfig file. No guarantee that'll fix it, but it's worth a try.

What Linux distribution are you using to build? Fedora?

Tony
tony
 
Posts: 666
Joined: Sun Feb 27, 2005 4:03 pm
Location: St. John's, Newfoundland, Canada

Postby ReaphSharc » Wed Feb 06, 2008 8:53 am

Thanks for the help, that did the trick.
I'm building Celtx for ArchLinux, and specifically I'm working on an install script for our Arch User Repository. I've already put the binary build in there, but that doesn't work for the 64-bit system owners. So now I want to supply our community with both a binary (32-bits) package and a source package.
ReaphSharc
 
Posts: 7
Joined: Tue Feb 05, 2008 7:26 am


Return to Modifying Celtx

Who is online

Users browsing this forum: No registered users and 2 guests