Created attachment 190527 [details] clang_3.4.1 error test code Testing a new port version in poudriere (graphics/openimageio 1.8.8) I got the following error. Host is 11.1-stable r326495, jail is 10.4-RELEASE-p5. fatal error: error in backend: ran out of registers during register allocation c++: error: clang frontend command failed with exit code 70 (use -v to see invocation) FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512 Target: i386-unknown-freebsd10.4 Thread model: posix 11.1amd64, 11.1i386 and 10.4amd64 jails build without error.
Created attachment 190528 [details] clang compile command
I can reproduce the error, and found that upstream's https://reviews.llvm.org/rL212119 fixes it, however this is a commit that is difficult to backport to clang 3.4.1 (it uses C++11 and is from quite a bit post the upstream 3.5 version), not to mention that it is likely pretty risky. As an "easy solution" I would recommend to make the port depend on, and use, a newer version of clang, 3.8 or higher should do. Might as well take clang 5.0 since that is used quite a lot in the ports tree already.
I have found a few of my port updates fail on 10.4 (not with this same issue) and using clang50 is a solution. As they either use opengl or are used by opengl based apps USES=compiler:c++14-lang seems a reasonable option as clang50 can already be expected to be available. Support for 10.4 ends in October, it doesn't appear that we will get a 10.5 release to extend that so we can expect to only support 10.x for another 8 months. I would skip a complex clang patch if it will only be used for 8 months. Also as this only affects 32bit systems, I don't see a large need for it.
not an issue on currently supported systems