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

Build instructions are out of date #491

Closed
JanEbbing opened this issue Jan 31, 2025 · 4 comments
Closed

Build instructions are out of date #491

JanEbbing opened this issue Jan 31, 2025 · 4 comments

Comments

@JanEbbing
Copy link

I'm following the build instructions for Ubuntu on the website:

docker run -it --name ubuntu ubuntu:24.10 bash
## in docker image shell:

# apt-get update
# apt-get install \
    g++ \
    cmake \
    make \
    ninja-build \
    bison flex \
    git curl \
    rsync m4 \
    libzstd-dev \
    libboost-all-dev \
    libevent-dev \
    libdouble-conversion-dev \
    libgoogle-glog-dev \
    libgflags-dev \
    libiberty-dev \
    liblz4-dev \
    liblzma-dev \
    libsnappy-dev \
    zlib1g-dev \
    binutils-dev \
    libjemalloc-dev \
    libssl-dev \
    pkg-config \
    libunwind-dev \
    libsodium-dev \
    libpcre3-dev \
    libfftw3-dev \
    libxxhash-dev \
    libgtest-dev \
    libfmt-dev \
    clang-12 \
    llvm-12 \
    libclang-12-dev

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package clang-12 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'clang-12' has no installation candidate

The closest version available is clang-14, which I am trying now. See ubuntu packages list

@JanEbbing
Copy link
Author

JanEbbing commented Jan 31, 2025

EDIT: Adding libgmp-dev as a required install

I also needed to # apt-get install libfast-float-dev libgmp-dev (this is a dependency of folly, so maybe the issue should go there?), before that I got

