Re: C version of ucs2any.pl

2003-09-21 Thread Egbert Eich
David Dawes writes:
  
  BTW, how are things like host vs target imake binaries handled when
  cross-compiling?
  

Currently in most cases the installed versions are used. Only imake
is compiled as HostProgramTarget(). I don't recall if a target version
is ever built and installed.
This should definitely be tested and fixed.

Egbert.
___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: C version of ucs2any.pl

2003-09-20 Thread Matthieu Herrb
David Dawes wrote (in a message from Friday 19)
  
  If it does need to be done in the includes phase, for example, because
  a host version of ucs2any is needed to do the conversion when
  cross-compliling, but a target version of ucs2any needs to get built
  later for installation,

After looking at some existing Imafiles, it doesn't look like the
existing cross-compiling code supports building the fonts.  There's no
visible code to build bdftopcf as a host tool for example. And the 2
systems configs (itsy.cf and iPAQ.cf) that set CrossCompiling to YES,
also set BuildFonts to NO.

  
  BTW, how are things like host vs target imake binaries handled when
  cross-compiling?
  
Imake itself get built as a host tool during bootstrap, but not target
version is built or installed afaict. 

Of course someone who actually uses the cross-compile support and
knowns better can always correct me if I'm wrong here. 

In order to avoid such problems more easily in the future, I suggest
that for XFree86 5.0 we isolate the build of host tools in a separate
phase of the global process (bootstrap imake / Makefiles /
host-{includes,depend,all} / includes / depend / all / install).

Matthieu
___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: C version of ucs2any.pl

2003-09-20 Thread David Dawes
On Sat, Sep 20, 2003 at 03:56:51PM +0200, Matthieu Herrb wrote:
David Dawes wrote (in a message from Friday 19)
  
  If it does need to be done in the includes phase, for example, because
  a host version of ucs2any is needed to do the conversion when
  cross-compliling, but a target version of ucs2any needs to get built
  later for installation,

After looking at some existing Imafiles, it doesn't look like the
existing cross-compiling code supports building the fonts.  There's no
visible code to build bdftopcf as a host tool for example. And the 2

Yes, let alone the libraries that are also required.

systems configs (itsy.cf and iPAQ.cf) that set CrossCompiling to YES,
also set BuildFonts to NO.

OK, so we should ignore cross compiling for ucs2any too, until the
broader problem is dealt with.

  BTW, how are things like host vs target imake binaries handled when
  cross-compiling?
  
Imake itself get built as a host tool during bootstrap, but not target
version is built or installed afaict. 

That's the conclusion I came to as well, but I thought I might be missing
something.

Of course someone who actually uses the cross-compile support and
knowns better can always correct me if I'm wrong here. 

In order to avoid such problems more easily in the future, I suggest
that for XFree86 5.0 we isolate the build of host tools in a separate
phase of the global process (bootstrap imake / Makefiles /
host-{includes,depend,all} / includes / depend / all / install).

Agreed.

David
-- 
David Dawes X-Oz Technologies
www.XFree86.org/~dawes  www.x-oz.com
___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: C version of ucs2any.pl

2003-09-19 Thread Harold L Hunt II
Matthieu (and Matthias),

Matthias Scheler wrote:

On Thu, Sep 18, 2003 at 10:58:19PM +0200, Matthieu Herrb wrote:

It seems to me that the C langage version of ucs2any.pl developped by
Ben Collver and other NetBSD developpers is now stable enough to be
included in XFree86.


Two comments:
1.) While it is stable enough it is quite slow due to excessive and
ineffecient use of regular expressions.
2.) A while ago I reported the fonts get build twice. We could confirm
that problem in the meantime and found out that it was related
to using a C version of ucs2any. Tatoku Ogaito finally fixed
it by adding includes :: ucs2any to xc/fonts/util/Imakefile.
Fonts get built twice on Cygwin as well.  In fact, they probably get 
built twice on all platforms.

The xc/fonts/util/Imakefile already has includes:: ucs2any in it in 
the version that I am compiling; yet, ucs2any is still run for each font 
during both the includes step and later during the all step.

It seems that Tatoku Ogaito's patch (if his patch was to add the 
includes:: dependency) was included but it does not fix the problem.

The root problem here is that ucs2any is being deleted and rebuilt, 
because of its dependencies, during the all stage of compilation.

It breaks down like this:
=
1) ucs2any is built using SimpleProgramTarget
2) SimpleProgramTarget calls ComplexProgramTarget

3) ComplexProgramTarget calls ProgramTargetHelper as such:

ProgramTargetHelper(program,SRCS,OBJS,DEPLIBS,$(LOCAL_LIBRARIES),NullParameter)

4) ProgramTargetHelper sets up the dependencies as follows:

	ProgramTargetName(program): $(objs) $(deplib)

4) DEPLIBS is, in this case:
$(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)
5) The DEPLIBS have not yet been built during the includes stage.  Why 
ucs2any is still built when its dependencies have not been built is sort 
of a mystery to me.  In any case, ucs2any is built and run during the 
includes stage.

