MantisBT - CMake
View Issue Details
0013390CMakeCMakepublic2012-07-10 13:002013-01-09 10:56
Daniel Richard G. 
Brad King 
normalminoralways
closedfixed 
PowerPCAIX5.3
CMake 2.8.8 
CMake 2.8.9CMake 2.8.9 
0013390: Tests/Assembler fails to link due to bare library-directory arguments
From http://open.cdash.org/testDetails.php?test=150972074&build=2429333 [^] :

Linking ASM executable HelloAsm
/home/cport/Dashboards/MyTests/CMake-build/bin/cmake -E cmake_link_script CMakeFiles/HelloAsm.dir/link.txt --verbose=1
/usr/bin/gcc -mminimal-toc -O0 CMakeFiles/HelloAsm.dir/main.s.o -o HelloAsm /usr/lib /lib
ld: 0711-168 SEVERE ERROR: Input file: /usr/lib
    Input files must be regular files.
collect2: ld returned 12 exit status
make[1]: *** [HelloAsm] Error 1
make[1]: Leaving directory `/home/cport/Dashboards/MyTests/CMake-build/Tests/Assembler'
make: *** [CMakeFiles/HelloAsm.dir/all] Error 2
make: The error code from the last command is 2.
Stop.


I'm having trouble finding where the "/usr/lib /lib" bit in link.txt is coming from.
No tags attached.
? CMakeASMCompiler.cmake (371) 2012-07-10 14:52
https://public.kitware.com/Bug/file/4389/*
? CMakeCCompiler.cmake (1,718) 2012-07-10 14:52
https://public.kitware.com/Bug/file/4390/CMakeCCompiler.cmake
log CMakeOutput.log (10,577) 2012-07-10 14:52
https://public.kitware.com/Bug/file/4391/CMakeOutput.log
Issue History
2012-07-10 13:00Daniel Richard G.New Issue
2012-07-10 14:41Brad KingNote Added: 0030027
2012-07-10 14:52Daniel Richard G.File Added: CMakeASMCompiler.cmake
2012-07-10 14:52Daniel Richard G.File Added: CMakeCCompiler.cmake
2012-07-10 14:52Daniel Richard G.File Added: CMakeOutput.log
2012-07-10 14:53Daniel Richard G.Note Added: 0030028
2012-07-10 15:14Brad KingNote Added: 0030029
2012-07-10 15:28Daniel Richard G.Note Added: 0030030
2012-07-10 16:00Brad KingNote Added: 0030031
2012-07-10 16:00Brad KingAssigned To => Brad King
2012-07-10 16:00Brad KingStatusnew => resolved
2012-07-10 16:00Brad KingResolutionopen => fixed
2012-08-09 19:44David ColeFixed in Version => CMake 2.8.9
2012-08-09 19:44David ColeTarget Version => CMake 2.8.9
2013-01-09 10:56Robert MaynardNote Added: 0032037
2013-01-09 10:56Robert MaynardStatusresolved => closed

Notes
(0030027)
Brad King   
2012-07-10 14:41   
Please attach CMakeFiles/CMake*Compiler.cmake and CMakeFiles/CMake*.log from that test.
(0030028)
Daniel Richard G.   
2012-07-10 14:53   
Attached.
(0030029)
Brad King   
2012-07-10 15:14   
We need the GNU equivalent to this from XL:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a0bab7ae [^]

Try adding this file:
$ cat Modules/Platform/AIX-GNU-ASM.cmake
include(Platform/AIX-GNU)
__aix_compiler_gnu(ASM)
(0030030)
Daniel Richard G.   
2012-07-10 15:28   
Yep, that did it:

Linking ASM executable HelloAsm
/home/cport/Dashboards/MyTests/CMake-build/bin/cmake -E cmake_link_script CMakeFiles/HelloAsm.dir/link.txt --verbose=1
/usr/bin/gcc CMakeFiles/HelloAsm.dir/main.s.o -o HelloAsm -Wl,-brtl,-bnoipath,-bexpall -Wl,-blibpath:/usr/lib:/lib
make[1]: Leaving directory `/tmp/foo'
/home/cport/Dashboards/MyTests/CMake-build/bin/cmake -E cmake_progress_report /tmp/foo/CMakeFiles 1 2
[100%] Built target HelloAsm
        /home/cport/Dashboards/MyTests/CMake-build/bin/cmake -E cmake_progress_start /tmp/foo/CMakeFiles 0
Target "default_target" is up to date.
Running test command: "/tmp/foo/HelloAsm"
hello assembler world, 1 arguments given
(0030031)
Brad King   
2012-07-10 16:00   
Applied, thanks for testing:

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7755283e [^]
(0032037)
Robert Maynard   
2013-01-09 10:56   
Closing resolved issues that have not been updated in more than 4 months.