No rule to make target '/msys64/mingw64/lib/libqwt-qt5.dll.a'

Discussion about building and installing Elmer
Post Reply
matsuiSL
Posts: 7
Joined: 15 Oct 2022, 02:48
Antispam: Yes

No rule to make target '/msys64/mingw64/lib/libqwt-qt5.dll.a'

Post by matsuiSL »

Hi,

I'm trying to compile the latest dev version of ElmerGUI on Windows.

I've gone through all the steps in the readme (a couple times):

Code: Select all

Windows
Install MSYS from https://www.msys2.org/

Launch MSYS via the "MSYS2 MinGW x64" shortcut.

Download fresh MSYS package databases and upgrade installed packages by running pacman -Syu twice.

Install Elmer MSYS dependencies:

pacman -S --noconfirm --needed base-devel mingw-w64-x86_64-toolchain mingw64/mingw-w64-x86_64-cmake mingw64/mingw-w64-x86_64-openblas mingw64/mingw-w64-x86_64-qt5 mingw64/mingw-w64-x86_64-qwt-qt5 mingw64/mingw-w64-x86_64-nsis git

Get the Elmer source code:

git clone https://github.com/ElmerCSC/elmerfem

Create directories required for building a local Elmer install

mkdir -p bundle_msys2/bin bundle_qt5/bin platforms

Create a build directory for build artifacts

mkdir -p build

Run CMake to prepare the build with executable binaries in an "install" directory. Note that the QWT_INCLUDE_DIR needs to be correctly set to match the MSYS installation location.

cd build

cmake -G "MSYS Makefiles" -DWITH_ELMERGUI:BOOL=TRUE -DWITH_MPI:BOOL=FALSE -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_Fortran_COMPILER=/mingw64/bin/gfortran.exe -DQWT_INCLUDE_DIR=C:/msys64/mingw64/include/qwt-qt5/ -DWIN32:BOOL=TRUE -DCPACK_BUNDLE_EXTRA_WINDOWS_DLLS:BOOL=TRUE ../elmerfem

Build the source code and create a local installation

make install
and everything looks great all the way up to the end, where we start making the actual .exe, and it runs into an error:

Code: Select all

[100%] Building RC object ElmerGUI/Application/CMakeFiles/ElmerGUI.dir/ElmerGUI.rc.obj
[100%] Building CXX object ElmerGUI/Application/CMakeFiles/ElmerGUI.dir/qrc_ElmerGUI.cpp.obj
make[2]: *** No rule to make target '/msys64/mingw64/lib/libqwt-qt5.dll.a', needed by 'ElmerGUI/Application/ElmerGUI.exe'.  Stop.
make[1]: *** [CMakeFiles/Makefile2:24080: ElmerGUI/Application/CMakeFiles/ElmerGUI.dir/all] Error 2
make: *** [Makefile:166: all] Error 2
I've been trying to dig through as to why this going on but I'm not much of an expert when it comes to these things.
  • MSYS2 is installed in the default C:\ directory so I don't think it's that
  • Maybe some qt paths are messed up?
Not sure how to proceed, wondering if this is a common issue?
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: No rule to make target '/msys64/mingw64/lib/libqwt-qt5.dll.a'

Post by kevinarden »

Not sure what MSYS2 is installed in the default C:\ directory means
But in the cmake you said
QWT_INCLUDE_DIR=C:/msys64/mingw64/include/qwt-qt5/

Have you verified that MSYS2 is installed in C:/msys64/mingw64/include/qwt-qt5/
matsuiSL
Posts: 7
Joined: 15 Oct 2022, 02:48
Antispam: Yes

Re: No rule to make target '/msys64/mingw64/lib/libqwt-qt5.dll.a'

Post by matsuiSL »

Yeah I just mean that it is in fact installed in C:/msys64/mingw64/include/qwt-qt5/.

