#69 Problem with --mode=compile and custom wrapper scripts.
Closed 2 months ago by orbea. Opened 2 months ago by orbea.

OS: Gentoo
slibtool: abd6f6b
isa-l: 2.30.0

With slibtool it fails.

rdlibtool --mode=compile ./tools/nasm-filter.sh -f elf64 -I ./include/ -I ./erasure_code -I ./crc -I ./igzip -I ./tests/fuzz -I ./examples/ec -DPACKAGE_NAME="libisal" -DPACKAGE_TARNAME="isa-l" -DPACKAGE_VERSION="2.31.0" -DPACKAGE_STRING="libisal 2.31.0" -DPACKAGE_BUGREPORT="https://github.com/intel/isa-l/issues" -DPACKAGE_URL="" -DPACKAGE="isa-l" -DVERSION="2.31.0" -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DHAVE_WCHAR_H=1 -DSTDC_HEADERS=1 -D_ALL_SOURCE=1 -D_DARWIN_C_SOURCE=1 -D_GNU_SOURCE=1 -D_HPUX_ALT_XOPEN_SOCKET_API=1 -D_NETBSD_SOURCE=1 -D_OPENBSD_SOURCE=1 -D_POSIX_PTHREAD_SEMANTICS=1 -D__STDC_WANT_IEC_60559_ATTRIBS_EXT__=1 -D__STDC_WANT_IEC_60559_BFP_EXT__=1 -D__STDC_WANT_IEC_60559_DFP_EXT__=1 -D__STDC_WANT_IEC_60559_FUNCS_EXT__=1 -D__STDC_WANT_IEC_60559_TYPES_EXT__=1 -D__STDC_WANT_LIB_EXT2__=1 -D__STDC_WANT_MATH_SPEC_FUNCS__=1 -D_TANDEM_SOURCE=1 -D__EXTENSIONS__=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=".libs/" -DAS_FEATURE_LEVEL=10 -DHAVE_AS_KNOWS_AVX512=1 -DHAVE_LIMITS_H=1 -DHAVE_STDINT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MALLOC=1 -DHAVE_MEMMOVE=1 -DHAVE_MEMSET=1 -DHAVE_GETOPT=1 -g -O2 -c -o erasure_code/gf_vect_mul_sse.lo erasure_code/gf_vect_mul_sse.s

rdlibtool: lconf: {.name="libtool"}.
rdlibtool: fdcwd: {.fdcwd=AT_FDCWD, .realpath="/tmp/isa-l"}.
rdlibtool: lconf: fstatat(AT_FDCWD,".",...) = 0 {.st_dev = 30, .st_ino = 149083}.
rdlibtool: lconf: openat(AT_FDCWD,"libtool",O_RDONLY,0) = 3.
rdlibtool: lconf: found "/tmp/isa-l/libtool".
rdlibtool: compile: ./tools/nasm-filter.sh -I./include/ -I./erasure_code -I./crc -I./igzip -I./tests/fuzz -I./examples/ec -f elf64 -DPACKAGE_NAME="libisal" -DPACKAGE_TARNAME="isa-l" -DPACKAGE_VERSION="2.31.0" -DPACKAGE_STRING="libisal 2.31.0" -DPACKAGE_BUGREPORT="https://github.com/intel/isa-l/issues" -DPACKAGE_URL="" -DPACKAGE="isa-l" -DVERSION="2.31.0" -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DHAVE_WCHAR_H=1 -DSTDC_HEADERS=1 -D_ALL_SOURCE=1 -D_DARWIN_C_SOURCE=1 -D_GNU_SOURCE=1 -D_HPUX_ALT_XOPEN_SOCKET_API=1 -D_NETBSD_SOURCE=1 -D_OPENBSD_SOURCE=1 -D_POSIX_PTHREAD_SEMANTICS=1 -D__STDC_WANT_IEC_60559_ATTRIBS_EXT__=1 -D__STDC_WANT_IEC_60559_BFP_EXT__=1 -D__STDC_WANT_IEC_60559_DFP_EXT__=1 -D__STDC_WANT_IEC_60559_FUNCS_EXT__=1 -D__STDC_WANT_IEC_60559_TYPES_EXT__=1 -D__STDC_WANT_LIB_EXT2__=1 -D__STDC_WANT_MATH_SPEC_FUNCS__=1 -D_TANDEM_SOURCE=1 -D__EXTENSIONS__=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=".libs/" -DAS_FEATURE_LEVEL=10 -DHAVE_AS_KNOWS_AVX512=1 -DHAVE_LIMITS_H=1 -DHAVE_STDINT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MALLOC=1 -DHAVE_MEMMOVE=1 -DHAVE_MEMSET=1 -DHAVE_GETOPT=1 -g -O2 -c erasure_code/gf_vect_mul_sse.s -DPIC -fPIC -o erasure_code/.libs/gf_vect_mul_sse.o
rdlibtool: error logged in slbt_exec_compile(), line 236: Exec format error.
make[1]: *** [Makefile:3780: erasure_code/gf_vect_mul_sse.lo] Error 2
rm erasure_code/gf_vect_mul_sse.s
make: *** [Makefile:2352: all] Error 2

