Menu

#120 Patch to remove most of the unused direct dependencies

v3.9.1
closed-accepted
None
5
2010-12-05
2010-11-30
No

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

Discussion

  • Julien Valroff

    Julien Valroff - 2010-11-30

    Patch to remove unused direct dependencies

     
  • Stevan Bajic

    Stevan Bajic - 2010-11-30
    • milestone: --> v3.9.1
    • assigned_to: nobody --> sbajic
    • status: open --> closed-accepted
     
  • Stevan Bajic

    Stevan Bajic - 2010-11-30

    Hallo Julien, thanks for the patch. It's applied to GIT now.

     
  • franta

    franta - 2010-12-04

    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

     
  • franta

    franta - 2010-12-04

    Ehmm... nor programmer, nor engish guru. There likely should be 'broke something'. Excuse me.

     
  • Stevan Bajic

    Stevan Bajic - 2010-12-05

    3123162.patch

     
  • Stevan Bajic

    Stevan Bajic - 2010-12-05

    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

     
  • Stevan Bajic

    Stevan Bajic - 2010-12-05
    • status: closed-accepted --> open-accepted
     
  • franta

    franta - 2010-12-05

    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.

     
  • SteveB

    SteveB - 2010-12-05

    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.

     
  • SteveB

    SteveB - 2010-12-05
    • status: open-accepted --> closed-accepted
     

Log in to post a comment.