Package Details: codelldb 1.10.0-1

Git Clone URL: https://aur.archlinux.org/codelldb.git (read-only, click to copy)
Package Base: codelldb
Description: A native debugger extension for VSCode based on LLDB. Also known as vscode-lldb (NOT lldb-vscode)
Upstream URL: https://github.com/vadimcn/codelldb
Licenses: MIT
Provides: codelldb, vscode-lldb
Submitter: bageljr
Maintainer: mahor1221
Last Packager: mahor1221
Votes: 3
Popularity: 0.000021
First Submitted: 2022-04-11 20:24 (UTC)
Last Updated: 2023-09-18 06:18 (UTC)

Dependencies (6)

Required by (0)

Sources (1)

Pinned Comments

mahor1221 commented on 2022-10-05 15:51 (UTC) (edited on 2022-10-15 11:51 (UTC) by mahor1221)

After hours of searching I couldn't build the custom LLDB this package depends on (only needed when debugging Rust binaries). It's a rabbit hole which I don't want to step into it.

I suggest installing codelldb-bin to debug Rust programs

Latest Comments

mahor1221 commented on 2022-10-05 15:51 (UTC) (edited on 2022-10-15 11:51 (UTC) by mahor1221)

After hours of searching I couldn't build the custom LLDB this package depends on (only needed when debugging Rust binaries). It's a rabbit hole which I don't want to step into it.

I suggest installing codelldb-bin to debug Rust programs

qubidt commented on 2022-07-19 21:06 (UTC)

sha256 of the current (v.1.7.2) source tarball on github is actually d818c0ffab6c52d3804fda40f2c5cd80a36567a5f1094490b3b768b34a6a1a99

dmitmel commented on 2022-07-18 10:49 (UTC)

bageljr: Hi, don't want to be a bother, but could you please take a look at the patch I posted?

dmitmel commented on 2022-06-27 12:36 (UTC)

@bageljr: Can you also apply this patch as well? I made a mistake and symlinked the executable installed at /usr/bin/codelldb to a file in $pkgdir.

diff --git a/PKGBUILD b/PKGBUILD
index ac12c3b..609e58a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -26,7 +26,7 @@ package() {
    shopt -s globstar

    cd "$_reponame-$pkgver"
-   local _lib_dir="$pkgdir/usr/lib/codelldb"
+   local _lib_dir="$pkgdir/usr/lib/$pkgname"

    # <https://github.com/vadimcn/vscode-lldb/blob/v1.7.0/CMakeLists.txt#L173-L186>
    install -Dm644 -t "$_lib_dir" build/platform.ok
@@ -38,7 +38,7 @@ package() {
    ln -s -t "$_lib_dir"/lldb /usr/{bin,lib}

    install -d "$pkgdir"/usr/bin
-   ln -s -t "$pkgdir"/usr/bin "$_lib_dir"/adapter/codelldb
+   ln -s -t "$pkgdir"/usr/bin /usr/lib/"$pkgname"/adapter/codelldb

    install -Dm644 -t "$pkgdir"/usr/share/licenses/"$pkgname" LICENSE
    eval "$reset_shopt"

dmitmel commented on 2022-04-27 09:12 (UTC)

bageljr: I fixed the PKGBUILD. The binary was failing because it couldn't find liblldb.so (that is solved by creating a directory structure such that ../lldb/lib/liblldb.so exists, in our case this is done with a symlink) and libcodelldb.so (the binary itself is just a small entry point that loads the dylib and calls the real main function from there). There are also a few Python scripts that needed packaging, and I removed -DCMAKE_BUILD_TYPE=None because it was preventing the Rust program from being built with the --release flag (and debug builds are massive). Anyway, the diff:

diff --git a/PKGBUILD b/PKGBUILD
index 2f794ce..de2d6b5 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,24 +1,44 @@
-#Maintainer: bageljr <bageljr 897 at protonmail dot com> 
+#Maintainer: bageljr <bageljr 897 at protonmail dot com>
 pkgname=codelldb
 _reponame=vscode-lldb
-pkgdesc="also known as vscode-lldb (NOT lldb-vscode).  A native debugger extension for VSCode based on LLDB"
+pkgdesc="A native debugger extension for VSCode based on LLDB. Also known as vscode-lldb (NOT lldb-vscode)."
 pkgver=1.7.0
-pkgrel=1
-url=https://github.com/vadimcn/vscode-lldb
-arch=("x86_64")
-license=("MIT")
+pkgrel=2
+url="https://github.com/vadimcn/$_reponame"
+arch=("x86_64" "aarch64" "arm7h")
+license=("custom:MIT")
 options=(!debug strip) #Debug package is broken
 source=("$_reponame.tar.gz::https://github.com/vadimcn/$_reponame/archive/refs/tags/v$pkgver.tar.gz")
 sha256sums=("275dac810e6b20584f1b82b785fdee28539eda1b9f8b9395dd74441b43f11b3b")
 depends=(lldb)
 makedepends=(cmake cargo npm python)
+
 build() {
-   export CFLAGS=""
-   mkdir -p build
-   cmake $_reponame-$pkgver -B build -DLLDB_PACKAGE=/usr -DCMAKE_BUILD_TYPE=None -DCMAKE_INSTALL_PREFIX=/usr -Wno-dev
-   cd build
-   make codelldb
+   cd "$_reponame-$pkgver"
+   cmake -B build -DLLDB_PACKAGE=/usr -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -Wno-dev
+   cmake --build build --target codelldb
 }
+
 package() {
-   install -D build/adapter/codelldb $pkgdir/usr/bin/codelldb  
+   local reset_shopt="$(shopt -p globstar)"
+   shopt -s globstar
+
+   cd "$_reponame-$pkgver"
+   local _lib_dir="$pkgdir/usr/lib/codelldb"
+
+   # <https://github.com/vadimcn/vscode-lldb/blob/v1.7.0/CMakeLists.txt#L173-L186>
+   install -Dm644 -t "$_lib_dir" build/platform.ok
+   install -Dm755 -t "$_lib_dir"/adapter build/adapter/{codelldb,*.so}
+   install -Dm644 -t "$_lib_dir"/adapter build/adapter/*.py
+   install -Dm644 -t "$_lib_dir"/formatters build/formatters/**/*.py
+
+   install -d "$_lib_dir"/lldb
+   ln -s -t "$_lib_dir"/lldb /usr/{bin,lib}
+
+   install -d "$pkgdir"/usr/bin
+   ln -s -t "$pkgdir"/usr/bin "$_lib_dir"/adapter/codelldb
+
+   install -Dm644 -t "$pkgdir"/usr/share/licenses/"$pkgname" LICENSE
+
+   eval "$reset_shopt"
 }

bageljr commented on 2022-04-11 22:27 (UTC)

Currently doesn't work because it can't find lldb correctly. LMK if you know a solution.