So yes that directory brings up all the files I believe should be in there and found.
Attachments
Screenshot 2022-10-27 132553.png
(247.97 KiB) Not downloaded yet
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: No rule to make target '/msys64/mingw64/lib/libqwt-qt5.dll.a'

Post by kevinarden »

The error specifically means the compiler can't find the file

/msys64/mingw64/lib/libqwt-qt5.dll.a

May be because window systems use back slashes, linux uses forward slashes

C:/msys64/mingw64/include/qwt-qt5/ on Linux

C:\msys64\mingw64\include\qwt-qt5\ on Windows
matsuiSL
Posts: 7
Joined: 15 Oct 2022, 02:48
Antispam: Yes

Re: No rule to make target '/msys64/mingw64/lib/libqwt-qt5.dll.a'

Post by matsuiSL »

Hmm I would be surprised if the file separator is the issue... Windows is pretty ambiguous to that sort of thing nowadays.

And MSYS runs in a Unix-like environment anyway right?

And I was able to run through 99.9% of the rest of the build without issues from the other packages, and those aren't specified any differently.

Rerunning the cmake line though (after a make clean)

Code: Select all

cmake -G "MSYS Makefiles" -DWITH_ELMERGUI:BOOL=TRUE -DWITH_MPI:BOOL=FALSE -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_Fortran_COMPILER=/mingw64/bin/gfortran.exe -DQWT_INCLUDE_DIR=C:/msys64/mingw64/include/qwt-qt5/ -DWIN32:BOOL=TRUE -DCPACK_BUNDLE_EXTRA_WINDOWS_DLLS:BOOL=TRUE ../elmerfem
I did notice a bit of warnings I missed eariler:

Code: Select all

-- Could NOT find Qt3 (missing: QT_QT_LIBRARY QT_INCLUDE_DIR)
CMake was unable to find desired Qt version: 3. Set advanced values QT_QMAKE_EXECUTABLE and QT3_QGLOBAL_H_FILE.
-- ------------------------------------------------
--   BLAS library:   C:/msys64/mingw64/lib/libopenblas.dll.a
--   LAPACK library: C:/msys64/mingw64/lib/libopenblas.dll.a
-- ------------------------------------------------
--   Fortran compiler:        C:/msys64/mingw64/bin/gfortran.exe
--   Fortran flags:            -fallow-argument-mismatch
-- ------------------------------------------------
--   C compiler:              C:/msys64/mingw64/bin/cc.exe
--   C flags:                  -O2 -g -DNDEBUG
-- ------------------------------------------------
--   CXX compiler:            C:/msys64/mingw64/bin/c++.exe
--   CXX flags:                -O2 -g -DNDEBUG
-- ------------------------------------------------
-- ------------------------------------------------
--   Package filename: elmerfem-9.0-dc81ffdd7-20221028_Windows-AMD64
--   Patch version: 9.0-dc81ffdd7
-- Configuring done
Again I'm not super familiar with these things but is this a version issue where it's looking for qt3 when qt5 is what's installed? Not sure how to fix this. For reference, all those paths resolve and those .dll's are there.

Full output:

Code: Select all

-- Checking whether GFortran version >= 4.8 -- yes
CMake Deprecation Warning at cmake/Modules/FindMKL.cmake:2 (CMAKE_MINIMUM_REQUIRED):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.
Call Stack (most recent call first):
  CMakeLists.txt:309 (FIND_PACKAGE)


-- ------------------------------------------------
-- Checking whether C:/msys64/mingw64/bin/gfortran.exe supports PROCEDURE POINTER
-- Checking whether C:/msys64/mingw64/bin/gfortran.exe supports PROCEDURE POINTER -- yes
-- Checking whether C:/msys64/mingw64/bin/gfortran.exe supports CONTIGUOUS
-- Checking whether C:/msys64/mingw64/bin/gfortran.exe supports CONTIGUOUS -- yes
-- Checking whether C:/msys64/mingw64/bin/gfortran.exe supports EXECUTE_COMMAND_LINE
-- Checking whether C:/msys64/mingw64/bin/gfortran.exe supports EXECUTE_COMMAND_LINE -- yes
-- Found 132 modules from C:/msys64/home/usr/elmerfem/fem/src/modules
CMake Deprecation Warning at fem/tests/CMakeLists.txt:2 (CMAKE_MINIMUM_REQUIRED):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- Found 785 tests
CMake Deprecation Warning at elmergrid/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


