[cmake-developers] [CMake 0012423]: cmake -G"Unix Makefiles" .. : make causes linker-error when executed on network drive

Mantis Bug Tracker mantis at public.kitware.com
Fri Aug 26 09:47:15 EDT 2011


The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=12423 
====================================================================== 
Reported By:                Patrick Gampp
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   12423
Category:                   CMake
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2011-08-26 09:47 EDT
Last Modified:              2011-08-26 09:47 EDT
====================================================================== 
Summary:                    cmake -G"Unix Makefiles" .. : make causes
linker-error when executed on network drive
Description: 
cmake -generated unix makefile causes error when executed on network drive. The
source code is from the Tutorial/Step2. When the same project is copied to the
local harddisk, the project is built whitout a problem. 

I have only Xcode4 installed, so no additional compilers running. Tutorial/Step2
can be built on the network drive with Xcode4 without problems. As Xcode and the
makefile are using the same linker, this is probably a cmake bug.

I built Tutorial/Step2 also on a linux-machine on the network drive with
-G"UnixMakefiles", it worked.


Steps to Reproduce: 
1) Downloaded Tutorial files
(http://www.cmake.org/cmake/help/cmake_tutorial.html) at
http://public.kitware.com/cgi-bin/viewcvs.cgi/Tests/Tutorial/?root=CMake.

2) mkdir mac_dir (on network drive /Volumes/amm-er/..)
cd mac_dir
cmake -G"Unix Makefiles" ..
make VERBOSE=1



Additional Information: 
mac151:mac_um gmp$ cmake -G"Unix Makefiles" ..
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring done
-- Generating done
-- Build files have been written to:
/Volumes/amm-er/gmp/Projects/_shared/cmake_unixMakefile_testProject/Tutorial/Step2/mac_um
mac151:mac_um gmp$ make VERBOSE=1
"/Applications/CMake 2.8-5.app/Contents/bin/cmake"
-H/Volumes/amm-er/gmp/Projects/_shared/cmake_unixMakefile_testProject/Tutorial/Step2
-B/Volumes/amm-er/gmp/Projects/_shared/cmake_unixMakefile_testProject/Tutorial/Step2/mac_um
--check-build-system CMakeFiles/Makefile.cmake 0
"/Applications/CMake 2.8-5.app/Contents/bin/cmake" -E cmake_progress_start
/Volumes/amm-er/gmp/Projects/_shared/cmake_unixMakefile_testProject/Tutorial/Step2/mac_um/CMakeFiles
/Volumes/amm-er/gmp/Projects/_shared/cmake_unixMakefile_testProject/Tutorial/Step2/mac_um/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make -f MathFunctions/CMakeFiles/MathFunctions.dir/build.make
MathFunctions/CMakeFiles/MathFunctions.dir/depend
cd
/Volumes/amm-er/gmp/Projects/_shared/cmake_unixMakefile_testProject/Tutorial/Step2/mac_um
&& "/Applications/CMake 2.8-5.app/Contents/bin/cmake" -E cmake_depends "Unix
Makefiles"
/Volumes/amm-er/gmp/Projects/_shared/cmake_unixMakefile_testProject/Tutorial/Step2
/Volumes/amm-er/gmp/Projects/_shared/cmake_unixMakefile_testProject/Tutorial/Step2/MathFunctions
/Volumes/amm-er/gmp/Projects/_shared/cmake_unixMakefile_testProject/Tutorial/Step2/mac_um
/Volumes/amm-er/gmp/Projects/_shared/cmake_unixMakefile_testProject/Tutorial/Step2/mac_um/MathFunctions
/Volumes/amm-er/gmp/Projects/_shared/cmake_unixMakefile_testProject/Tutorial/Step2/mac_um/MathFunctions/CMakeFiles/MathFunctions.dir/DependInfo.cmake
--color=
Dependee
"/Volumes/amm-er/gmp/Projects/_shared/cmake_unixMakefile_testProject/Tutorial/Step2/mac_um/MathFunctions/CMakeFiles/MathFunctions.dir/DependInfo.cmake"
is newer than depender
"/Volumes/amm-er/gmp/Projects/_shared/cmake_unixMakefile_testProject/Tutorial/Step2/mac_um/MathFunctions/CMakeFiles/MathFunctions.dir/depend.internal".
Dependee
"/Volumes/amm-er/gmp/Projects/_shared/cmake_unixMakefile_testProject/Tutorial/Step2/mac_um/MathFunctions/CMakeFiles/CMakeDirectoryInformation.cmake"
is newer than depender
"/Volumes/amm-er/gmp/Projects/_shared/cmake_unixMakefile_testProject/Tutorial/Step2/mac_um/MathFunctions/CMakeFiles/MathFunctions.dir/depend.internal".
Scanning dependencies of target MathFunctions
make -f MathFunctions/CMakeFiles/MathFunctions.dir/build.make
MathFunctions/CMakeFiles/MathFunctions.dir/build
"/Applications/CMake 2.8-5.app/Contents/bin/cmake" -E cmake_progress_report
/Volumes/amm-er/gmp/Projects/_shared/cmake_unixMakefile_testProject/Tutorial/Step2/mac_um/CMakeFiles
1
[ 50%] Building CXX object
MathFunctions/CMakeFiles/MathFunctions.dir/mysqrt.cxx.o
cd
/Volumes/amm-er/gmp/Projects/_shared/cmake_unixMakefile_testProject/Tutorial/Step2/mac_um/MathFunctions
&& /usr/bin/c++   
-I/Volumes/amm-er/gmp/Projects/_shared/cmake_unixMakefile_testProject/Tutorial/Step2/mac_um
-I/Volumes/amm-er/gmp/Projects/_shared/cmake_unixMakefile_testProject/Tutorial/Step2/MathFunctions
   -o CMakeFiles/MathFunctions.dir/mysqrt.cxx.o -c
