Re: 1.1.6fix1 (status update #2) / HP-UX

2001-02-13 Thread Bruce Foster

At 4:03 PM -0600 2/1/01, Albert Chin-A-Young wrote:
>On Thu, Feb 01, 2001 at 02:54:25PM +0100, Jean-Marc Lasgouttes wrote:
>> >>>>> "Bruce" == Bruce Foster <[EMAIL PROTECTED]> writes:
>>
>> Bruce> If the operating system is hp-ux, then they do it. If you want
>> Bruce> to be specific to HPUX 10.20, then configure shows my host
>> Bruce> system type to be hppa1.1-hp-hpux10.20
>>
>> The autoconf way of doing things is rather to look at functionality,
>> not versions. I'll see what I can do, unless albert beats me to it :)
>
>Not all packages use their own vsnprintf() regardless of whether or
>not the system has one. Lftp certainly does not. And, I don't think
>Samba does either. Anyway, on HP-UX 10.20, patch PHCO_20441 (or
>possibly one of its predecessors) gives you the vsnprintf function in
>libc. Unfortunately, no header definition. So, this requires two
>separate vsnprintf checks:
>  1. Test if the function exists
>  2. Test if the declaration for the function exists
>
>I'm working on this now (just stealing how lftp does it). I should
>have a patch soon.
>
>--
>albert chin ([EMAIL PROTECTED])

I received a patched tar file from Albert, and I have succeeded in 
building the revised LyX for HPUX 10.20 using gcc.

Bruce
---
Northwestern University | Academic Technologies | Research Technologies
1935 Sheridan Rd  |  NU Library 2East, Rm 2644  | Evanston IL 60208-2323
V:847/491-4055 F:847/467-7705 http://charlotte.at.northwestern.edu.edu/bef/



Re: HP-UX 10.20 patch for lyx 1.1.6fix1

2001-02-09 Thread Bruce Foster

> >>>>> "Bruce" == Bruce Foster <[EMAIL PROTECTED]> writes:
>
>Bruce> After applying the patch and rerunning the configuration, the
>Bruce> compile still fails in fmt.C:
>
>Have you run autoconf?
>
>JMarc

At that time, I was working with an incomplete patch and also had not 
run autoconf. With Albert Chin-A-Young's assistance (we have been 
working offline from this list), I've been making progress, but we're 
not yet ready to report results.

Bruce



Re: HP-UX 10.20 patch for lyx 1.1.6fix1

2001-02-06 Thread Bruce Foster

After applying the patch and rerunning the configuration, the compile 
still fails in fmt.C:

/bin/sh ../../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I. 
-I../../src -I./../ -I../../boost  -I/opt/local/include 
-D_HPUX_SOURCE -fno-rtti -fno-exceptions -c fmt.C
g++ -DHAVE_CONFIG_H -I. -I. -I../../src -I./../ -I../../boost 
-I/opt/local/include -D_HPUX_SOURCE -fno-rtti -fno-exceptions -c 
fmt.C -o fmt.o
fmt.C: In function `class string fmt(const char *, ...)':
fmt.C:40: implicit declaration of function `int vsnprintf(...)'
gmake[3]: *** [fmt.lo] Error 1
gmake[3]: Leaving directory `/scr02/root/teTeX/LyX/lyx-1.1.6fix1/src/support'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/scr02/root/teTeX/LyX/lyx-1.1.6fix1/src'
gmake[1]: *** [all-recursive-am] Error 2
gmake[1]: Leaving directory `/scr02/root/teTeX/LyX/lyx-1.1.6fix1/src'
gmake: *** [all-recursive] Error 1

Bruce