6) The DEPLIBS are built during all and upon return to the font/util 
directory during all, ucs2any is deleted and rebuilt since the DEPLIBS 
have a more recent timestamp.

7) All of the bdf files are thus rebuilt since the ucs2any timestamp has 
been updated.

Building the fonts takes a really long time.  Maybe my opinion doesn't 
matter, but I think that this patch needs to be corrected so that the 
fonts aren't built twice.  I can think of at least one way to do this, 
which would be to call AllTarget and ProgramTargetHelper directly from 
xc/fonts/util/Imakefile, passing nothing as DEPLIBS.

Harold

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: C version of ucs2any.pl

2003-09-19 Thread David Dawes
On Fri, Sep 19, 2003 at 02:01:00PM -0400, Harold L Hunt II wrote:
Matthieu (and Matthias),


Matthias Scheler wrote:

 On Thu, Sep 18, 2003 at 10:58:19PM +0200, Matthieu Herrb wrote:
 
It seems to me that the C langage version of ucs2any.pl developped by
Ben Collver and other NetBSD developpers is now stable enough to be
included in XFree86.
 
 
 Two comments:
 1.) While it is stable enough it is quite slow due to excessive and
 ineffecient use of regular expressions.
 2.) A while ago I reported the fonts get build twice. We could confirm
 that problem in the meantime and found out that it was related
 to using a C version of ucs2any. Tatoku Ogaito finally fixed
 it by adding includes :: ucs2any to xc/fonts/util/Imakefile.

Fonts get built twice on Cygwin as well.  In fact, they probably get 
built twice on all platforms.

The xc/fonts/util/Imakefile already has includes:: ucs2any in it in 
the version that I am compiling; yet, ucs2any is still run for each font 
during both the includes step and later during the all step.

Maybe removing the includes part of MakeTruncatedUCSBdfFont and
MakeBdfFontFromUCSMaster would be sufficient?  I don't remember why the
conversion was done in the includes phase instead of the all phase, but
removing the includes part from those rules worked here when I just
tested it.

If it does need to be done in the includes phase, for example, because
a host version of ucs2any is needed to do the conversion when
cross-compliling, but a target version of ucs2any needs to get built
later for installation, then I'd just remove $(UCS2ANY) as a dependency
in MakeBdfFontFromUCSMaster().  If a dependency is still desired, make
it be the source rather than the binary.

BTW, how are things like host vs target imake binaries handled when
cross-compiling?

David
-- 
David Dawes X-Oz Technologies
www.XFree86.org/~dawes  www.x-oz.com
___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: C version of ucs2any.pl

2003-09-19 Thread Harold L Hunt II
David Dawes wrote:

On Fri, Sep 19, 2003 at 02:01:00PM -0400, Harold L Hunt II wrote:

Matthieu (and Matthias),

Matthias Scheler wrote:


On Thu, Sep 18, 2003 at 10:58:19PM +0200, Matthieu Herrb wrote:


It seems to me that the C langage version of ucs2any.pl developped by
Ben Collver and other NetBSD developpers is now stable enough to be
included in XFree86.


Two comments:
1.) While it is stable enough it is quite slow due to excessive and
   ineffecient use of regular expressions.
2.) A while ago I reported the fonts get build twice. We could confirm
   that problem in the meantime and found out that it was related
   to using a C version of ucs2any. Tatoku Ogaito finally fixed
   it by adding includes :: ucs2any to xc/fonts/util/Imakefile.
Fonts get built twice on Cygwin as well.  In fact, they probably get 
built twice on all platforms.

The xc/fonts/util/Imakefile already has includes:: ucs2any in it in 
the version that I am compiling; yet, ucs2any is still run for each font 
during both the includes step and later during the all step.


Maybe removing the includes part of MakeTruncatedUCSBdfFont and
MakeBdfFontFromUCSMaster would be sufficient?  I don't remember why the
conversion was done in the includes phase instead of the all phase, but
removing the includes part from those rules worked here when I just
tested it.
David,

Hmm... I don't know enough about how the fonts are built to say whether 
or not that is a good idea.

However, I can say that changing SimpleProgramTarget(ucs2any) to the 
following stops ucs2any from being rebuilt when the DEPLIBS are built:

NormalProgramTarget(ucs2any, ucs2any.o, , , )

ucs2any doesn't depend on any X libs so this seems to be fine.

I build tested this on Cygwin without problems and confirmed that the 
fonts were only passed through ucs2any once.

If it does need to be done in the includes phase, for example, because
a host version of ucs2any is needed to do the conversion when
cross-compliling, but a target version of ucs2any needs to get built
later for installation, then I'd just remove $(UCS2ANY) as a dependency
in MakeBdfFontFromUCSMaster().  If a dependency is still desired, make
it be the source rather than the binary.
BTW, how are things like host vs target imake binaries handled when
cross-compiling?
I think this are questions for Matthieu, right?

Harold

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: C version of ucs2any.pl

