-
-
Notifications
You must be signed in to change notification settings - Fork 911
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
Fix for compile errors in GCC 12 #824
base: develop
Are you sure you want to change the base?
Changes from all commits
9cfd329
290709b
cce1599
545bfa7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ else() | |
endif() | ||
FILE(GLOB LIBRARY_FILES_H "*.h" "*.inl") | ||
|
||
cxx_executable_with_flags(DensifyPointCloud "Apps" "${cxx_default}" "MVS;${OpenMVS_EXTRA_LIBS}" ${LIBRARY_FILES_C} ${LIBRARY_FILES_H}) | ||
cxx_executable_with_flags(DensifyPointCloud "Apps" "${cxx_default}" "MVS;Common;${OpenMVS_EXTRA_LIBS}" ${LIBRARY_FILES_C} ${LIBRARY_FILES_H}) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this should not be needed, Common is linked to MVS; pls find out why this is needed here and it worked fine will all linux distros till now |
||
|
||
# Install | ||
INSTALL(TARGETS DensifyPointCloud | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ else() | |
endif() | ||
FILE(GLOB LIBRARY_FILES_H "*.h" "*.inl") | ||
|
||
cxx_executable_with_flags(InterfaceCOLMAP "Apps" "${cxx_default}" "MVS;${OpenMVS_EXTRA_LIBS}" ${LIBRARY_FILES_C} ${LIBRARY_FILES_H}) | ||
cxx_executable_with_flags(InterfaceCOLMAP "Apps" "${cxx_default}" "MVS;IO;${OpenMVS_EXTRA_LIBS}" ${LIBRARY_FILES_C} ${LIBRARY_FILES_H}) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same as above |
||
|
||
# Install | ||
INSTALL(TARGETS InterfaceCOLMAP | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,9 @@ | |
#undef R2D | ||
#include <openMVG/sfm/sfm_data.hpp> | ||
#include <openMVG/sfm/sfm_data_io.hpp> | ||
#include <openMVG/image/image.hpp> | ||
#include <openMVG/image/image_io.hpp> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. cool, but the interface should be disabled anyway |
||
#include <openMVG/cameras/cameras.hpp> | ||
|
||
#endif | ||
|
||
|
||
|
@@ -415,7 +417,7 @@ bool Initialize(size_t argc, LPCTSTR* argv) | |
Util::ensureValidPath(OPT::strInputFileName); | ||
Util::ensureUnifySlash(OPT::strInputFileName); | ||
Util::ensureUnifySlash(OPT::strOutputImageFolder); | ||
Util::ensureDirectorySlash(OPT::strOutputImageFolder); | ||
Util::ensureFolderSlash(OPT::strOutputImageFolder); | ||
const String strInputFileNameExt(Util::getFileExt(OPT::strInputFileName).ToLower()); | ||
OPT::bOpenMVS2OpenMVG = (strInputFileNameExt == MVS_EXT); | ||
#ifdef _USE_OPENMVG | ||
|
@@ -440,10 +442,10 @@ bool Initialize(size_t argc, LPCTSTR* argv) | |
Util::ensureUnifySlash(OPT::strOutputFileName); | ||
if (OPT::bOpenMVS2OpenMVG) { | ||
if (OPT::strOutputFileName.IsEmpty()) | ||
OPT::strOutputFileName = Util::getFullFileName(OPT::strInputFileName); | ||
OPT::strOutputFileName = Util::getFileFullName(OPT::strInputFileName); | ||
} else { | ||
if (OPT::strOutputFileName.IsEmpty()) | ||
OPT::strOutputFileName = Util::getFullFileName(OPT::strInputFileName) + MVS_EXT; | ||
OPT::strOutputFileName = Util::getFileFullName(OPT::strInputFileName) + MVS_EXT; | ||
} | ||
|
||
// initialize global options | ||
|
@@ -602,10 +604,10 @@ int main(int argc, LPCTSTR* argv) | |
image.name = view.second->s_Img_path; | ||
Util::ensureUnifySlash(image.name); | ||
Util::strTrim(image.name, PATH_SEPARATOR_STR); | ||
String pathRoot(sfm_data.s_root_path); Util::ensureDirectorySlash(pathRoot); | ||
String pathRoot(sfm_data.s_root_path); Util::ensureFolderSlash(pathRoot); | ||
const String srcImage(MAKE_PATH_FULL(WORKING_FOLDER_FULL, pathRoot+image.name)); | ||
image.name = MAKE_PATH_FULL(WORKING_FOLDER_FULL, OPT::strOutputImageFolder+image.name); | ||
Util::ensureDirectory(image.name); | ||
Util::ensureFolder(image.name); | ||
image.ID = static_cast<MVS::IIndex>(view.first); | ||
image.platformID = map_intrinsic.at(view.second->id_intrinsic); | ||
MVS::Platform& platform = scene.platforms[image.platformID]; | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -451,7 +451,6 @@ macro(optimize_default_compiler_settings) | |
add_extra_compiler_option(-Werror=sequence-point) | ||
add_extra_compiler_option(-Wformat) | ||
add_extra_compiler_option(-Werror=format-security -Wformat) | ||
add_extra_compiler_option(-Wstrict-prototypes) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pls explain There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In comment below you can see that compiler is producing a warning:
|
||
add_extra_compiler_option(-Winit-self) | ||
add_extra_compiler_option(-Wsign-promo) | ||
add_extra_compiler_option(-Wreorder) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ endif() | |
|
||
# Link its dependencies | ||
TARGET_LINK_LIBRARIES(Common ${Boost_LIBRARIES} ${OpenCV_LIBS}) | ||
TARGET_COMPILE_OPTIONS(Common INTERFACE -fpermissive) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pls detail, I did not understand the comment from the PR; at line 3062 all looks fine to me:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unfortunatelly either new version of OpenCV has some kind of a bug or GCC12 is behaving differently and selecting non const template version of a ptr function (line 713 of mat.inl.hpp) and though const qualifier is not respected for
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @cdcseacave I'm having the same issue on Fedora 36 and
Would be happy to provide more information so we can solve this! |
||
|
||
# Install | ||
SET_TARGET_PROPERTIES(Common PROPERTIES | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls test these chages with older linux distribution and windows and mac too