Closed yunkot closed 7 months ago
I have updated the instructions:
-Wno-dev
to CMake
to avoid the spam messages until this is fixed-DCMAKE_INSTALL_PREFIX=$HOME/root
to install wx-config
under $HOME/root/bin
, make sure that this path is in your PATH
environment variable (instructions updated)Unfortunately, I wasn't able to add "$HOME/root/bin" to PATH: msys2 system simply ignores Windows environment PATH variable and uncommenting MSYS2_PATH_TYPE=inherit in msys2.ini doesn't work.
As a workaround for "wx-config-msys", I've used the following command:
cmake .. -DCMAKE_BUILD_TYPE=Release -G"MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=/usr/local
Also, in instructions for building wxWidgets, the make command should be:
mingw32-make -j$(nproc) install
("install" was missing)
After above changes, CodeLite gets built successfully, however, it doesn't run. Initially, when trying to execute it, it complains for missing DLLs such as "wxmsw330u_clang_custom.dll", "libssh.dll", "libc++.dll", etc. After copying these DLLs from corresponding msys2 folders to "bin" folder of CodeLite, there are no more complains, but after running it - nothing happens. As far as I can tell, no log file is generated anywhere, and there is no error message.
P.S. I'm running on Windows 10 22H2, using "UCRT64" version of "msys2".
By the way, I don't seem to have option to re-open this issue. :(
Maybe it isn't clear enough from the docs, but: You should build CodeLite from a MSYS terminal on Windows, not from CMD.
After successfully call to:
mingw32-make -j$(nproc) install
You should run it from the install
directory, a one liner should be:
(mingw32-make -j$(nproc) install && cd install && ./codelite -d /home/$USER/cache)
Note:
the -d /home/$USER/cache
tells CodeLite to read the settings from a different location instead of using the deafult %appdata%\CodeLite
The install
target copies all the missing DLLs you mentioned into the install
folder:
MSYS2 master /home/eran/devl/codelite/build-release/install
$ ls -l *.dll
-rwxr-xr-x 1 eran None 4275200 Mar 4 08:44 codelite.dll
-rwxr-xr-x 1 eran None 1497600 Nov 30 17:30 libc++.dll
-rwxr-xr-x 1 eran None 56037888 Dec 28 14:44 libclang-cpp.dll
-rwxr-xr-x 1 eran None 4786176 Nov 23 23:03 libcrypto-3-x64.dll
-rwxr-xr-x 1 eran None 781824 Mar 4 08:43 libdapcxx.dll
-rwxr-xr-x 1 eran None 213504 Mar 4 08:43 libdatabaselayersqlite.dll
-rwxr-xr-x 1 eran None 38912 Oct 28 2022 libffi-8.dll
-rwxr-xr-x 1 eran None 838656 Jul 20 2023 libhunspell-1.7-0.dll
-rwxr-xr-x 1 eran None 1101312 Feb 19 2023 libiconv-2.dll
-rwxr-xr-x 1 eran None 122894848 Dec 28 14:44 libLLVM-17.dll
-rwxr-xr-x 1 eran None 201728 Nov 2 07:51 liblzma-5.dll
-rwxr-xr-x 1 eran None 8558080 Mar 5 22:09 libplugin.dll
-rwxr-xr-x 1 eran None 1831936 Nov 26 20:48 libsqlite3-0.dll
-rwxr-xr-x 1 eran None 506368 Dec 19 08:50 libssh.dll
-rwxr-xr-x 1 eran None 41984 Nov 30 17:30 libunwind.dll
-rwxr-xr-x 1 eran None 90112 Jan 1 13:33 libwinpthread-1.dll
-rwxr-xr-x 1 eran None 903168 Mar 4 08:43 libwxshapeframework.dll
-rwxr-xr-x 1 eran None 167936 Mar 4 08:43 libwxsqlite3.dll
-rwxr-xr-x 1 eran None 1430016 Dec 17 11:55 libxml2-2.dll
-rwxr-xr-x 1 eran None 1022976 Apr 5 2023 libzstd.dll
-rwxr-xr-x 1 eran None 2983134 May 30 2023 msys-2.0.dll
-rwxr-xr-x 1 eran None 1082798 Jun 6 2022 msys-iconv-2.dll
-rwxr-xr-x 1 eran None 45895 May 14 2022 msys-intl-8.dll
-rwxr-xr-x 1 eran None 18479104 Mar 4 08:42 wxmsw330u_clang_custom.dll
-rwxr-xr-x 1 eran None 110592 Aug 18 2023 zlib1.dll
Using above steps, CodeLite installation fails at "install" target with:
-- Installing: D:/msys64/home/localuser/codelite/build-release/install/svgs/dark-theme/x-close.svg
-- Installing: D:/msys64/home/localuser/codelite/build-release/install/svgs/dark-theme/yml.svg
-- Installing: D:/msys64/home/localuser/codelite/build-release/install/svgs/dark-theme/zip.svg
-- Installing: D:/msys64/home/localuser/codelite/build-release/install/svgs/dark-theme/zoom-button.svg
CMake Error at cmake_install.cmake:108 (file):
file INSTALL cannot find "/clang64/bin/libc++.dll": File exists.
The file does seem to exist:
$ which libc++.dll
/clang64/bin/libc++.dll
I'm using msys2 terminal.
are you running this from within an MSYS terminal?
Delete your CMakeCache.txt
- run it again and try. It should work. It works on 3 different windows machines I have
This is a fresh/new msys2 installation and before executing above I've removed and re-created the whole "build-release" folder, and yes, I'm doing everything from within MSYS terminal. Perhaps there is some extra step you are doing that is not described in instructions, which is missing in my case?
To clarify, I'm building CodeLite as:
git clone https://github.com/eranif/codelite.git
cd codelite
git submodule update --init --recursive --progress
mkdir build-release && cd build-release
cmake .. -DCMAKE_BUILD_TYPE=Release -G"MinGW Makefiles" -DWXWIN=$HOME/root -Wno-dev
mingw32-make -j$(nproc) install
All executed inside MSYS terminal, and installation fails with aforementioned error.
You should have a file name build-release/msys2-environment
what its content?.
The content of the env variables in this file are coming from the environment variable WD
To check that it exists for you, run:
echo $WD
(inside the MSYS terminal)
If it doesn't, try this:
CMaekCache.txt
cmake
like this:build-release/msys2-environment
fileWD=D:/msys64 cmake .. -DCMAKE_BUILD_TYPE=Release -G"MinGW Makefiles" -DWXWIN=$HOME/root -Wno-dev
mingw32-make -j$(nproc) install
Note: a good msys2-environment
file should contain something like this:
export WXWIN=C:/msys64/home/eran/root
export MSYS2_HOME=C:/msys64
After calling "cmake .. -DCMAKE_BUILD_TYPE=Release -G"MinGW Makefiles" -DWXWIN=$HOME/root -Wno-dev" command in an empty "build-release" folder, the contents of "msys2-environment" are:
export WXWIN=D:/msys64/home/localuser/root
export MSYS2_HOME=
"echo $WD" gives an empty string.
Edit: I also tried running "cmake .. -DCMAKE_BUILD_TYPE=Release -G"MinGW Makefiles" -DWXWIN=$HOME/root -DMSYS2_HOME=/d/msys64 -Wno-dev", but this gives a warning of unused variable and doesn't change content of "MSYS2_HOME". After executing "cmake" command, manually editing "msys2-environment" and specifying "MSYS2_HOME" to point to correct path still leads to the same error as above.
Set it locally to installation path of msys
Sorry, I didn't notice "WD=D:/msys64" part before "cmake" in your previous post - this command does produce correct "msys2-environment", resulting in build and installation going successfully. After that, CodeLite can be executed normally from "install" folder, even outside of "msys2" terminal.
It seems that "WD=D:/msys64" part is crucial to enable successful build of CodeLite on Windows. I would suggest to add this to the instructions. Many thanks!
Docs updated + changed the logic in the CMake
files. CodeLite now requires that you set the environment variable MSYS2_BASE
in order for CMake
to succeed
What happened?
I usually use CodeLite on Linux, so this is first time trying to build it on Windows since the monthly build is 4-5 months old now.
I'm using instructions from https://docs.codelite.org/build/build_from_sources. The part of building "wx-config.exe" fails with this:
A better approach would be to put "wx-config.exe" somewhere, where no administrative privileges are required, but instructions say nothing about this. I've manually copied it to the path it wanted to install, added that path to PATH environment variable on Windows. I also noticed that CodeLite itself comes with "wx-config-msys2" submodule, so maybe these steps are no longer necessary?
Instructions also never mention that you have to install "InnoSetup", which seems to also be required. Now, when running CMake command with CodeLite, I'm getting these errors:
It's difficult to judge due a flood of deprecation warnings, but a wild guess tells that wxWidgets is probably not being found correctly, but I have no idea how to fix it.
Version
Self compiled
Operating system
Windows 10
Steps to reproduce
No response
Relevant log output
No response