[R] e1071 and netpbm

Martyn Plummer plummer at iarc.fr
Mon Mar 22 14:55:03 CET 1999


[Snip: Problems installing the e1071 package on Red Hat Linux]

Instead of having a single netpbm library, Red Hat has four libraries
(all provided by the libgr rpm), with recursive dependencies

libpnm -> libppm -> libpgm -> libpbm

So, for example, libpbm stands alone but libpgm contains references to
functions in libpbm.  This means that if you want to use any functions
in libpnm (which we do), you must also link against the other three
libraries. If you don't do this, then the compiler won't complain about
undefined references when you type "R INSTALL e1071", since it is building
a shared object, but you will get run time errors.

I can't see the advantage of splitting the library, myself. I wrote to
Red Hat about this in November but didn't get a reply.  It looks like
various other Linux distributions which use the RPM packager (OpenLinux,
TurboLinux, LinuxPPC, ...) use the same setup.

I use the patch below when compiling on Red Hat
Martyn
-------------- next part --------------
diff -uNr e1071/src/Makefile e1071-patched/src/Makefile
--- e1071/src/Makefile	Tue Nov 17 11:44:10 1998
+++ e1071-patched/src/Makefile	Fri Nov 20 15:05:00 1998
@@ -4,7 +4,7 @@
 OBJS=pnm.o 
 
 $(LIBNAME).so:  $(OBJS)
-	$(LD) $(SHLIBLDFLAGS) -o $@ $(OBJS) -lnetpbm
+	$(LD) $(SHLIBLDFLAGS) -o $@ $(OBJS) -lpnm -lppm -lpgm -lpbm
 
 clean:
 	@rm -f *.o *.so


More information about the R-help mailing list