Patch to remove most of the unused direct dependencies
Brought to you by:
paulcockings,
sbajic
Hi,
You will find attached a patch worked out by Thomas Preud'homme and I which removes unused direct dependencies on most of the executables and libraries built by DSPAM.
The only left is a dependency on libpthread for dspam_crc:
% ldd -u -r /usr/bin/dspam_crc
Unused direct dependencies:
/lib/i686/cmov/libpthread.so.0
I don't know how it can be easily removed as all others really depend on symbols of libpthread.
Also, one should have a look if this doesn't break anything when building as a static driver, though it shouldn't, it wasn't tested.
It would be great to get this patch committed.
Cheers,
Julien
Patch to remove unused direct dependencies
Hallo Julien, thanks for the patch. It's applied to GIT now.
Sorry, I'm not programmer and maybe not right, but it seems as this patch broken anything - linking with math library isn't invoked when building statically linked (hash only?) driver. Then "src/tools.hash_drv/Makefile.am" conditions
if DYNAMIC_DRIVER
if BUILD_HASH_DRV
cssstat_CPPFLAGS = $(libhash_drv_cppflags)
cssstat_LDFLAGS += $(libhash_drv_libs) $(libhash_drv_ldflags)
cssstat_LDADD = -lm
endif
endif
aren't satisfied and linking ends with error:
/bin/sh ../../libtool --tag=CC --mode=link gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -Wall -Wmissing-prototypes -Wmissing-declarations -I../../src -rdynamic -o cssstat cssstat-cssstat.o cssstat-read_config.o cssstat-util.o cssstat-diction.o cssstat-nodetree.o cssstat-hash_drv.o cssstat-error.o cssstat-config_shared.o cssstat-pref.o -pthread
libtool: link: gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -Wall -Wmissing-prototypes -Wmissing-declarations -I../../src -rdynamic -o cssstat cssstat-cssstat.o cssstat-read_config.o cssstat-util.o cssstat-diction.o cssstat-nodetree.o cssstat-hash_drv.o cssstat-error.o cssstat-config_shared.o cssstat-pref.o -pthread -pthread
cssstat-util.o: In function `chi2Q':
/home/hanzlik/src/rpm/BUILD/dspam-3.9.0-git.20101204.050400/src/tools.hash_drv/../util.c:712: undefined reference to `exp'
collect2: ld returned 1 exit status
make[3]: *** [cssstat] Error 1
Ehmm... nor programmer, nor engish guru. There likely should be 'broke something'. Excuse me.
3123162.patch
Hello franta,
thanks for reporting this problem. I have attached a patch for that problem. Can you please try and report if this fixes the issue?
// Steve
DSpam now build OK.
Let me tell how I'm glad because You not leave project. You and Your work is quite cardinal to him.
Thanks.
Hallo franta, thanks for reporting your success with the new patch.
btw: I said in the past that I will be here and apply patches (or fix bugs) if they are posted here on SF.