Hi, all-- On Sep 22, 2010, at 9:40 AM, Larry Stone wrote: >> Download the bzip2 security release and compile. I have to go back to my >> office to check what compile settings are necessary as the dedault make file >> is nor good enough. > > There is, of course, more than one way to get to the same result. But first > I'm a little confused by Wendy where she says Snow Leopard (which is Mac OS X > 10.6) but then says FreeBSD. My understanding is OS X incorporates some stuff > from FreeBSD but is not 100% FreeBSD.
Yes; while MacOS X incorporates a bunch of userland stuff from NetBSD and FreeBSD, they are not identical. > In any event, on my Snow Leopard system (running the client version of OS X > even though I use it as a server), I downloaded the latest bzip2 tarball and > did build it with a simple make; make install. This puts the files in > /usr/local/... The Apple provided files are in /usr/... Assuming an Apple > Security update is forthcoming, I did not want to touch the Apple proviced > versions as that can cause problems with their updates. Where Tom says the > default makefile is not good enough, I suspect he means to put the latest > bzip2 files in /usr/... rather than the default /usr/local/... One issue is that the Makefile doesn't build shared libraries/dylibs OK for MacOS X, and also doesn't build them for the multiple supported architectures. Please consider the following diff to bzip2-1.0.6's Makefiles: --- Makefile~ 2010-09-22 10:00:28.000000000 -0700 +++ Makefile 2010-09-22 10:06:50.000000000 -0700 @@ -21,7 +21,7 @@ LDFLAGS= BIGFILES=-D_FILE_OFFSET_BITS=64 -CFLAGS=-Wall -Winline -O2 -g $(BIGFILES) +CFLAGS=-Wall -Winline -O2 -g $(BIGFILES) -arch x86_64 -arch i386 -arch ppc # Where you want it installed when you do 'make install' PREFIX=/usr/local --- Makefile-libbz2_so~ 2010-09-22 10:00:35.000000000 -0700 +++ Makefile-libbz2_so 2010-09-22 10:06:16.000000000 -0700 @@ -24,7 +24,7 @@ SHELL=/bin/sh CC=gcc BIGFILES=-D_FILE_OFFSET_BITS=64 -CFLAGS=-fpic -fPIC -Wall -Winline -O2 -g $(BIGFILES) +CFLAGS=-fpic -fPIC -Wall -Winline -O2 -g $(BIGFILES) -arch x86_64 -arch i386 -arch ppc OBJS= blocksort.o \ huffman.o \ @@ -35,11 +35,21 @@ bzlib.o all: $(OBJS) - $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.6 $(OBJS) + $(CC) $(CFLAGS) -shared -Wl,-dylib -o libbz2.so.1.0.6 $(OBJS) $(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.6 rm -f libbz2.so.1.0 ln -s libbz2.so.1.0.6 libbz2.so.1.0 +# Where you want it installed when you do 'make install' +PREFIX=/usr/local + +install: libbz2.so.1.0.6 + if ( test ! -d $(PREFIX)/lib ) ; then mkdir -p $(PREFIX)/lib ; fi + cp -f libbz2.so.1.0.6 $(PREFIX)/lib/libbz2.1.0.6.dylib + chmod a+r $(PREFIX)/lib/libbz2.1.0.6.dylib + ln -s -f $(PREFIX)/lib/libbz2.1.0.6.dylib $(PREFIX)/lib/libbz2.1.0.dylib + ln -s -f $(PREFIX)/lib/libbz2.1.0.6.dylib $(PREFIX)/lib/libbz2.1.dylib + clean: rm -f $(OBJS) bzip2.o libbz2.so.1.0.6 libbz2.so.1.0 bzip2-shared Regards, -- -Chuck _______________________________________________ Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net http://www.clamav.net/support/ml