[653] in Pthreads mailing list archive
compile bug in pthread of 16nov97
daemon@ATHENA.MIT.EDU (Michael J. Gourlay)
Tue May 13 17:36:30 1997
From: "Michael J. Gourlay" <gourlay@ucsub.Colorado.EDU>
To: proven@MIT.EDU, pthreads@MIT.EDU
Date: Tue, 13 May 1997 15:18:13 -0600 (MDT)
Hello,
In the process of trying to compile pthreads 1.60 of 16nov97 on an
SGI Indigo with an IP22 processor running IRIX 6.2 using the native C
compiler, I received these errors. Please help.
(1) EVERY SINGLE COMPILE LINE during the make reported the following:
cfe: Warning 581: include/sys/__signal.h:5: Macro sigmask redefined.
This is because sigmask is already defined in "sys/signal.h" o my
machine. The definitions seem to be compatible, maybe.
Here is how my machine defines this:
#define sigmask(sig) (1L << ((sig)-1))
Here is the definition in __signal.h:
#define sigmask(n) ((unsigned int)1 << (((n) - 1) & (32 - 1)))
(2) in include/pthread/sleep.h the declaration of machdep_gettimeofday
uses the word "inline" which is obviously not ANSI C. I omitted the
word "inline" and this no longer caused problems. However, it seems
very strange that one would want to include a function multiple times
in a single library so this is not an optimal solution. It would be
better to rewrite this either as a macro or as a regular function. My
guess is that this is an attempt to make use of a non-standard feature
of the GNU C compiler. There was no sign that the code was supposed
to be C++ code.
(3) This error is much worse:
cfe: Error: pthreads-1_60_beta6/stdio/vfprintf.c, line 188: Syntax Error
u_quad_t _uquad;
---------^
There were a cacade of other errors in vfprintf.c after this, but
they were probably due to the above error. This error seems to be
due to a mess of precompiler code where u_quad_t is only defined if
either __GNUC__ or __alpha is defined. In case anybody is wondering,
IRIX 6.2 does define a type called "long long". I defined u_quad_t
to be "long long", and the compilation proceeded. BTW there is no
"long double" on this machine.
(4) in stdio/vfprintf.c, the following line causes the warning "Bad
identifier after the ifndef":
#ifndef 0
(5) This error killed my buzz. I have no idea how to fix it. I have
no idea what it means. I guess this is an assembly problem.
syscall.S is linked to "machdep/syscall-ip22-irix-5.2.S". PLEASE
HELP:
cc -I. -Iinclude -I/tmp_mnt/mckenna3/local/src/pthreads-1_60_beta6/include -DPTHREAD_KERNEL -g -c syscall.S -o obj/syscall.o
input buffer on non-int boundry
gnumake: *** [obj/syscall.o] Error 1
--
Michael J. Gourlay Physics Graduate Michael.Gourlay@colorado.edu
Duane Physics D031, Department of Physics, University of Colorado at Boulder
"That's me; I've been ionized...." - Buckaroo Banzai
SMAIL: CU Boulder, Physics Department, Campus Box 390, Boulder, CO 80309, USA
WORK: Colorado Research Associates. 415-9701 FAX: 415-9702
WEB: http://ucsub.Colorado.EDU/~gourlay