I am doing a buildworld with clang on amd64 9.1-PRERELEASE #2 r242867. In /etc/src.conf I have "WITHOUT_GCC= yes". Compile progresses up to below then breaks: ===> usr.bin/xlint/xlint (all) ===> usr.bin/xlint/llib (all) lint -cghapbx -Cposix /asp/src/usr.bin/xlint/llib/llib-lposix lint -cghapbx -Cstdc /asp/src/usr.bin/xlint/llib/llib-lstdc ===> lib/clang/libllvmx86codegen (all) llib-lposix: llib-lstdc: lint: cannot exec /usr/obj/asp/src/tmp/usr/bin/cc: No such file or directory *** [llib-lstdc.ln] Error code 1 lint: cannot exec /usr/obj/asp/src/tmp/usr/bin/cc: No such file or directory *** [llib-lposix.ln] Error code 1 2 errors *** [all] Error code 2 1 error *** [all] Error code 2 1 error *** [usr.bin.all__D] Error code 2 ===> lib/clang/libllvmx86desc (all) ===> lib/clang/libllvmx86disassembler (all) ===> lib/clang/libllvmx86info (all) ===> lib/clang/libllvmx86instprinter (all) ===> lib/clang/libllvmx86utils (all) ===> lib/clang/include (all) 1 error *** [everything] Error code 2 1 error *** [buildworld] Error code 2 Stop in /asp/src. My source is in /asp/src (symlinked from /usr/src also). clang is set in /usr/local/etc/buildflags.conf. I have disabled ccache while I try and work through this error - so it is not a factor. -- View this message in context: http://freebsd.1045724.n5.nabble.com/buildworld-with-clang-breaks-because-no-cc-tp5763472.html Sent from the freebsd-stable mailing list archive at Nabble.com.
I hacked it with cd /usr/obj/asp/src/tmp/usr/bin/ # ln -s clang cc BUT NOW I HAVE: ===> lib/libz (install) sh /asp/src/tools/install.sh -C -o root -g wheel -m 444 libz.a /usr/obj/asp/src/lib32/usr/lib32 sh /asp/src/tools/install.sh -C -o root -g wheel -m 444 /asp/src/lib/libz/zconf.h /asp/src/lib/libz/zlib.h /usr/obj/asp/src/lib32/usr/include sh /asp/src/tools/install.sh -s -o root -g wheel -m 444 libz.so.6 /usr/obj/asp/src/lib32/usr/lib32 ln -fs libz.so.6 /usr/obj/asp/src/lib32/usr/lib32/libz.so 1 error *** [libraries] Error code 2 1 error *** [build32] Error code 2 1 error *** [buildworld] Error code 2 -- View this message in context: http://freebsd.1045724.n5.nabble.com/buildworld-with-clang-breaks-because-no-cc-tp5763472p5763475.html Sent from the freebsd-stable mailing list archive at Nabble.com.
23.11.2012 15:45, Beeblebrox:> I am now stuck with trying to make this work. I am doing buildworld with > clang and ccache enabled. > > 1. I have to keep re-starting buildworld at different points of break. When > re-started the build continues past the last break-point and goes on to > break somewhere else. > 2. This continues until build gets to ===> usr.bin/ypwhich (all) and cannot > continue past the error. > 3. I disable ccache in /usr/local/etc/buildflags.conf and re-start the > build. Progresses upto: > sh /asp/src/tools/install.sh -s -o root -g wheel -m 444 libz.so.6 > /usr/obj/asp/src/lib32/usr/lib32 > ln -fs libz.so.6 /usr/obj/asp/src/lib32/usr/lib32/libz.so > > However, examining the contents after build-break of > /usr/obj/asp/src/lib32/usr/lib32/ shows libz.so.6 and its linked alias > libz.so. > I am not able to move any further without help because I cannot figure out > where the problem may be. > > Thanks for any help.Try running make buildworld without -j. -- Sphinx of black quartz, judge my vow.
Thanks for the suggestion. Build progressed a little further then had other problem: ===> gnu/lib/libstdc++ (all) building shared library libstdc++.so.6 /usr/obj/asp/src/tmp/usr/bin/ld: warning: creating a DT_TEXTREL in a shared object. clang: error: linker command failed with exit code 1 (use -v to see invocation) *** [libstdc++.so.6] Error code 1 Stop in /asp/src/gnu/lib/libstdc++. *** [all] Error code 1 Stop in /asp/src/gnu/lib. *** [gnu/lib__L] Error code 1 Why is it building gcc4.2 ?? Should I not be using WITH_CLANG_IS_CC= yes ? Bummer... -- View this message in context: http://freebsd.1045724.n5.nabble.com/buildworld-with-clang-breaks-because-no-cc-tp5763472p5763506.html Sent from the freebsd-stable mailing list archive at Nabble.com.
On 2012-11-23 12:37, Beeblebrox wrote:> I am doing a buildworld with clang on amd64 9.1-PRERELEASE #2 r242867. > In /etc/src.conf I have "WITHOUT_GCC= yes". Compile progresses up to below > then breaks:...> lint: cannot exec /usr/obj/asp/src/tmp/usr/bin/cc: No such file or directoryCurrently, you cannot use WITHOUT_GCC without also setting WITH_CLANG_IS_CC. Some programs, like lint, are still hardcoded to run 'cc' for their processing, so if there is no 'cc' executable during the world stage, your build will fail.
On 2012-11-23 15:14, Beeblebrox wrote:> Thanks for the suggestion. Build progressed a little further then had other > problem: > > ===> gnu/lib/libstdc++ (all) > building shared library libstdc++.so.6 > /usr/obj/asp/src/tmp/usr/bin/ld: warning: creating a DT_TEXTREL in a shared > object.I am not sure what causes this. Maybe strange CFLAGS in make.conf? Or is this still with ccache?> clang: error: linker command failed with exit code 1 (use -v to see > invocation) > *** [libstdc++.so.6] Error code 1 > Stop in /asp/src/gnu/lib/libstdc++. > *** [all] Error code 1 > Stop in /asp/src/gnu/lib. > *** [gnu/lib__L] Error code 1 > > Why is it building gcc4.2 ??This is not gcc, it is libstdc++. Currently, there is no way to disable it, as many applications will still use it. After libc++ has matured enough, it can probably be moved to a compat port, but that will certainly not happen in the 9.x series. :)> Should I not be using WITH_CLANG_IS_CC= yes ? > Bummer...This setting should work just fine.
On Sat, Nov 24, 2012 at 01:55:50PM +0100, Dimitry Andric wrote:> On 2012-11-23 15:14, Beeblebrox wrote: > > Thanks for the suggestion. Build progressed a little further then had other > > problem: > > > > ===> gnu/lib/libstdc++ (all) > > building shared library libstdc++.so.6 > > /usr/obj/asp/src/tmp/usr/bin/ld: warning: creating a DT_TEXTREL in a shared > > object. > > I am not sure what causes this. Maybe strange CFLAGS in make.conf? Or > is this still with ccache?There are two usual causes for this error: 1. missed -fPIC when compiling some .c file 2. wrong assembler which uses non-pic safe relocations. I very much doubt that #2 is the cause. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 834 bytes Desc: not available URL: <http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20121124/198d7ec8/attachment.sig>
I have been using WITH_CLANG_IS_CC=true WITHOUT_GCC=true on stable almost since switching to clang build system without any build problems whatsoever. -- View this message in context: http://freebsd.1045724.n5.nabble.com/buildworld-with-clang-breaks-because-no-cc-tp5763472p5764013.html Sent from the freebsd-stable mailing list archive at Nabble.com.
Possibly Parallel Threads
- CC messed up in RELENG_7 build
- libstdc++ not found by clang and base ld on 9-STABLE when building cmake c++ project
- Arch and latest wine : major Dsound crashes with my apps
- Linking the FreeBSD base system with lld -- status update
- gmirror crash writing to disk? Or is it su+j crash?