[patch] Fix "make check" failure to build on Ubuntu 14.04 LTS
Paul Pluzhnikov
ppluzhnikov@google.com
Mon Jan 18 20:41:00 GMT 2016
On Mon, Dec 7, 2015 at 10:13 AM, Joseph Myers <joseph@codesourcery.com> wrote:
> On Mon, 7 Dec 2015, Paul Pluzhnikov wrote:
>
>> Testing with (gcc-4.8 Ubuntu 4.8.4-2ubuntu1~14.04) 4:4.8.2-1ubuntu6
>> fails for apparently unrelated reasons:
>>
>> build/math/test-double-vlen2-wrappers.o: In function `cos_vlen2':
>> /glibc-git/math/../sysdeps/x86_64/fpu/test-double-vlen2-wrappers.c:24:
>> undefined reference to `_ZGVbN2v_cos'
>> /glibc-git/build-system-gcc/math/test-double-vlen2-wrappers.o: In
>> function `sin_vlen2':
>> /glibc-git/math/../sysdeps/x86_64/fpu/test-double-vlen2-wrappers.c:25:
>> undefined reference to `_ZGVbN2v_sin'
>> ... etc.
>
> You should raise that with Andrew Senkevich, including details of whether
> libmvec got built, what symbols it exports, the command line used for that
> link, etc.
This continues to fail.
mkdir /tmp/build; cd /tmp/build;
~/Archive/glibc-git/configure --prefix=/usr
make -j40 && make check
...
gcc -nostdlib -nostartfiles -o /tmp/glibc-build/math/test-double-vlen2
-Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both
/tmp/glibc-build/csu/crt1.o /tmp/glibc-build/csu/crti.o `gcc
--print-file-name=crtbegin.o`
/tmp/glibc-build/math/test-double-vlen2.o
/tmp/glibc-build/math/libm.so.6 /tmp/glibc-build/mathvec/libmvec.so.1
/tmp/glibc-build/math/test-double-vlen2-wrappers.o
-Wl,-dynamic-linker=/lib64/ld-linux-x86-64.so.2
-Wl,-rpath-link=/tmp/glibc-build:/tmp/glibc-build/math:/tmp/glibc-build/elf:/tmp/glibc-build/dlfcn:/tmp/glibc-build/nss:/tmp/glibc-build/nis:/tmp/glibc-build/rt:/tmp/glibc-build/resolv:/tmp/glibc-build/crypt:/tmp/glibc-build/mathvec:/tmp/glibc-build/nptl
/tmp/glibc-build/libc.so.6 /tmp/glibc-build/libc_nonshared.a
-Wl,--as-needed /tmp/glibc-build/elf/ld.so -Wl,--no-as-needed -lgcc
-Wl,--as-needed -lgcc_s -Wl,--no-as-needed `gcc
--print-file-name=crtend.o` /tmp/glibc-build/csu/crtn.o
/tmp/glibc-build/math/test-double-vlen2-wrappers.o: In function `cos_vlen2':
/Archive/glibc-git/math/../sysdeps/x86_64/fpu/test-double-vlen2-wrappers.c:24:
undefined reference to `_ZGVbN2v_cos'
/tmp/glibc-build/math/test-double-vlen2-wrappers.o: In function `sin_vlen2':
/Archive/glibc-git/math/../sysdeps/x86_64/fpu/test-double-vlen2-wrappers.c:25:
undefined reference to `_ZGVbN2v_sin'
/tmp/glibc-build/math/test-double-vlen2-wrappers.o: In function `sincos_vlen2':
/Archive/glibc-git/math/../sysdeps/x86_64/fpu/test-double-vlen2-wrappers.c:26:
undefined reference to `_ZGVbN2vvv_sincos'
/tmp/glibc-build/math/test-double-vlen2-wrappers.o: In function `log_vlen2':
/Archive/glibc-git/math/../sysdeps/x86_64/fpu/test-double-vlen2-wrappers.c:27:
undefined reference to `_ZGVbN2v_log'
/tmp/glibc-build/math/test-double-vlen2-wrappers.o: In function `exp_vlen2':
/Archive/glibc-git/math/../sysdeps/x86_64/fpu/test-double-vlen2-wrappers.c:28:
undefined reference to `_ZGVbN2v_exp'
/tmp/glibc-build/math/test-double-vlen2-wrappers.o: In function `pow_vlen2':
/Archive/glibc-git/math/../sysdeps/x86_64/fpu/test-double-vlen2-wrappers.c:29:
undefined reference to `_ZGVbN2vv_pow'
collect2: error: ld returned 1 exit status
../Rules:154: recipe for target '/tmp/glibc-build/math/test-double-vlen2' failed
make[2]: *** [/tmp/glibc-build/math/test-double-vlen2] Error 1
make[2]: Leaving directory '/Archive/glibc-git/math'
Makefile:214: recipe for target 'math/tests' failed
make[1]: *** [math/tests] Error 2
make[1]: Leaving directory '/Archive/glibc-git'
Makefile:9: recipe for target 'check' failed
make: *** [check] Error 2
$ readelf -Ws /tmp/glibc-build/mathvec/libmvec.so.1 | grep _ZGVbN2vvv_sincos
26: 0000000000001ec0 35 IFUNC GLOBAL DEFAULT 13
_ZGVbN2vvv_sincos@@GLIBC_2.22
54: 0000000000001ec0 35 IFUNC LOCAL DEFAULT 13
__GI__ZGVbN2vvv_sincos
105: 0000000000001ef0 109 FUNC LOCAL DEFAULT 13
_ZGVbN2vvv_sincos_sse2
108: 0000000000003f40 874 FUNC LOCAL DEFAULT 13
_ZGVbN2vvv_sincos_sse4
196: 0000000000001ec0 35 IFUNC GLOBAL DEFAULT 13 _ZGVbN2vvv_sincos
The problem appears to be that test-double-vlen2-wrappers.o is on the
link line after libmvec.so.1, and indeed if I move libmvec.so.1 after
test-double-vlen2-wrappers.o, the link succeeds.
Attached patch fixes the problem. Ok for trunk?
Thanks,
2016-01-18 Paul Pluzhnikov <ppluzhnikov@google.com>
* math/Makefile (libm-vec-tests): Move libraries after wrappers.o
--
Paul Pluzhnikov
-------------- next part --------------
diff --git a/math/Makefile b/math/Makefile
index 8bedef7..222ee6b 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -295,8 +295,8 @@ $(objpfx)libieee.a: $(objpfx)ieee-math.o
$(addprefix $(objpfx),$(filter-out $(tests-static) $(libm-vec-tests),$(tests))): $(libm)
$(addprefix $(objpfx),$(tests-static)): $(objpfx)libm.a
-$(addprefix $(objpfx), $(libm-vec-tests)): $(objpfx)%: $(libm) $(libmvec) \
- $(objpfx)%-wrappers.o
+$(addprefix $(objpfx), $(libm-vec-tests)): $(objpfx)%: $(objpfx)%-wrappers.o $(libm) \
+ $(libmvec)
gmp-objs = $(patsubst %,$(common-objpfx)stdlib/%.o,\
add_n sub_n cmp addmul_1 mul_1 mul_n divmod_1 \
More information about the Libc-alpha
mailing list