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

#305 Be able to find and compile the fluid demo with QtCreator #307

Closed
wants to merge 1 commit into from

Conversation

Slesa
Copy link

@Slesa Slesa commented Apr 10, 2020

Pull Request check-list

Please make sure to review and check all of these items:

  • Does the code keep building with this change?
  • Do the unit tests pass with this change?
  • Is the commit message formatted according to CONTRIBUTING.MD?
  • If this change fixes a bug (or a performance problem), is a regression
    test (or a benchmark) included?
  • Is a documentation update included (if this change modifies
    existing APIs, or introduces new ones)

NOTE: these things are not required to open a PR and can be done
afterwards / while the PR is open.

Affected core subsystem(s)

Please provide affected core subsystem(s).

Description of change

Please provide a description of the change here.
Add a screenshot or a screencast if necessary.

@plfiorini
Copy link
Member

Why did you rename the folder. You can already build the demo by default.

@plfiorini plfiorini self-requested a review April 11, 2020 07:28
@Slesa
Copy link
Author

Slesa commented Apr 11, 2020

Well, if I would have been able to build the demo, I wouldn't have created a complete new project.

Second reason: it was the question where the demo app is, you have to search it in src. Whereas the examples are in the root - why have two different concepts?

@plfiorini
Copy link
Member

Well, if I would have been able to build the demo, I wouldn't have created a complete new project.

That is not good engineering, first you should understand the problem.

Second reason: it was the question where the demo app is, you have to search it in src. Whereas the examples are in the root - why have two different concepts?

It's not an example it's a standalone application that is installable.

@plfiorini
Copy link
Member

And the demo is literally built by default.

@Slesa
Copy link
Author

Slesa commented Apr 11, 2020

The problem is, that I check out a completely unknown fresh new project, try to compile it, and it does not work. I did neither change nor remove something. So what do you guess I should do? Go on, try another project?

@plfiorini
Copy link
Member

The problem is, that I check out a completely unknown fresh new project, try to compile it, and it does not work. I did neither change nor remove something. So what do you guess I should do? Go on, try another project?

Open an issue with the error and ask for help maybe.

@Slesa
Copy link
Author

Slesa commented Apr 11, 2020

And the demo is literally built by default.

I know that make install of fluid copies the plugin into the Qt folder. I have no idea where this demo should be.

@Slesa
Copy link
Author

Slesa commented Apr 11, 2020

The problem is, that I check out a completely unknown fresh new project, try to compile it, and it does not work. I did neither change nor remove something. So what do you guess I should do? Go on, try another project?

Open an issue with the error and ask for help maybe.

Like this one?
#305

@plfiorini
Copy link
Member

And the demo is literally built by default.

I know that make install of fluid copies the plugin into the Qt folder. I have no idea where this demo should be.

<prefix>/bin as other programs are installed on Linux

@plfiorini
Copy link
Member

The problem is, that I check out a completely unknown fresh new project, try to compile it, and it does not work. I did neither change nor remove something. So what do you guess I should do? Go on, try another project?

Open an issue with the error and ask for help maybe.

Like this one?
#305

Doesn't say much just that you can't build it but you don't say what is your problem.
README.md documents how to build Fluid and the demo gets built automatically by default.

@Slesa
Copy link
Author

Slesa commented Apr 11, 2020

And the demo is literally built by default.

I know that make install of fluid copies the plugin into the Qt folder. I have no idea where this demo should be.

<prefix>/bin as other programs are installed on Linux

Why would I want to have a demo in $QTDIR/bin?
But...
Qt/5.14.2/gcc_64/bin/ does not have the demo, Qt/5.14.2/gcc_64/qml has no bin, Qt/5.14.2/gcc_64/qml/fluid has no demo... where else could it be?
which fluid-demo -> fluid-demo not found

@Slesa
Copy link
Author

Slesa commented Apr 11, 2020

The problem is, that I check out a completely unknown fresh new project, try to compile it, and it does not work. I did neither change nor remove something. So what do you guess I should do? Go on, try another project?

Open an issue with the error and ask for help maybe.

Like this one?
#305

Doesn't say much just that you can't build it but you don't say what is your problem.
README.md documents how to build Fluid and the demo gets built automatically by default.

This is true, sorry for that

CMake Error at CMakeLists.txt:19 (include):
include could not find load file:

LiriSetup

@plfiorini
Copy link
Member

And the demo is literally built by default.

I know that make install of fluid copies the plugin into the Qt folder. I have no idea where this demo should be.

<prefix>/bin as other programs are installed on Linux

Why would I want to have a demo in $QTDIR/bin?

You don't, it's installed in $CMAKE_PREFIX/bin

But...
Qt/5.14.2/gcc_64/bin/ does not have the demo, Qt/5.14.2/gcc_64/qml has no bin, Qt/5.14.2/gcc_64/qml/fluid has no demo... where else could it be?
which fluid-demo -> fluid-demo not found

@plfiorini
Copy link
Member

Make sure submodules are fetched:

git submodule update --init

Then following the instructions at https://github.com/lirios/fluid#build we see that the -DFLUID_USE_SYSTEM_LCS:BOOL=OFF option needs to be passed to cmake in order to use LCS from the git submodule.

@Slesa
Copy link
Author

Slesa commented Apr 11, 2020

What works: qmake && make
What not works: cmake

CMake Error at cmake/shared/modules/LiriAddExecutable.cmake:50 (add_executable):
  add_executable called with incorrect number of arguments
Call Stack (most recent call first):
  cmake/shared/modules/LiriAddTest.cmake:59 (liri_add_executable)
  tests/auto/controls/CMakeLists.txt:1 (liri_add_test)


CMake Error at cmake/shared/modules/LiriAddExecutable.cmake:50 (add_executable):
  add_executable called with incorrect number of arguments
Call Stack (most recent call first):
  cmake/shared/modules/LiriAddTest.cmake:59 (liri_add_executable)
  tests/auto/core/CMakeLists.txt:1 (liri_add_test)

@plfiorini
Copy link
Member

plfiorini commented Apr 11, 2020

What works: qmake && make
What not works: cmake

CMake Error at cmake/shared/modules/LiriAddExecutable.cmake:50 (add_executable):
  add_executable called with incorrect number of arguments
Call Stack (most recent call first):
  cmake/shared/modules/LiriAddTest.cmake:59 (liri_add_executable)
  tests/auto/controls/CMakeLists.txt:1 (liri_add_test)


CMake Error at cmake/shared/modules/LiriAddExecutable.cmake:50 (add_executable):
  add_executable called with incorrect number of arguments
Call Stack (most recent call first):
  cmake/shared/modules/LiriAddTest.cmake:59 (liri_add_executable)
  tests/auto/core/CMakeLists.txt:1 (liri_add_test)

I have added more information on the build process: 24a57c6

Just to pinpoint the issue, what version of CMake and (if it applies) QtCreator are you using?
Cmake 3.10 is required.

@Slesa
Copy link
Author

Slesa commented Apr 11, 2020

Just to pinpoint the issue, what version of CMake and (if it applies) QtCreator are you using?
Cmake 3.10 is required.

It is cmake 3.10.2 on Ubuntu 18.04. Qt & Creator is the latest download with 5.14.2.
I called it

cmake -DCMAKE_INSTALL_PREFIX=~/work/liri ..

in subfolder build

@Slesa
Copy link
Author

Slesa commented Apr 11, 2020

Still the same error, now with

cmake -DCMAKE_INSTALL_PREFIX=~/work/liri -DFLUID_USE_SYSTEM_LCS:BOOL=OFF ..

🤷‍♂️

@plfiorini
Copy link
Member

Can't reproduce on my system neither I can reproduce it in the CI.
Have to make an Ubuntu 18.04 VM to test this out.

@plfiorini
Copy link
Member

It is cmake 3.10.2 on Ubuntu 18.04. Qt & Creator is the latest download with 5.14.2.
I called it

Ubuntu 18.04 has Qt 5.9, how did you get 5.14.2?

@Slesa
Copy link
Author

Slesa commented Apr 16, 2020

As I wrote earlier, I've downloaded it from Qt.io. I had this problem on (I think) an actual Fedora 31, so the two things coming together are maybe a Qt 5.14.2 with a CMake > 3.10 (as there was no warning about that). I can even check if it runs on Manjaro.
On the other hand: what could cause this 'incorrect number of arguments'? Should I go all those steps again, beginning from the correct git checkout, checking all versions of all involved programs? Would that help?

@plfiorini
Copy link
Member

@Slesa With commit fee08d6, the cmake/shared/ submodule was updated and that fixed your issue. This means you are using an old fluid repository version.

Make sure it's up to date:

git pull
git submodule update

Check the status with:

git rev-parse HEAD
git submodule status

@Slesa
Copy link
Author

Slesa commented Apr 18, 2020

Ok, step by step:

git clone https://github.com/lirios/fluid.git fluidup && cd fluidup
git submodule update --init
git log | grep fee08
   commit fee08d610f8b1447de1c3f3fe65f1dbdf7bfa823
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=~/work/liri -DFLUID_USE_SYSTEM_LCS:BOOL=OFF ..

CMake Error at src/demo/CMakeLists.txt:72 (set_target_properties):
  set_target_properties Can not find target to add properties to: FluidDemo


CMake Error at cmake/shared/modules/LiriAddExecutable.cmake:50 (add_executable):
  add_executable called with incorrect number of argument

What is wrong with me? :)

git rev-parse HEAD                                         ✘ 1 
24a57c6832164e40e364d2ef5d29d01066624cbc
git submodule status
 4fdf2cb6edd23aaa467cfdbc758ee8ed15cbfc81 ../cmake/shared (v1.1.0)
 ebee5a8798ab0a063b56cf7c73be2a28ec353a2e ../qbs/shared (v1.4.0)
cmake --version
cmake version 3.10.2
echo $QTDIR
~/work/Qt/5.14.2/gcc_64

@plfiorini plfiorini closed this Apr 6, 2024
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

Successfully merging this pull request may close these issues.

2 participants