Closed HannesSommer closed 10 years ago
Can one of the admins verify this patch?
add to whitelist
lgtm
Hm, nope. Fails:
-- catkin 0.6.9
CMake Error: An attempt was made to access a variable: GTSAM_DIR that has not been defined. This variable is created by the FIND_PACKAGE command. CMake version 1.6 always converted the variable name to upper-case, but this behavior is no longer the case. To fix this you might need to set the cache value of CMAKE_BACKWARDS_COMPATIBILITY to 1.6 or less. If you are writing a CMake listfile, you should change the variable reference to use the case of the argument to FIND_PACKAGE.
CMake Warning at CMakeLists.txt:27 (find_package):
Does that ring a bell? I can reproduce that on my machine with an empty workspace. If I rerun cmake (catkin build with force-cmake) it works ! That is why I didn't catch it.
Can we ignore this ERROR somehow easily? It raises this error apparently only because it is capital! It is not even finding the package. I guess that is how it is supposed to work on the thirdparty_submodules build, right? (A bigger extract of the same log:
CMake Error: An attempt was made to access a variable: GTSAM_DIR that has not been defined. This variable is created by the FIND_PACKAGE command. CMake version 1.6 always converted the variable name to upper-case, but this behavior is no longer the case. To fix this you might need to set the cache value of CMAKE_BACKWARDS_COMPATIBILITY to 1.6 or less. If you are writing a CMake listfile, you should change the variable reference to use the case of the argument to FIND_PACKAGE.
CMake Warning at CMakeLists.txt:27 (find_package):
By not providing "FindGTSAM.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "GTSAM", but
CMake did not find one.
Could not find a package configuration file provided by "GTSAM" with any of
the following names:
GTSAMConfig.cmake
gtsam-config.cmake
Add the installation prefix of "GTSAM" to CMAKE_PREFIX_PATH or set
"GTSAM_DIR" to a directory containing one of the above files. If "GTSAM"
provides a separate development package or SDK, be sure it has been
installed.
--- No source version of GTSAM found. Downloading.
-- Configuring incomplete, errors occurred!
It should be a warning as it does not break anything :). If in the cmake source code the comments talk about a warning but they issue an Error :( :
{
// Listfiles should not be using the capitalized version of the
// name. Add a watch to warn the user.
this->Makefile->GetVariableWatch()->AddWatch(
upperDir.c_str(),
cmFindPackageNeedBackwardsCompatibility
);
this->Makefile->GetVariableWatch()->AddWatch(
upperFound.c_str(),
cmFindPackageNeedBackwardsCompatibility
);
}
and :
void cmFindPackageNeedBackwardsCompatibility(const std::string& variable,
int access_type, void* )
{
#ifdef CMAKE_BUILD_WITH_CMAKE
if(access_type == cmVariableWatch::UNKNOWN_VARIABLE_READ_ACCESS)
{
std::string message = "An attempt was made to access a variable: ";
message += variable;
message +=
" that has not been defined. This variable is created by the "
"FIND_PACKAGE command. CMake version 1.6 always converted the "
"variable name to upper-case, but this behavior is no longer the "
"case. To fix this you might need to set the cache value of "
"CMAKE_BACKWARDS_COMPATIBILITY to 1.6 or less. If you are writing a "
"CMake listfile, you should change the variable reference to use "
"the case of the argument to FIND_PACKAGE.";
cmSystemTools::Error(message.c_str());
}
#else
(void)variable;
(void)access_type;
#endif
}
Maybe that helps :)
Hm, it worked for Ubuntu. But now OSX fails. The error, however, doesn't look related: ''' CMake Error at /opt/ros/indigo/share/catkin/cmake/catkin_add_env_hooks.cmake:91 (file): file COPY cannot copy file "/opt/ros/indigo/share/catkin/cmake/env-hooks/05.catkin_make_isolated.bash" to "/Users/slynen/workspace/thirdparty_submodules_multiarch/label/osx/devel/etc/catkin/profile.d/05.catkin_make_isolated.bash". Call Stack (most recent call first): /opt/ros/indigo/share/catkin/cmake/all.cmake:199 (catkin_add_env_hooks) /opt/ros/indigo/share/catkin/cmake/catkinConfig.cmake:20 (include) CMakeLists.txt:4 (find_package) '''
test this please
@HannesSommer This happens sometimes. I haven't had time yet to figure out what causes this, but it is happening not too often so it hasn't got priority.
Ah, ok. thanks for rerunning.
Ah, great. I'll merge.