You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Almost impossible to build AND use, need to fix packaging or provide instructions.
Also segfault on 1 unittest on master.
E.g if you try to use the packeges after installing you simply get
0.403 Could not find a package configuration file provided by "Sodium" with any
0.403 of the following names:
0.403
0.403 SodiumConfig.cmake
0.403 sodium-config.cmake
when using find_package(proxygen REQUIRED)
after running [install.sh]
e.g when running cmake .. -DCMAKE_PREFIX_PATH=${DEPS_PATH}
for this:
# CMakeLists.txt
cmake_minimum_required(VERSION 3.15)
project(proxygen_server)
# Set C++17 as the default
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
# Find required libraries
find_package(Proxygen REQUIRED)
Hello, thanks for the answer. I managed to to get it working with getdeps.sh. But it took alot of work to figure out a way to finally get it to build (out of the proxygen source dir), without too much dirty hacking.
As a user I want to be able to consume this library in an easy way. Perhaps you can understand what I do wrong by looking at my working example below. I have reduced and simplified as much as I possibly can. I made a Dockerfile to show all necessary other steps before you can start building (from a clean ubuntu:22.04). Please see the Dockerfile
FROM ubuntu:22.04
# Install required dependenciesRUN apt-get update && apt-get install -y git cmake g++ curl
WORKDIR /app
# Clone the Proxygen repositoryRUN git clone https://github.com/facebook/proxygen.git
RUN apt-get install python3 python3-pip -y
RUN apt-get install -y openssl libssl-dev pkg-config
RUN apt-get install -y autoconf automake libtool
# Build and install ProxygenWORKDIR /app/proxygen
RUN ./getdeps.sh
WORKDIR /app
COPY . .
RUN mkdir build && cd build && cmake .. && make -j$(nproc)
# Note you'll need to EXPOSE ports if you want to try the server outside the container# Set the default command to run when the container startsCMD ["./build/server"]
Then for the CMakeLists.txt, I have made a comment on every line I needed to add to make it work
# The most minimal CMakeLists.txt file to build a proxygen server I could findcmake_minimum_required(VERSION3.15)
project(proxygen_server)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIREDTrue)
# Needed to find proxygen-config.cmakelist(APPENDCMAKE_PREFIX_PATH"/app/proxygen/_build")
# Needed to find sodium-config.cmakelist(APPENDCMAKE_MODULE_PATH"/app/proxygen/build/fbcode_builder/CMake")
# Otherwise you will not find sodium correctly. If you install with# package-manager as well, you get warnings...file(GLOBSODIUM_DIR"/app/proxygen/_build/libsodium-*")
if(SODIUM_DIR)
list(APPENDCMAKE_PREFIX_PATH${SODIUM_DIR})
else()
message(FATAL_ERROR"Sodium directory not found")
endif()
# Find required libraries, for the eche server examplefind_package(proxygenCONFIGREQUIRED)
find_package(gflagsREQUIRED)
find_package(zstdCONFIGREQUIRED)
find_package(follyREQUIRED)
# find_package(sodium REQUIRED) # Will not workadd_executable(serverEchoServer.cppEchoHandler.cpp)
# Link the required librariestarget_link_libraries(serverPUBLICproxygen::proxygenhttpservergflagszstd)
# This is needed to find libzstd, Using prefix path does not workfile(GLOBZSTD_LIB_DIR"/app/proxygen/_build/zstd-*/lib")
if(ZSTD_LIB_DIR)
target_link_directories(serverPUBLIC${ZSTD_LIB_DIR})
else()
message(FATAL_ERROR"Zstd library directory not found")
endif()
I started trying to consume this lib through vcpkg, that also failed. I opened an issue over there too microsoft/vcpkg#38086. So I came to try to figure out how to build it myself so I can maybe create a "working" vcpkg port.
Activity
jbeshay commentedon Apr 18, 2024
Please use one of these scripts to build proxygen:
https://github.com/facebook/proxygen/blob/main/proxygen/build.sh
https://github.com/facebook/proxygen/blob/main/getdeps.sh
As you've already noticed in #497, the build.sh installs the required dependencies including libsodium
jkammerland commentedon Apr 21, 2024
Hello, thanks for the answer. I managed to to get it working with getdeps.sh. But it took alot of work to figure out a way to finally get it to build (out of the proxygen source dir), without too much dirty hacking.
As a user I want to be able to consume this library in an easy way. Perhaps you can understand what I do wrong by looking at my working example below. I have reduced and simplified as much as I possibly can. I made a Dockerfile to show all necessary other steps before you can start building (from a clean ubuntu:22.04). Please see the Dockerfile
at https://github.com/jkammerland/proxygen-docker-example/blob/main/Dockerfile
Then for the CMakeLists.txt, I have made a comment on every line I needed to add to make it work
at https://github.com/jkammerland/proxygen-docker-example/blob/main/CMakeLists.txt
I started trying to consume this lib through vcpkg, that also failed. I opened an issue over there too microsoft/vcpkg#38086. So I came to try to figure out how to build it myself so I can maybe create a "working" vcpkg port.
Please have look and sanity check this.
BR