bug-groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Groff Bug Report (Compilation on HPUX)


From: Jost Martin
Subject: Groff Bug Report (Compilation on HPUX)
Date: Fri, 24 Nov 2000 13:48:58 +0100

                           Groff Bug Report

GROFF VERSION: 1.16

MACHINE: HP 9000/785 (HP C360)

OS: HPUX 10.20

COMPILER:
ANSI C: HP cc (HP92453-01 A.10.32.30 HP C Compiler)
C++:    HP aCC  (HP aC++ B3910B A.01.23)

INPUT FILES: -

COMMAND LINE: - (Compilation problem)

DESCRIPTION OF INCORRECT BEHAVIOUR:
aCC barfs on src/devices/grolbp/lpb.cc:
aCC -I. -I/home/pd/pd-sw/tools/groff-1.16/src/devices/grolbp 
-I/home/pd/pd-sw/tools/groff-1.16/src/include 
-I/home/pd/pd-sw/tools/groff-1.16/src/include -DHAVE_UNISTD_H=1 
-DHAVE_DIRENT_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_DIR_H=1 -DHAVE_STDLIB_H=1 
-DHAVE_STRINGS_H=1 -DSTDLIB_H_DECLARES_PUTENV=1 -DSTDIO_H_DECLARES_POPEN=1 
-DSTDIO_H_DECLARES_PCLOSE=1 -DHAVE_SYS_NERR=1 -DHAVE_SYS_ERRLIST=1 
-DHAVE_CC_LIMITS_H=1 -DRETSIGTYPE=void -DHAVE_STRUCT_EXCEPTION=1 
-DHAVE_UNISTD_H=1 -DHAVE_GETPAGESIZE=1 -DHAVE_FMOD=1 -DHAVE_STRTOL=1 
-DHAVE_GETCWD=1 -DHAVE_STRERROR=1 -DHAVE_PUTENV=1 -DHAVE_RENAME=1 
-DHAVE_MKSTEMP=1 -DHAVE_STRCASECMP=1 -DHAVE_STRDUP=1 -DWCOREFLAG=0200  
+DAportable -Aa +O2 -D_POSIX_SOURCE -D_HPUX_SOURCE -D_XOPEN_SOURCE 
-D_XPG4_EXTENDED  -c lbp.cc
Error 221: "lbp.cc", line 69 # Member 'polygon' not declared in class
    lbp_printer ["lbp.cc", line 54].
      void lbp_printer::polygon( int hpos,int vpos,int np,int *p);
                        ^^^^^^^
Error 221: "lbp.cc", line 70 # Member 'font_name' not declared in class
    lbp_printer ["lbp.cc", line 54].
      char *lbp_printer::font_name(const lbp_font *f, const int siz);
                         ^^^^^^^^^
Error 225: "lbp.cc", line 493 # Ambiguous overloaded function call; more than
    one acceptable function found. Two such functions that matched were "long
    double sqrt(long double)" ["/opt/aCC/include/cmath", line 110] and "float
    sqrt(float)" ["/opt/aCC/include/cmath", line 58].
                                    int(sqrt( (p[0]*p[0])+(p[1]*p[1]))),\

HP needs libPW.a for alloca.

SUGGESTED FIX [optional]:
Below are the diffs I applied:
(Removing the class-Name before the declarations in the class itself,
disambiguating the argument to sqrt()
I hope this doesn't break things on other compilers)

To satisfy the symbol alloca, before starting configure a
export LDFLAGS="-lPW"
is a good idea; maybe this could be added to the PROBLEMS-File


*** lbp.cc.~1~  Sat May 13 01:27:51 2000 (original file)
--- lbp.cc      Thu Nov 23 12:49:06 2000 (file including my fixes)
***************
*** 66,73 ****
    void vdmstart();
    void vdmflush(); // the name vdmend was already used in lbp.h
    void setfillmode(int mode);
!   void lbp_printer::polygon( int hpos,int vpos,int np,int *p);
!   char *lbp_printer::font_name(const lbp_font *f, const int siz);

    int fill_pattern;
    int fill_mode;
--- 66,73 ----
    void vdmstart();
    void vdmflush(); // the name vdmend was already used in lbp.h
    void setfillmode(int mode);
!   void polygon( int hpos,int vpos,int np,int *p);
!   char *font_name(const lbp_font *f, const int siz);

    int fill_pattern;
    int fill_mode;
***************
*** 490,496 ****
                // We must compensate for that, exchanging the starting and
                // ending points
                vdmvarc(env->hpos + p[0],env->vpos+p[1],\
!                               int(sqrt( (p[0]*p[0])+(p[1]*p[1]))),\
                                p[2],p[3],\
                                (-p[0]),(-p[1]),1,2);
                break;
--- 490,496 ----
                // We must compensate for that, exchanging the starting and
                // ending points
                vdmvarc(env->hpos + p[0],env->vpos+p[1],\
!                               int(sqrt((float) (p[0]*p[0])+(p[1]*p[1]))),\
                                p[2],p[3],\
                                (-p[0]),(-p[1]),1,2);
                break;


Thanks

Martin Jost




reply via email to

[Prev in Thread] Current Thread [Next in Thread]