Created attachment 241325 [details] proposed patch I found an issue with the lit tool that comes bundled with llvm (if the LIT options is selected). % lit-devel File "/usr/local/bin/lit-devel", line 3 from lit-devel.main import main ^ SyntaxError: invalid syntax Lit is written in Python. The issue is that the LLVM_SUFFIX contains a '-' and sed that is being run during the build to add the LLVM_SUFFIX to filenames inadvertently converts also a Python module name. Python doesn't support importing modules with dashes in names. I'm attaching a patch that resolved that issue for me. It uses an underscore variant of the LLVM_SUFFIX ('_' in a module name is accepted) to change the relevant parts of python lib so lit-devel becomes lit_devel, the script name keeps the expected name of lit-LLVM_SUFFIX. I only tested it on llvm-devel.
Comment on attachment 241325 [details] proposed patch I'd suggest replacing lit${LLVM_SUFFIX} with something like ${LIT_MOD_NAME} where LIT_MOD_NAME= lit${LLVM_SUFFIX:S/-/_/g}
Created attachment 241337 [details] updated patch Update patch with suggested change. Tested again, still resolves the issue.
(In reply to Pawel Biernacki from comment #2) Thanks! I've applied this and will include it in my next update.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=bcc6ffd087d07cdee35c8633863fb0a92f00d346 commit bcc6ffd087d07cdee35c8633863fb0a92f00d346 Author: Brooks Davis <brooks@FreeBSD.org> AuthorDate: 2023-04-12 18:01:19 +0000 Commit: Brooks Davis <brooks@FreeBSD.org> CommitDate: 2023-04-12 18:01:19 +0000 devel/llvm-devel: new snapshot, lit fixes Fix the the python module name to use an '_' in place of '-' in the port-specific module name. Remove a workaround that is now upstream. PR: 270670, 269931 Co-Authored-by: Pawel Biernacki <kaktus@freebsd.org> devel/llvm-devel/Makefile | 23 +++--- devel/llvm-devel/Makefile.snapshot | 4 +- devel/llvm-devel/distinfo | 6 +- ...ugins_Process_Utility_FreeBSDSignals.cpp (gone) | 13 ---- devel/llvm-devel/pkg-plist | 86 +++++++++++++++------- 5 files changed, 78 insertions(+), 54 deletions(-)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=cd4074145d743032b5237a7caf34de04f73601bf commit cd4074145d743032b5237a7caf34de04f73601bf Author: Brooks Davis <brooks@FreeBSD.org> AuthorDate: 2023-04-18 16:48:33 +0000 Commit: Brooks Davis <brooks@FreeBSD.org> CommitDate: 2023-04-18 16:48:33 +0000 devel/llvm-{cheri,morello}: new snapshots, lit fixes Fix the the python module name to use an '_' in place of '-' in the port-specific module name. PR: 270670, 269931 Sponsored by: DARPA Co-Authored-by: Pawel Biernacki <kaktus@freebsd.org> devel/llvm-cheri/Makefile | 19 ++++++++++-------- devel/llvm-cheri/Makefile.snapshot | 4 ++-- devel/llvm-cheri/distinfo | 6 +++--- devel/llvm-cheri/pkg-plist | 38 ++++++++++++++++++------------------ devel/llvm-morello/Makefile.snapshot | 4 ++-- devel/llvm-morello/distinfo | 6 +++--- devel/llvm-morello/pkg-plist | 38 ++++++++++++++++++------------------ 7 files changed, 59 insertions(+), 56 deletions(-)