Date: Wed, 2 Nov 2011 13:03:35 +0100 From: Olivier Smedts <olivier@gid0.org> To: Volodymyr Kostyrko <c.kworr@gmail.com> Cc: freebsd-current@freebsd.org, Dimitry Andric <dim@freebsd.org> Subject: Re: Compiling BETA2 with clang fails Message-ID: <CABzXLYNf5v4WUF-ZR3XPLCVz=OMKKA7N9W%2BKp1ubEjjg2ykxJg@mail.gmail.com> In-Reply-To: <4E644993.4090703@gmail.com> References: <j3u29f$bv8$1@dough.gmane.org> <4E62915E.1010405@FreeBSD.org> <4E6294E0.5010104@gmail.com> <4E6298DE.5090007@FreeBSD.org> <4E644993.4090703@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
2011/9/5 Volodymyr Kostyrko <c.kworr@gmail.com>: > > 0k, here you go. Just as you say - no -fPIC, no ccache, no anything. > > ===> libexec/atrun (all) > clang -O2 -pipe -march=native -DATJOB_DIR=\"/var/at/jobs/\" > -DLFILE=\"/var/at/jobs/.lockfile\" -DLOADAVG_MX=1.5 > -DATSPOOL_DIR=\"/var/at/spool\" -DVERSION=\"2.9\" -DDAEMON_UID=1 > -DDAEMON_GID=1 -DDEFAULT_BATCH_QUEUE=\'E\' -DDEFAULT_AT_QUEUE=\'c\' > -DPERM_PATH=\"/var/at/\" -I/usr/src/libexec/atrun/../../usr.bin/at > -I/usr/src/libexec/atrun -DLOGIN_CAP -DPAM -std=gnu99 -fstack-protector > -Wsystem-headers -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign > -c /usr/src/libexec/atrun/atrun.c > clang -O2 -pipe -march=native -DATJOB_DIR=\"/var/at/jobs/\" > -DLFILE=\"/var/at/jobs/.lockfile\" -DLOADAVG_MX=1.5 > -DATSPOOL_DIR=\"/var/at/spool\" -DVERSION=\"2.9\" -DDAEMON_UID=1 > -DDAEMON_GID=1 -DDEFAULT_BATCH_QUEUE=\'E\' -DDEFAULT_AT_QUEUE=\'c\' > -DPERM_PATH=\"/var/at/\" -I/usr/src/libexec/atrun/../../usr.bin/at > -I/usr/src/libexec/atrun -DLOGIN_CAP -DPAM -std=gnu99 -fstack-protector > -Wsystem-headers -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign > -c /usr/src/libexec/atrun/gloadavg.c > clang -O2 -pipe -march=native -DATJOB_DIR=\"/var/at/jobs/\" > -DLFILE=\"/var/at/jobs/.lockfile\" -DLOADAVG_MX=1.5 > -DATSPOOL_DIR=\"/var/at/spool\" -DVERSION=\"2.9\" -DDAEMON_UID=1 > -DDAEMON_GID=1 -DDEFAULT_BATCH_QUEUE=\'E\' -DDEFAULT_AT_QUEUE=\'c\' > -DPERM_PATH=\"/var/at/\" -I/usr/src/libexec/atrun/../../usr.bin/at > -I/usr/src/libexec/atrun -DLOGIN_CAP -DPAM -std=gnu99 -fstack-protector > -Wsystem-headers -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign > -o atrun atrun.o gloadavg.o -lpam -lutil > clang: warning: argument unused during compilation: '-std=gnu99' > /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 `strlen' > /usr/src/libexec/atrun/atrun.c:(.text+0x45): undefined reference to `vwarn' > /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 `vwarnx' > /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=corei7 instead of -march=core2 :) (the same should apply for -march=native) Cheers -- Olivier Smedts _ ASCII ribbon campaign ( ) e-mail: olivier@gid0.org - against HTML email & vCards X www: http://www.gid0.org - against proprietary attachments / \ "Il y a seulement 10 sortes de gens dans le monde : ceux qui comprennent le binaire, et ceux qui ne le comprennent pas."
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CABzXLYNf5v4WUF-ZR3XPLCVz=OMKKA7N9W%2BKp1ubEjjg2ykxJg>
