Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arch Linux package creation - clang-llvm usage #509

Open
D3vil0p3r opened this issue Nov 16, 2024 · 0 comments
Open

Arch Linux package creation - clang-llvm usage #509

D3vil0p3r opened this issue Nov 16, 2024 · 0 comments

Comments

@D3vil0p3r
Copy link

Hello,
I am creating a PKGBUILD file to create a package for Arch Linux environment. The current code is:

pkgname=s2e
pkgver=v2.0.0.r540.g799ad0b
pkgrel=1
pkgdesc='A platform for multi-path program analysis with selective symbolic execution.'
arch=('x86_64' 'aarch64')
url='https://github.com/S2E/s2e'
license=('custom:cyberhaven')
depends=()
makedepends=('git' 'repo' 'ca-certificates' 'cmake' 'curl' 'wget'
'python' 'python-pip' 'python-virtualenv' 'mingw-w64-gcc' 'lsb-release' 'autoconf'
'libtool' 'protobuf' 'protobuf-c' 'libdwarf' 'libelf' 'boost' 'zlib' 'jemalloc'
'nasm' 'pkgconf' 'memcached' 'postgresql-libs' 'glibc' 'binutils' 'boost-libs'
'pixman' 'glib2' 'gcc-multilib' 'gtest' 'rapidjson' 'capstone'
'unzip' 'zstd' 'python-sphinx_rtd_theme')
source=("git+https://github.com/S2E/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  ( set -o pipefail
    git describe --long --tags --abbrev=7 2>/dev/null |
      sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
    printf "%s.%s" "$(git rev-list --count HEAD)" \
      "$(git rev-parse --short=7 HEAD)"
  )
}

prepare() {
  cd $pkgname

  git config --global color.ui false
  repo init -u https://github.com/s2e/manifest.git
  repo sync --fail-fast
}

build() {
  cd $pkgname

  mkdir -p build
  cd build
  make -f ../s2e/Makefile S2E_PREFIX=$pkgdir/opt/s2e stamps/llvm-release-make
  export USE_Z3_BINARY=yes
  make -f ../s2e/Makefile S2E_PREFIX=$pkgdir/opt/s2e stamps/z3
  make -f ../s2e/Makefile S2E_PREFIX=$pkgdir/opt/s2e stamps/libdwarf-make

  #cd ..

  #cd docs/sphinx
  #./build.sh
}

package() {
  cd $pkgname

  make -f ../s2e/Makefile S2E_PREFIX=$pkgdir/opt/s2e install
}

What I note is that make -f ../s2e/Makefile S2E_PREFIX=$pkgdir/opt/s2e stamps/llvm-release-make fails to extract the clang-llvm .tar.xz archive by crashing my system during the extraction by tar -Jxf command.

Is it possible to make Makefile to use the latest clang in order to install as dependency the related Arch Linux clang package?

I'm aware it could create some issues during building but it could be a possibility to prevent the unarchiving and build of clang-llvm provided above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant