On Sun, Apr 05, 2015 at 02:27:16PM +0200, Sébastien Marie wrote: > On Sun, Apr 05, 2015 at 09:56:34AM +0100, Stuart Henderson wrote: > > On 2015/04/05 09:55, Sébastien Marie wrote: > > > Currently the port of rustc (see openbsd-wip/lang/rustc) start by > > > building llvm (using g++-4.8 as it need c++11) in order to build rustc. > > > > Does newer llvm require a c++11 standard library or is the older one > > still usable? > > I haven't tested a lot: my purpose was to package rustc, and not to > package llvm :) > > What I have checked is that llvm complaint if building is done with base gcc: > > | The selected GCC C++ compiler is not new enough to build LLVM. Please > | upgrade to GCC 4.7. > > and if I force the use of base gcc, I have the following error: > > | cc1plus: error: unrecognized command line option "-std=c++11" > > > next, if I try to build newer llvm with llvm from ports, the configure > have the following error: > > | We detected a missing feature in the standard C++ library that was known > | to be missing in libstdc++4.6 and implemented in libstdc++4.7. There are > | numerous C++11 problems with 4.6's library, and we don't support GCCs or > | libstdc++ older than 4.7. You will need to update your system and ensure > | Clang uses the newer standard library. > > same, if I bypass the check, build errors arrived very quickly... > > | error: no template named 'enable_if' in namespace 'std' > | ... > | error: no type named 'remove_reference' in namespace 'std' > | ... > | error: 'Callable' does not refer to a value > | ...
You're using clang + system libstdc++. Did you try with clang + libestdc++? > > But the errors could be due to us llvm version: the version annonced > (3.5) isn't exactly accurated: it is more something between 3.4 and 3.5 > (if I recall the search I do when I have tried to build rustc with llvm > from ports). > > > > If at least the package can be made self-contained that > > would be nice as it is pretty unappealing to pull in gcc 4.8/9 (as a > > library dependency) when you pkg_add llvm. > > I have just checked the binaries of llvm that are builded for rustc (but > aren't installed with using package: llvm is just a BUILD_DEP): all the > binaries builded depends of libestdc++. > > So pkg_add llvm would install libstdc++-4.8.4p1 package (lang/gcc/4.8,-estdc). > > But from build point of vue, yes building llvm would required to first > build lang/gcc. > > > Another possible issue is that depending on ports gcc during build is > > that there will likely be a negative impact on bulk build time, llvm is > > on the path to a number of large ports. Not sure how bad this will be. > > A test would be needed to measure the impact. Just add a BUILD_DEP for > gcc in llvm ports should be suffisant for measure it as first approch. > > -- > Sébastien Marie > -- Juan Francisco Cantero Hurtado http://juanfra.info