# clang and llvm from base are not used for xorg building



## kpect (Dec 29, 2015)

Hi,
While installing xorg from ports on FreeBSD 10.2 it builds lang/clang36 and devel/llvm36 tools among others as dependencies. Although I have both CLANG and LLVM (3.4.1) on base, Xorg still requires to have duplicates. Is it possible to avoid building CLANG and LLVM and use those from base?
Cheers.


----------



## SirDice (Dec 29, 2015)

No, graphics/dri (a dependency of Xorg) requires Clang 3.6 to build properly.


----------



## kpect (Dec 29, 2015)

I know that xorg requires graphics/dri, so it doesn't make sense, I have to install them.


----------



## leebrown66 (Dec 29, 2015)

SirDice said:


> No, graphics/dri (a dependency of Xorg) requires Clang 3.6 to build properly.


Deeper than that, devel/libclc requires clang 3.6 (commit message).

The generic answer to the OP is that 3.4.1 is going to be missing some feature that 3.6 provides.  Therefore using 3.4.1 will give you a broken build, either a concrete "can't compile this" or a subtle runtime fault.


----------



## Daniel Tourde (Dec 30, 2015)

Trying to avoid that, I tried FreeBSD 11.0 with Clang 3.7. Xorg still requires Clang 3.6....


----------



## SirDice (Dec 30, 2015)

It's set to a specific version. -CURRENT may have a newer compiler but it's not tested and there's no guarantee it's going to work with 3.7.

Thread topics-about-unsupported-freebsd-versions.40469/


----------



## kpect (Dec 30, 2015)

Maybe there's a way to replace dependency from 3.6 to 3.4.1 (skip installation of additional clang), then I will be able to perform some testings on VM and check if xorg will build properly?


----------



## SirDice (Dec 30, 2015)

kpect said:


> Maybe there's a way to replace dependency from 3.6 to 3.4.1 (skip installation of additional clang), then I will be able to perform some testings on VM and check if xorg will build properly?


Read leebrown66 's post.

If it was possible to use the standard compiler the port would have used it.


----------



## tobik@ (Dec 30, 2015)

kpect said:


> Maybe there's a way to replace dependency from 3.6 to 3.4.1 (skip installation of additional clang), then I will be able to perform some testings on VM and check if xorg will build properly?


devel/libclc only requires clang36 for building, so let it install clang36, finish compiling xorg, and then run `pkg autoremove` to remove all build dependencies. This should uninstall clang36 as well.


----------



## ljboiler (Dec 30, 2015)

To paraphrase what leebrown66 said:   I assume they tried to make it work with 3.4.1.  For some reason it didn't.  It was found that 3.6 was the first version that it would work with to build the Xorg stuff for every supported version of FreeBSD out there, and that is why it has that dependency.

Once FreeBSD 11.0 is officially released (using clang 3.7 as the base compiler),  I imagine that the dependency will be "updated" to that version, if clang 3.7 works to build all the Xorg stuff.  This means that on FreeBSD 11, one might not need that "extra compiler" that seems to be a issue for you.  However, that extra compiler _will_ still be needed on the older supported versions of FreeBSD, since the base compiler for those systems will remain unchanged.


----------



## kpect (Dec 30, 2015)

Thanks, I got you.


----------

