On Oct 9, 10:32am, Jonathan Lim wrote:
> Subject: Re: Patches for Makefiles
> On Mon Oct 9 07:09:49 2000, mbrett@xxxxxxxxxxxxxxxxxxxx wrote:
> >
> > There are 2 classes of bugs fixed by these patches:
> >
> > 1) /usr/lib/Inventor[Xt].so needs to be in place successfully to build
> > the code, but I haven't built it yet, so... Catch 22! Instead, refer
> > explicitly to the locally-built stuff when linking code or running
ivman.
>
> You probably forgot to set IVROOT.
Hmmm. If I "setenv IVROOT $HOME" (or something else user-writeable), I can
"gmake install" and it works (mostly -- see below). To install it in /
I'll then have to "gmake clobber ; su - ; setenv IVROOT / ; gmake install"
which is a waste of time since I've already made it once, and also a bit
dangerous since I'm building the package as superuser and it has unknown side
effects.
As a user, I expect to compile the code in user space to avoid possible
problems as root, and only when I've got a clean compile should I need to
"gmake install". The expected sequence is:
% setenv IVROOT / # This is my ultimate destination
% gmake # Repeat until it builds cleanly,
# test package in user-space.
% su - # Only if above works
# gmake install # Commit to root partition.
This minimizes the time and work spent as superuser and should be a
safer sequence.
If the user follows the instructions in README.FIRST, the file should
at least mention that he must be superuser. However, I'd prefer
the above sequence to work properly and have *that* documented in
README.FIRST.
At any rate, even if the user sets IVROOT to something user-writeable,
the gmake will fail because "ivman" still needs the inventor libraries, so
a patch like this will be necessary:
--- make/ivcommonrules.orig Mon Sep 18 08:27:37 2000
+++ make/ivcommonrules Tue Oct 10 16:59:51 2000
@@ -53,6 +53,8 @@
.SUFFIXES: .ivm .3iv
.ivm.3iv:
+ LD_LIBRARY_PATH=$(IVLIBDIR):$$LD_LIBRARY_PATH ; \
+ export LD_LIBRARY_PATH ; \
(cd ..; $(IVMAN) `$(MAKEMANDIRS) $(*F)`) > $@
MAN3PAGES = $(IVMFILES:.ivm=.3iv)
> > 2) Many of the executables require -lXp in order to link. I'm not sure
> > if this is an OpenMotif thing, but my system sure needs it. I've set
> > up the patches so that if /usr/X11R6/lib/libXp.so exists, then add
> > -lXp to the list of required libraries. My config:
>
> Just add -lXp to LLDLIBS in libSoXt/GNUmakefile.
Ack! You're right. Would it still be useful to automate the process,
something like this?:
--- libSoXt/GNUmakefile.orig Mon Sep 18 11:22:53 2000
+++ libSoXt/GNUmakefile Tue Oct 10 16:52:15 2000
@@ -3,9 +3,13 @@
LIBDSO = libInventorXt.so
++ifeq ($(usingLinux), 1)
++LIBXP = $(shell if test -r $(X11DIR)/lib/libXp.so ; then echo -lXp; else echo
; fi)
++endif
+
LLDLIBS = \
-lXm -lXt -lXext -lXi -lX11 -lm \
- -lInventor -lGLU -lGL
+ -lInventor -lGLU -lGL $(LIBXP)
OBJECTS = \
./src/devices/SoXtFocus.o \
Best Regards,
Marc
--
Marc Brett +44 20 8560 3160 Western Geophysical
Marc.Brett@xxxxxxxxxxx 455 London Road, Isleworth
FAX: +44 20 8847 5711 Middlesex TW7 5AA UK
|