cling icon indicating copy to clipboard operation
cling copied to clipboard

cpt.py crash: " 'llvm_flags' is not defined"

Open Minabsapi opened this issue 2 years ago • 4 comments

  • [x] Checked for duplicates

Describe the bug

Upon launching ./cpt.py --last-stable deb to get a Cling DEB package the script crashes

Cling Packaging Tool (CPT)
Arguments vector: ['./cpt.py', '--last-stable', 'deb']

╔══════════════════════════════════════════════════════════════════════════════╗
║ cling (x86_64)                               Fri, 06 Aug 2021 17:29:48 +0200 ║
╚══════════════════════════════════════════════════════════════════════════════╝
Thread Model: POSIX
Operating System: Linux
Distribution: Ubuntu
Release: focal
Revision: 20.04
Architecture: x86_64
Project tree and index state saved in WIP on (no branch): ddd3a61c4e Allow interfaces to operate on in-memory buffers with no source location info.
warning: redirecting to http://root.cern/git/clang.git/
HEAD is now on ddd3a61c4e Allow interfaces to operate on in-memory buffers with no source location info.
warning: redirecting to http://root.cern/git/clang.git/
warning: redirecting to http://root.cern/git/clang.git/
From http://root.cern.ch/git/clang
 * tag                     cling-patches-rrelease_90 -> FETCH_HEAD
Already up to date.
Last stable Cling release detected:  v0.9
HEAD is now on f3768a4c Prepare for releasing cling v0.9
From https://github.com/root-project/cling
 * tag                 v0.9       -> FETCH_HEAD
Already up to date.

┌──────────────────────────────────────────────────────────────────────────────┐
│ Set Cling version                                                            │
└──────────────────────────────────────────────────────────────────────────────┘
Version: 0.9
Revision: f3768a4c43b0f3b23eccc6075fa178861a002a10
Using previous build directory: /home/minabsapi/ci/build/builddir
Traceback (most recent call last):
  File "./cpt.py", line 2286, in <module>
    compile(os.path.join(workdir, 'cling-' + VERSION))
  File "./cpt.py", line 590, in compile_for_binary
    .format(build.buildType, TMP_PREFIX) + llvm_flags +
NameError: name 'llvm_flags' is not defined

Expected behavior

The automated build process packages the Cling DEB

To Reproduce

Simply running ./cpt.py --last-stable deb

Setup

Cling version: 0.9 OS: GNU/Linux Ubuntu 20.04 cpt.py obtained from https://raw.githubusercontent.com/root-project/cling/v0.9/tools/packaging/cpt.py

Minabsapi avatar Aug 06 '21 15:08 Minabsapi

Cc: @reikdas

vgvassilev avatar Nov 12 '21 06:11 vgvassilev

+1; I have the same issue

MohammadMD1383 avatar Feb 07 '22 06:02 MohammadMD1383

+1

0rtz avatar May 20 '22 16:05 0rtz

Calling the download_llvm_binary function in the with_binary_llvm block within the last_stable block should fix it, although now there seems to be an CMake error, and it now says that there is a source directory mismatch. I think #358 is correct in that the function should be rewritten as well as the overriding of the with_binary_llvm argument.

saisoma123 avatar May 26 '22 21:05 saisoma123