CMake Deprecation Warning at elmergrid/src/metis-5.1.0/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- checking for thread-local storage - found
--   Building ElmerGUI
-- ------------------------------------------------
CMake Deprecation Warning at ElmerGUI/CMakeLists.txt:1 (CMAKE_MINIMUM_REQUIRED):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- ------------------------------------------------
-- Qt5 Windows packaging
--   [ElmerGUI] Qt5:               1
--   [ElmerGUI] Qt5 Libraries: Qt5::OpenGL Qt5::Xml Qt5::Script Qt5::Gui Qt5::Core
-- ------------------------------------------------
CMake Warning (dev) at C:/msys64/mingw64/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (OpenGL)
  does not match the name of the calling package (Qwt).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  C:/msys64/mingw64/share/cmake/Modules/FindOpenGL.cmake:443 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  ElmerGUI/cmake/Modules/FindQwt.cmake:10 (INCLUDE)
  ElmerGUI/CMakeLists.txt:61 (FIND_PACKAGE)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at C:/msys64/mingw64/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (Qt3) does
  not match the name of the calling package (Qwt).  This can lead to problems
  in calling code that expects `find_package` result variables (e.g.,
  `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  C:/msys64/mingw64/share/cmake/Modules/FindQt3.cmake:213 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  C:/msys64/mingw64/share/cmake/Modules/FindQt.cmake:160 (include)
  ElmerGUI/cmake/Modules/FindQwt.cmake:11 (INCLUDE)
  ElmerGUI/CMakeLists.txt:61 (FIND_PACKAGE)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Could NOT find Qt3 (missing: QT_QT_LIBRARY QT_INCLUDE_DIR)
CMake was unable to find desired Qt version: 3. Set advanced values QT_QMAKE_EXECUTABLE and QT3_QGLOBAL_H_FILE.
--   [ElmerGUI] Qwt:             TRUE
--   [ElmerGUI] QWT_LIBRARY:     /msys64/mingw64/lib/libqwt-qt5.dll.a
--   [ElmerGUI] QWT_INCLUDE_DIR: C:/msys64/mingw64/include/qwt-qt5
-- ------------------------------------------------
CMake Warning (dev) at C:/msys64/mingw64/lib/cmake/Qt5Core/Qt5CoreMacros.cmake:44 (message):
  qt5_use_modules is not part of the official API, and might be removed in Qt
  6.
Call Stack (most recent call first):
  C:/msys64/mingw64/lib/cmake/Qt5Core/Qt5CoreMacros.cmake:434 (_qt5_warn_deprecated)
  ElmerGUI/Application/CMakeLists.txt:216 (QT5_USE_MODULES)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at C:/msys64/mingw64/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (OpenGL)
  does not match the name of the calling package (Qwt).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  C:/msys64/mingw64/share/cmake/Modules/FindOpenGL.cmake:443 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  ElmerGUI/cmake/Modules/FindQwt.cmake:10 (INCLUDE)
  ElmerGUI/cmake/windows_bundle.cmake:38 (FIND_PACKAGE)
  ElmerGUI/CMakeLists.txt:131 (INCLUDE)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at C:/msys64/mingw64/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (Qt3) does
  not match the name of the calling package (Qwt).  This can lead to problems
  in calling code that expects `find_package` result variables (e.g.,
  `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  C:/msys64/mingw64/share/cmake/Modules/FindQt3.cmake:213 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  C:/msys64/mingw64/share/cmake/Modules/FindQt.cmake:160 (include)
  ElmerGUI/cmake/Modules/FindQwt.cmake:11 (INCLUDE)
  ElmerGUI/cmake/windows_bundle.cmake:38 (FIND_PACKAGE)
  ElmerGUI/CMakeLists.txt:131 (INCLUDE)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Could NOT find Qt3 (missing: QT_QT_LIBRARY QT_INCLUDE_DIR)
CMake was unable to find desired Qt version: 3. Set advanced values QT_QMAKE_EXECUTABLE and QT3_QGLOBAL_H_FILE.
-- ------------------------------------------------
--   BLAS library:   C:/msys64/mingw64/lib/libopenblas.dll.a
--   LAPACK library: C:/msys64/mingw64/lib/libopenblas.dll.a
-- ------------------------------------------------
--   Fortran compiler:        C:/msys64/mingw64/bin/gfortran.exe
--   Fortran flags:            -fallow-argument-mismatch
-- ------------------------------------------------
--   C compiler:              C:/msys64/mingw64/bin/cc.exe
--   C flags:                  -O2 -g -DNDEBUG
-- ------------------------------------------------
--   CXX compiler:            C:/msys64/mingw64/bin/c++.exe
--   CXX flags:                -O2 -g -DNDEBUG
-- ------------------------------------------------
-- ------------------------------------------------
--   Package filename: elmerfem-9.0-dc81ffdd7-20221028_Windows-AMD64
--   Patch version: 9.0-dc81ffdd7
-- Configuring done
CMake Warning (dev) in ElmerGUI/Application/CMakeLists.txt:
  Policy CMP0020 is not set: Automatically link Qt executables to qtmain
  target on Windows.  Run "cmake --help-policy CMP0020" for policy details.
  Use the cmake_policy command to set the policy and suppress this warning.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) in ElmerGUI/Application/CMakeLists.txt:
  Policy CMP0020 is not set: Automatically link Qt executables to qtmain
  target on Windows.  Run "cmake --help-policy CMP0020" for policy details.
  Use the cmake_policy command to set the policy and suppress this warning.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) in ElmerGUI/Application/CMakeLists.txt:
  Policy CMP0043 is not set: Ignore COMPILE_DEFINITIONS_<Config> properties.
  Run "cmake --help-policy CMP0043" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) in ElmerGUI/Application/CMakeLists.txt:
  Policy CMP0020 is not set: Automatically link Qt executables to qtmain
  target on Windows.  Run "cmake --help-policy CMP0020" for policy details.
  Use the cmake_policy command to set the policy and suppress this warning.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) in ElmerGUI/Application/CMakeLists.txt:
  Policy CMP0043 is not set: Ignore COMPILE_DEFINITIONS_<Config> properties.
  Run "cmake --help-policy CMP0043" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) in ElmerGUI/Application/CMakeLists.txt:
  Policy CMP0043 is not set: Ignore COMPILE_DEFINITIONS_<Config> properties.
  Run "cmake --help-policy CMP0043" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) in ElmerGUI/Application/CMakeLists.txt:
  Policy CMP0043 is not set: Ignore COMPILE_DEFINITIONS_<Config> properties.
  Run "cmake --help-policy CMP0043" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
Rich_B
Posts: 421
Joined: 24 Aug 2009, 20:18

Re: No rule to make target '/msys64/mingw64/lib/libqwt-qt5.dll.a'

Post by Rich_B »

Hello,

You can fix the qt3 issue easily. When you first run configure with Cmake gui, there will be an entry 'DESIRED_QT_VERSION' with a default value of 3. Every time you run configure, you need to change this value to 5. Also, set 'WITH_QT5' to true. Then when you rerun configure followed by generate, cmake will look for qt5.

Probably there is a way to set the desired settings as part of the command line entry, or you could edit the cmake file.

Rich.
Post Reply