/Volumes/amm-er/gmp/Projects/_shared/cmake_unixMakefile_testProject/Tutorial/Step2/MathFunctions/mysqrt.cxx
Linking CXX static library libMathFunctions.a
cd
/Volumes/amm-er/gmp/Projects/_shared/cmake_unixMakefile_testProject/Tutorial/Step2/mac_um/MathFunctions
&& "/Applications/CMake 2.8-5.app/Contents/bin/cmake" -P
CMakeFiles/MathFunctions.dir/cmake_clean_target.cmake
cd
/Volumes/amm-er/gmp/Projects/_shared/cmake_unixMakefile_testProject/Tutorial/Step2/mac_um/MathFunctions
&& "/Applications/CMake 2.8-5.app/Contents/bin/cmake" -E cmake_link_script
CMakeFiles/MathFunctions.dir/link.txt --verbose=1
/usr/bin/ar cr libMathFunctions.a  CMakeFiles/MathFunctions.dir/mysqrt.cxx.o
/usr/bin/ranlib libMathFunctions.a
Error running link command: Bus error
make[2]: *** [MathFunctions/libMathFunctions.a] Error 1
make[1]: *** [MathFunctions/CMakeFiles/MathFunctions.dir/all] Error 2
make: *** [all] Error 2
mac151:mac_um gmp$ pwd
/Volumes/amm-er/gmp/Projects/_shared/cmake_unixMakefile_testProject/Tutorial/Step2/mac_um
mac151:mac_um gmp$ 


Another error occurs, when I re-run cmake:

