From owner-freebsd-current@FreeBSD.ORG Wed Nov 2 12:03:37 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 46B7E1065675 for ; Wed, 2 Nov 2011 12:03:37 +0000 (UTC) (envelope-from olivier@gid0.org) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id E18EF8FC23 for ; Wed, 2 Nov 2011 12:03:36 +0000 (UTC) Received: by qadz32 with SMTP id z32so114235qad.13 for ; Wed, 02 Nov 2011 05:03:36 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.27.136 with SMTP id i8mr481289qcc.171.1320235415991; Wed, 02 Nov 2011 05:03:35 -0700 (PDT) Received: by 10.229.134.84 with HTTP; Wed, 2 Nov 2011 05:03:35 -0700 (PDT) In-Reply-To: <4E644993.4090703@gmail.com> References: <4E62915E.1010405@FreeBSD.org> <4E6294E0.5010104@gmail.com> <4E6298DE.5090007@FreeBSD.org> <4E644993.4090703@gmail.com> Date: Wed, 2 Nov 2011 13:03:35 +0100 Message-ID: From: Olivier Smedts To: Volodymyr Kostyrko Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-current@freebsd.org, Dimitry Andric Subject: Re: Compiling BETA2 with clang fails X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Nov 2011 12:03:37 -0000 2011/9/5 Volodymyr Kostyrko : > > 0k, here you go. Just as you say - no -fPIC, no ccache, no anything. > > =3D=3D=3D> libexec/atrun (all) > clang -O2 -pipe -march=3Dnative -DATJOB_DIR=3D\"/var/at/jobs/\" > -DLFILE=3D\"/var/at/jobs/.lockfile\" =A0-DLOADAVG_MX=3D1.5 > -DATSPOOL_DIR=3D\"/var/at/spool\" =A0-DVERSION=3D\"2.9\" -DDAEMON_UID=3D1 > -DDAEMON_GID=3D1 =A0-DDEFAULT_BATCH_QUEUE=3D\'E\' =A0-DDEFAULT_AT_QUEUE= =3D\'c\' > -DPERM_PATH=3D\"/var/at/\" -I/usr/src/libexec/atrun/../../usr.bin/at > -I/usr/src/libexec/atrun -DLOGIN_CAP -DPAM -std=3Dgnu99 -fstack-protector > -Wsystem-headers -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-si= gn > -c /usr/src/libexec/atrun/atrun.c > clang -O2 -pipe -march=3Dnative -DATJOB_DIR=3D\"/var/at/jobs/\" > -DLFILE=3D\"/var/at/jobs/.lockfile\" =A0-DLOADAVG_MX=3D1.5 > -DATSPOOL_DIR=3D\"/var/at/spool\" =A0-DVERSION=3D\"2.9\" -DDAEMON_UID=3D1 > -DDAEMON_GID=3D1 =A0-DDEFAULT_BATCH_QUEUE=3D\'E\' =A0-DDEFAULT_AT_QUEUE= =3D\'c\' > -DPERM_PATH=3D\"/var/at/\" -I/usr/src/libexec/atrun/../../usr.bin/at > -I/usr/src/libexec/atrun -DLOGIN_CAP -DPAM -std=3Dgnu99 -fstack-protector > -Wsystem-headers -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-si= gn > -c /usr/src/libexec/atrun/gloadavg.c > clang -O2 -pipe -march=3Dnative -DATJOB_DIR=3D\"/var/at/jobs/\" > -DLFILE=3D\"/var/at/jobs/.lockfile\" =A0-DLOADAVG_MX=3D1.5 > -DATSPOOL_DIR=3D\"/var/at/spool\" =A0-DVERSION=3D\"2.9\" -DDAEMON_UID=3D1 > -DDAEMON_GID=3D1 =A0-DDEFAULT_BATCH_QUEUE=3D\'E\' =A0-DDEFAULT_AT_QUEUE= =3D\'c\' > -DPERM_PATH=3D\"/var/at/\" -I/usr/src/libexec/atrun/../../usr.bin/at > -I/usr/src/libexec/atrun -DLOGIN_CAP -DPAM -std=3Dgnu99 -fstack-protector > -Wsystem-headers -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-si= gn > =A0-o atrun atrun.o gloadavg.o -lpam -lutil > clang: warning: argument unused during compilation: '-std=3Dgnu99' > /usr/obj/usr/src/tmp/usr/lib/crt1.o: In function `_start1': > /usr/src/lib/csu/i386-elf/crt1_c.c:(.text+0x7d): undefined reference to > `atexit' > /usr/src/lib/csu/i386-elf/crt1_c.c:(.text+0x84): undefined reference to > `_init_tls' > /usr/src/lib/csu/i386-elf/crt1_c.c:(.text+0x90): undefined reference to > `atexit' > /usr/src/lib/csu/i386-elf/crt1_c.c:(.text+0xad): undefined reference to > `exit' > atrun.o: In function `perr': > /usr/src/libexec/atrun/atrun.c:(.text+0x12): undefined reference to `strl= en' > /usr/src/libexec/atrun/atrun.c:(.text+0x45): undefined reference to `vwar= n' > /usr/src/libexec/atrun/atrun.c:(.text+0x6d): undefined reference to > `snprintf' > /usr/src/libexec/atrun/atrun.c:(.text+0x8a): undefined reference to > `vsyslog' > /usr/src/libexec/atrun/atrun.c:(.text+0x9c): undefined reference to `exit= ' > atrun.o: In function `perrx': > /usr/src/libexec/atrun/atrun.c:(.text+0xd3): undefined reference to `vwar= nx' > /usr/src/libexec/atrun/atrun.c:(.text+0xdf): undefined reference to `exit= ' > /usr/src/libexec/atrun/atrun.c:(.text+0xf3): undefined reference to > `vsyslog' > /usr/src/libexec/atrun/atrun.c:(.text+0xff): undefined reference to `exit= ' > atrun.o: In function `main': > /usr/src/libexec/atrun/atrun.c:(.text+0x160): undefined reference to > `geteuid' > /usr/src/libexec/atrun/atrun.c:(.text+0x174): undefined reference to > `getegid' > /usr/src/libexec/atrun/atrun.c:(.text+0x186): undefined reference to > `setegid' > /usr/src/libexec/atrun/atrun.c:(.text+0x193): undefined reference to > `seteuid' [...] > clang: error: linker command failed with exit code 1 (use -v to see > invocation) > *** Error code 1 > > Stop in /usr/src/libexec/atrun. > *** Error code 1 > > Stop in /usr/src/libexec. > *** Error code 1 > > Stop in /usr/src. > *** Error code 1 > > Stop in /usr/src. > *** Error code 1 > > Stop in /usr/src. Replying to an old thread, but FYI this problem which has been bugging me since months has gone away since the lastest clang branches/release_30 import, and it has been MFC'ed to stable/9. I can now buildworld with -march=3Dcorei7 instead of -march=3Dcore2 :) (the same should apply for -march=3Dnative) Cheers --=20 Olivier Smedts=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=A0 _ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 ASCII ribbon campaign ( ) e-mail: olivier@gid0.org=A0 =A0 =A0 =A0 - against HTML email & vCards=A0 X www: http://www.gid0.org=A0 =A0 - against proprietary attachments / \ =A0 "Il y a seulement 10 sortes de gens dans le monde : =A0 ceux qui comprennent le binaire, =A0 et ceux qui ne le comprennent pas."