opendx-4.2.0 problem (with patch)

Ralf Meyer ralf at thp.Uni-Duisburg.DE
Wed May 21 16:07:33 PDT 2003


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



More information about the freebsd-ports mailing list