[cmake-developers] [CMake 0016048]: Segfault on target_link_libraries() with aliased target from another subdirectory
The following issue has been SUBMITTED. == https://public.kitware.com/Bug/view.php?id=16048 == Reported By:arlbranch Assigned To: == Project:CMake Issue ID: 16048 Category: CMake Reproducibility:always Severity: crash Priority: high Status: new == Date Submitted: 2016-04-01 15:22 EDT Last Modified: 2016-04-01 15:22 EDT == Summary:Segfault on target_link_libraries() with aliased target from another subdirectory Description: CMake crashes with a segfault when target_link_libraries is used to add a dependency on an alias of a target that was added in a different subdirectory. Complete Example [branch@fortuna on /dev/pts/1] 1150 ~/repositories/test/cmake_segfault $ cmake --version cmake version 3.5.1 CMake suite maintained and supported by Kitware (kitware.com/cmake). [branch@fortuna on /dev/pts/1] 1151 ~/repositories/test/cmake_segfault $ ls -lR .: total 12 drwxr-xr-x 2 branch atlsdd 4096 Apr 1 13:37 alib/ drwxr-xr-x 2 branch atlsdd 4096 Apr 1 14:14 blib/ -rw-r--r-- 1 branch atlsdd 98 Apr 1 13:18 CMakeLists.txt ./alib: total 4 -rw-r--r-- 1 branch atlsdd 87 Apr 1 13:24 CMakeLists.txt ./blib: total 4 -rw-r--r-- 1 branch atlsdd 162 Apr 1 13:38 CMakeLists.txt [branch@fortuna on /dev/pts/1] 1152 ~/repositories/test/cmake_segfault $ cat CMakeLists.txt cmake_minimum_required(VERSION 2.8.11) project(top) add_subdirectory(alib) add_subdirectory(blib) [branch@fortuna on /dev/pts/1] 1153 ~/repositories/test/cmake_segfault $ cat alib/CMakeLists.txt add_library(alib alib.c) set_source_files_properties(alib.c PROPERTIES GENERATED TRUE) [branch@fortuna on /dev/pts/1] 1154 ~/repositories/test/cmake_segfault $ cat blib/CMakeLists.txt add_library(blib blib.c) set_source_files_properties(blib.c PROPERTIES GENERATED TRUE) add_library(alib::alib ALIAS alib) target_link_libraries(blib alib::alib) [branch@fortuna on /dev/pts/1] 1155 ~/repositories/test/cmake_segfault $ mkdir build && cd build [branch@fortuna on /dev/pts/1] 1156 ~/repositories/test/cmake_segfault/build $ cmake .. -- The C compiler identification is GNU 5.3.0 -- The CXX compiler identification is GNU 5.3.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - 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 -- Detecting CXX compile features -- Detecting CXX compile features - done Segmentation fault (core dumped) Steps to Reproduce: 1) create the project in the Description 2) run cmake against it Additional Information: Also seen on MacOS. This is a regression, cmake 3.4 does not crash. == Issue History Date ModifiedUsername FieldChange == 2016-04-01 15:22 arlbranch New Issue == -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
[cmake-developers] [CMake 0016047]: automoc generates wrong #includes for projects in a symlinked path
The following issue has been SUBMITTED. == https://cmake.org/Bug/view.php?id=16047 == Reported By:Maurizio Paolini Assigned To: == Project:CMake Issue ID: 16047 Category: CMake Reproducibility:always Severity: major Priority: normal Status: new == Date Submitted: 2016-04-01 13:36 EDT Last Modified: 2016-04-01 13:36 EDT == Summary:automoc generates wrong #includes for projects in a symlinked path Description: project "kig" uses cmake and automoc. My local copy of the git sources are located in a folder that I reach following a symlink (it resides in a local partition whereas my home is on an NFS-mounted filesystem). after a cmake and then a "make", the generated "moc*" files contain an "#include" like this: #include "../../../../../misc/euclide/paolini/Git/kdeedu/kig/modes/popup/popup.h" There is a wrong number of ".." and the path does not work. using "make VERBOSE=1 kigpart_automoc" it turns out that the following command is issued: /usr/lib/qt5/bin/moc -I/home/matem/paolini/Git/kdeedu/kig/modes [...] -o /home/matem/paolini/Git/kdeedu/kig/moc_popup.cpp /home/misc/euclide/paolini/Git/kdeedu/kig/modes/popup/popup.h where the [...] part contains many more -I and various options. Notice that "/home/matem/paolini/Git/" and "/home/misc/euclide/paolini/Git/" point to the same place, the first through the symlink "Git", the second is the physical path. I guess that then "moc" tries hard to walk (with a relative path) from one path to the other, but there is no way to successfully climb up a path with a symlink in it using the ".." directory. This problem was previously reported in the QT bug tracker https://bugreports.qt.io/browse/QTBUG-51964 Steps to Reproduce: $ mkdir -p a/b $ ln -s a/b a.lnk $ cd a.lnk $ $ cd $ cmake . [...] $ make == Issue History Date ModifiedUsername FieldChange == 2016-04-01 13:36 Maurizio PaoliniNew Issue == -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] Fix for re-running FindPythonLibs with multiple configurations
On 03/31/2016 10:31 PM, Richard Christie wrote: > So I've attached an improved fix, which is much simpler: > it determines whether PYTHON_LIBRARY is a list and extracts > the optimized library out of it. Thanks. Please try this code instead: # If we ran before and reported multiple configurations then PYTHON_LIBRARY # is a list "optimized;PYTHON_LIBRARY;debug;PYTHON_LIBRARY_DEBUG". Extract # the original value so we can re-construct the list properly later. if(";${PYTHON_LIBRARY};" MATCHES ";optimized;([^;]+);") set(PYTHON_LIBRARY "${CMAKE_MATCH_1}") endif() Thanks, -Brad -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] [PATCH v2] ExternalProject: Allow TLS_VERIFY for git clones
On Fri, Apr 01, 2016 at 15:39:26 +0100, Samir Benmendil wrote: > Use the git config `http.sslVerify=false` to disable strict ssl for git > commands. > --- > Changes in v2: > - git_options is now a list Thanks. I've pushed this into next for testing. --Ben -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] [PATCH] language detection in FindBLAS and FindLAPACK (#0016039)
Am Freitag, 1. April 2016, 16:20:10 schrieb Nils Gladitz: > On 04/01/2016 02:44 PM, melven.roehrig-zoell...@dlr.de wrote: > > Patch for a problem with find_package(BLAS/LAPACK) on Windows for pure > > Fortran projects reported by me in > > https://cmake.org/Bug/view.php?id=16039. > This might be a use case for the newish IN_LIST operator? > > e.g. if(Fortran IN_LIST _LANGUAGES_) Why not simply: if (CMAKE_Fortran_COMPILER_LOADED) Greetings, Eike signature.asc Description: This is a digitally signed message part. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] [PATCH] language detection in FindBLAS and FindLAPACK (#0016039)
On Fri, Apr 01, 2016 at 16:20:10 +0200, Nils Gladitz wrote: > This might be a use case for the newish IN_LIST operator? > > e.g. if(Fortran IN_LIST _LANGUAGES_) How have I missed this‽ *goes and makes minimum version of all CMake projects 3.3* ;) --Ben -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
[cmake-developers] [PATCH v2] ExternalProject: Allow TLS_VERIFY for git clones
Use the git config `http.sslVerify=false` to disable strict ssl for git commands. --- Changes in v2: - git_options is now a list Modules/ExternalProject.cmake | 23 +-- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index 1185a81..8d8382f 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -499,7 +499,7 @@ define_property(DIRECTORY PROPERTY "EP_UPDATE_DISCONNECTED" INHERITED "ExternalProject module." ) -function(_ep_write_gitclone_script script_filename source_dir git_EXECUTABLE git_repository git_tag git_remote_name git_submodules src_name work_dir gitclone_infofile gitclone_stampfile) +function(_ep_write_gitclone_script script_filename source_dir git_EXECUTABLE git_repository git_tag git_remote_name git_submodules src_name work_dir gitclone_infofile gitclone_stampfile tls_verify) file(WRITE ${script_filename} "if(\"${git_tag}\" STREQUAL \"\") message(FATAL_ERROR \"Tag for git checkout should not be empty.\") @@ -524,12 +524,18 @@ if(error_code) message(FATAL_ERROR \"Failed to remove directory: '${source_dir}'\") endif() +set(git_options) +if(NOT tls_verify) + list(APPEND git_options +-c http.sslVerify=false) +endif() + # try the clone 3 times incase there is an odd git clone issue set(error_code 1) set(number_of_tries 0) while(error_code AND number_of_tries LESS 3) execute_process( -COMMAND \"${git_EXECUTABLE}\" clone --origin \"${git_remote_name}\" \"${git_repository}\" \"${src_name}\" +COMMAND \"${git_EXECUTABLE}\" \${git_options} clone --origin \"${git_remote_name}\" \"${git_repository}\" \"${src_name}\" WORKING_DIRECTORY \"${work_dir}\" RESULT_VARIABLE error_code ) @@ -544,7 +550,7 @@ if(error_code) endif() execute_process( - COMMAND \"${git_EXECUTABLE}\" checkout ${git_tag} + COMMAND \"${git_EXECUTABLE}\" \${git_options} checkout ${git_tag} WORKING_DIRECTORY \"${work_dir}/${src_name}\" RESULT_VARIABLE error_code ) @@ -553,7 +559,7 @@ if(error_code) endif() execute_process( - COMMAND \"${git_EXECUTABLE}\" submodule init ${git_submodules} + COMMAND \"${git_EXECUTABLE}\" \${git_options} submodule init ${git_submodules} WORKING_DIRECTORY \"${work_dir}/${src_name}\" RESULT_VARIABLE error_code ) @@ -562,7 +568,7 @@ if(error_code) endif() execute_process( - COMMAND \"${git_EXECUTABLE}\" submodule update --recursive ${git_submodules} + COMMAND \"${git_EXECUTABLE}\" \${git_options} submodule update --recursive ${git_submodules} WORKING_DIRECTORY \"${work_dir}/${src_name}\" RESULT_VARIABLE error_code ) @@ -1777,6 +1783,11 @@ function(_ep_add_download_command name) set(git_remote_name "origin") endif() +get_property(tls_verify TARGET ${name} PROPERTY _EP_TLS_VERIFY) +if(NOT tls_verify) + set(tls_verify OFF) +endif() + # For the download step, and the git clone operation, only the repository # should be recorded in a configured RepositoryInfo file. If the repo # changes, the clone script should be run again. But if only the tag @@ -1801,7 +1812,7 @@ function(_ep_add_download_command name) # _ep_write_gitclone_script(${tmp_dir}/${name}-gitclone.cmake ${source_dir} ${GIT_EXECUTABLE} ${git_repository} ${git_tag} ${git_remote_name} "${git_submodules}" ${src_name} ${work_dir} - ${stamp_dir}/${name}-gitinfo.txt ${stamp_dir}/${name}-gitclone-lastrun.txt + ${stamp_dir}/${name}-gitinfo.txt ${stamp_dir}/${name}-gitclone-lastrun.txt ${tls_verify} ) set(comment "Performing download step (git clone) for '${name}'") set(cmd ${CMAKE_COMMAND} -P ${tmp_dir}/${name}-gitclone.cmake) -- 2.8.0 -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] [PATCH] ExternalProject: Allow TLS_VERIFY for git clones
On Fri, Apr 01, 2016 at 10:58:50 +0100, Samir Benmendil wrote: > +# set git_options > +if(NOT tls_verify) > + set(git_options -c http.sslVerify=false) > +endif() Looks good overall, but could this be turned into a pattern like: set(git_options) if (NOT tls_verify) list(APPEND git_options -c http.sslVerify=false) endif () to help out future options which might make sense? Thanks, --Ben -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] [PATCH] language detection in FindBLAS and FindLAPACK (#0016039)
On Fri, Apr 01, 2016 at 12:44:29 +, melven.roehrig-zoell...@dlr.de wrote: > Patch for a problem with find_package(BLAS/LAPACK) on Windows for pure > Fortran projects reported by me in > https://cmake.org/Bug/view.php?id=16039. Thanks. My patch looks similar (differs in variable names basically), but I hadn't gotten around to testing it. --Ben -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
[cmake-developers] [CMake 0016046]: GHS Multi Generator: duplicate object file names
The following issue has been SUBMITTED. == https://cmake.org/Bug/view.php?id=16046 == Reported By:stw_sesa Assigned To: == Project:CMake Issue ID: 16046 Category: CMake Reproducibility:always Severity: minor Priority: normal Status: new == Date Submitted: 2016-04-01 08:56 EDT Last Modified: 2016-04-01 08:56 EDT == Summary:GHS Multi Generator: duplicate object file names Description: When a target contains multiple files with the same name (in different (sub)folders) the generated object files will have the same names too. Normally this isn't a problem at all, but for GHS MULTI it is as the duplicates are ignored. Steps to Reproduce: Create a project with a target containing at least two files with the same name like this: add_library(libdemo test.c subfolder/test.c ) Expected result: The library contains both test.o and subfolder/test.o Actual result: Only one of these source files is compiled and archived in the library due to their name equality. A sample project is attached, that will build successfully using other C project generators (e.g Makefile), but won't when using GHS MULTI toolchain. Additional Information: This could also be either a bug in MULTI Project Manager or intended behaviour. However, from the CMake perspective the results are unexpected. A workaround for the generator would be to rename the generated object file by emitting a unique object file name with the option "-o .o" in the generated project files (.gpj). Is there any CMake workaround? (which doesn't require changing CMake itself) Maybe there is an project file option that changes that behaviour? == Issue History Date ModifiedUsername FieldChange == 2016-04-01 08:56 stw_sesa New Issue 2016-04-01 08:56 stw_sesa File Added: dup_objname_test.zip == -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
[cmake-developers] [PATCH] language detection in FindBLAS and FindLAPACK (#0016039)
Patch for a problem with find_package(BLAS/LAPACK) on Windows for pure Fortran projects reported by me in https://cmake.org/Bug/view.php?id=16039. Regards, Melven -- Deutsches Zentrum für Luft- und Raumfahrt e.V. (DLR) German Aerospace Center Simulation and Software Technology | Linder Hoehe | 51147 Cologne | Germany Melven Röhrig-Zöllner Telephone +492203 / 601 - 2574 www.DLR.de 0001-Fix-for-pure-Fortran-projects-with-BLAS-LAPACK-00160.patch Description: 0001-Fix-for-pure-Fortran-projects-with-BLAS-LAPACK-00160.patch -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
[cmake-developers] [CMake 0016044]: cmake crashed with SIGSEGV in cmTarget::GetProperty()
The following issue has been SUBMITTED. == https://cmake.org/Bug/view.php?id=16044 == Reported By:Gianfranco Assigned To: == Project:CMake Issue ID: 16044 Category: CMake Reproducibility:have not tried Severity: crash Priority: high Status: new == Date Submitted: 2016-04-01 05:57 EDT Last Modified: 2016-04-01 05:57 EDT == Summary:cmake crashed with SIGSEGV in cmTarget::GetProperty() Description: https://bugs.launchpad.net/ubuntu/+source/cmake/+bug/1564741 As reported on the Ubuntu bug, the culprit seems to be commit a67231ac114235f0af4673235c4c07fa896c8ab6. == Issue History Date ModifiedUsername FieldChange == 2016-04-01 05:57 Gianfranco New Issue == -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers