CodeLite 12.0.0 crashes when selecting 'Run CMake'

CodeLite installation/troubleshooting forum
_-LC-_
CodeLite Curious
Posts: 4
Joined: Fri May 17, 2019 7:12 pm
Genuine User: Yes
IDE Question: C++
Contact:

CodeLite 12.0.0 crashes when selecting 'Run CMake'

Post by _-LC-_ » Fri May 17, 2019 7:35 pm

Hello, :-)

I'm a new CodeLite user. I built it from source on Linux without any issues.
Trying to continue work on an existing CMake project, I ran into problems. The CMakeLists.txt looks like this:

#####

Code: Select all

cmake_minimum_required( VERSION 3.13 )

set( PROJECT_NAME "ProxydiggerTest" )

project( proxydigger_module )
set( CMAKE_CXX_STANDARD 20 )

set( MY_CONFIG_FOLDER "${CMAKE_SOURCE_DIR}/debug_config_folder" )
set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG_CONFIG_PATH=\\\"${MY_CONFIG_FOLDER}\\\"" )

include_directories( ${CMAKE_SOURCE_DIR}/src )
include_directories( ${CMAKE_SOURCE_DIR}/../config_module/src )
include_directories( ${CMAKE_SOURCE_DIR}/../download_module/src )
include_directories( /usr/local/src/curl/curl/include )

add_executable( ${PROJECT_NAME} test_proxydigger.cpp ../config_module/src/config.cpp ../config_module/src/platform_folders.cpp ../download_module/src/download.cpp ../download_module/src/downloader.cpp ../download_module/src/resolver.cpp src/proxy.cpp src/table_widget.cpp src/table_widget.hpp src/proxydigger_widget.cpp src/proxydigger_widget.hpp src/proxylist_widget.cpp src/proxylist_widget.hpp src/dummydata_proxylist.txt src/url.cpp src/url.hpp src/failure_log.cpp src/failure_log.hpp src/parameter_extractor.cpp src/parameter_extractor.hpp src/test_download.cpp src/test_download.hpp src/download_list_item.cpp src/download_list_item.hpp src/proxy_webpage.cpp src/proxy_webpage.hpp src/testdownload_widget.cpp src/testdownload_widget.hpp src/proxywebpage_widget.cpp src/proxywebpage_widget.hpp )

if( CMAKE_BUILD_TYPE MATCHES "debug" )
    # Dynamicly linked debug version:
    add_compile_options( -ggdb3 )
    set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_GLIBCXX_DEBUG" )
    set( BUILD_SHARED_LIBS ON )
    set( MY_NANA_LINK_OPT "-lnana_d" )
    add_compile_options( -march=native )
elseif( CMAKE_BUILD_TYPE MATCHES "release" )
    # Static release - fast, not portable:
    add_compile_options( -O3 )
    add_compile_options( -march=native )
    set( CMAKE_STATIC_LINKER_FLAGS "-Wl,--as-needed" )
    set( BUILD_SHARED_LIBS OFF )
    set( MY_NANA_LINK_OPT "-lnana_release" )
else( CMAKE_BUILD_TYPE MATCHES "minsizerel" )
    # Static release - minimize size, max portability:
    add_compile_options( -Os )
    add_compile_options( -s )
    set( CMAKE_STATIC_LINKER_FLAGS "-Wl,--as-needed" )
    set( MY_NANA_LINK_OPT "-lnana_release" )
    set( BUILD_SHARED_LIBS OFF )
    add_custom_command( TARGET ${PROJECT_NAME} POST_BUILD WORKING_DIRECTORY ${_dir} COMMAND strip --strip-all ${PROJECT_NAME} )
endif( CMAKE_BUILD_TYPE MATCHES "debug" )

find_library( CURL_LIBRARY NAMES curl HINTS "/usr/local/src/curl" )
set( CMAKE_CXX_STANDARD_LIBRARIES "${MY_NANA_LINK_OPT} -lboost_system -lboost_filesystem -lX11 -lXft -lfontconfig -static-libgcc -static-libstdc++ -pthread -lstdc++fs ${CURL_LIBRARY} -levent -lz -lssl -lcrypto" )
#####

I can simply build from the command-line:

Code: Select all

mkdir build-debug && cd build-debug
cmake .. -DCMAKE_BUILD_TYPE=debug # release or minsizerel
make -j 4
I can't seem to build anything with CodeLite, though. Selecting 'Run CMake', by right-clicking the project, crashes CodeLite (without error, not even on the command-line).
Selecting 'Build Project' or rebuild or whatever, creates an empty folder called 'build-debug' or 'build-release' (but not even 'build-minsizerel'). I've added all three configurations. The debug configuration settings look like this:

Image

Thanks for your help!

User avatar
eranif
CodeLite Plugin
Posts: 5934
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: CodeLite 12.0.0 crashes when selecting 'Run CMake'

Post by eranif » Fri May 17, 2019 8:06 pm

I can't really help you with this issue as it does not reproduce for me.
Can you run CodeLite under debugger? a backtrace could help here
Make sure you have read the HOW TO POST thread

_-LC-_
CodeLite Curious
Posts: 4
Joined: Fri May 17, 2019 7:12 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: CodeLite 12.0.0 crashes when selecting 'Run CMake'

Post by _-LC-_ » Fri May 17, 2019 11:47 pm

- ignore previous content as it's not helpful -
Last edited by _-LC-_ on Sat May 18, 2019 2:16 am, edited 2 times in total.

_-LC-_
CodeLite Curious
Posts: 4
Joined: Fri May 17, 2019 7:12 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: CodeLite 12.0.0 crashes when selecting 'Run CMake'

Post by _-LC-_ » Sat May 18, 2019 2:12 am

Found it (strace). The 'cmake-build-debug' folder already existed (I had used CLion before). This caused the crash. When moving the directory, it created a new one. :-)
Though building fails even then, as it's trying for the directory 'build-debug':
MESSAGE: Entering directory `correct-directory/build-debug'
/bin/sh -c 'make -j4'
----------Building project:[ proxydigger_module - debug ]----------
make: *** No targets specified and no makefile found. Stop.
====0 errors, 0 warnings====

_-LC-_
CodeLite Curious
Posts: 4
Joined: Fri May 17, 2019 7:12 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: CodeLite 12.0.0 crashes when selecting 'Run CMake'

Post by _-LC-_ » Mon May 20, 2019 11:14 am

eranif wrote:
Fri May 17, 2019 8:06 pm
I can't really help you with this issue as it does not reproduce for me.
Can you run CodeLite under debugger? a backtrace could help here
I filed the issue as multiple bugs:
https://github.com/eranif/codelite/issues/2275

Post Reply