Hi all. When enabling WITH_LIBCPLUSPLUS libc build fails with: /usr/local/libexec/ccache/clang++ -O2 -pipe -march=native -I/usr/src/lib/libc++/../../contrib/libc++/include -I/usr/src/lib/libc++/../../contrib/libcxxrt -nostdlib -DLIBCXXRT -Qunused-arguments -fstack-protector -Wno-empty-body -Wno-string-plus-int -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-conversion -Wno-switch -Wno-switch-enum -Wno-parentheses -std=c++0x -c cxxrt_guard.cc -o cxxrt_guard.o building shared library libc++.so.1 FreeBSD clang version 3.1 (branches/release_31 156863) 20120523 Target: x86_64-unknown-freebsd9.0 Thread model: posix "/usr/bin/ld" --eh-frame-hdr -Bshareable -o libc++.so.1 /usr/lib/crti.o /usr/lib/crtbeginS.o -L/usr/lib -x --fatal-warnings --warn-shared-textrel -soname libc++.so.1 valarray.So utility.So typeinfo.So strstream.So regex.So random.So iostream.So debug.So chrono.So bind.So algorithm.So hash.So thread.So future.So exception.So locale.So mutex.So memory.So ios.So condition_variable.So system_error.So string.So stdexcept.So new.So -lcxxrt -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/crtendS.o /usr/lib/crtn.o /usr/bin/ld: cannot find -lcxxrt clang: error: linker command failed with exit code 1 (use -v to see invocation) This lib was already built: # find /usr/obj -name libcxxrt.so /usr/obj/usr/src/tmp/usr/lib/libcxxrt.so /usr/obj/usr/src/lib/libcxxrt/libcxxrt.so But this error is only fixed after: # cd /usr/src/lib/libcxxrt ; make install Other irrelevant data: # uname -a FreeBSD ar1l0u 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #0 r241089M: Mon Oct 1 12:48:30 EEST 2012 arcade@ar1l0u:/usr/obj/usr/src/sys/MINIMAL amd64 World is built WITH_CLANG_IS_CC and with ccache. Modifications are tmpfs directory patch. -- Sphinx of black quartz judge my vow.
On 2012-10-02 09:53, Volodymyr Kostyrko wrote:> When enabling WITH_LIBCPLUSPLUS libc build fails with: > > /usr/local/libexec/ccache/clang++ -O2 -pipe -march=native > -I/usr/src/lib/libc++/../../contrib/libc++/include > -I/usr/src/lib/libc++/../../contrib/libcxxrt -nostdlib -DLIBCXXRT > -Qunused-arguments -fstack-protector -Wno-empty-body > -Wno-string-plus-int -Wno-tautological-compare -Wno-unused-value > -Wno-parentheses-equality -Wno-unused-function -Wno-conversion > -Wno-switch -Wno-switch-enum -Wno-parentheses -std=c++0x -c > cxxrt_guard.cc -o cxxrt_guard.o > building shared library libc++.so.1 > FreeBSD clang version 3.1 (branches/release_31 156863) 20120523 > Target: x86_64-unknown-freebsd9.0 > Thread model: posix > "/usr/bin/ld" --eh-frame-hdr -Bshareable -o libc++.so.1 > /usr/lib/crti.o /usr/lib/crtbeginS.o -L/usr/lib -x --fatal-warnings > --warn-shared-textrel -soname libc++.so.1 valarray.So utility.So > typeinfo.So strstream.So regex.So random.So iostream.So debug.So > chrono.So bind.So algorithm.So hash.So thread.So future.So exception.So > locale.So mutex.So memory.So ios.So condition_variable.So > system_error.So string.So stdexcept.So new.So -lcxxrt -lgcc --as-needed > -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed > /usr/lib/crtendS.o /usr/lib/crtn.o > /usr/bin/ld: cannot find -lcxxrt > clang: error: linker command failed with exit code 1 (use -v to see > invocation) > > This lib was already built: > > # find /usr/obj -name libcxxrt.so > /usr/obj/usr/src/tmp/usr/lib/libcxxrt.so > /usr/obj/usr/src/lib/libcxxrt/libcxxrt.so > > But this error is only fixed after: > > # cd /usr/src/lib/libcxxrt ; make installAre you getting this error as part of buildworld, or when you build libc++ by hand? Also, an obvious question is: does it work when you disable ccache?
02.10.2012 12:12, Dimitry Andric wrote:> On 2012-10-02 09:53, Volodymyr Kostyrko wrote: >> When enabling WITH_LIBCPLUSPLUS libc build fails with: >> >> /usr/local/libexec/ccache/clang++ -O2 -pipe -march=native >> -I/usr/src/lib/libc++/../../contrib/libc++/include >> -I/usr/src/lib/libc++/../../contrib/libcxxrt -nostdlib -DLIBCXXRT >> -Qunused-arguments -fstack-protector -Wno-empty-body >> -Wno-string-plus-int -Wno-tautological-compare -Wno-unused-value >> -Wno-parentheses-equality -Wno-unused-function -Wno-conversion >> -Wno-switch -Wno-switch-enum -Wno-parentheses -std=c++0x -c >> cxxrt_guard.cc -o cxxrt_guard.o >> building shared library libc++.so.1 >> FreeBSD clang version 3.1 (branches/release_31 156863) 20120523 >> Target: x86_64-unknown-freebsd9.0 >> Thread model: posix >> "/usr/bin/ld" --eh-frame-hdr -Bshareable -o libc++.so.1 >> /usr/lib/crti.o /usr/lib/crtbeginS.o -L/usr/lib -x --fatal-warnings >> --warn-shared-textrel -soname libc++.so.1 valarray.So utility.So >> typeinfo.So strstream.So regex.So random.So iostream.So debug.So >> chrono.So bind.So algorithm.So hash.So thread.So future.So exception.So >> locale.So mutex.So memory.So ios.So condition_variable.So >> system_error.So string.So stdexcept.So new.So -lcxxrt -lgcc --as-needed >> -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed >> /usr/lib/crtendS.o /usr/lib/crtn.o >> /usr/bin/ld: cannot find -lcxxrt >> clang: error: linker command failed with exit code 1 (use -v to see >> invocation) >> >> This lib was already built: >> >> # find /usr/obj -name libcxxrt.so >> /usr/obj/usr/src/tmp/usr/lib/libcxxrt.so >> /usr/obj/usr/src/lib/libcxxrt/libcxxrt.so >> >> But this error is only fixed after: >> >> # cd /usr/src/lib/libcxxrt ; make install > > Are you getting this error as part of buildworld, or when you build > libc++ by hand?As part of the buildworld. I feel that it looks for the lib in the system skipping /usr/obj.> Also, an obvious question is: does it work when you disable ccache?Bingo. Yes, disabling ccache makes everything work. -- Sphinx of black quartz judge my vow.