* Errors compiling Rasmol under Redhat 5.1
@ 1998-06-06 20:18 Red Hat Linux User
1998-06-07 15:58 ` Michal Jaegermann
1998-06-08 23:44 ` Uncle George
0 siblings, 2 replies; 3+ messages in thread
From: Red Hat Linux User @ 1998-06-06 20:18 UTC (permalink / raw)
To: axp-list
Rasmol is an excellent free-ware molecular visualization program. I was
able to compile and run it under redhat 4.2 with a termino->terminos
header file change but under 5.1 it chokes under expansion of FD_SET and
FD_CLR macros.
The following is a code snipit from the file rasmol.c.
static struct fd_set OrigWaitSet;
static int OpenConnection( socket )
int socket;
{
register int i;
for( i=0; i<MaxConvNum; i++ )
if( !ConvData[i].protocol )
{ FD_SET(socket,&OrigWaitSet);
if( socket >= WaitWidth )
WaitWidth = socket+1;
ConvData[i].protocol = ProtoRasMol;
ConvData[i].socket = socket;
return( True );
}
close( socket );
return( False );
}
When doing an xmkmf and make
gcc -O2 -I/usr/X11R6/include -I/include -Dlinux -D__alpha__
-D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE=500L
-D_BSD_SOURCE -D_SVID_SOURCE -DFUNCPROTO=15 -DNARROWPROTO
-DRASMOLDIR=\"/usr/X11R6/lib/rasmol/\" -DEIGHTBIT -c rasmol.c -o
rasmol.o
The compiler complains:
rasmol.c: In function `OpenConnection':
rasmol.c:328: invalid use of undefined type `struct fd_set'
and
rasmol.c: At top level:
rasmol.c:111: storage size of `OrigWaitSet' isn't known
When I explicitly include <sys/select.h> which defines fd_set the messages
still appear.
Have the necessary header files changed from 4.2?
If anyone wants to take a look at the code it can be found at
http://evolution.bmc.uu.se/~thomas/mol_linux/rasmol/
Thanks,
Tim
tim@rnaworld.princeton.edu
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Errors compiling Rasmol under Redhat 5.1
1998-06-06 20:18 Errors compiling Rasmol under Redhat 5.1 Red Hat Linux User
@ 1998-06-07 15:58 ` Michal Jaegermann
1998-06-08 23:44 ` Uncle George
1 sibling, 0 replies; 3+ messages in thread
From: Michal Jaegermann @ 1998-06-07 15:58 UTC (permalink / raw)
To: axp-list
"Red Hat Linux User" writes:
>
> When doing an xmkmf and make
>
> gcc -O2 -I/usr/X11R6/include -I/include -Dlinux -D__alpha__
> -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE=500L
> -D_BSD_SOURCE -D_SVID_SOURCE -DFUNCPROTO=15 -DNARROWPROTO
> -DRASMOLDIR=\"/usr/X11R6/lib/rasmol/\" -DEIGHTBIT -c rasmol.c -o
^^^^^^^
You likely want to change that.
> rasmol.o
>
> The compiler complains:
>
> rasmol.c: In function `OpenConnection':
> rasmol.c:328: invalid use of undefined type `struct fd_set'
fd_set is in headers a typedef already to a structure so this really
should be just 'fd_set'.
> and
>
> rasmol.c: At top level:
> rasmol.c:111: storage size of `OrigWaitSet' isn't known
Rasmol needs the following set of includes in rasmol.c
....
#ifdef linux
#include <sys/ioctl.h>
#include <sys/termios.h>
#include <sys/select.h>
#include <string.h>
#else
#include <sys/termio.h>
#endif /* linux */
#endif /* _CONVEX_SOURCE */
....
and after a change outlined above it will compile just fine with glibc.
If it works - that I do not know at this moment. :-)
Michal
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Errors compiling Rasmol under Redhat 5.1
1998-06-06 20:18 Errors compiling Rasmol under Redhat 5.1 Red Hat Linux User
1998-06-07 15:58 ` Michal Jaegermann
@ 1998-06-08 23:44 ` Uncle George
1 sibling, 0 replies; 3+ messages in thread
From: Uncle George @ 1998-06-08 23:44 UTC (permalink / raw)
To: axp-list
fd_set may not be a struct anymore, it is possibly a typedef.
to be sure try:
gcc -E file.c >foo.cpp
vi foo.cpp
now look to see how fd_set is defined
Red Hat Linux User wrote:
> Rasmol is an excellent free-ware molecular visualization program. I was
> able to compile and run it under redhat 4.2 with a termino->terminos
> header file change but under 5.1 it chokes under expansion of FD_SET and
> FD_CLR macros.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1998-06-08 23:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-06-06 20:18 Errors compiling Rasmol under Redhat 5.1 Red Hat Linux User
1998-06-07 15:58 ` Michal Jaegermann
1998-06-08 23:44 ` Uncle George
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox