Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 06 Apr 2023 16:02:18 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 270670] devel/llvm*: LLVM_SUFFIX with '-' breaks llvm Python modules
Message-ID:  <bug-270670-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D270670

            Bug ID: 270670
           Summary: devel/llvm*: LLVM_SUFFIX with '-' breaks llvm Python
                    modules
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs@FreeBSD.org
          Reporter: kaktus@FreeBSD.org

Created attachment 241325
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D241325&action=
=3Dedit
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 undersco=
re
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.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-270670-7788>