CMake Error at /usr/share/cmake-3.30/Modules/FindPackageHandleStandardArgs.cmake:233 (message):
  Could NOT find FastFloat (missing: FASTFLOAT_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake-3.30/Modules/FindPackageHandleStandardArgs.cmake:603 (_FPHSA_FAILURE_MESSAGE)
  CMake/FindFastFloat.cmake:25 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMake/folly-deps.cmake:55 (find_package)
  CMakeLists.txt:135 (include)

when running ./install_deps.sh

@JanEbbing
Copy link
Author

JanEbbing commented Jan 31, 2025

EDIT: This seems to mean my ghc version is too new. Trying with stack now....
EDIT 2: The following helped:

## Install ghc 9.2.8, last version with base < 4.17 like the project requires
# ghcup install ghc 9.2.8
# ghcup set ghc 9.2.8
## Continue on from build guide at step "make"
# make

I am currently getting

# make
Error: [Cabal-7107]
Could not resolve dependencies:
[__0] trying: fb-stubs-0.1.0.0 (user goal)
[__1] next goal: base (dependency of fb-stubs)
[__1] rejecting: base-4.17.2.1/installed-4.17.2.1 (conflict: fb-stubs => base>=4.11.1.0 && <4.17)
[__1] skipping: base; 4.21.0.0, 4.20.0.1, 4.20.0.0, 4.19.2.0, 4.19.1.0, 4.19.0.0, 4.18.2.1, 4.18.2.0, 4.18.1.0, 4.18.0.0, 4.17.2.1, 4.17.2.0, 4.17.1.0, 4.17.0.0 (has the same characteristics that caused the previous version to fail: excluded by constraint '>=4.11.1.0 && <4.17' from 'fb-stubs')
[__1] rejecting: base; 4.16.4.0, 4.16.3.0, 4.16.2.0, 4.16.1.0, 4.16.0.0, 4.15.1.0, 4.15.0.0, 4.14.3.0, 4.14.2.0, 4.14.1.0, 4.14.0.0, 4.13.0.0, 4.12.0.0, 4.11.1.0, 4.11.0.0, 4.10.1.0, 4.10.0.0, 4.9.1.0, 4.9.0.0, 4.8.2.0, 4.8.1.0, 4.8.0.0, 4.7.0.2, 4.7.0.1, 4.7.0.0, 4.6.0.1, 4.6.0.0, 4.5.1.0, 4.5.0.0, 4.4.1.0, 4.4.0.0, 4.3.1.0, 4.3.0.0, 4.2.0.2, 4.2.0.1, 4.2.0.0, 4.1.0.0, 4.0.0.0, 3.0.3.2, 3.0.3.1 (constraint from non-reinstallable package requires installed instance)
[__1] fail (backjumping, conflict set: base, fb-stubs)
After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: base, fb-stubs

(cd hsthrift && make CABAL="cabal --jobs --ghc-options='' -vnormal+nowrap --project-file=/Glean/cabal.project  " compiler)
make[1]: Entering directory '/Glean/hsthrift'
cabal --jobs --ghc-options='' -vnormal+nowrap --project-file=/Glean/cabal.project   build thrift-compiler
Warning: Specifying an absolute path to the project file is deprecated. Use --project-dir to set the project's directory.
Resolving dependencies...
Error: [Cabal-7107]
Could not resolve dependencies:
[__0] trying: fb-stubs-0.1.0.0 (user goal)
[__1] next goal: base (dependency of fb-stubs)
[__1] rejecting: base-4.17.2.1/installed-4.17.2.1 (conflict: fb-stubs => base>=4.11.1.0 && <4.17)
[__1] skipping: base; 4.21.0.0, 4.20.0.1, 4.20.0.0, 4.19.2.0, 4.19.1.0, 4.19.0.0, 4.18.2.1, 4.18.2.0, 4.18.1.0, 4.18.0.0, 4.17.2.1, 4.17.2.0, 4.17.1.0, 4.17.0.0 (has the same characteristics that caused the previous version to fail: excluded by constraint '>=4.11.1.0 && <4.17' from 'fb-stubs')
[__1] rejecting: base; 4.16.4.0, 4.16.3.0, 4.16.2.0, 4.16.1.0, 4.16.0.0, 4.15.1.0, 4.15.0.0, 4.14.3.0, 4.14.2.0, 4.14.1.0, 4.14.0.0, 4.13.0.0, 4.12.0.0, 4.11.1.0, 4.11.0.0, 4.10.1.0, 4.10.0.0, 4.9.1.0, 4.9.0.0, 4.8.2.0, 4.8.1.0, 4.8.0.0, 4.7.0.2, 4.7.0.1, 4.7.0.0, 4.6.0.1, 4.6.0.0, 4.5.1.0, 4.5.0.0, 4.4.1.0, 4.4.0.0, 4.3.1.0, 4.3.0.0, 4.2.0.2, 4.2.0.1, 4.2.0.0, 4.1.0.0, 4.0.0.0, 3.0.3.2, 3.0.3.1 (constraint from non-reinstallable package requires installed instance)
[__1] fail (backjumping, conflict set: base, fb-stubs)
After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: base, fb-stubs

make[1]: *** [Makefile:16: compiler] Error 1
make[1]: Leaving directory '/Glean/hsthrift'
make: *** [Makefile:233: thrift-compiler] Error 2

Trying to find a way to fix this

@JanEbbing
Copy link
Author

JanEbbing commented Jan 31, 2025

Edit: Also need to # apt-get install clang-15 llvm-15 libclang-15-dev

make works eventually, make test fails. Internet search recommended cabal build all afterwards, which is running now...

@pepeiborra
Copy link
Contributor

Hey @JanEbbing thanks for reporting this!

  • fast-float is a new Folly dependency. Our CI system was updated to include it in Add libfast-float-dev to RPM deps #467 but we forgot to update the build instructions. I'll will update them
  • The cabal error you are seeing is fixed by running cabal update. I'll add a note to the build instructions
  • In general, I recommend using the CI build script as a reference:

https://github.com/facebookincubator/Glean/blob/main/.github/workflows/ci.yml#L2

facebook-github-bot pushed a commit that referenced this issue Feb 3, 2025
Summary: Address issues from #491

Reviewed By: josefs

Differential Revision: D69049801

fbshipit-source-id: 0759237824842b13a6c35696a3ab4ac9da0d3b5e
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

2 participants