intel / isa-l

Intelligent Storage Acceleration Library
Other
956 stars 301 forks source link

x32 compatibility #3

Open onovy opened 8 years ago

onovy commented 8 years ago

This library can't be compiled (linked) on x32 (https://en.wikipedia.org/wiki/X32_ABI)

/usr/bin/ld: i386:x86-64 architecture of input file `erasure_code/.libs/gf_vect_mul_sse.o' is incompatible with i386:x64-32 output

Thanks for fixing

dong-liuliu commented 8 years ago

Hi, Onovy If you want to compile 32bit version ISA-L erasure code, you shouldn't use autotools(./autogen.sh && ./configure) since ISA-L's autotool facility doesn't support 32bit.

The correct way for 32bit version ISA-L EC is:(in the top path of ISA-L) compile: make -f Makefile.unx arch=32 clean: make -f Makefile.unx arch=32 clean

from Xiaodong

onovy commented 8 years ago

No I don't want to compile 32bit version, but x32 version. Version which uses 64-bit processor set, but 32-bit pointers. See link in my first comment for better explanation.

dong-liuliu commented 8 years ago

Oh, if support x32, all ASM files need to be filtered carefully. And it is not a quick work.

onovy commented 8 years ago

it's not needed "quickly" :)

i'm building package for amd64 only now, no problem.

simonis commented 5 years ago

It seems that make -f Makefile.unx arch=32 doesn't work any more. When I try I get the following error when the first assembler file gets compiled:

nasm -f elf32   -D NDEBUG -I./ -Ierasure_code/ -Iraid/ -Icrc/ -Iigzip/ -Iprograms/ -Imem/ -Iinclude/ -Itests/fuzz/ -Iexamples/ec/ -DAS_FEATURE_LEVEL=6 -DHAVE_AS_KNOWS_AVX512 -o bin/gf_vect_mul_sse.o erasure_code/gf_vect_mul_sse.asm
erasure_code/gf_vect_mul_sse.asm:116: error: parser: instruction expected
erasure_code/gf_vect_mul_sse.asm:117: warning: label alone on a line without a colon might be in error [-w+orphan-labels]
erasure_code/gf_vect_mul_sse.asm:153: warning: label alone on a line without a colon might be in error [-w+orphan-labels]
erasure_code/gf_vect_mul_sse.asm:158: warning: label alone on a line without a colon might be in error [-w+orphan-labels]
erasure_code/gf_vect_mul_sse.asm:158: error: symbol `FUNC_RESTORE' redefined
make.inc:225: recipe for target 'bin/gf_vect_mul_sse.o' failed
make: *** [bin/gf_vect_mul_sse.o] Error 1

This is because erasure_code/gf_vect_mul_sse.asm has no section for elf32 definitions and therefore FUNC_RESTORE is only defined for elf64. It seems that a lot of files which have special elf64 definitions miss these definitions for elf32.

Has 32bit support been dropped meanwhile or is this something that could be fixed easily?

gbtucker commented 5 years ago

Thanks for reporting. I think the list of the files that were back-ported to 32-bit was modified at some point to include some files that were not. It may be an easy fix to change the makefile lsrc_x86_32 += but we may need to add a bit more to span the combination of base functions and backported sources.