catid / wirehair

Wirehair : O(N) Fountain Code for Large Data
http://wirehairfec.com
BSD 3-Clause "New" or "Revised" License
268 stars 56 forks source link

Error compiling #18

Closed gitonio closed 5 years ago

gitonio commented 5 years ago

Running into the following error while compiling a program that uses wirehair:

In file included from ./wirehair/cm256.h:32:0, from ./fec.h:17, from ./blockencodings.h:8, from blockencodings.cpp:6: ./wirehair/gf256.h:70:14: fatal error: tmmintrin.h: No such file or directory

include // SSSE3: _mm_shuffle_epi8

          ^~~~~~~~~~~~~

compilation terminated.

This is on ubuntu. Any help or quidance is appreciated.

catid commented 5 years ago

You probably need to add -mssse3 to gcc

On Sat, Aug 31, 2019 at 1:53 PM gitonio notifications@github.com wrote:

Running into the following error while compiling a program that uses wirehair:

In file included from ./wirehair/cm256.h:32:0, from ./fec.h:17, from ./blockencodings.h:8, from blockencodings.cpp:6: ./wirehair/gf256.h:70:14: fatal error: tmmintrin.h: No such file or directory

include // SSSE3: _mm_shuffle_epi8

^~~~~ compilation terminated.

This is on ubuntu. Any help or quidance is appreciated.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/catid/wirehair/issues/18?email_source=notifications&email_token=AAB5SIIVXM7ZMSXIF2OXCGDQHLK4RA5CNFSM4ISUYUEKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HITMXTQ, or mute the thread https://github.com/notifications/unsubscribe-auth/AAB5SIMQU6VMTMWOQAK4OY3QHLK4RANCNFSM4ISUYUEA .

gitonio commented 5 years ago

Thanks for the quick response!

I tried: sudo make CFLAGS='-mssse3'

That didn't change the output.

catid commented 5 years ago

Maybe -march=native ?

gitonio commented 5 years ago

Based on config.log output it looks like it is running with following flag: CXXFLAGS = -g -O2 -Wall -Wextra -Wformat -Wvla -Wformat-security -Wno-unused-parameter -Wno-implicit-fallthrough -march=native

I didn't mention that this is arm architecture. Are #define being correctly set for this architecture?

$ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/aarch64-linux-gnu/7/lto-wrapper Target: aarch64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 7.4.0-1ubuntu118.04.1' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-7 --program-prefix=aarch64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --enable-multiarch --enable-fix-cortex-a53-843419 --disable-werror --enable-checking=release --build=aarch64-linux-gnu --host=aarch64-linux-gnu --target=aarch64-linux-gnu Thread model: posix gcc version 7.4.0 (Ubuntu/Linaro 7.4.0-1ubuntu118.04.1)

catid commented 5 years ago

Here's the switch that controls that: https://github.com/catid/wirehair/blob/559de702b8f352e798776e0c3d7564761b70be49/gf256.h#L56

You could edit it to add your compiler's arm flag or add one of these to your makefile

On Mon, Sep 2, 2019, 1:08 PM gitonio notifications@github.com wrote:

Based on config.log output it looks like it is running with following flag: CXXFLAGS = -g -O2 -Wall -Wextra -Wformat -Wvla -Wformat-security -Wno-unused-parameter -Wno-implicit-fallthrough -march=native

I didn't mention that this is arm architecture. Are #define being correctly set for this architecture?

$ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/aarch64-linux-gnu/7/lto-wrapper Target: aarch64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 7.4.0-1ubuntu118.04.1' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-7 --program-prefix=aarch64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --enable-multiarch --enable-fix-cortex-a53-843419 --disable-werror --enable-checking=release --build=aarch64-linux-gnu --host=aarch64-linux-gnu --target=aarch64-linux-gnu Thread model: posix gcc version 7.4.0 (Ubuntu/Linaro 7.4.0-1ubuntu118.04.1)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/catid/wirehair/issues/18?email_source=notifications&email_token=AAB5SIJ3LSTTMZ6YVFFD4Q3QHVXCFA5CNFSM4ISUYUEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5WPS3Y#issuecomment-527235439, or mute the thread https://github.com/notifications/unsubscribe-auth/AAB5SIP26RYRGENAQKVTQLLQHVXCFANCNFSM4ISUYUEA .

gitonio commented 5 years ago

Thank you. That worked.