See:
However if I run the nasm-filter.sh command manually it works.

# the Makefile helpfully deletes this after the build...
$ cp erasure_code/gf_vect_mul_sse.asm erasure_code/gf_vect_mul_sse.s

$ /tools/nasm-filter.sh -I./include/ -I./erasure_code -I./crc -I./igzip -I./tests/fuzz -I./examples/ec -f elf64 -DPACKAGE_NAME="libisal" -DPACKAGE_TARNAME="isa-l" -DPACKAGE_VERSION="2.31.0" -DPACKAGE_STRING="libisal 2.31.0" -DPACKAGE_BUGREPORT="https://github.com/intel/isa-l/issues" -DPACKAGE_URL="" -DPACKAGE="isa-l" -DVERSION="2.31.0" -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DHAVE_WCHAR_H=1 -DSTDC_HEADERS=1 -D_ALL_SOURCE=1 -D_DARWIN_C_SOURCE=1 -D_GNU_SOURCE=1 -D_HPUX_ALT_XOPEN_SOCKET_API=1 -D_NETBSD_SOURCE=1 -D_OPENBSD_SOURCE=1 -D_POSIX_PTHREAD_SEMANTICS=1 -D__STDC_WANT_IEC_60559_ATTRIBS_EXT__=1 -D__STDC_WANT_IEC_60559_BFP_EXT__=1 -D__STDC_WANT_IEC_60559_DFP_EXT__=1 -D__STDC_WANT_IEC_60559_FUNCS_EXT__=1 -D__STDC_WANT_IEC_60559_TYPES_EXT__=1 -D__STDC_WANT_LIB_EXT2__=1 -D__STDC_WANT_MATH_SPEC_FUNCS__=1 -D_TANDEM_SOURCE=1 -D__EXTENSIONS__=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=".libs/" -DAS_FEATURE_LEVEL=10 -DHAVE_AS_KNOWS_AVX512=1 -DHAVE_LIMITS_H=1 -DHAVE_STDINT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MALLOC=1 -DHAVE_MEMMOVE=1 -DHAVE_MEMSET=1 -DHAVE_GETOPT=1 -g -O2 -c erasure_code/gf_vect_mul_sse.s -DPIC -fPIC -o erasure_code/.libs/gf_vect_mul_sse.o

$ echo $?
0

This is actually a project bug, the shebang in the wrapper scripts are "#/bin/sh" and not "#!/bin/sh".

https://github.com/intel/isa-l/pull/281
https://github.com/intel/isa-l_crypto/pull/131

Metadata Update from @orbea:
- Issue status updated to: Closed (was: Open)

2 months ago

Login to comment on this ticket.

Metadata