2003-09-19 Thread David Dawes
On Fri, Sep 19, 2003 at 03:38:14PM -0400, Harold L Hunt II wrote:
David Dawes wrote:

 On Fri, Sep 19, 2003 at 02:01:00PM -0400, Harold L Hunt II wrote:
 
Matthieu (and Matthias),


Matthias Scheler wrote:


On Thu, Sep 18, 2003 at 10:58:19PM +0200, Matthieu Herrb wrote:


It seems to me that the C langage version of ucs2any.pl developped by
Ben Collver and other NetBSD developpers is now stable enough to be
included in XFree86.


Two comments:
1.) While it is stable enough it is quite slow due to excessive and
ineffecient use of regular expressions.
2.) A while ago I reported the fonts get build twice. We could confirm
that problem in the meantime and found out that it was related
to using a C version of ucs2any. Tatoku Ogaito finally fixed
it by adding includes :: ucs2any to xc/fonts/util/Imakefile.

Fonts get built twice on Cygwin as well.  In fact, they probably get 
built twice on all platforms.

The xc/fonts/util/Imakefile already has includes:: ucs2any in it in 
the version that I am compiling; yet, ucs2any is still run for each font 
during both the includes step and later during the all step.
 
 
 Maybe removing the includes part of MakeTruncatedUCSBdfFont and
 MakeBdfFontFromUCSMaster would be sufficient?  I don't remember why the
 conversion was done in the includes phase instead of the all phase, but
 removing the includes part from those rules worked here when I just
 tested it.

David,

Hmm... I don't know enough about how the fonts are built to say whether 
or not that is a good idea.

However, I can say that changing SimpleProgramTarget(ucs2any) to the 
following stops ucs2any from being rebuilt when the DEPLIBS are built:

NormalProgramTarget(ucs2any, ucs2any.o, , , )

ucs2any doesn't depend on any X libs so this seems to be fine.

That looks OK too.

 If it does need to be done in the includes phase, for example, because
 a host version of ucs2any is needed to do the conversion when
 cross-compliling, but a target version of ucs2any needs to get built
 later for installation, then I'd just remove $(UCS2ANY) as a dependency
 in MakeBdfFontFromUCSMaster().  If a dependency is still desired, make
 it be the source rather than the binary.
 
 BTW, how are things like host vs target imake binaries handled when
 cross-compiling?

I think this are questions for Matthieu, right?

They're for anyone who has the answers :-).  We do currently install
ucs2any, so when cross compliling that would mean having a host version
to process the fonts and a target version to install.  I was wondering
how we deal with the same issue with imake (and other utilities that
get used at build-time) in case it affects the way to deal with the
current usc2any getting called twice issue.

David
-- 
David Dawes X-Oz Technologies
www.XFree86.org/~dawes  www.x-oz.com
___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


C version of ucs2any.pl

2003-09-18 Thread Matthieu Herrb
Hi,

It seems to me that the C langage version of ucs2any.pl developped by
Ben Collver and other NetBSD developpers is now stable enough to be
included in XFree86.

I've put a patch against the current XFree86 CVS version at
http://www.xfree86.org/~herrb/ucs2any.diffs for those who'd like to
review it. I plan to commit that in the next days if no problems are
found. 

Matthieu
___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: C version of ucs2any.pl

2003-09-18 Thread Harold L Hunt II
Matthieu,

I appreciate the notification in advance of committing something like 
this.  I am doing a build test right now on Cygwin.  I will let you know 
if I find any problems.

Harold

Matthieu Herrb wrote:

Hi,

It seems to me that the C langage version of ucs2any.pl developped by
Ben Collver and other NetBSD developpers is now stable enough to be
included in XFree86.
I've put a patch against the current XFree86 CVS version at
http://www.xfree86.org/~herrb/ucs2any.diffs for those who'd like to
review it. I plan to commit that in the next days if no problems are
found. 

Matthieu
___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel
___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: C version of ucs2any.pl

2003-09-18 Thread Harold L Hunt II
Matthieu,

I found two things:

1) In ucs2any.c the libgen.h header is included only to provide 
basename, while a local definition of basename is provided for those 
platforms that don't have it.  However, libgen.h is still included even 
on those platforms that define NEED_BASENAME.  Thus, the build is broken 
on platforms that don't have libgen.h, regardless of whether 
NEED_BASENAME is defined or not.

The #include libgen.h needs to be protected with #ifndef 
NEED_BASENAME, like so:

#ifndef NEED_BASENAME
#include libgen.h
#endif
2) The zitoa function is defined statically but it isn't used within 
ucs2any.c.  Is there any reason it should be included if it isn't in use?

Harold

Matthieu Herrb wrote:
Hi,

It seems to me that the C langage version of ucs2any.pl developped by
Ben Collver and other NetBSD developpers is now stable enough to be
included in XFree86.
I've put a patch against the current XFree86 CVS version at
http://www.xfree86.org/~herrb/ucs2any.diffs for those who'd like to
review it. I plan to commit that in the next days if no problems are
found. 

Matthieu
___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel
___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel