MantisBT - CMake
View Issue Details
0006114CMakeCCMakepublic2007-12-03 12:182008-09-11 14:46
Will Stephenson 
Bill Hoffman 
normalmajoralways
closedunable to reproduce 
 
 
0006114: "ccmake ." aborts in cmake::LoadCache()
CMake 2.4.7-16 on openSUSE 10.3 x86_64

Every time I try to ccmake in any existing build dir, it aborts with:
"Error running cmake::LoadCache(). Aborting."

Where should I set a breakpoint to determine where it's aborting? There is no useful info at _exit.

The attached file is an strace dump, CMakeCache.txt to follow
No tags attached.
? ccmake.out (14,376) 2007-12-03 12:18
https://public.kitware.com/Bug/file/1236/ccmake.out
txt CMakeCache.txt (67,805) 2007-12-03 12:19
https://public.kitware.com/Bug/file/1237/CMakeCache.txt
Issue History
2007-12-03 12:18Will StephensonNew Issue
2007-12-03 12:18Will StephensonFile Added: ccmake.out
2007-12-03 12:19Will StephensonFile Added: CMakeCache.txt
2007-12-03 12:19Will StephensonNote Added: 0009818
2007-12-14 13:11Bill HoffmanNote Added: 0009898
2007-12-14 13:43Will StephensonNote Added: 0009900
2007-12-14 14:42Bill HoffmanNote Added: 0009902
2007-12-14 15:02Will StephensonNote Added: 0009907
2007-12-14 20:33Bill HoffmanNote Added: 0009917
2007-12-14 20:33Bill HoffmanStatusnew => assigned
2007-12-14 20:33Bill HoffmanAssigned To => Bill Hoffman
2008-09-11 14:46Bill HoffmanStatusassigned => closed
2008-09-11 14:46Bill HoffmanResolutionopen => unable to reproduce

Notes
(0009818)
Will Stephenson   
2007-12-03 12:19   
This is a representative cache, but it happens on all of my cmake projects. They are all KDE 4 projects.
(0009898)
Bill Hoffman   
2007-12-14 13:11   
This error :

write(2, "CMake Error: Could not find CMAK"..., 134CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.

Looks like more of a problem. How did you build cmake? Can you try one of the binaries from the cmake download page?
(0009900)
Will Stephenson   
2007-12-14 13:43   
It's from SUSE binary rpms. The 32-bit binary you provide works normally.
I'm on the KDE team at SUSE and would like to ensure we're not mis-packaging CMake. What else can I do to troubleshoot our build?
(0009902)
Bill Hoffman   
2007-12-14 14:42   
I am not sure what to do in order to debug it better. But, it does appear that the build is bad for your cmake. CMake does look relative to the cmake binary to find the Modules directory, and if you changed the directory structure, that could break things. CMAKE_PREFIX and CMAKE_DATA_DIR can be used to modify the laytout some:

    // try compiled in install prefix
    cMakeRoot = CMAKE_PREFIX CMAKE_DATA_DIR;
    modules = cMakeRoot + "/Modules/CMake.cmake";

What is the directory structure you are creating?
(0009907)
Will Stephenson   
2007-12-14 15:02   
I should point out that the same package built for i586 works fine, on i586.
cmake itself works normally on x86_64 - I've only experienced problems with ccmake, so I'm not sure it's a result of our cmake package layout.

Here are the relevant bits of our specfile.
We apply 3 patches as well, one to use in-tree xmlrpc, one to Modules/FindPythonLibs.cmake to use the system shared python lib, and one to make unix makefiles less chatty while building, none of which I guess affects finding the CMAKE_ROOT.

%build
export CXXFLAGS="$RPM_OPT_FLAGS"
export CFLAGS="$CXXFLAGS"
./configure \
    --prefix=%{_prefix} \
    --datadir=/share/%{name} \
    --docdir=/share/doc/packages/%{name} \
    --mandir=/share/man \
    --system-libs
make VERBOSE=1 %{?jobs:-j %jobs}
  
%install
make DESTDIR=%{buildroot} install
find %{buildroot}/usr/share/cmake -type f -print0 | xargs -0 chmod 644
  
%clean
rm -rf %{buildroot}
  
%files
%defattr(-,root,root)
/usr/bin/cpack
/usr/bin/ccmake
/usr/bin/cmake
/usr/bin/ctest
/usr/share/cmake
%doc /usr/share/doc/packages/%name
/usr/share/man/man1/ccmake.1.gz
/usr/share/man/man1/cmake.1.gz
/usr/share/man/man1/ctest.1.gz
(0009917)
Bill Hoffman   
2007-12-14 20:33   
Not sure what to say. I guess you would have to build with gdb and walk in and try to figure out what is wrong. If you could give me a set of commands to reproduce the problem with a build of cmake, I would try that as well.