Problems compiling perl4.003 on the UNIXPC/3B1
Jeffery Small
jeff at cjsa.wa.com
Sat May 4 04:35:53 AEST 1991
When compiling perl4.003 on the 3B1 using the stock compiler (Version 3.51m),
I get the following messages for toke.o (and ttoke.o):
==============================================================================
"toke.c", line 2333: warning: illegal member use: f_up
"toke.c", line 2333: warning: illegal structure pointer combination, op =
"toke.c", line 2345: warning: illegal member use: f_up
"toke.c", line 2345: warning: illegal structure pointer combination, op =
"toke.c", line 2453: warning: illegal member use: f_up
"toke.c", line 2453: warning: illegal structure pointer combination, op =
"toke.c", line 2464: warning: illegal member use: f_up
"toke.c", line 2464: warning: illegal member use: f_type
"toke.c", line 2517: warning: illegal member use: f_up
"toke.c", line 2517: warning: illegal structure pointer combination, op =
==============================================================================
This turns out to be a problem with a pre-existing #define in <sys/file.h>
as follows:
== /usr/include/sys/file.h ===================================================
struct file
{
char f_flag;
cnt_t f_count; /* reference count */
union {
struct inode *f_uinode; /* pointer to inode structure */
struct file *f_unext; /* next entry in freelist */
} f_up;
off_t f_offset; /* read/write character pointer */
};
#define f_inode f_up.f_uinode
#define f_next f_up.f_unext
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
==============================================================================
The perl structure formcmd (FCMD) contains a f_next member and this is being
replaced by "f_up.unext" with obviously bad results. Although the program
does compile, it is failing on the comp/decl.t and op/write.t tests -
and I am assuming that these problem are caused by the above situation.
Before I hack things up I wanted to see if there was a standard patch or
fix for this condition? Have others gotten perl to compile on this platform
without problems? Are you including sys/file.h in your config.sh?
Thanks for any help you may be able to offer.
--
Jeff Small C. Jeffery Small & Associates (206) 232-3338
uunet!nwnexus!cjsa!jeff 7000 E Mercer Way, Mercer Island, WA 98040
More information about the Comp.sys.3b1
mailing list