View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0013280 | CMake | CMake | public | 2012-06-07 15:44 | 2013-03-04 08:38 | ||||
Reporter | Alex Herrmann | ||||||||
Assigned To | |||||||||
Priority | low | Severity | major | Reproducibility | always | ||||
Status | closed | Resolution | unable to reproduce | ||||||
Platform | Linux | OS | Ubuntu | OS Version | 12.04 | ||||
Product Version | CMake 2.8.7 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0013280: CMake does not detect multi-arch library architecture from hand-built gcc 4.7 | ||||||||
Description | Hello, I just built gcc-4.7 in my /opt/ directory, and I would like to cmake to compile using those binaries. However, whenever I specify the C and CXX compiler with -D or set() commands, it always complains about it not being able to find anything. | ||||||||
Steps To Reproduce | Specify CMAKE_C_COMPILER and CMAKE_CXX_COMPILER, and try to find() something. More specifically for me include(FindPNG) or include(FindJPEG), nothing like this works. | ||||||||
Additional Information | I have a feeling this isn't a bug, and I've tried setting just about variable I can think to right this, but until this is fixed, my software is much less portable. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | build.tar.gz [^] (1,075 bytes) 2012-06-15 13:34 cmakebuild.tar.gz [^] (15,448 bytes) 2012-06-16 14:36 | ||||||||
Relationships | ||||||
|
Relationships |
Notes | |
(0029640) Brad King (manager) 2012-06-07 17:06 |
What is your full cmake command line and what is its full output? If ABI detection fails then CMake does not know where to search in Ubuntu's multi-arch /usr/lib/<arch> layout. Look at CMakeFiles/CMakeError.log for details on why it fails. |
(0029641) Alex Herrmann (reporter) 2012-06-07 17:51 |
It doesn't error out, the cmake file has a check for the _FOUND variable, and gracefully selects included source for the libraries, but I would like to use system libraries. But in LLVM, it does the same thing, but once it starts building it complains about not being able to find files which are obviously there. Is there a variable to skip ABI checks? |
(0029645) Brad King (manager) 2012-06-08 08:02 |
Phrases like "complains about it not being able to find anything" and "not being able to find files which are obviously there" are far too general to help us diagnose the problem. We really need to see the full cmake command line you're running and its output, please. |
(0029655) Alex Herrmann (reporter) 2012-06-08 16:23 |
here is the output with cmake .. &> normal.log : -- The C compiler identification is GNU -- The CXX compiler identification is GNU -- 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 -- 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 -- Found ZLIB: /usr/lib/i386-linux-gnu/libz.so (found version "1.2.3.4") -- Boost version: 1.49.0 -- Found the following Boost libraries: -- iostreams -- Configuring done -- Generating done -- Build files have been written to: /home/alex/repo/mine/herrmanncode/codez/c++/boosty/build here it is with cmake ../ -DCMAKE_C_COMPILER=/opt/gcc-4.7/bin/gcc -DCMAKE_CXX_COMPILER=/opt/gcc-4.7/bin/g++ &> mycompiler.log : -- The C compiler identification is GNU -- The CXX compiler identification is GNU -- Check for working C compiler: /opt/gcc-4.7/bin/gcc -- Check for working C compiler: /opt/gcc-4.7/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /opt/gcc-4.7/bin/g++ -- Check for working CXX compiler: /opt/gcc-4.7/bin/g++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:91 (MESSAGE): Could NOT find ZLIB (missing: ZLIB_LIBRARY) (found version "1.2.3.4") Call Stack (most recent call first): /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:252 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake-2.8/Modules/FindZLIB.cmake:85 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) CMakeLists.txt:4 (find_package) -- Configuring incomplete, errors occurred! |
(0029658) Brad King (manager) 2012-06-11 09:02 |
Thanks. Please also attach a tarball of the CMakeFiles subdirectory from the top of the build tree in the case that fails. |
(0029706) Alex Herrmann (reporter) 2012-06-15 13:35 |
Alright, It's up, you just need to specify your own compiler. I did build gcc-4.7 with some wierd multi-arch stuff, would that change anything? |
(0029707) Brad King (manager) 2012-06-15 13:49 |
Re 0013280:0029706: Thanks for the minimal source tree, but that is not what I asked for. If you create a build tree in a fresh directory using this source tree, there will be a subdirectory created named literally "CMakeFiles". That directory is what I'd like to see in a tarball. |
(0029710) Alex Herrmann (reporter) 2012-06-16 14:36 edited on: 2012-06-16 14:37 |
There you go, sorry about the confusion (I'm kind of a CMake Noob). At least CMake is easy to learn & use! |
(0029714) Brad King (manager) 2012-06-18 08:12 |
Re 0013280:0029710: Thanks. The CMakeFiles/CMakeOutput.log contains a section headed "Detecting C compiler ABI info compiled with the following output" and below that information about the options the compiler front-end passes to the linker under the hood. The results are reported in CMakeFiles/CMakeCCompiler.cmake, and yours has: SET(CMAKE_LIBRARY_ARCHITECTURE "") SET(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "/opt/gcc-4.7/lib/gcc/i686-pc-linux-gnu/4.7.0;/opt/gcc-4.7/lib") On multi-arch systems CMake depends on the implicit link directories to detect the library architecture. None of the directories configured for this compiler refers to any "/usr/lib/<arch>" so CMake fails to detect the library architecture in use. Once that fails it has no way to know where to look for libraries that match the target architecture. How was this gcc 4.7 built? |
(0029736) Alex Herrmann (reporter) 2012-06-18 18:07 |
It originally didn't build because of the Multi-Arch stuff, because of the way it was layed out, It couldn't find the include files it needed for the build, so being the super smart guy I am, I just said: "well hey! why not symlink i386-linux-gnu to i686-linux-gnu" I should't run in to any problems right? wrong...... That's probably the reason I'm screwed up right now huh? |
(0029741) Brad King (manager) 2012-06-19 09:06 |
Re 0013280:0029736: I suspect adding the symlink only covered up one symptom of an incorrectly configured compiler installation. Please visit an Ubuntu, GCC, or other appropriate mailing list for help installing gcc 4.7 on a multiarch system. |
(0032437) Robert Maynard (manager) 2013-03-04 08:38 |
Closing resolved issues that have not been updated in more than 4 months. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2012-06-07 15:44 | Alex Herrmann | New Issue | |
2012-06-07 17:06 | Brad King | Note Added: 0029640 | |
2012-06-07 17:51 | Alex Herrmann | Note Added: 0029641 | |
2012-06-08 08:02 | Brad King | Note Added: 0029645 | |
2012-06-08 16:23 | Alex Herrmann | Note Added: 0029655 | |
2012-06-11 09:02 | Brad King | Note Added: 0029658 | |
2012-06-13 17:40 | Alex Herrmann | Note Added: 0029691 | |
2012-06-13 17:40 | Alex Herrmann | Note Deleted: 0029691 | |
2012-06-15 13:34 | Alex Herrmann | File Added: build.tar.gz | |
2012-06-15 13:35 | Alex Herrmann | Note Added: 0029706 | |
2012-06-15 13:49 | Brad King | Note Added: 0029707 | |
2012-06-16 14:36 | Alex Herrmann | File Added: cmakebuild.tar.gz | |
2012-06-16 14:36 | Alex Herrmann | Note Added: 0029710 | |
2012-06-16 14:37 | Alex Herrmann | Note Edited: 0029710 | |
2012-06-18 08:12 | Brad King | Note Added: 0029714 | |
2012-06-18 08:13 | Brad King | Summary | setting CMAKE_C_COMPILER and CMAKE_CXX_COMPILER breaks find_package => CMake does not detect multi-arch library architecture from hand-built gcc 4.7 |
2012-06-18 08:14 | Brad King | Relationship added | related to 0012037 |
2012-06-18 18:07 | Alex Herrmann | Note Added: 0029736 | |
2012-06-19 09:06 | Brad King | Note Added: 0029741 | |
2012-06-19 09:06 | Brad King | Status | new => resolved |
2012-06-19 09:06 | Brad King | Resolution | open => unable to reproduce |
2013-03-04 08:38 | Robert Maynard | Note Added: 0032437 | |
2013-03-04 08:38 | Robert Maynard | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |