[CMake] Corrupt object files bootstrapping cmake on x86_64 Synology

Vicne Vicne vicnevicne at gmail.com
Sun Jun 17 06:00:18 EDT 2012


Hi,

Replying to self as I finally managed to build. I'm sharing here in
case others run into similar same problem.

Obviously, there was something wrong with my build system, so I
removed the gcc and optware-devel packages, reinstalled them, then
rebooted the NAS, and bootstrap suceeded.
I don't understand how these packages could have been corrupt as I
installed the same versions two days ago, but I now realize that while
I was unsuccessfully trying to bootstrap yesterday, I had another
session running with an intensive data-copying rsync running. No
conflicting dirs, but maybe the load on the raid system made compiling
unstable. Really scary if it is so :-(. Anyway...

For the sake of completeness, here are the other tweaks that were
needed to bootstrap / make :
The following packages have to be installed :
ipkg install gcc
ipkg install optware-devel
ipkg install make
ipkg install ncurses-dev
ipkg install libidn
and the following links have to be created :
ln -s /opt/include/ncurses/ncurses_dll.h /opt/include/ncurses_dll.h
ln -s /opt/include/ncurses/unctrl.h /opt/include/unctrl.h
ln -s /opt/lib/libidn.so.11.6.8 /lib/libidn.so.11

Best regards,

Vicne

2012/6/16 Vicne Vicne <vicnevicne at gmail.com>
>
> 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
>


More information about the CMake mailing list