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

Changes made on October 16 break build on Ubuntu 24.04 #1075

Open
farhaven opened this issue Oct 18, 2024 · 1 comment
Open

Changes made on October 16 break build on Ubuntu 24.04 #1075

farhaven opened this issue Oct 18, 2024 · 1 comment

Comments

@farhaven
Copy link

The changes made on October 16 by generatedunixname89002005279527 remove a bunch of third party files, but leave the infrastructure that tries to build them in place (in particular vlfeat and gtest). This breaks the configuration step (and thus the build) on Ubuntu 24.04.

What is the best way to work around this? As of now, I'm building an older checkout, but this seems to be an issue that should be fixed?

@nomtats
Copy link

nomtats commented Jan 17, 2025

I had the same issue.
I first reverted those changes by

git revert -n 129ab66 b863db5 177d146 444e362

It was still giving me gmock related errors, so I turned test off.

Then it started giving me this error:
error: ‘optional’ in namespace ‘std’ does not name a template type
I fixed this one by changing the c++ standard to c++17

here's a patch

diff --git a/opensfm/src/CMakeLists.txt b/opensfm/src/CMakeLists.txt
index c85aa6fb..bbae2d2c 100644
--- a/opensfm/src/CMakeLists.txt
+++ b/opensfm/src/CMakeLists.txt
@@ -24,10 +24,13 @@ set(CMAKE_CXX_VISIBILITY_INLINES ON)
 # fPIC
 set(CMAKE_POSITION_INDEPENDENT_CODE ON)
 
-# C++14
-set(CMAKE_CXX_STANDARD 14)
+# C++17
+set(CMAKE_CXX_STANDARD 17)
 set(CMAKE_CXX_STANDARD_REQUIRED ON)
 
+# Disable tests
+set(OPENSFM_BUILD_TESTS OFF)
+
 # Enable all warnings
 if (NOT WIN32)
 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra")

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