asl / BandageNG

a Bioinformatics Application for Navigating De novo Assembly Graphs Easily
GNU General Public License v3.0
116 stars 10 forks source link

Qt and CMake related issues #118

Closed Overcraft90 closed 2 years ago

Overcraft90 commented 2 years ago

Hi there,

I've been using the original Bandage without any major issue. However, I've been recommended to try this new version as it can handle the GFAv1.2 format.

For some reason, after following the Building from source the command cmake .. returns this error message:

-- The CXX compiler identification is GNU 11.2.0 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done CMake Error at CMakeLists.txt:13 (find_package): By not providing "FindQt6.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Qt6", but CMake did not find one.

Could not find a package configuration file provided by "Qt6" with any of the following names:

Qt6Config.cmake
qt6-config.cmake

Add the installation prefix of "Qt6" to CMAKE_PREFIX_PATH or set "Qt6_DIR" to a directory containing one of the above files. If "Qt6" provides a separate development package or SDK, be sure it has been installed.

-- Configuring incomplete, errors occurred! See also "/home/mat/BandageNG-2022.08/build/CMakeFiles/CMakeOutput.log".

This prevents me from using the tool..., the strange things is that I have Qt v6.3.1 but the error mention something related to the impossibility in finding the corresponding building package/s. Any idea on how to fix this? Thanks in advance!

asl commented 2 years ago

Hello

How have you installed Qt6?

paoloczi commented 2 years ago

Or you could just download a pre-built release instead of attempting to build it yourself. The AppImage format is highly portable.

Overcraft90 commented 2 years ago

Yes I did, I have both Qt Creator and Qt Maintenance Tool; is there any way I can check what version of Qt my system is using.

After running qtdiag it seems like Qt v5.15.3 is running but I specifically downloaded and installed Qt v6.3.1, see below: Screenshot from 2022-09-06 13-44-45

asl commented 2 years ago

but I specifically downloaded and installed Qt v6.3.1, see below:

But how exactly have you installed it? Simply having Qt Creator in some random place will not help. You need to ensure that your Qt installation is "visible" to other tools such as cmake, etc.. The best way to achieve this is to install via your system package manager, usually they do everything correct.

If nothing works, I would suggest you to simply use pre-built binaries that we're providing with every release.

Overcraft90 commented 2 years ago

Indeed, as @paoloczi suggested, I downloaded and tried out the AppImage. It works perfectly, I was confused by the format and looked for a .deb file of some sort to run in Ubuntu. Thanks again, I will try to install Qt6 through the system package manager so that is visible for apps invoking it.

asl commented 2 years ago

Please reopen if this would still be an issue

Overcraft90 commented 2 years ago

Hi again,

I faced an error while running the make command. At about 86% it returns the following:

In file included from /home/mat/BandageNG/io/gfa.cpp:18: /home/mat/BandageNG/io/gfa.h: In constructor ‘gfa::gaplink::gaplink(std::string_view, std::string_view, std::string_view, std::string_view, std::vector)’: /home/mat/BandageNG/io/gfa.h:140:54: error: incomplete type ‘std::numeric_limits’ used in nested name specifier 140 | distance{std::numeric_limits::min()}, | ^~~ /home/mat/BandageNG/io/gfa.h:140:15: error: cannot convert ‘’ to ‘int64_t’ {aka ‘long int’} in initialization 140 | distance{std::numeric_limits::min()}, | ^~~~~~~~~~~~~ make[2]: [CMakeFiles/BandageIo.dir/build.make:90: CMakeFiles/BandageIo.dir/io/gfa.cpp.o] Error 1 make[1]: [CMakeFiles/Makefile2:256: CMakeFiles/BandageIo.dir/all] Error 2 make: *** [Makefile:146: all] Error 2

It looks like is something related to the handling/definition of some numeric variables, but I'm not able to figure out how/what to do in order to fix it..., let me know. Thanks!

asl commented 2 years ago

@Overcraft90 Likely some header is missed. We will fix in the next release.

Overcraft90 commented 2 years ago

Sure, thanks a lot!