Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error on Linux #9

Closed
emilydolson opened this issue Mar 20, 2023 · 3 comments
Closed

Compilation error on Linux #9

emilydolson opened this issue Mar 20, 2023 · 3 comments

Comments

@emilydolson
Copy link

Hi, I'm reviewing the JOSS paper on this package and I ran into the following compilation error when following the instructions for Linux (Ubuntu >= 21.04) installation. Specifically, this occurred when running make:

g++ -c -pipe -O2 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DSOFTWARE_VERSION=\"3.0.0\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CONCURRENT_LIB -DQT_CORE_LIB -I. -I../../../anaconda3/include/qt -I../../../anaconda3/include/qt/QtWidgets -I../../../anaconda3/include/qt/QtGui -I../../../anaconda3/include/qt/QtConcurrent -I../../../anaconda3/include/qt/QtCore -Ibuild -I. -I../../../anaconda3/mkspecs/linux-g++ -o build/main.o main.cpp
In file included from simmanager.h:35,
                 from genomecomparison.h:21,
                 from mainwindow.h:23,
                 from main.cpp:19:
randoms.h:4:10: fatal error: QRandomGenerator: No such file or directory
    4 | #include <QRandomGenerator>

In case it matters, I am running PopOS 22.04.

@RussellGarwood
Copy link
Contributor

Thanks for taking the time to review our paper - we really appreciate your time and input.

This looks like, in this case, the default qmake in your terminal is one in an Anaconda package, and the version of Qt in Anaconda is <5.10 (when QRandomGenerator was introduced). There are, I think, two solutions. Using a fresh clone (or after removing the previous build files from the build directory):

  1. Open the .pro in Qt creator (which can be launched from the menu), under tools->options->kits select the version of Qt that was installed in the earlier part of the instructions for building REvoSim, which will be >5.10, then build by hitting ctrl + R

image

  1. Point the terminal to the qmake that was installed by the Qt packages -
    2a. Run
    dpkg-query -L qt5-qmake
    to find out where the package placed qmake - in my installation, towards the very bottom of the output of this command I see
    /usr/lib/x86_64-linux-gnu/qt5/bin/qmake
    2b. Cd to the source folder (i.e. that with revosim.pro in it)
    2c. Run qmake, specifying the version of qmake from step 2a, in my case
    /usr/lib/x86_64-linux-gnu/qt5/bin/qmake
    2d. Continue following the instructions by running make

I have tested solution 2, which worked, on a machine with Anaconda installed that threw the same error (but which I don't have access to as I am travelling, so can't test number one). If this works, I can add this to the build instructions in the readme. Please do let me know either way!

@emilydolson
Copy link
Author

Solution 2 worked! (I didn't try solution 1) Thanks!

@RussellGarwood
Copy link
Contributor

Great news! I have added a note to reflect this potential issue to the readme, and linked it to this issue (which I'll now close).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants