MSYS2 make install misses dll

CodeLite installation/troubleshooting forum
amwink
CodeLite Enthusiast
Posts: 27
Joined: Mon Jun 08, 2020 4:04 pm
Genuine User: Yes
IDE Question: c++
Contact:

MSYS2 make install misses dll

Post by amwink »

I'm building CodeLite to get WxWidgets working on Windows, and have followed the recipe of setting up MSYS2, downloading and building WxWidgets, wx-config and codelite (all done), and then when I finally do mingw32-make install I get this error:

Code: Select all

CMake Error at cmake_install.cmake:82 (file):
  file INSTALL cannot find "/clang64/bin/libc++.dll": No error.

But that is strange because:

Code: Select all

amwin@LAPTOP-FREGCOJU UCRT64 /usr/local/codelite/build-release
$ ls -la /clang64/bin/libc++.dll
-rwxr-xr-x 1 amwin amwin 1474048 Apr  6 09:10 /clang64/bin/libc++.dll

So the file exists but cannot be copied?
Or does CMake try to copy in the other direction?

What I have now in terms of diagnostics is that during the "make install" bit (if I do that separately):

  1. the sources are (confirmed to have been) built
  2. the script reports: Install configuration: ""
  3. the file build-release/install/wx-config.exe is installed
  4. the directories build-release/install/svgs/light-theme and /build-release/install/svgs/dark-theme are installed
  5. the error message about libc++.dll shows up

and also, in the cmake_install.cmake file it says:

Code: Select all

cmake_install.cmake:   "D:/tools/msys2/usr/local/codelite/build-release/install/libc++.dll")
cmake_install.cmake:  file(INSTALL DESTINATION "D:/tools/msys2/usr/local/codelite/build-release/install" TYPE FILE FILES "/clang64/bin/libc++.dll")

The DLL file in the /clang subdirectory exists, only it has not been copied into the install directory.

Does this look like an error that I can fix myself? Specifically,

  • should the "Install configuration" string be non-empty
  • do the words in capital letters in the CMake file form a command that cannot be executed?
amwink
CodeLite Enthusiast
Posts: 27
Joined: Mon Jun 08, 2020 4:04 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: MSYS2 make install misses dll

Post by amwink »

In the end I got to the last line of the install script by editing the files cmake_install.cmake, CodeFormatter/cmake_install.cmake and LanguageServer/cmake_install.cmake, respectively

and removing the sections (from cmake_install.cmake)

Code: Select all

