[CMake] Corrupt object files bootstrapping cmake on x86_64 Synology

Vicne Vicne vicnevicne at gmail.com
Sat Jun 16 12:43:14 EDT 2012


Hi, all,

I have a project that uses cmake as build system on a Synology NAS.
As I could not find binaries, I had successfully built cmake v2.8.4 one
year ago on an old ARM-based model (DS-109). Now I want to migrate my
project to a brand new Intel-based model (DS-412+ with Intel D2700
processor).

Unfortunately, I can't seem to be able to build cmake now. I first tried
with v2.8.8 which failed, then tried again with 2.8.4, to no avail.

./bootstrap fails at link step with the following error on the console:

---------------------------------------------
g++   -I/opt/cmake-2.8.4/Bootstrap.cmk -I/opt/cmake-2.8.4/Source
-I/opt/cmake-2.8.4/Bootstrap.cmk  cmStandardIncludes.o cmake.o cmakemain.o
cmakewizard.o cmCommandArgumentLexer.o cmCommandArgumentParser.o
cmCommandArgumentParserHelper.o cmDefinitions.o cmDepends.o cmDependsC.o
cmDocumentationFormatter.o cmDocumentationFormatterText.o cmPolicies.o
cmProperty.o cmPropertyMap.o cmPropertyDefinition.o
cmPropertyDefinitionMap.o cmMakeDepend.o cmMakefile.o
cmExportFileGenerator.o cmExportInstallFileGenerator.o
cmInstallDirectoryGenerator.o cmGeneratedFileStream.o
cmGeneratorExpression.o cmGlobalGenerator.o cmLocalGenerator.o
cmInstallGenerator.o cmInstallExportGenerator.o cmInstallFilesGenerator.o
cmInstallScriptGenerator.o cmInstallTargetGenerator.o cmScriptGenerator.o
cmSourceFile.o cmSourceFileLocation.o cmSystemTools.o cmTestGenerator.o
cmVersion.o cmFileTimeComparison.o cmGlobalUnixMakefileGenerator3.o
cmLocalUnixMakefileGenerator3.o cmMakefileExecutableTargetGenerator.o
cmMakefileLibraryTargetGenerator.o cmMakefileTargetGenerator.o
cmMakefileUtilityTargetGenerator.o cmBootstrapCommands.o cmCommands.o
cmTarget.o cmTest.o cmCustomCommand.o cmCustomCommandGenerator.o
cmDocumentVariables.o cmCacheManager.o cmListFileCache.o
cmComputeLinkDepends.o cmComputeLinkInformation.o cmOrderDirectories.o
cmComputeTargetDepends.o cmComputeComponentGraph.o cmExprLexer.o
cmExprParser.o cmExprParserHelper.o cmListFileLexer.o Directory.o Glob.o
RegularExpression.o SystemTools.o ProcessUNIX.o String.o System.o -o cmake
*cmDepends.o: file not recognized: File truncated*
collect2: ld returned 1 exit status
make: *** [cmake] Error 1
---------------------------------------------

Indeed, cmDepends.o is 0 bytes. I'm attaching the corresponding
cmake_bootstrap.log

It happens on v2.8.8 too, but with another file (3 files were 0 bytes long
in that case).

What is weirder is that different tries don't choke on the same file, which
means that deleting 0-size files and restarting, in the end I can manage to
get a complete set of object files

Then, upon link, I now get some errors like
cmBootstrapCommands.o: file not recognized: File format not recognized
by the same method, I get rid of those files and restart ./bootstrap, until
it says

"CMake has bootstrapped.  Now run make."

I'm rather happy but then make fails with
----------------------------------------------
...
[ 10%] Building C object
Source/kwsys/CMakeFiles/cmsysTestSharedForward.dir/testSharedForward.o
Linking C executable cmsysTestSharedForward
/opt/lib/gcc/i686-linux-gnu/4.2.1/../../../../i686-linux-gnu/lib/crt1.o: In
function `_start':
(.text+0x18): undefined reference to `main'
collect2: ld returned 1 exit status
make[2]: *** [Source/kwsys/cmsysTestSharedForward] Error 1
make[1]: *** [Source/kwsys/CMakeFiles/cmsysTestSharedForward.dir/all] Error
2
make: *** [all] Error 2
----------------------------------------------

Which makes me think that things are not that good in the end.

Any idea what could cause this issue ?

Best regards,


Vicne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120616/0df8dc06/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: log.tgz
Type: application/x-gzip
Size: 5927 bytes
Desc: not available
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120616/0df8dc06/attachment.bin>


More information about the CMake mailing list