From patchwork Mon Jan 18 20:40:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Pluzhnikov X-Patchwork-Id: 10434 Received: (qmail 6548 invoked by alias); 18 Jan 2016 20:41:27 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 6537 invoked by uid 89); 18 Jan 2016 20:41:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.5 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy=GLOBAL, Archive X-HELO: mail-wm0-f44.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc :content-type; bh=aU7j5UCXw+2W3oVhCbRvSP8xu+Ll0M5xDiVTxvpk8O8=; b=YcAASbEUU2ES0/ocu73l546FbCaxKWeyhOz0nQLuXQihaGDwsjETrxqfX4dT38FKkm Wdcny8BgIFMPmmXyVyJ5pBzS+aSYvUn4fEvYECM5zIu7QJH1vRa4COd5ScUEu4RX0tJE 15s4wCQAC3ak3jnlIRAMfkW35y85tijs0FKJZjR4YA32GPTxfwEEO1zY9NJCA118krH2 aZBViYtj4mQ41h24/BLRYKBRnVIISyZrTXY+srp1am1fJhgEmAqJvnLbDishk5RPZKiI 6Sy7uOVpZGSPGWMqsyGLr4YqzVrcedYMR1DHSuiFMFGmpQ9qAI8ieMqJQS0FpHT69c4b ylsw== X-Gm-Message-State: ALoCoQkiS5tYmsUHd9G9SXk+2Ua36XKKkFw14mN15FWRVn41Gw1qZzM/Po44JTyFIhZ5eZ/85br1ApGEruYZ04yBs2x9BtqLfsBUs+r57yP/H0Bfb8SWqfE= X-Received: by 10.194.86.71 with SMTP id n7mr25942686wjz.107.1453149681502; Mon, 18 Jan 2016 12:41:21 -0800 (PST) MIME-Version: 1.0 From: Paul Pluzhnikov Date: Mon, 18 Jan 2016 12:40:51 -0800 Message-ID: Subject: [patch] Fix "make check" failure to build on Ubuntu 14.04 LTS To: GLIBC Devel Cc: Joseph Myers , andrew.senkevich@intel.com On Mon, Dec 7, 2015 at 10:13 AM, Joseph Myers 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 * math/Makefile (libm-vec-tests): Move libraries after wrappers.o 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 \