Created attachment 203460 [details] patch - specify LLVM_DIR Port specifies clang info in the build, but not llvm. When multiple LLVM installs are present, the port's build process can pick up the wrong one. e.g.: % grep llvm work/.build/CMakeCache.txt Clang_DIR:PATH=/usr/local/llvm80/lib/cmake/clang LLVM_DIR:PATH=/usr/local/llvm50/lib/cmake/llvm This causes the build to fail pretty quickly...
A commit references this bug: Author: tobik Date: Mon Apr 8 00:37:46 UTC 2019 New revision: 498336 URL: https://svnweb.freebsd.org/changeset/ports/498336 Log: devel/ccls: Fix build with multiple llvm* packages installed Apparently it is possible for the build to pick multiple LLVM versions if LLVM_DIR is not explicitly set similar to Clang_DIR. $ grep llvm $(make -V CONFIGURE_WRKSRC)/CMakeCache.txt Clang_DIR:PATH=/usr/local/llvm80/lib/cmake/clang LLVM_DIR:PATH=/usr/local/llvm50/lib/cmake/llvm PR: 237089 Submitted by: fullermd@over-yonder.net Changes: head/devel/ccls/Makefile
A commit references this bug: Author: tobik Date: Mon Apr 8 00:38:30 UTC 2019 New revision: 498337 URL: https://svnweb.freebsd.org/changeset/ports/498337 Log: MFH: r498336 devel/ccls: Fix build with multiple llvm* packages installed Apparently it is possible for the build to pick multiple LLVM versions if LLVM_DIR is not explicitly set similar to Clang_DIR. $ grep llvm $(make -V CONFIGURE_WRKSRC)/CMakeCache.txt Clang_DIR:PATH=/usr/local/llvm80/lib/cmake/clang LLVM_DIR:PATH=/usr/local/llvm50/lib/cmake/llvm PR: 237089 Submitted by: fullermd@over-yonder.net Approved by: ports-secteam blanket Changes: _U branches/2019Q2/ branches/2019Q2/devel/ccls/Makefile
I could not reproduce with both llvm70 and llvm80 installed. Adding this should be harmless though.
Yeah, it probably requires versions that are "far enough" apart to completely blow up. e.g., with 50 and 80, it builds for about 8 seconds, and then... /home/fullermd/work/freebsd-hacks/ports/ccls/work/ccls-0.20190314/src/main.cc:74:25: error: no viable conversion from '(lambda at /home/fullermd/work/freebsd-hacks/ports/ccls/work/ccls-0.20190314/src/main.cc:74:25)' to 'void (*)()' cl::SetVersionPrinter([](raw_ostream &OS) { ^~~~~~~~~~~~~~~~~~~~~ /home/fullermd/work/freebsd-hacks/ports/ccls/work/ccls-0.20190314/src/indexer.cc:697:69: error: non-virtual member function marked 'override' hides virtual member function SourceLocation Loc, ASTNodeInfo ASTNode) override { /home/fullermd/work/freebsd-hacks/ports/ccls/work/ccls-0.20190314/src/indexer.cc:493:8: error: no member named 'ConstantsAsWritten' in 'clang::PrintingPolicy' PP.ConstantsAsWritten = true; ~~ ^ [and on for another ~dozen errors]