[CMake] CMAKE -- compiling questions

Michael Hertling mhertling at online.de
Tue May 25 09:33:17 EDT 2010


On 05/25/2010 11:16 AM, Lucian Goron wrote:
> Not exactly.
> I saved my work directory, with all my sources and libraries, formatted my
> HDD, installed lucid lynx, and copied my work directory back.

As MW already pointed out, the C++ compiler of your new distribution
possibly generates object code which can't be linked with object code
generated by the C++ compiler of your previous distribution. So, you
should play it safe and rebuild everything your project provides or
links against unless the latter stems from the current distribution.

> At first my home directory was /home/lucian/, but my old one has been
> /home/goron/.
> So, I created another user with root privileges.

???

> But, there are still errors ?!
> 
> goron at schwarz:~/work/ransac/build$ make
> Linking CXX executable coloredElevationMap
> /home/goron/TUM/source/VTK-CVS/build/bin/libvtkCommon.so: file not
> recognized: File truncated
> collect2: ld returned 1 exit status
> make[2]: *** [coloredElevationMap] Error 1
> make[1]: *** [CMakeFiles/coloredElevationMap.dir/all] Error 2
> make: *** [all] Error 2
> goron at schwarz:~/work/ransac/build$
> 
> I did search libvtkCommon.so and it revealed
> 
> root at schwarz:/# find /home/goron/ -name 'libvtkCommon.so'
> /home/goron/TUM/source/VTK-CVS/build/bin/libvtkCommon.so
> /home/goron/TUM/source/VTK-CVS/build/Common/CMakeFiles/CMakeRelink.dir/libvtkCommon.so
> 
> So, do I really need to re-build what is in
> 
> /home/goron/TUM/source/VTK-CVS
> 
> or is there another way ?

Foremost, try to rebuild comprehensively using a clean build directory.

Regards,

Michael


More information about the CMake mailing list