Re: [CMake] CMake 2.8.8 : Reproducible Crash in Mac OS X 10.8
Hi, On Wed, Aug 8, 2012 at 7:32 AM, Jerry Krinock wrote: > Hello, > > I have been using CMake for a couple years, invoked from a script, to build > an Xcode project in Mac OS X. Most recently, I have successfully used CMake > 2.8.7 on Mac OS X 10.7. > > Upon upgrading to CMake 2.8.8 and Mac OS X 10.8, CMake crashes raises an > exception and crashes repeatably. > > Crash report follows. Please someone advise how I can start troubleshooting > this. First thing to do is build CMake with debug symbols so you actually get useful information from the crashreport and can possibly link the backtrace back to a part of your CMake code. Another thing is to limit the number of changes, i.e. go back to cmake 2.8.7 on your 10.8 system or try out cmake 2.8.8 on a 10.7. That way you better understand wether the trigger is an OS-change or a CMake version change. The output produced by cmake on the commandline may also be useful, since the exceptions thrown from the STL usually have some kind of error message which is then printed there. I can't imagine right now what kind of logic-error would happen when constructing a std::string, but probably the message tells more. Andreas -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] CMake 2.8.8 : Reproducible Crash in Mac OS X 10.8
Hello, I have been using CMake for a couple years, invoked from a script, to build an Xcode project in Mac OS X. Most recently, I have successfully used CMake 2.8.7 on Mac OS X 10.7. Upon upgrading to CMake 2.8.8 and Mac OS X 10.8, CMake crashes raises an exception and crashes repeatably. Crash report follows. Please someone advise how I can start troubleshooting this. Thank you, Jerry Krinock Process: cmake [33159] Path:/Applications/CMake 2.8-8.app/Contents/bin/cmake Identifier: cmake Version: ??? Code Type: X86-64 (Native) Parent Process: bash [33152] User ID: 501 Date/Time: 2012-08-07 21:42:11.589 -0700 OS Version: Mac OS X 10.8 (12A256) Report Version: 10 Interval Since Last Report: 19678 sec Crashes Since Last Report: 8 Per-App Crashes Since Last Report: 8 Anonymous UUID: 4CA98B01-E05D-4F83-B47A-369B6E08C0D8 Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x, 0x Application Specific Information: terminate called throwing an exception abort() called Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libsystem_kernel.dylib 0x7fff82119d46 __kill + 10 1 libsystem_c.dylib 0x7fff82e28e1c abort + 177 2 libc++abi.dylib 0x7fff8b9b9f87 abort_message + 257 3 libc++abi.dylib 0x7fff8b9b7936 default_terminate() + 28 4 libobjc.A.dylib 0x7fff82135907 _objc_terminate() + 111 5 libc++abi.dylib 0x7fff8b9b7965 safe_handler_caller(void (*)()) + 8 6 libc++abi.dylib 0x7fff8b9b79c0 std::terminate() + 16 7 libc++abi.dylib 0x7fff8b9b8b27 __cxa_throw + 111 8 libstdc++.6.dylib 0x7fff8cf361a7 std::__throw_logic_error(char const*) + 85 9 libstdc++.6.dylib 0x7fff8cf55a63 char* std::string::_S_construct(char const*, char const*, std::allocator const&, std::forward_iterator_tag) + 145 10 libstdc++.6.dylib 0x7fff8cf5ea50 std::basic_string, std::allocator >::basic_string(char const*, std::allocator const&) + 56 11 cmake 0x000100194e0c 0x1 + 1658380 12 cmake 0x0001001a23ff 0x1 + 1713151 13 cmake 0x0001001a2827 0x1 + 1714215 14 cmake 0x000100192a11 0x1 + 1649169 15 cmake 0x00010017b457 0x1 + 1553495 16 cmake 0x0001001843d8 0x1 + 1590232 17 cmake 0x00013b1c 0x1 + 15132 18 cmake 0x00012eaa 0x1 + 11946 19 cmake 0x000129b4 0x1 + 10676 Thread 0 crashed with X86 Thread State (64-bit): rax: 0x rbx: 0x7fff5fbfdb50 rcx: 0x7fff5fbfdb38 rdx: 0x rdi: 0x8187 rsi: 0x0006 rbp: 0x7fff5fbfdb60 rsp: 0x7fff5fbfdb38 r8: 0x0007 r9: 0x001b r10: 0x7fff8211b342 r11: 0x0206 r12: 0x7fff5fbfdc90 r13: 0x r14: 0x7fff8b9cca23 r15: 0x7fff5fbfdb70 rip: 0x7fff82119d46 rfl: 0x0206 cr2: 0x7fff70aa0fe8 Logical CPU: 0 Binary Images: 0x1 -0x1003b3ff7 cmake (???) <4C7BB78B-5097-377E-B509-A56DFCAE034F> /usr/bin/cmake 0x7fff6986a000 - 0x7fff6989e93f dyld (210.2.3) /usr/lib/dyld 0x7fff8089 - 0x7fff808a7fff com.apple.CFOpenDirectory (10.8 - 151.10) <7AB5DF99-4B0D-356E-AA7C-F0A1889A7F01> /System/Library/Frameworks/OpenDirectory.framework/Versions/A/Frameworks/CFOpenDirectory.framework/Versions/A/CFOpenDirectory 0x7fff808af000 - 0x7fff80c0bff7 com.apple.Foundation (6.8 - 945) <0C972F73-0C07-3384-98F2-B176E0289494> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation 0x7fff810e7000 - 0x7fff81144ff7 com.apple.AE (645 - 645) <9C3E54BA-EE6B-3F02-8775-9C4AF40F40CD> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE 0x7fff818d3000 - 0x7fff818e2ff7 libxar.1.dylib (105) <370ED355-E516-311E-BAFD-D80633A84BE1> /usr/lib/libxar.1.dylib 0x7fff818e3000 - 0x7fff81904ff7 libCRFSuite.dylib (33) <736ABE58-8DED-3289-A042-C25AF7AE5B23> /usr/lib/libCRFSuite.dylib 0x7fff81d41000 - 0x7fff81d42ff7 libdnsinfo.dylib (453.16) <38A3E0F4-E34C-3D45-A2C9-4CDE2DF007BD> /usr/lib/system/libdnsinfo.dylib 0x7fff81d71000 - 0x7fff81f5afff com.apple.CoreFoundation (6.8 - 743) <4DAE8487-FAAA-3758-9526-73DB4C42A05A> /System/Library/Frameworks/CoreFoundation.framework/Versio
[CMake] "UTILITY" library?
Hi, I am using include_external_msproject() to add my Intel Threading Building Blocks MSVC project file (that have been converted from VS200x to VS2012 through a script). All is fine, I see the converted project in my solution with no problem. However, when I add the project in the target links of a project, I get the following error: CMake Error at _cmake/NetRushProjectsMacros.cmake:93 (target_link_libraries): Target "tbb" of type UTILITY may not be linked into another target. One may link only to STATIC or SHARED libraries, or to executables with the ENABLE_EXPORTS property set. I have no Idea how to fix this. Any suggestions? I note that I do the same process with google protobuf msvc projects (to see them in my solution) but it doesn't cause any problem at all. So I suppose something is wrong with the conversion or the original project file, but I don't understand at all this error... Thanks for your attention. Klaim / Joël Lamotte. -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] How to compare booleans
EQUAL is meant for exact numeric equal comparison (i.e. -- works with numbers only, not meant to work with booleans) One possibility is: if(_COMPILE_RESULT) set(_COMPILE_RESULT 1) else() set(_COMPILE_RESULT 0) endif() if(SHOULD_COMPILE) set(SHOULD_COMPILE 1) else() set(SHOULD_COMPILE 0) endif() if(_COMPILE_RESULT EQUAL SHOULD_COMPILE) ... Or make new tmp vars if you can't adjust the vars in-the-same-name like that... On Thu, Aug 2, 2012 at 6:49 PM, Rolf Eike Beer wrote: > I have 2 variables that hold boolean values. One is the result of a > try_compile() and the other has the expected outcome. Now I want to check if > the expectation is correct, so I tried: > > if (_COMPILE_RESULT EQUAL SHOULD_COMPILE) > > Which works if both are true or different, but the result is "false" if both > variables are false, too. I played around with expanding the variables or > quoting, but no change. The only way I got the expected result was this: > > if (_COMPILE_RESULT EQUAL SHOULD_COMPILE OR (NOT _COMPILE_RESULT) EQUAL (NOT > SHOULD_COMPILE) > > This is not really what I would have expected. Is there a less ugly way to get > the expected result? > > Eike > -- > -- > > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.cmake.org/mailman/listinfo/cmake -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] "include_directories" help
On Thu, Aug 2, 2012 at 4:09 PM, John L. Poole wrote: > I'm either completely misunderstanding how the CMake command > "include_directories" works > or something in my Windows MinGW/CMake (2.8.8) is not working. > > BACKGROUND: > > http://www.cmake.org/cmake/help/v2.8.8/cmake.html#command:include_directories > specifies: > > "Add the given directories to those the compiler uses to search for include > files." > > I'm working on a project that compiles in Linux and I am trying > to get it to compile on Windows using MinGW. The open source project > is Scribus - a layout program much like Adobe PageMaker and Adobe InDesign. > > The Scribus project uses CMake. > > I've confirmed that in the topmost CMakeLists.txt file of the Scribus source > code, there is the dependency project Cairo [graphics] > and that Cairo has as its destination "include" directory > "/build32/include/cairo" > specified. Moreover, at the end of the CMake Configure, I have a MESSAGE > statement > that displays the value of INCLUDE_DIRECTORIES, and indeed > "/build32/include/cairo" > is therein. > > I added a SET statement, just in case, to the topmost Scribus source > CMakeLists.txt file: > > MESSAGE("Finding CAIRO...") > FIND_PACKAGE(CAIRO) > IF(CAIRO_FOUND) >MESSAGE("CAIRO Library Found OK") > SET(CAIRO_INCLUDE_DIR /local32/include/cairo) > MESSAGE("Setting CAIRO_INCLUDE_DIR = ${CAIRO_INCLUDE_DIR}") > > and the MESSAGE statement duly produces the expected result > at Configure time in the CMake GUI (invoked with "mingw32-make edit_cache"): > >Finding CAIRO... >CAIRO Library Found OK >Setting CAIRO_INCLUDE_DIR = /local32/include/cairo > > Near the very end of the Configure session, > I also print out what the INCLUDE_DIRECTORIES > has just to make sure something has not altered. My understanding > is that INCLUDE_DIRECTORIES is like a hash table that you continue > to append to and that nothing is deleted from it and that it's values > will appear (or made available to?) on the compile command line. > > Here's the code the shows what the value is near the completion of > Configure: > >get_property(inc_dirs DIRECTORY PROPERTY INCLUDE_DIRECTORIES) >message("inc_dirs = ${inc_dirs}") > > and here is the result: > > inc_dirs = > C:/QT/4.8.2/include;C:/QT/4.8.2/include/QtOpenGL;C:/QT/4.8.2/include/QtWebKit;C:/QT/4.8.2/include/QtGui;C:/QT/4.8.2/include/QtXml;C:/QT/4.8.2/include/QtNetwork;C:/QT/4.8.2/include/QtCore;/local32/include/freetype2;C:/MinGW1/build32/scribus32;C:/MinGW1/build32/scribus32/scribus;C:/QT/4.8.2/include/ActiveQt;C:/QT/4.8.2/include/ActiveQt;C:/QT/4.8.2/include/QtDesigner;C:/QT/4.8.2/include/ActiveQt;C:/QT/4.8.2/include/ActiveQt;C:/QT/4.8.2/include/QtDeclarative;C:/QT/4.8.2/include/QtScriptTools;C:/QT/4.8.2/include/QtDBus;C:/QT/4.8.2/include/QtDesigner;C:/QT/4.8.2/include/QtXml;C:/QT/4.8.2/include/QtSql;C:/QT/4.8.2/include/QtOpenGL;C:/QT/4.8.2/include/QtMultimedia;C:/QT/4.8.2/include/QtNetwork;C:/QT/4.8.2/include/phonon;C:/QT/4.8.2/include/QtXmlPatterns;C:/QT/4.8.2/include/QtWebKit;C:/QT/4.8.2/include/QtHelp;C:/QT/4.8.2/include/QtUiTools;C:/QT/4.8.2/include/QtTest;C:/QT/4.8.2/include/QtScript;C:/QT/4.8.2/include/QtSvg;C:/QT/4.8.2/include/Qt3Support;C:/QT/4.8.2/include/QtGui;C:/QT/4 .8.2/include/QtCore;C:/QT/4.8.2/mkspecs/default;C:/QT/4.8.2/include;C:/QT/4.8.2/include/QtCore;/local32/include/cairo;/local32/include;C:/MinGW1/build32/lcms2-2.3/include;C:/MinGW1/local32/include/libxml2;C:/MinGW1/local32/include;C:/MinGW1/local32/bin > > What I am seeing is that although Configure reports the inclusion > of the Cairo "include" directory, the path, nor any of the paths, does not > show up in the > code that ultimately gets compiled. > > QUESTION: How do I specify an include directory path that will appear on > the command line at compilation time? > > EXAMPLES: > The file C:\MinGW1\build32\scribus32\CMakeFiles\build.make has: > == START === > scribus/CMakeFiles/scribusSVN.dir/pageitem.cpp.obj: > C:/MinGW1/build32/scribusSVN/scribus/pageitem.cpp > $(CMAKE_COMMAND) -E cmake_progress_report > C:\MinGW1\build32\scribus32\CMakeFiles $(CMAKE_PROGRESS_786) > @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green > "Building CXX object scribus/CMakeFiles/scribusSVN.dir/pageitem.cpp.obj" > cd /d C:\MinGW1\build32\scribus32\scribus && > C:\MinGW1\mingw32\bin\g++.exe $(CXX_DEFINES) $(CXX_FLAGS) > -DCOMPILE_SCRIBUS_MAIN_APP -o CMakeFiles\scribusSVN.dir\pageitem.cpp.obj -c > C:\MinGW1\build32\scribusSVN\scribus\pageitem.cpp > > scribus/CMakeFiles/scribusSVN.dir/pageitem.cpp.i: cmake_force > @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green > "Preprocessing CXX source to CMakeFiles/scribusSVN.dir/pageitem.cpp.i" > cd /d C:\MinGW1\build32\scribus32\scribus && > C:\MinGW1\mingw32\bin\g++.exe $(CXX_DEFINES) $(CXX_FLAGS) > -DCOMPILE_SCRIBUS_MAIN_APP -E > C:\MinGW1\build32\scribusSVN\scribus\pageitem.cpp > > CMakeFil