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

Compiling from source fails on Ubuntu 22.04.1 #251

Closed
amphioxus opened this issue Oct 18, 2022 · 2 comments
Closed

Compiling from source fails on Ubuntu 22.04.1 #251

amphioxus opened this issue Oct 18, 2022 · 2 comments
Labels

Comments

@amphioxus
Copy link

After updating from Ubuntu 20.04 to the new 22.04 LTS version, HTStream no longer worked for me. (I had previously installed it from source.) I tried rebuilding it, but when running make, the build process stopped with an error at [ 12%] Building CXX object googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o

Since the external googletest library seemed like the culprit here, I downloaded the newest googletest release from https://github.com/google/googletest (v1.12.1) and placed the tar file (release-1.12.1.tar.gz) within ext/googletest of the HTStream repo.

I then changed the file cmake/gtest.cmake to use the updated googletest version instead of the included v.1.10.0 one. Here are the changes I applied:

$ git diff cmake/gtest.cmake

diff --git a/cmake/gtest.cmake b/cmake/gtest.cmake
index e10e50c..6b866a0 100644
--- a/cmake/gtest.cmake
+++ b/cmake/gtest.cmake
@@ -5,15 +5,15 @@ include(ExternalProject)
 
 
 execute_process(
-  COMMAND "tar" "-xzf" "${CMAKE_SOURCE_DIR}/ext/googletest/release-1.10.0.tar.gz"
+  COMMAND "tar" "-xzf" "${CMAKE_SOURCE_DIR}/ext/googletest/release-1.12.1.tar.gz"
   WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/ext/googletest"
   RESULT_VARIABLE tar_result
   )
 
-message(STATUS "tar result: ${tar_result} ${CMAKE_SOURCE_DIR}/ext/googletest/release-1.10.0.tar.gz")
+message(STATUS "tar result: ${tar_result} ${CMAKE_SOURCE_DIR}/ext/googletest/release-1.12.1.tar.gz")
 
 ExternalProject_Add(googletest
-  SOURCE_DIR "${CMAKE_SOURCE_DIR}/ext/googletest/googletest-release-1.10.0"
+  SOURCE_DIR "${CMAKE_SOURCE_DIR}/ext/googletest/googletest-release-1.12.1"
   CMAKE_ARGS -Dgtest_force_shared_crt=ON
   PREFIX "${CMAKE_CURRENT_BINARY_DIR}"

After running cmake .. and make again, the build succeeded and it seems like everything is working as it should. Maybe this info helps someone...

Thanks for this great tool!
Armin

@amphioxus amphioxus added the bug label Oct 18, 2022
@samhunter
Copy link
Collaborator

Hi @amphioxus thanks for reporting this! I'm glad you like HTStream.
Do you happen to know if you used statically linked libraries when you compiled from source (e.g. -DBUILD_STATIC_BIN=ON)? I ask because I include statically linked executables as part of the release (https://github.com/s4hts/HTStream/releases/download/v1.3.3/HTStream_v1.3.3.tar.gz), and now I wonder if they will stop working under 22.04.
Either way it seems reasonable to upgrade HTStream so that it uses the latest version of googletest.

@amphioxus
Copy link
Author

amphioxus commented Oct 19, 2022 via email

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

No branches or pull requests

3 participants