jank-lang / jank

A Clojure dialect hosted on LLVM with native C++ interop
https://jank-lang.org
Mozilla Public License 2.0
1.6k stars 43 forks source link

Fail to build on Ubuntu 22.04 #48

Closed beekalam closed 7 months ago

beekalam commented 10 months ago

When running

./bin/configure -GNinja -DCMAKE_BUILD_TYPE=Debug -Djank_cling_build_dir=build/cling-build 
-- Running vcpkg install

I get the following error:

-- Running vcpkg install - failed
CMake Error at third-party/vcpkg/scripts/buildsystems/vcpkg.cmake:893 (message):
  vcpkg install failed.  See logs for more information:
  /home/mohv/src/jank/build/vcpkg-manifest-install.log
Call Stack (most recent call first):
  /usr/share/cmake-3.22/Modules/CMakeDetermineSystem.cmake:124 (include)
  CMakeLists.txt:28 (project)

here is the full log

Detecting compiler hash for triplet x64-linux...
Detecting compiler hash for triplet x64-clang-static...
The following packages will be built and installed:
    folly[core,zlib]:x64-clang-static -> 2023.05.22.00#1
    immer:x64-clang-static -> 0.8.0#1
    libguarded:x64-clang-static -> 2019-08-27#3
    magic-enum:x64-clang-static -> 0.9.2
Restored 0 package(s) from /home/mohv/.cache/vcpkg/archives in 8.82 us. Use --debug to see more details.
Installing 1/4 folly:x64-clang-static...
Building folly[core,zlib]:x64-clang-static...
-- [OVERLAY] Loading triplet configuration from: /home/mohv/src/jank/vcpkg-triplet/x64-clang-static.cmake
-- Using cached facebook-folly-v2023.05.22.00.tar.gz.
-- Cleaning sources at /home/mohv/src/jank/third-party/vcpkg/buildtrees/folly/src/3.05.22.00-f3a2ac5bcf.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source /home/mohv/src/jank/third-party/vcpkg/downloads/facebook-folly-v2023.05.22.00.tar.gz
-- Applying patch reorder-glog-gflags.patch
-- Applying patch disable-non-underscore-posix-names.patch
-- Applying patch boost-1.70.patch
-- Applying patch fix-windows-minmax.patch
-- Applying patch fix-deps.patch
-- Applying patch openssl.patch
-- Applying patch strong-symbols.patch
-- Using source at /home/mohv/src/jank/third-party/vcpkg/buildtrees/folly/src/3.05.22.00-f3a2ac5bcf.clean
-- Configuring x64-clang-static
-- Building x64-clang-static-dbg
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:134 (message):
    Command failed: /home/mohv/src/jank/third-party/vcpkg/downloads/tools/cmake-3.25.1-linux/cmake-3.25.1-linux-x86_64/bin/cmake --build . --config Debug --target install -- -v -j3
    Working Directory: /home/mohv/src/jank/third-party/vcpkg/buildtrees/folly/x64-clang-static-dbg
    See logs for more information:
      /home/mohv/src/jank/third-party/vcpkg/buildtrees/folly/install-x64-clang-static-dbg-out.log

Call Stack (most recent call first):
  /home/mohv/src/jank/build/vcpkg_installed/x64-linux/share/vcpkg-cmake/vcpkg_cmake_build.cmake:74 (vcpkg_execute_build_process)
  /home/mohv/src/jank/build/vcpkg_installed/x64-linux/share/vcpkg-cmake/vcpkg_cmake_install.cmake:16 (vcpkg_cmake_build)
  ports/folly/portfile.cmake:71 (vcpkg_cmake_install)
  scripts/ports.cmake:147 (include)

error: building folly:x64-clang-static failed with: BUILD_FAILED
Elapsed time to handle folly:x64-clang-static: 3.8 min
Please ensure you're using the latest port files with `git pull` and `vcpkg update`.
Then check for known issues at:
    https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+folly
You can submit a new issue at:
    https://github.com/microsoft/vcpkg/issues/new?title=[folly]+Build+error&body=Copy+issue+body+from+%2Fhome%2Fmohv%2Fsrc%2Fjank%2Fbuild%2Fvcpkg_installed%2Fvcpkg%2Fissue_body.md

-- Running vcpkg install - failed
CMake Error at third-party/vcpkg/scripts/buildsystems/vcpkg.cmake:893 (message):
  vcpkg install failed.  See logs for more information:
  /home/mohv/src/jank/build/vcpkg-manifest-install.log
Call Stack (most recent call first):
  /usr/share/cmake-3.22/Modules/CMakeDetermineSystem.cmake:124 (include)
  CMakeLists.txt:28 (project)

CMake Error: CMake was unable to find a build program corresponding to "Ninja".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
-- Configuring incomplete, errors occurred!
jeaye commented 10 months ago

Hey! Thanks for checking out jank and for reporting your build issue. The problem here is that folly, a dependency of jank via vcpkg, is failing to build. This, unfortunately, is not surprising, since folly is a real pain in the ass to build. In fact, I believe CI is failing right now for the exact same reason: https://github.com/jank-lang/jank/actions/runs/6912644696/job/18808605214

I haven't taken the time to dig into it yet, but you're in luck that it's almost certainly the same issue as CI is having. Once that's resolved, you should be all set.

However, since jank isn't meant to be used right now, fixing builds for people is not a top priority. Currently, I'm building out jank's module system. If you end up digging into this and fixing it first, you are most welcome to submit a PR; our CI jobs would be happier for it. The starting point would be to take a look at the vcpkg build logs pointed out (i.e. /home/mohv/src/jank/third-party/vcpkg/buildtrees/folly/install-x64-clang-static-dbg-out.log).