Date: Thu, 22 May 2003 01:07:28 +0200 (MESZ) From: Ralf Meyer <ralf@thp.Uni-Duisburg.DE> To: ports@freebsd.org Cc: pbelle@fisica.ufjf.br Subject: opendx-4.2.0 problem (with patch) Message-ID: <Pine.A41.4.44.0305220038460.142994-100000@hal6020.thp.Uni-Duisburg.DE>
next in thread | raw e-mail | index | archive | help
Hi, I ran into a problem with the opendx-4.2.0 port on a FreeBSD-5.0 system. While I had no major problems to compile it, the program crahed when the user interface was started. The symptoms are the same as reported by Paulo Belletato two weeks ago. The problem seems to be that the program uses the value returned by getdtablesize() instead of FD_SETSIZE as the number of file descriptors when calling select(). If have tried to inspect all places in the code where getdtablesize() is called and have compiled the following patch in order to fix the relevant places (there are two more calls to getdtablesize() which look ok for me): --- src/exec/dpexec/ccm.c-orig Thu Mar 21 21:14:38 2002 +++ src/exec/dpexec/ccm.c Wed May 21 23:33:02 2003 @@ -230,7 +230,7 @@ int width = FD_SETSIZE; #else #if DXD_HAS_GETDTABLESIZE - int width = getdtablesize(); + int width = FD_SETSIZE; #else int width = MAXFUPLIM; #endif --- src/uipp/dxuilib/DXChild.C-orig Fri Mar 29 14:43:00 2002 +++ src/uipp/dxuilib/DXChild.C Wed May 21 23:37:20 2003 @@ -1261,7 +1261,7 @@ rstring[0] = '\0'; #if defined(HAVE_SYS_UTSNAME_H) fd_set fds; - int width = getdtablesize(); + int width = FD_SETSIZE; #endif /* Until we get port = ..., read from stdout and error. Close the --- src/uipp/dxuilib/PacketIF.C-orig Sat Mar 2 05:04:55 2002 +++ src/uipp/dxuilib/PacketIF.C Wed May 21 23:38:33 2003 @@ -1434,7 +1434,7 @@ #endif int tries; fd_set fds; - int width = getdtablesize(); + int width = FD_SETSIZE; struct timeval to; port = pport; --- src/uipp/dxl/conn.c-orig Mon Apr 29 22:01:38 2002 +++ src/uipp/dxl/conn.c Wed May 21 23:43:53 2003 @@ -177,7 +177,7 @@ int width = FD_SETSIZE; #else #ifndef OS2 - int width = getdtablesize(); + int width = FD_SETSIZE; #endif #endif #endif --- src/uipp/dxl/exit.c-orig Fri Mar 22 23:23:05 2002 +++ src/uipp/dxl/exit.c Wed May 21 23:39:56 2003 @@ -80,7 +80,7 @@ int width = FD_SETSIZE; #else #ifndef OS2 - int width = getdtablesize(); + int width = FD_SETSIZE; #endif #endif #endif --- src/uipp/dxl/send.c-orig Fri Mar 22 23:23:05 2002 +++ src/uipp/dxl/send.c Wed May 21 23:41:57 2003 @@ -651,7 +651,7 @@ int width = FD_SETSIZE; #else #ifndef OS2 - int width = getdtablesize(); + int width = FD_SETSIZE; #endif #endif #endif @@ -721,7 +721,7 @@ int width = FD_SETSIZE; #else #ifndef OS2 - int width = getdtablesize(); + int width = FD_SETSIZE; #endif #endif #endif With this patch the user interface started and I was able make a simple graphic. It would be nice if one of the port maintainers could take a look at this. In this case he/she might also look at the sed command in the post-configure section of the Makefile. On my system this line did nothing because of the space after "flex". This is probably irrelevant if bison is installed. This is probably ok if bison is installed (not the case for me), however in this case the whole line not needed. Without bison, however, the program does not compile without the -l option. Regards Ralf
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.A41.4.44.0305220038460.142994-100000>