Date: Fri, 09 Sep 2011 06:45:16 +0300 From: Volodymyr Kostyrko <c.kworr@gmail.com> To: freebsd-current@freebsd.org Subject: Re: Compiling BETA2 with clang fails Message-ID: <4E698BCC.5010400@gmail.com> In-Reply-To: <CABzXLYNRy=L=SBLoG3uvfTAdp=fL2i1=qo2rxN2UL5sdzS949w@mail.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> <4E660BA3.8080103@FreeBSD.org> <CABzXLYPUPvubXa4a%2BRkAftCOCyr===v6SOw=o=qtZ%2BHDTiJywg@mail.gmail.com> <4E66162F.8090406@gmail.com> <CABzXLYOxgYbFtSJ%2BVHwLHRYmUsC2jVGhuJOmG-KGPiqjACH9AQ@mail.gmail.com> <4E661B1C.2030608@gmail.com> <CABzXLYPZSN8kzsyauA_TpjkPyo_xA_OXWfCjkLsc=s6vkt-%2BbQ@mail.gmail.com> <4E662C7A.3020404@gmail.com> <CABzXLYNRy=L=SBLoG3uvfTAdp=fL2i1=qo2rxN2UL5sdzS949w@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
06.09.2011 17:44, Olivier Smedts wrote: >> You mean like fully rebuilding system with gcc and -march=athlon-xp and then >> try again? > > Like cleaning /usr/obj/ and then buildworld with clang but with > "-march=athlon-xp" instead of "-march=native". > As the problem does not seem to be in your current world but rather in > the bootstrap clang compiled with -march=native, you should not have > to {build,install}world with gcc first. I cleaned /usr/obj and made a build with -march=athlon-xp. Same errors. I've also tried to investigate further. This happens when clang runs linker to link a binary. It runs something like: "/usr/obj/usr/src/tmp/usr/bin/ld" --eh-frame-hdr -dynamic-linker /libexec/ld-elf.so.1 -m elf_i386_fbsd -o atrun /usr/obj/usr/src/tmp/usr/lib/crt1.o /usr/obj/usr/src/tmp/usr/lib/crti.o /usr/obj/usr/src/tmp/usr/lib/crtbegin.o -L/usr/obj/usr/src/tmp/usr/lib atrun.o gloadavg.o -lpam -lutil -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/obj/usr/src/tmp/usr/lib/crtend.o /usr/obj/usr/src/tmp/usr/lib/crtn.o Showstopper here is -L. If I add -L/usr/lib to this command it completes successfully. # nm -D /usr/obj/usr/src/tmp/usr/lib/libc.so 00000000 A FBSD_1.0 00000000 A FBSD_1.1 00000000 A FBSD_1.2 00000000 A FBSDprivate_1.0 w _Jv_RegisterClasses U __progname w __pthread_cxa_finalize 00030624 T __semctl 0000dbe0 T __stack_chk_fail_local 00012880 T acl_add_perm 000128b0 T acl_delete_perm 00012850 T acl_get_perm_np U environ 00029610 T fts_children 000286b0 T fts_close 00029770 T fts_get_clientptr 00029780 T fts_get_stream 00027f70 T fts_open 000287e0 T fts_read 000295d0 T fts_set 00029790 T fts_set_clientptr 000305c4 T msgctl 0001e910 T sem_close 0001e6a0 T sem_destroy 0001edb0 T sem_getvalue 0001e5c0 T sem_init 0001e730 T sem_open 0001ed20 T sem_post 0001ea00 T sem_timedwait 0001ec90 T sem_trywait 0001e9e0 T sem_unlink 0001ec60 T sem_wait 00021a30 T semctl 00030524 T shmctl 0001fff0 T ttyslot That's the problem - libraries miss most symbols. That's all for now, I'll be back at this one tomorrow. -- Sphinx of black quartz judge my vow.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4E698BCC.5010400>