[CMake] Segfault with cmake 2.8.0 rc4 and CGAL-3.5

Orion Poplawski orion at cora.nwra.com
Mon Nov 2 11:54:26 EST 2009


On 11/02/2009 09:34 AM, Brad King wrote:
> Orion Poplawski wrote:
>> Trying to configure CGAL 3.5 with cmake 2.8.0 rc4 on Fedora and cmake is
>> segfaulting.  Quick analysis shows that it's faulting here:
>>
>> #1  cmMakefile::RaiseScope (this=<value optimized out>)
>>      at /usr/src/debug/cmake-2.8.0-rc4/Source/cmMakefile.cxx:3392
>> 3392              this->LocalGenerator->GetParent()->GetMakefile())
>> (gdb) list
>> 3391      else if(cmMakefile* parent =
>> 3392              this->LocalGenerator->GetParent()->GetMakefile())
>> 3393        {
>>
>> looks like this->LocalGenerator->Parent is null here.
>>
>> (gdb) print this->LocalGenerator->Parent
>> $3 = (cmLocalGenerator *) 0x0
>>
>> Does there need to be check for it being null, or should it never be null?
>
> The check for null is incorrectly applied to the GetMakefile() call instead
> of the GetParent() call.  We'll fix it for the next release candidate.

Thanks.

> However, it does mean that the project tries to use set(... PARENT_SCOPE)
> at the top level, which should also be fixed.

That's coming from an old copy of FindBoost in the project.  Removing 
that and using the cmake provided copy seems to fix it.

-- 
Orion Poplawski
Technical Manager                     303-415-9701 x222
NWRA/CoRA Division                    FAX: 303-415-9702
3380 Mitchell Lane                  orion at cora.nwra.com
Boulder, CO 80301              http://www.cora.nwra.com


More information about the CMake mailing list