Menu

undefined reference to `raid_gen?_avx2ext' during compile

Help
neurocis
2014-12-10
2014-12-11
  • neurocis

    neurocis - 2014-12-10

    OS Debian Squeeze w/wheezy backports x64

    During compile:

    gcc  -g -O2 -Wall -Wextra   -o snapraid raid/raid.o raid/module.o raid/tables.o raid/int.o raid/x86.o raid/intz.o raid/x86z.o raid/helper.o raid/memory.o raid/test.o raid/tag.o tommyds/tommy.o cmdline/snapraid.o cmdline/util.o cmdline/elem.o cmdline/state.o cmdline/scan.o cmdline/sync.o cmdline/check.o cmdline/dry.o cmdline/rehash.o cmdline/scrub.o cmdline/status.o cmdline/dup.o cmdline/list.o cmdline/pool.o cmdline/parity.o cmdline/handle.o cmdline/nano.o cmdline/fnmatch.o cmdline/selftest.o cmdline/speed.o cmdline/import.o cmdline/search.o cmdline/mingw.o cmdline/unix.o  -lrt
    raid/tag.o:(.data+0x1d8): undefined reference to `raid_gen3_avx2ext'
    raid/tag.o:(.data+0x1e8): undefined reference to `raid_genz_avx2ext'
    raid/tag.o:(.data+0x1f8): undefined reference to `raid_gen4_avx2ext'
    raid/tag.o:(.data+0x208): undefined reference to `raid_gen5_avx2ext'
    raid/tag.o:(.data+0x218): undefined reference to `raid_gen6_avx2ext'
    collect2: ld returned 1 exit status
    make[1]: *** [snapraid] Error 1
    make[1]: Leaving directory `/root/snapraid-7.0'
    make: *** [all] Error 2
    

    Request build assistance, not sure where this make issue is coming into play or what dependency I may be missing? These look to be defined in internal.h for test units (depricated?)

    Thanks

     
  • Andrea Mazzoleni

    Hi neurocis,

    It's the compiler too old to support AVX2, and I missed one #ifdef to support this case. You can fix the build using the following patch for tag.c.

    I'm going to fix that in 7.1.

    Ciao,
    Andrea

    commit 15e6e6d8a9e9a55a5d68524e343f13be3eedab8f
    Author: Andrea Mazzoleni <amadvance@gmail.com>
    Date:   Wed Dec 10 21:27:52 2014 +0100
    
        Fixes build issue with old compilers in the x64 platform.
    
    diff --git a/raid/tag.c b/raid/tag.c
    index 9afe405..91c1fef 100644
    --- a/raid/tag.c
    +++ b/raid/tag.c
    @@ -63,12 +63,14 @@ static struct raid_func {
            { "ssse3e", raid_gen4_ssse3ext },
            { "ssse3e", raid_gen5_ssse3ext },
            { "ssse3e", raid_gen6_ssse3ext },
    +#ifdef CONFIG_AVX2
            { "avx2e", raid_gen3_avx2ext },
            { "avx2e", raid_genz_avx2ext },
            { "avx2e", raid_gen4_avx2ext },
            { "avx2e", raid_gen5_avx2ext },
            { "avx2e", raid_gen6_avx2ext },
     #endif
    +#endif
            { 0, 0 }
     };
    
     
  • neurocis

    neurocis - 2014-12-11

    Excellent, that sussed it. Threw a pull request on github to further fix sse2 ssse3 under x86_64.

    Cheers!

     

Log in to post a comment.