McStas
Kristian Nielsen
kristian.nielsen at risoe.dk
Fri Aug 20 08:36:57 CEST 1999
> Date: Thu, 19 Aug 1999 15:14:23 -0500 (EST)
> From: "Gregory L. Hansen" <glhansen at iucf.indiana.edu>
> I was attracted by your wonderful project, but I'm having trouble
> installing it on an HP-UX system. The /.configure --prefix=/user/glhansen
> part seemed to go well, but I got a bunch of errors on make that I don't
> know what to do with, they're copied below. I don't have any kind of
> superuser privilages.
>
> glhansen at ashima:/mcstas-1.1 $ make
> gcc -I. -I. -c -g -O2
> -DMC_SYS_DIR='"'/users/glhansen/lib/mcstas'"' -DCC
> _HAS_PROTOS=1 -DHAVE_STRCASECMP=1 -DHAVE_FDOPEN=1 -DDEBUG=0
> instrument.tab.c
> In file included from
> /usr/local/gnu/lib/gcc-lib/hppa1.1-hp-hpux9.05/2.7.0/inclu
> de/stdlib.h:231,
> from mcstas.h:78,
> from instrument.y:18:
> /usr/include/pwd.h:29: parse error before `int32_t'
> /usr/include/pwd.h:29: warning: no semicolon at end of struct or union
> /usr/include/pwd.h:31: parse error before `}'
> /usr/include/pwd.h:67: parse error before `int32_t'
> /usr/include/pwd.h:67: warning: no semicolon at end of struct or union
Hm, this looks like there is a problem with the installation of the GCC
C compiler on your machine.
I think the first thing to try is to compile McStas with the standard
HPUX compiler (assuming you have it installed). To do this, compile
McStas again as follows:
rm -f config.cache
setenv CC cc
./configure --prefix=/user/glhansen
make
and see if it helps (or mail me the output if it does not). You do not
need superuser privileges to install McStas. Just let me know if you
need further assistance.
I found the following on the Web, which seems to mention a similar
problem:
----------------------------------------------------------------------
Norman Bullen <nbullen at ix.netcom.com> writes:
> Andy Armacost wrote:
> >
> > Having problems running Gnu C/C++ on hpux 10.20. When #INCLUDEing
> > stdlib.h, we get parse errors in the header file pwd.h.
> > from hello.c:3:
> > /usr/include/pwd.h:37: parse error before `int32_t'
> > /usr/include/pwd.h:37: warning: no semicolon at end of struct or union
> > /usr/include/pwd.h:39: parse error before `}'
> > /usr/include/pwd.h:75: parse error before `int32_t'
> > /usr/include/pwd.h:75: warning: no semicolon at end of struct or union
The following program works for me on an HP-UX 10.20 machine compiled
using g++
#include <iostream.h>
#include <stdlib.h>
#include <pwd.h>
int main(void)
{
cout << " hello\n";
return 0;
}
the pwd.h header is included in the stdlib.h file (at least in the HP
version) so you should look in the gcc fixed include files. gcc does
not use the standard system includes, instead it copies them and
changes them to be ANSI c compliant. The sed program for HP 10.20 is
broken and the gcc installation needs either a patched HP sed or the
Gnu version of sed. If not, compilation of programs will fail with
symptoms similar to the above.
----------------------------------------------------------------------
- Kristian.
--
Kristian Nielsen kristian.nielsen at risoe.dk
Risø National Laboratory
Condensed Matter Physics and Chemistry Department
Tel. +45 4677 5515 Fax +45 4677 4790
More information about the mcstas-users
mailing list