bbandix / crcutil

Automatically exported from code.google.com/p/crcutil
Apache License 2.0
0 stars 0 forks source link

FTBFS@i686 (2/2): 'asm' operand has impossible constraints #7

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Yet another FTBFS on i686:

code/multiword_64_64_gcc_i386_mmx.cc: In member function 'crcutil::GenericCrc<_Crc, _TableEntry, _Word, kStride>::Crc crcutil::GenericCrc<_Crc, _TableEntry, _Word, kStride>::CrcMultiwordI386Mmx(const void*, size_t, const Crc&) const [with _Crc = long long unsigned int; _TableEntry = long long unsigned int; _Word = long long unsigned int; int kStride = 4; crcutil::GenericCrc<_Crc, _TableEntry, _Word, kStride>::Crc = long long unsigned int; size_t = unsigned int]': code/multiword_64_64_gcc_i386_mmx.cc:252:37: error: 'asm' operand has impossible constraints [table_word] "m" (table_word)); ^ Makefile:685: recipe for target 'code/multiword_64_64_gcc_i386_mmx.lo' failed


I've managed to "fix" it by adding "-DCRCUTIL_USE_ASM=0" to CPPFLAGS but there 
should be a better way...

Original issue reported on code.google.com by only...@gmail.com on 8 Dec 2014 at 4:27

GoogleCodeExporter commented 8 years ago
It turned out that this problem is due to unconditional use of '-msse2' which 
is set in "Makefile.am". It should be unconditionally replaced with "-mcrc32" 
which is necessary for successful build. "-msse2" breaks build on x86_32 and 
its absence makes no difference for x86_64. "-DCRCUTIL_USE_ASM=0" should not be 
used because it disables "GenericCrc" functionality. Here is the patch:

--- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,5 @@ -AM_CXXFLAGS=-DCRCUTIL_USE_MM_CRC32=1 -Wall -msse2 -Icode +AM_CXXFLAGS=-DCRCUTIL_USE_MM_CRC32=1 -Wall -mcrc32 -Icode AM_CFLAGS=$(AM_CXXFLAGS)

lib_LTLIBRARIES = libcrcutil.la libcrcutil_la_SOURCES = \

Original comment by only...@gmail.com on 10 Dec 2014 at 10:14