if(CMAKE_INSTALL_COMPONENT STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT)
  list(APPEND CMAKE_ABSOLUTE_DESTINATION_FILES
   "D:/tools/msys2/usr/local/codelite/build-release/install/libc++.dll")
  if(CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION)
    message(WARNING "ABSOLUTE path INSTALL DESTINATION : ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
  endif()
  if(CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION)
    message(FATAL_ERROR "ABSOLUTE path INSTALL DESTINATION forbidden (by caller): ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
  endif()
  file(INSTALL DESTINATION "D:/tools/msys2/usr/local/codelite/build-release/install" TYPE FILE FILES "/clang64/bin/libc++.dll")
endif()

if(CMAKE_INSTALL_COMPONENT STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT)
  list(APPEND CMAKE_ABSOLUTE_DESTINATION_FILES
   "D:/tools/msys2/usr/local/codelite/build-release/install/libssh.dll")
  if(CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION)
    message(WARNING "ABSOLUTE path INSTALL DESTINATION : ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
  endif()
  if(CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION)
    message(FATAL_ERROR "ABSOLUTE path INSTALL DESTINATION forbidden (by caller): ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
  endif()
  file(INSTALL DESTINATION "D:/tools/msys2/usr/local/codelite/build-release/install" TYPE FILE FILES "/clang64/bin/libssh.dll")
endif()

if(CMAKE_INSTALL_COMPONENT STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT)
  list(APPEND CMAKE_ABSOLUTE_DESTINATION_FILES
   "D:/tools/msys2/usr/local/codelite/build-release/install/libsqlite3-0.dll")
  if(CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION)
    message(WARNING "ABSOLUTE path INSTALL DESTINATION : ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
  endif()
  if(CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION)
    message(FATAL_ERROR "ABSOLUTE path INSTALL DESTINATION forbidden (by caller): ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
  endif()
  file(INSTALL DESTINATION "D:/tools/msys2/usr/local/codelite/build-release/install" TYPE FILE FILES "/clang64/bin/libsqlite3-0.dll")
endif()

if(CMAKE_INSTALL_COMPONENT STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT)
  list(APPEND CMAKE_ABSOLUTE_DESTINATION_FILES
   "D:/tools/msys2/usr/local/codelite/build-release/install/libhunspell-1.7-0.dll")
  if(CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION)
    message(WARNING "ABSOLUTE path INSTALL DESTINATION : ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
  endif()
  if(CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION)
    message(FATAL_ERROR "ABSOLUTE path INSTALL DESTINATION forbidden (by caller): ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
  endif()
  file(INSTALL DESTINATION "D:/tools/msys2/usr/local/codelite/build-release/install" TYPE FILE FILES "/clang64/bin/libhunspell-1.7-0.dll")
endif()

if(CMAKE_INSTALL_COMPONENT STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT)
  list(APPEND CMAKE_ABSOLUTE_DESTINATION_FILES
   "D:/tools/msys2/usr/local/codelite/build-release/install/libunwind.dll")
  if(CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION)
    message(WARNING "ABSOLUTE path INSTALL DESTINATION : ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
  endif()
  if(CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION)
    message(FATAL_ERROR "ABSOLUTE path INSTALL DESTINATION forbidden (by caller): ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
  endif()
  file(INSTALL DESTINATION "D:/tools/msys2/usr/local/codelite/build-release/install" TYPE FILE FILES "/clang64/bin/libunwind.dll")
endif()

if(CMAKE_INSTALL_COMPONENT STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT)
  list(APPEND CMAKE_ABSOLUTE_DESTINATION_FILES
   "D:/tools/msys2/usr/local/codelite/build-release/install/msys-intl-8.dll")
  if(CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION)
    message(WARNING "ABSOLUTE path INSTALL DESTINATION : ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
  endif()
  if(CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION)
    message(FATAL_ERROR "ABSOLUTE path INSTALL DESTINATION forbidden (by caller): ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
  endif()
  file(INSTALL DESTINATION "D:/tools/msys2/usr/local/codelite/build-release/install" TYPE FILE FILES "/usr/bin/msys-intl-8.dll")
endif()

if(CMAKE_INSTALL_COMPONENT STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT)
  list(APPEND CMAKE_ABSOLUTE_DESTINATION_FILES
   "D:/tools/msys2/usr/local/codelite/build-release/install/msys-2.0.dll")
  if(CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION)
    message(WARNING "ABSOLUTE path INSTALL DESTINATION : ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
  endif()
  if(CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION)
    message(FATAL_ERROR "ABSOLUTE path INSTALL DESTINATION forbidden (by caller): ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
  endif()
  file(INSTALL DESTINATION "D:/tools/msys2/usr/local/codelite/build-release/install" TYPE FILE FILES "/usr/bin/msys-2.0.dll")
endif()

if(CMAKE_INSTALL_COMPONENT STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT)
  list(APPEND CMAKE_ABSOLUTE_DESTINATION_FILES
   "D:/tools/msys2/usr/local/codelite/build-release/install/msys-iconv-2.dll")
  if(CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION)
    message(WARNING "ABSOLUTE path INSTALL DESTINATION : ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
  endif()
  if(CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION)
    message(FATAL_ERROR "ABSOLUTE path INSTALL DESTINATION forbidden (by caller): ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
  endif()
  file(INSTALL DESTINATION "D:/tools/msys2/usr/local/codelite/build-release/install" TYPE FILE FILES "/usr/bin/msys-iconv-2.dll")
endif()

if(CMAKE_INSTALL_COMPONENT STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT)
  list(APPEND CMAKE_ABSOLUTE_DESTINATION_FILES
   "D:/tools/msys2/usr/local/codelite/build-release/install/rm.exe")
  if(CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION)
    message(WARNING "ABSOLUTE path INSTALL DESTINATION : ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
  endif()
  if(CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION)
    message(FATAL_ERROR "ABSOLUTE path INSTALL DESTINATION forbidden (by caller): ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
  endif()
  file(INSTALL DESTINATION "D:/tools/msys2/usr/local/codelite/build-release/install" TYPE FILE FILES "/usr/bin/rm.exe")
endif()

if(CMAKE_INSTALL_COMPONENT STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT)
  list(APPEND CMAKE_ABSOLUTE_DESTINATION_FILES
   "D:/tools/msys2/usr/local/codelite/build-release/install/mkdir.exe")
  if(CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION)
    message(WARNING "ABSOLUTE path INSTALL DESTINATION : ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
  endif()
  if(CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION)
    message(FATAL_ERROR "ABSOLUTE path INSTALL DESTINATION forbidden (by caller): ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
  endif()
  file(INSTALL DESTINATION "D:/tools/msys2/usr/local/codelite/build-release/install" TYPE FILE FILES "/usr/bin/mkdir.exe")
endif()

if(CMAKE_INSTALL_COMPONENT STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT)
  list(APPEND CMAKE_ABSOLUTE_DESTINATION_FILES
   "D:/tools/msys2/usr/local/codelite/build-release/install/cp.exe")
  if(CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION)
    message(WARNING "ABSOLUTE path INSTALL DESTINATION : ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
  endif()
  if(CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION)
    message(FATAL_ERROR "ABSOLUTE path INSTALL DESTINATION forbidden (by caller): ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
  endif()
  file(INSTALL DESTINATION "D:/tools/msys2/usr/local/codelite/build-release/install" TYPE FILE FILES "/usr/bin/cp.exe")
endif()

if(CMAKE_INSTALL_COMPONENT STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT)
  list(APPEND CMAKE_ABSOLUTE_DESTINATION_FILES
   "D:/tools/msys2/usr/local/codelite/build-release/install/ls.exe")
  if(CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION)
    message(WARNING "ABSOLUTE path INSTALL DESTINATION : ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
  endif()
  if(CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION)
    message(FATAL_ERROR "ABSOLUTE path INSTALL DESTINATION forbidden (by caller): ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
  endif()
  file(INSTALL DESTINATION "D:/tools/msys2/usr/local/codelite/build-release/install" TYPE FILE FILES "/usr/bin/ls.exe")
endif()

if(CMAKE_INSTALL_COMPONENT STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT)
  list(APPEND CMAKE_ABSOLUTE_DESTINATION_FILES
   "D:/tools/msys2/usr/local/codelite/build-release/install/mv.exe")
  if(CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION)
    message(WARNING "ABSOLUTE path INSTALL DESTINATION : ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
  endif()
  if(CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION)
    message(FATAL_ERROR "ABSOLUTE path INSTALL DESTINATION forbidden (by caller): ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
  endif()
  file(INSTALL DESTINATION "D:/tools/msys2/usr/local/codelite/build-release/install" TYPE FILE FILES "/usr/bin/mv.exe")
endif()

and (from CodeFormatter/cmake_install.cmake)

Code: Select all

if(CMAKE_INSTALL_COMPONENT STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT)
  list(APPEND CMAKE_ABSOLUTE_DESTINATION_FILES
   "D:/tools/msys2/usr/local/codelite/build-release/install/clang-format.exe")
  if(CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION)
    message(WARNING "ABSOLUTE path INSTALL DESTINATION : ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
  endif()
  if(CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION)
    message(FATAL_ERROR "ABSOLUTE path INSTALL DESTINATION forbidden (by caller): ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
  endif()
  file(INSTALL DESTINATION "D:/tools/msys2/usr/local/codelite/build-release/install" TYPE FILE FILES "/clang64/bin/clang-format.exe")
endif()

and (from LanguageServer/cmake_install.cmake)

Code: Select all

if(CMAKE_INSTALL_COMPONENT STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT)
  list(APPEND CMAKE_ABSOLUTE_DESTINATION_FILES
   "D:/tools/msys2/usr/local/codelite/build-release/install/clangd.exe")
  if(CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION)
    message(WARNING "ABSOLUTE path INSTALL DESTINATION : ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
  endif()
  if(CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION)
    message(FATAL_ERROR "ABSOLUTE path INSTALL DESTINATION forbidden (by caller): ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
  endif()
  file(INSTALL DESTINATION "D:/tools/msys2/usr/local/codelite/build-release/install" TYPE FILE FILES "/clang64/bin/clangd.exe")
endif()

.

So this works, but if I run ccmake .. again to generate the Makefiles and scripts, the error comes back.
Seeing this, I'm not sure if the lines I have removed are necessary for a complete installation?

(some of the removed sections, but not all, have another version with windows-style paths -drive letters, etc.)

The executables are in the build-release/bin directory, but nothing has been copied to the install-prefix.
If this is enough to copy everything to a windows environment without MSYS2 then that it is done, right?

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

Re: MSYS2 make install misses dll

Post by eranif »

this is obviously a mix between windows paths and MSYS paths. When install runs it "thinks" it is under windows terminal, where /clang64/bin does not exist, while within the MSYS terminal it does.

This page documents how to build CodeLite for Windows:
https://docs.codelite.org/build/build_f ... s/#windows

Make sure you have read the HOW TO POST thread
amwink
CodeLite Enthusiast
Posts: 27
Joined: Mon Jun 08, 2020 4:04 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: MSYS2 make install misses dll

Post by amwink »

Thanks for that advice. In fact that is the recipe that I had followed.

In the MSYS2 terminal (straight from installing), I run

Code: Select all

$ pacman -Sy git openssh mingw-w64-clang-x86_64-gdb mingw-w64-clang-x86_64-toolchain mingw-w64-clang-x86_64-python3 mingw-w64-clang-x86_64-cmake mingw-w64-clang-x86_64-libffi mingw-w64-clang-x86_64-jq mingw-w64-clang-x86_64-libxml2 unzip
$ echo 'export PATH=/clang64/bin:$PATH' >> ~/.$(basename $SHELL)rc
$ . ~/.$(basename $SHELL)rc
$ cd /tmp
$ wget https://bootstrap.pypa.io/get-pip.py
$ /clang64/bin/python3 /tmp/get-pip.py
$ rm -f /tmp/get-pip.py
 

All fine. But then

Code: Select all

/clang64/bin/python3 -m pip install python-lsp-server --upgrade

gives the error

Code: Select all

  Building wheel for ujson (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for ujson (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [5 lines of output]
      running bdist_wheel
      running build
      running build_ext
      building 'ujson' extension
      error: --plat-name must be one of ('win32', 'win-amd64', 'win-arm32', 'win-arm64')
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for ujson
Failed to build ujson
ERROR: Could not build wheels for ujson, which is required to install pyproject.toml-based projects

This is not a CodeLite error, but could this be why I cannot complete the build/install process?

amwink
CodeLite Enthusiast
Posts: 27
Joined: Mon Jun 08, 2020 4:04 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: MSYS2 make install misses dll

Post by amwink »

In the end I went for the 'lazy' Windows option:

  1. Installed CodeLite via Chocolatey

  2. installed CMake via Chocolatey

  3. installed C++ via WinLibs

  4. downloaded wxWidgets from the wxWidgets website

Then it was relatively easy to build wxWidgets, and all of the 4 items were independent as well.
(the Chocolatey installation mentions that MinGW and wxWidgets are included, but I cannot find them)

Not sure that I followed all the naming conventions (the sources are in C:/ProgramData/wxWidgets-3.2.2.1-src, the Cmake files and the libraries are in C:/ProgramData/wxWidgets-3.2.2.1 -- I had to copy the include files there from the src directory)

Just one more question in this thread, if I may.

I have now set WXWIN and WXCFG as environment variables, and I'm trying to build the simplest wxWidgets program: [New Project] -> [ Catergory: GUI | Type: Executable (wxWidgets enabled) | Compiler: gcc-13.1.0 | Debugger: GNU gdb debugger | Build System: Codelite Makefile Generator ].

Then the compiler options automatically include the call of wx-config, except that does not seem to work as I get an error that <wx/wx.h> cannot be found. Is there anything else required in Windows besides setting the WXWIN and WXCFG environment variables (before starting CodeLite of course)?

Post Reply