Re: 1.1.6fix1 (status update #2) / HP-UX

2001-02-01 Thread Bruce Foster

At 2:54 PM +0100 2/1/01, Jean-Marc Lasgouttes wrote:
> >>>>> "Bruce" == Bruce Foster <[EMAIL PROTECTED]> writes:
>
>Bruce> If the operating system is hp-ux, then they do it. If you want
>Bruce> to be specific to HPUX 10.20, then configure shows my host
>Bruce> system type to be hppa1.1-hp-hpux10.20
>
>The autoconf way of doing things is rather to look at functionality,
>not versions. I'll see what I can do, unless albert beats me to it :)
>
>JMarc

I just searched HP's Developer's Resource web site 
(http://devresource.hp.com) and from what I found, I'll offer my own 
(unverified) interpretation on the situation.

I'm running HPUX 10.20, which is not the most recent HPUX release. 
It's a  stable release, and is in widespread use.

It appears that snprintf, vsnprintf and so forth were introduced into 
HPUX 10.30 (a specialized release, not in common use) and HPUX 11.x, 
but not HPUX 10.20.

The gcc compiler we use is built on HPUX 11.x and backfit into HPUX 
10.20. I think that's why the (v)snprintf routines are not fully 
integrated into my release. Gcc thinks it knows about the routines, 
but the underlying HPUX 10.20 OS doesn't properly provide everything 
needed.

There _may_ be similar problems with HP's aCC product, their 
proprietary C++, when working across different HPUX versions.

Perhaps we could add a symbol definition to force the use the 
portable version of (v)snprintf, no matter what the LyX configure 
script thinks it finds. That would keep us HPUX 10.20 people in 
business, and might help others whose operating systems don't have 
these routines.

Bruce



Re: 1.1.6fix1 (status update #2) / HP-UX

2001-01-29 Thread Bruce Foster

At 10:42 AM +0100 1/29/01, Jean-Marc Lasgouttes wrote:
> >>>>> "Bruce" == Bruce Foster <[EMAIL PROTECTED]> writes:
>
>Bruce> As an HPUX 10.20 user, my advice is to always use the portable
>Bruce> version of vsnprintf. That's what other software packages do.
>Bruce> But if you have another solution to try, I can test it for you.
>
>So, what do these package do to determine whether they should do that?
>
>JMarc

If the operating system is hp-ux, then they do it. If you want to be 
specific to HPUX 10.20, then configure shows my host system type to 
be hppa1.1-hp-hpux10.20

Bruce



Re: 1.1.6fix1 (status update #2) / HP-UX

2001-01-26 Thread Bruce Foster

At 10:26 AM +0100 1/26/01, Jean-Marc Lasgouttes wrote:
> > "lyx-devel" == lyx-devel  <[EMAIL PROTECTED]> writes:
>
>lyx-devel> On Thu, Jan 25, 2001 at 04:06:29PM +0100, Jean-Marc
>lyx-devel> Lasgouttes wrote:
>>> - compilation on HP-UX fails for various reasons (vsnprintf,
>>> isset() macro...).
>
>lyx-devel> Is this on anyone's TODO list? If not, we'll take a look at
>lyx-devel> it.
>
>None of us have access to an HPUX system, as far as I know. Please
>have a look. In particular, I am not sure what is the best way to find
>whether vsnprintf is declared on a system. Duncan Simson advocates
>using LYX_CHECK_DECL(function, headerfile) (defined in
>config.lyxincludes.m4), and I am beginning to think he is right :)
>
>JMarc

As an HPUX 10.20 user, my advice is to always use the portable 
version of vsnprintf. That's what other software packages do. But if 
you have another solution to try, I can test it for you.

Bruce



Re: HPUX 10.20, gcc and vsnprintf

2001-01-23 Thread Bruce Foster

At 4:04 PM +0100 1/22/01, Lars Gullik Bj¯nnes wrote:
>Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:
>
>| > "Lars" =3D=3D Lars Gullik Bj=F8nnes <[EMAIL PROTECTED]> writes:
>|=20
>| Lars> I belive we use the system provided one if it exists.
>|=20
>| But src/support/Makefile.am contains explicitely
>| snprintf.h \
>| snprintf.c \
>| and does not use a clever trick like USE_LYXSTRING or USE_REGEXP. BTW
>| those tricks seem to produce an awful Makefile. Why not just add them
>| to LIBOBJS as with AC_REPLACE_FUNCS?
>
>If you look at the snprintf files you see that the symbols taht we use
>are only used if HAVE_SNPRINTF is undef.
>
>Lgb

I agree. And when I run configure on HPUX 10.20 with gcc, configure 
thinks that we have vsnprintf and it defines HAVE_SNPRINTF. But then 
we get a compiler error later on in fmt.C.

I extracted the configure check for vsnprintf into a simple program 
which compiles without error using gcc on my system. It also links 
without error. Here is the code I used:

/* for snprintf in snprintf vsnprintf */
/* #line 11104 "configure" */

#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char snprintf(); below.  */
#include 
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply.  */
char vsnprintf();

int main() {

/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS.  Some functions are actually named
something starting with __ and the normal name is an alias.  */
#if defined (__stub_vsnprintf) || defined (__stub___vsnprintf)
choke me
#else
vsnprintf();
#endif

; return 0; }

I believe that our solution is either to use the portable versions of 
vsnprintf for HPUX systems (no matter what configure thinks), or to 
explicitly declare the function int vsnprintf in fmt.C for (at least) 
HPUX systems.

I have proved that the first solution works. I have not tested the 
second solution.

Bruce



Re: lyx-1.16 on hpux

2001-01-19 Thread Bruce Foster

At 3:00 PM +0100 1/18/01, Jean-Marc Lasgouttes wrote:
> > "Klaus" == Klaus Dittrich <[EMAIL PROTECTED]> writes:
>
>Klaus> OS: hpux-10.20 with both aCC an gcc-2.75.2 installed. I tried
>Klaus> to get lyx-1.16 up, here my expieriences ..
>
>Klaus> In ./src/support/fmt.C --- I had to insert
>Klaus> the declaration of vsnprintf in string fmt(char const * fmtstr
>Klaus> ...) extern int vsnprintf(char *, size_t, const char *,
>Klaus> va_list); to get it compiled. Seems configure doesn't configure
>Klaus> HAVE_SNPRINTF properly.
>
>Where is vsnprintf defined in HP-UX headers? I do not understand why
>the configure test compiles correctly, but not the fmt.C file.
>
>JMarc

With gcc, vsnprintf is defined in the file libioP.h:

extern int _IO_vsnprintf __P ((char *string, _IO_size_t maxlen,
   __const char *format, _IO_va_list args));

Bruce



isset conflict in lyx-1.1.6/src/Variables.C

2001-01-12 Thread Bruce Foster

Here is a lyx-1.1.6 compilation failure under HPUX 10.20 using gcc-2.95.2:

g++ -DHAVE_CONFIG_H -I. -I. -I. -I.. -I.. -I../boost 
-I/opt/local/include -D_HPUX_SOURCE -fno-rtti -fno-exceptions -c 
Variables.C
In file included from Variables.C:17:
Variables.h:31: macro `isset' used with just one arg
Variables.C:41: macro `isset' used with just one arg
gmake[3]: *** [Variables.o] Error 1

The HP system isset macro defined in  has two arguments.

What's the best way to resolve this difficulty?

Thanks,
Bruce
---
Northwestern University | Academic Technologies | Research Technologies
1935 Sheridan Rd  |  NU Library 2East, Rm 2644  | Evanston IL 60208-2323
V:847/491-4055 F:847/467-7705 http://charlotte.at.northwestern.edu.edu/bef/

"The purpose of computation is insight, not numbers." -- Richard Hamming



HPUX 10.20, gcc and vsnprintf

2001-01-02 Thread Bruce Foster

Here is a lyx-1.1.6pre3 compilation failure under HPUX 10.20 using gcc-2.95.2:

/bin/sh ../../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I. 
-I../../src -I./../ -I../../boost  -I/opt/local/include 
-D_HPUX_SOURCE -fno-rtti -fno-exceptions -W -Wall -c fmt.C
g++ -DHAVE_CONFIG_H -I. -I. -I../../src -I./../ -I../../boost 
-I/opt/local/include -D_HPUX_SOURCE -fno-rtti -fno-exceptions -W 
-Wall -c fmt.C -o fmt.o
fmt.C: In function `class string fmt(const char *, ...)':
fmt.C:40: implicit declaration of function `int vsnprintf(...)'

Note that configure finds (v)snprintf OK on my system.

I've been able to configure and build lyx 1.1.5fix2 using the same 
software suite, so I'm not new to LyX.

What's the best way to proceed?

Thanks,
Bruce
---
Northwestern University | Academic Technologies | Research Technologies
1935 Sheridan Rd  |  NU Library 2East, Rm 2644  | Evanston IL 60208-2323
V:847/491-4055 F:847/467-7705 http://charlotte.at.northwestern.edu.edu/bef/

"A distributed system is one in which the failure of a computer you 
didn't even know existed can render your own computer unusable." -- 
Leslie Lamport