mac151:mac_um gmp$ cmake -G"Unix Makefiles" ..
-- Configuring done
-- Generating done
-- Build files have been written to:
/Volumes/amm-er/gmp/Projects/_shared/cmake_unixMakefile_testProject/Tutorial/Step2/mac_um
mac151:mac_um gmp$ make VERBOSE=1
"/Applications/CMake 2.8-5.app/Contents/bin/cmake"
-H/Volumes/amm-er/gmp/Projects/_shared/cmake_unixMakefile_testProject/Tutorial/Step2
-B/Volumes/amm-er/gmp/Projects/_shared/cmake_unixMakefile_testProject/Tutorial/Step2/mac_um
--check-build-system CMakeFiles/Makefile.cmake 0
"/Applications/CMake 2.8-5.app/Contents/bin/cmake" -E cmake_progress_start
/Volumes/amm-er/gmp/Projects/_shared/cmake_unixMakefile_testProject/Tutorial/Step2/mac_um/CMakeFiles
/Volumes/amm-er/gmp/Projects/_shared/cmake_unixMakefile_testProject/Tutorial/Step2/mac_um/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make -f MathFunctions/CMakeFiles/MathFunctions.dir/build.make
MathFunctions/CMakeFiles/MathFunctions.dir/depend
cd
/Volumes/amm-er/gmp/Projects/_shared/cmake_unixMakefile_testProject/Tutorial/Step2/mac_um
&& "/Applications/CMake 2.8-5.app/Contents/bin/cmake" -E cmake_depends "Unix
Makefiles"
/Volumes/amm-er/gmp/Projects/_shared/cmake_unixMakefile_testProject/Tutorial/Step2
/Volumes/amm-er/gmp/Projects/_shared/cmake_unixMakefile_testProject/Tutorial/Step2/MathFunctions
/Volumes/amm-er/gmp/Projects/_shared/cmake_unixMakefile_testProject/Tutorial/Step2/mac_um
/Volumes/amm-er/gmp/Projects/_shared/cmake_unixMakefile_testProject/Tutorial/Step2/mac_um/MathFunctions
/Volumes/amm-er/gmp/Projects/_shared/cmake_unixMakefile_testProject/Tutorial/Step2/mac_um/MathFunctions/CMakeFiles/MathFunctions.dir/DependInfo.cmake
--color=
make -f MathFunctions/CMakeFiles/MathFunctions.dir/build.make
MathFunctions/CMakeFiles/MathFunctions.dir/build
make[2]: Nothing to be done for
`MathFunctions/CMakeFiles/MathFunctions.dir/build'.
"/Applications/CMake 2.8-5.app/Contents/bin/cmake" -E cmake_progress_report
/Volumes/amm-er/gmp/Projects/_shared/cmake_unixMakefile_testProject/Tutorial/Step2/mac_um/CMakeFiles
 1
[ 50%] Built target MathFunctions
make -f CMakeFiles/Tutorial.dir/build.make CMakeFiles/Tutorial.dir/depend
cd
/Volumes/amm-er/gmp/Projects/_shared/cmake_unixMakefile_testProject/Tutorial/Step2/mac_um
&& "/Applications/CMake 2.8-5.app/Contents/bin/cmake" -E cmake_depends "Unix
Makefiles"
/Volumes/amm-er/gmp/Projects/_shared/cmake_unixMakefile_testProject/Tutorial/Step2
/Volumes/amm-er/gmp/Projects/_shared/cmake_unixMakefile_testProject/Tutorial/Step2
/Volumes/amm-er/gmp/Projects/_shared/cmake_unixMakefile_testProject/Tutorial/Step2/mac_um
/Volumes/amm-er/gmp/Projects/_shared/cmake_unixMakefile_testProject/Tutorial/Step2/mac_um
/Volumes/amm-er/gmp/Projects/_shared/cmake_unixMakefile_testProject/Tutorial/Step2/mac_um/CMakeFiles/Tutorial.dir/DependInfo.cmake
--color=
make -f CMakeFiles/Tutorial.dir/build.make CMakeFiles/Tutorial.dir/build
Linking CXX executable Tutorial
"/Applications/CMake 2.8-5.app/Contents/bin/cmake" -E cmake_link_script
CMakeFiles/Tutorial.dir/link.txt --verbose=1
/usr/bin/c++    -Wl,-search_paths_first -Wl,-headerpad_max_install_names  
CMakeFiles/Tutorial.dir/tutorial.cxx.o  -o Tutorial 
MathFunctions/libMathFunctions.a 
ld: in MathFunctions/libMathFunctions.a, file too small for architecture x86_64
collect2: ld returned 1 exit status
make[2]: *** [Tutorial] Error 1
make[1]: *** [CMakeFiles/Tutorial.dir/all] Error 2
make: *** [all] Error 2
mac151:mac_um gmp$ 



When I copy the project to my local harddrive, the output is the following:

mac151:mac_um gmp$ cmake -G"Unix Makefiles" ..
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/gmp/tmp2/Tutorial/Step2/mac_um
mac151:mac_um gmp$ make VERBOSE=1
"/Applications/CMake 2.8-5.app/Contents/bin/cmake"
-H/Users/gmp/tmp2/Tutorial/Step2 -B/Users/gmp/tmp2/Tutorial/Step2/mac_um
--check-build-system CMakeFiles/Makefile.cmake 0
"/Applications/CMake 2.8-5.app/Contents/bin/cmake" -E cmake_progress_start
/Users/gmp/tmp2/Tutorial/Step2/mac_um/CMakeFiles
/Users/gmp/tmp2/Tutorial/Step2/mac_um/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make -f MathFunctions/CMakeFiles/MathFunctions.dir/build.make
MathFunctions/CMakeFiles/MathFunctions.dir/depend
cd /Users/gmp/tmp2/Tutorial/Step2/mac_um && "/Applications/CMake
2.8-5.app/Contents/bin/cmake" -E cmake_depends "Unix Makefiles"
/Users/gmp/tmp2/Tutorial/Step2 /Users/gmp/tmp2/Tutorial/Step2/MathFunctions
/Users/gmp/tmp2/Tutorial/Step2/mac_um
/Users/gmp/tmp2/Tutorial/Step2/mac_um/MathFunctions
/Users/gmp/tmp2/Tutorial/Step2/mac_um/MathFunctions/CMakeFiles/MathFunctions.dir/DependInfo.cmake
--color=
Dependee
"/Users/gmp/tmp2/Tutorial/Step2/mac_um/MathFunctions/CMakeFiles/MathFunctions.dir/DependInfo.cmake"
is newer than depender
"/Users/gmp/tmp2/Tutorial/Step2/mac_um/MathFunctions/CMakeFiles/MathFunctions.dir/depend.internal".
Dependee
"/Users/gmp/tmp2/Tutorial/Step2/mac_um/MathFunctions/CMakeFiles/CMakeDirectoryInformation.cmake"
is newer than depender
"/Users/gmp/tmp2/Tutorial/Step2/mac_um/MathFunctions/CMakeFiles/MathFunctions.dir/depend.internal".
Scanning dependencies of target MathFunctions
make -f MathFunctions/CMakeFiles/MathFunctions.dir/build.make
MathFunctions/CMakeFiles/MathFunctions.dir/build
"/Applications/CMake 2.8-5.app/Contents/bin/cmake" -E cmake_progress_report
/Users/gmp/tmp2/Tutorial/Step2/mac_um/CMakeFiles 1
[ 50%] Building CXX object
MathFunctions/CMakeFiles/MathFunctions.dir/mysqrt.cxx.o
cd /Users/gmp/tmp2/Tutorial/Step2/mac_um/MathFunctions && /usr/bin/c++   
-I/Users/gmp/tmp2/Tutorial/Step2/mac_um
-I/Users/gmp/tmp2/Tutorial/Step2/MathFunctions    -o
CMakeFiles/MathFunctions.dir/mysqrt.cxx.o -c
/Users/gmp/tmp2/Tutorial/Step2/MathFunctions/mysqrt.cxx
Linking CXX static library libMathFunctions.a
cd /Users/gmp/tmp2/Tutorial/Step2/mac_um/MathFunctions && "/Applications/CMake
2.8-5.app/Contents/bin/cmake" -P
CMakeFiles/MathFunctions.dir/cmake_clean_target.cmake
cd /Users/gmp/tmp2/Tutorial/Step2/mac_um/MathFunctions && "/Applications/CMake
2.8-5.app/Contents/bin/cmake" -E cmake_link_script
CMakeFiles/MathFunctions.dir/link.txt --verbose=1
/usr/bin/ar cr libMathFunctions.a  CMakeFiles/MathFunctions.dir/mysqrt.cxx.o
/usr/bin/ranlib libMathFunctions.a
"/Applications/CMake 2.8-5.app/Contents/bin/cmake" -E cmake_progress_report
/Users/gmp/tmp2/Tutorial/Step2/mac_um/CMakeFiles  1
[ 50%] Built target MathFunctions
make -f CMakeFiles/Tutorial.dir/build.make CMakeFiles/Tutorial.dir/depend
cd /Users/gmp/tmp2/Tutorial/Step2/mac_um && "/Applications/CMake
2.8-5.app/Contents/bin/cmake" -E cmake_depends "Unix Makefiles"
/Users/gmp/tmp2/Tutorial/Step2 /Users/gmp/tmp2/Tutorial/Step2
/Users/gmp/tmp2/Tutorial/Step2/mac_um /Users/gmp/tmp2/Tutorial/Step2/mac_um
/Users/gmp/tmp2/Tutorial/Step2/mac_um/CMakeFiles/Tutorial.dir/DependInfo.cmake
--color=
Dependee
"/Users/gmp/tmp2/Tutorial/Step2/mac_um/CMakeFiles/Tutorial.dir/DependInfo.cmake"
is newer than depender
"/Users/gmp/tmp2/Tutorial/Step2/mac_um/CMakeFiles/Tutorial.dir/depend.internal".
Dependee
"/Users/gmp/tmp2/Tutorial/Step2/mac_um/CMakeFiles/CMakeDirectoryInformation.cmake"
is newer than depender
"/Users/gmp/tmp2/Tutorial/Step2/mac_um/CMakeFiles/Tutorial.dir/depend.internal".
Scanning dependencies of target Tutorial
make -f CMakeFiles/Tutorial.dir/build.make CMakeFiles/Tutorial.dir/build
"/Applications/CMake 2.8-5.app/Contents/bin/cmake" -E cmake_progress_report
/Users/gmp/tmp2/Tutorial/Step2/mac_um/CMakeFiles 2
[100%] Building CXX object CMakeFiles/Tutorial.dir/tutorial.cxx.o
/usr/bin/c++    -I/Users/gmp/tmp2/Tutorial/Step2/mac_um
-I/Users/gmp/tmp2/Tutorial/Step2/MathFunctions    -o
CMakeFiles/Tutorial.dir/tutorial.cxx.o -c
/Users/gmp/tmp2/Tutorial/Step2/tutorial.cxx
Linking CXX executable Tutorial
"/Applications/CMake 2.8-5.app/Contents/bin/cmake" -E cmake_link_script
CMakeFiles/Tutorial.dir/link.txt --verbose=1
/usr/bin/c++    -Wl,-search_paths_first -Wl,-headerpad_max_install_names  
CMakeFiles/Tutorial.dir/tutorial.cxx.o  -o Tutorial 
MathFunctions/libMathFunctions.a 
"/Applications/CMake 2.8-5.app/Contents/bin/cmake" -E cmake_progress_report
/Users/gmp/tmp2/Tutorial/Step2/mac_um/CMakeFiles  2
[100%] Built target Tutorial
"/Applications/CMake 2.8-5.app/Contents/bin/cmake" -E cmake_progress_start
/Users/gmp/tmp2/Tutorial/Step2/mac_um/CMakeFiles 0






====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-08-26 09:47 Patrick Gampp  New Issue                                    
======================================================================




More information about the cmake-developers mailing list