NilFoundation / zkLLVM

Zero-Knowledge Proof Systems Circuit Compiler
https://docs.nil.foundation/zkllvm
278 stars 48 forks source link

[Possible bug] Symlinks creation doesn't take in count CMAKE_INSTALL_PREFIX #477

Open nemothenoone opened 8 months ago

nemothenoone commented 8 months ago

Describe the bug A CMAKE_INSTALL_PREFIX pre-configured installation fails with:

CMake Error at zkllvm/cmake/create-symlinks.cmake:12 (file): 
file failed to create symbolic link '/usr/bin/assigner': Operation not permitted
Call Stack (most recent call first): cmake_install.cmake:45 (include)

This means that the installation was only supposed to be done with root privileges, which is not always true.

To Reproduce How to reproduce the behavior:

cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=~/zkllvm/relwithdebinfo -DCMAKE_BUILD_TYPE=RelWithDebInfo -S zkllvm -B ~/zkllvm/relwithdebinfo && make -j$(nproc) install

Expected behavior Installation was supposed to succeed without requesting for root privileges

Toolchain versions https://github.com/NilFoundation/zkLLVM/commit/4e1357ac1f2b53127344b9fdfff13fab3eb09d0a

nil-foundation-cicd-bot[bot] commented 8 months ago

PRs, synced with the current issue:

Note: Please do not edit this comment; it's generated automatically.

nemothenoone commented 7 months ago

A fix worked partially, but unfortunately, still not fixed.