What the Status of Cairo?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

What the Status of Cairo?

William L. Hartzell
Sir:

When will Cairo GNU GCC fixes be checked in to the Cairo project so that
we can start to build the Mozilla trunk again?  I perused some of the
Cairo source code yesterday and saw nothing that relates to OS/2 there.
  Is it from there that OS/2 fixes will make it into the Mozilla tree?
--
Bill
Thanks a Million!
_______________________________________________
dev-ports-os2 mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-ports-os2
Reply | Threaded
Open this post in threaded view
|

Re: What the Status of Cairo?

Dave Yeo-3
William L. Hartzell wrote:
> Sir:
>
> When will Cairo GNU GCC fixes be checked in to the Cairo project so
> that we can start to build the Mozilla trunk again?  I perused some of
> the Cairo source code yesterday and saw nothing that relates to OS/2
> there.  Is it from there that OS/2 fixes will make it into the Mozilla
> tree?
For now you can DL the OS/2 cairo files from ftp.netlabs.org and needed
libraries from  Peters  site.
I have been working on trying to build cairo with GCC 3.3.5 (and 3.2.2)
and it should work but I keep getting a parse error
In file included from cairo-os2-surface.c:38:
cairo-os2-private.h:61: error: parse error before "BITMAPINFO2"
cairo-os2-private.h:61: warning: no semicolon at end of struct or union
...
which I don't understand. cairo-os2-surface.c compiles fine in the
Mozilla tree and compiles fine under pgcc 2.95.3 though under EMX there
are other errors. eg
cairo-slope.c: In function `_cairo_slope_compare':
cairo-slope.c:62: conversion to non-scalar type requested
cairo-slope.c:63: conversion to non-scalar type requested
cairo-slope.c:63: conversion to non-scalar type requested
cairo-slope.c:63: conversion to non-scalar type requested
cairo-slope.c:65: invalid operands to binary >
cairo-slope.c:67: invalid operands to binary <

If anyone has any insight into the parse error I could use the knowledge
or ideas on how to solve it.
I'd like to be able to at least build a test app and pass make check
before considering submitting a patch. Also of course checking with Doodle.
Dave
_______________________________________________
dev-ports-os2 mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-ports-os2
Reply | Threaded
Open this post in threaded view
|

Re: What the Status of Cairo?

Henry Sobotka
Dave Yeo wrote:
>
> I have been working on trying to build cairo with GCC 3.3.5 (and 3.2.2)
> and it should work but I keep getting a parse error
> In file included from cairo-os2-surface.c:38:
> cairo-os2-private.h:61: error: parse error before "BITMAPINFO2"
> cairo-os2-private.h:61: warning: no semicolon at end of struct or union

Can't say much without seeing the header, but parse errors often mean a
missing typedef upstream. For BITMAPINFO2 you need a #define
INCL_GPIBITMAPS which is done automatically in (emx)os2.h if INCL_GPI is
defined. Running gcc -e and sifting through the preprocessor output to
see how the headers are being read might turn up a clue.

> which I don't understand. cairo-os2-surface.c compiles fine in the
> Mozilla tree and compiles fine under pgcc 2.95.3 though under EMX there
> are other errors. eg
> cairo-slope.c: In function `_cairo_slope_compare':
> cairo-slope.c:62: conversion to non-scalar type requested
> cairo-slope.c:63: conversion to non-scalar type requested
> cairo-slope.c:63: conversion to non-scalar type requested
> cairo-slope.c:63: conversion to non-scalar type requested
> cairo-slope.c:65: invalid operands to binary >
> cairo-slope.c:67: invalid operands to binary <

This would appear to be because EMX falls into the !HAVE_UINT64_T block
in cairo-wideint.h so cairo_int64_t and subsequently cairo_fixed_48_16_t
and ultimately diff in cairo-slope.c end up defined as a struct, so the
casts on lines 62 and 63 are no-ops and ditto for the comparisons on 65
and 67.

h~
_______________________________________________
dev-ports-os2 mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-ports-os2
Reply | Threaded
Open this post in threaded view
|

Re: What the Status of Cairo?

Dave Yeo-3
In reply to this post by Dave Yeo-3
Henry Sobotka wrote:

> Dave Yeo wrote:
>>
>> I have been working on trying to build cairo with GCC 3.3.5 (and
>> 3.2.2) and it should work but I keep getting a parse error
>> In file included from cairo-os2-surface.c:38:
>> cairo-os2-private.h:61: error: parse error before "BITMAPINFO2"
>> cairo-os2-private.h:61: warning: no semicolon at end of struct or union
>
> Can't say much without seeing the header, but parse errors often mean
> a missing typedef upstream. For BITMAPINFO2 you need a #define
> INCL_GPIBITMAPS which is done automatically in (emx)os2.h if INCL_GPI
> is defined. Running gcc -e and sifting through the preprocessor output
> to see how the headers are being read might turn up a clue.
Tried adding #define INCL_GPIBITMAPS, no change. The snippet of header is
#define INCL_DOS
#define INCL_DOSSEMAPHORES
#define INCL_DOSERRORS
#define INCL_WIN
#define INCL_GPI

#include <os2.h>

#include <cairo-os2.h>
#include <cairoint.h>

typedef struct _cairo_os2_surface
{
  cairo_surface_t        base;

  /* Mutex semaphore to protect private fields from concurrent access */
  HMTX                   hmtxUsePrivateFields;
  /* Private fields: */
  HPS                    hpsClientWindow;
  HWND                   hwndClientWindow;
  BITMAPINFO2            bmi2BitmapInfo;
  unsigned char         *pchPixels;
...

An older cairo did compile sometimes with GCC 3.2.2. Difference was no
HPS hpsClientWindow. I'll have to spend some time comparing EMXs
os2emx.h and libc version of os2emx.h.

>
>> which I don't understand. cairo-os2-surface.c compiles fine in the
>> Mozilla tree and compiles fine under pgcc 2.95.3 though under EMX
>> there are other errors. eg
>> cairo-slope.c: In function `_cairo_slope_compare':
>> cairo-slope.c:62: conversion to non-scalar type requested
>> cairo-slope.c:63: conversion to non-scalar type requested
>> cairo-slope.c:63: conversion to non-scalar type requested
>> cairo-slope.c:63: conversion to non-scalar type requested
>> cairo-slope.c:65: invalid operands to binary >
>> cairo-slope.c:67: invalid operands to binary <
>
> This would appear to be because EMX falls into the !HAVE_UINT64_T
> block in cairo-wideint.h so cairo_int64_t and subsequently
> cairo_fixed_48_16_t and ultimately diff in cairo-slope.c end up
> defined as a struct, so the casts on lines 62 and 63 are no-ops and
> ditto for the comparisons on 65 and 67.
>
> h~
Ok, my stupidity. I took a short cut and just edited config.h after
creating a short stdint.h consisting of the int_*t and uint_t typedefs.
Rerunning configure now creates a static lib. Unluckily it is missing a
couple of symbols which is maybe expected as the source has this
/* Unpublished API:
 *   GpiEnableYInversion = PMGPI.723
 *   GpiQueryYInversion = PMGPI.726
 *   BOOL APIENTRY GpiEnableYInversion(HPS hps, LONG lHeight);
 *   LONG APIENTRY GpiQueryYInversion(HPS hps);
 */

BOOL APIENTRY GpiEnableYInversion(HPS hps, LONG lHeight);
LONG APIENTRY GpiQueryYInversion(HPS hps);

possibly it will need to use the toolkit  headers.
Thanks for the hints. Now it is bedtime here
Dave
_______________________________________________
dev-ports-os2 mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-ports-os2
Reply | Threaded
Open this post in threaded view
|

Re: What the Status of Cairo?

Paul Smedley-2
In reply to this post by William L. Hartzell
On Sun, 26 Mar 2006 21:51:03 UTC, "William L. Hartzell"
<[hidden email]> wrote:

> Sir:
>
> When will Cairo GNU GCC fixes be checked in to the Cairo project so that
> we can start to build the Mozilla trunk again?  I perused some of the
> Cairo source code yesterday and saw nothing that relates to OS/2 there.
>   Is it from there that OS/2 fixes will make it into the Mozilla tree?

Firefox at least builds with a .mozconfig of"
# sh
# Build configuration script
#
# See http://www.mozilla.org/build/unix.html for build instructions.
#

. $topsrcdir/browser/config/mozconfig

# Options for client.mk.
mk_add_options MOZ_CO_PROJECT=browser,mail
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-browser335
#mk_add_options MOZ_MAKE_FLAGS=-j3
export MOZILLA_OFFICIAL=1
mk_add_options MOZILLA_OFFICIAL=1

# Options for 'configure' (same as command-line options).
ac_add_options --disable-tests
ac_add_options --enable-optimize
ac_add_options --disable-debug
ac_add_options --enable-crypto
ac_add_options --disable-updater
ac_add_options --disable-svg
ac_add_options --disable-canvas

/* note without cairo */

--
Cheers,

Paul.
_______________________________________________
dev-ports-os2 mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-ports-os2
Reply | Threaded
Open this post in threaded view
|

Re: What the Status of Cairo?

Henry Sobotka
In reply to this post by Dave Yeo-3
Dave Yeo wrote:
>
> Tried adding #define INCL_GPIBITMAPS, no change.

Another thought. Check if os2.h is being included anywhere upstream by
looking at the preprocessor output and, if it is, put the INCL_GPI in
that header. I recall once coming across a similar stumper and
discovering that os2.h was being skipped the second time it was
included, and all its INCL_* defines preamble had to be moved up before
the first time os2.h got included (and read).

h~

_______________________________________________
dev-ports-os2 mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-ports-os2
Reply | Threaded
Open this post in threaded view
|

Re: What the Status of Cairo?

Dave Yeo-3
In reply to this post by Dave Yeo-3
Henry Sobotka wrote:

> Dave Yeo wrote:
>>
>> Tried adding #define INCL_GPIBITMAPS, no change.
>
> Another thought. Check if os2.h is being included anywhere upstream by
> looking at the preprocessor output and, if it is, put the INCL_GPI in
> that header. I recall once coming across a similar stumper and
> discovering that os2.h was being skipped the second time it was
> included, and all its INCL_* defines preamble had to be moved up
> before the first time os2.h got included (and read).
>
> h~
>
Success! That was it. Doodle had #include <os2def.h> and #include
<bsedos.h> for the CAIRO_MUTEX_DECLARE in cairoint.h which I #ifdef
__EMX__ #include <os2.h>. Now after adding INCL_GPI  etc and disabling
pthreads I cn build a static lib and Doodles clock test app is now built
and running on the desktop. Font test fails with a sys2070 due to
expat.dll in XFree86. Easily fixed.
Still weird because with pthreads enabled the os2.h should never of been
included.
Unluckily libtool seems to be having problems with building a DLL, tons
of duplicate symbols in freetype, fontconfig  etc.
Dave
_______________________________________________
dev-ports-os2 mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-ports-os2