Subject: Re: 3-D Solids CAD Program?
To: Thomas Runge <coto@core.de>
From: Richard Rauch <rkr@olib.org>
List: netbsd-users
Date: 07/18/2003 10:21:58
On Fri, Jul 18, 2003 at 08:39:47AM +0200, Thomas Runge wrote:
 [...]
> http://www.informatik.uni-rostock.de/~rschultz/ayam/
 [...]

Well, this is more trouble to build than I anticipated (pkgsrc has made
me SO lazy!).  And the GNU/LINUX binary doesn't run.

I finally got the missing pre-requisite package, togl, to build and work
using the patches from the FreeBSD pkgsrc system as a reference.  (The
key seems to be to use the right tkInt.h, though there may have been other
issues with which .h file was found first.  Pointing togl.c at
tkInt.h from ...pkg/include/tk/generic/, seems to be a nice idea.
(^&  Why the togl sources use their own tkInt*.h files is a bit unclear,
as it seems to be quite sensitive to getting it right!  Why force such
a fragile construction, rather than just use the installed headers?
(boggle))

(I didn't look at the FreeBSD patches at first.  Ignorant of the
*standard* tk.h file, I took one of the included tk.8*.h files with
togl-1.5 and "rubbed off" a tk.8.3.h.  Trying to use that caused core-
dumps when running the demos.)


Well, I should go do other things for now, but with togl working,
hopefully Ayam will be an easy build.

For amusement, here are the diff's that I have for togl-1.5 to build and
run the demos:

 /~~~ Makefile

diff -u -r1.1 Makefile
--- Makefile    2003/07/18 14:03:21     1.1
+++ Makefile    2003/07/18 14:57:25
@@ -67,20 +67,24 @@
 COPTS = -c -O
 
 # Shared library linker command:
-SHLINK = cc -G
+SHLINK = ${CC} -G
 
 # Name for the shared lib:
 #SH_LIB = libtogl.so.1.3
 SH_LIB = 
 
+
 # Where to find tcl.h, tk.h, OpenGL/Mesa headers, etc:
-INCLUDES = -I/usr/local/include -I/usr/include/tcl
+#INCLUDES = -I/usr/local/include -I/usr/include/tcl
+INCLUDES = -I/usr/pkg/include -I/usr/X11R6/include -I/usr/pkg/include/tcl  -I/usr/pkg/include/tk -I/usr/pkg/include/tk/generic
 
 # Where to find libtcl.a, libtk.a, OpenGL/Mesa libraries:
-LIBDIRS = -L/usr/local/lib
+LIBDIRS = -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/X11R6/lib -Wl,-R/usr/X11R6/lib
 
 # Libraries to link with (-ldl for Linux only?):
-LIBS = -ltk -ltcl -lGLU -lGL -L/usr/X11/lib -lX11 -lXmu -lXext -lXt -lm -ldl
+# Remove -ldl (Dynamic Load? dlopen() isn't in a seperate library!)
+#LIBS = -ltk83 -ltcl83 -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXext -lXt -lm -ldl
+LIBS = -ltk83 -ltcl83 -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXext -lXt -lm
 
 TK_FLAGS =

 \___ Makefile

 /~~~ togl.c

diff -u -r1.1 togl.c
--- togl.c      2003/07/18 14:13:06     1.1
+++ togl.c      2003/07/18 14:57:31
@@ -121,7 +121,8 @@
 #elif TK_MAJOR_VERSION==8 && TK_MINOR_VERSION==0 && TK_RELEASE_SERIAL==2
 #  include "tkInt8.0p2.h"
 #else
-   Sorry, you will have to edit togl.c to include the right tkInt.h file
+/*** Sorry, you will have to edit togl.c to include the right tkInt.h file ***/
+#include "tkInt.h"
 #endif
 #elif defined(WIN32)
 #if TK_MAJOR_VERSION<8

 \___ togl.c

(Hm, should probably be <tkInt.h>, since we expressly want the one from
the system...but this works.  (^&)


  "I probably don't know what I'm talking about."  http://www.olib.org/~rkr/