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

Lua and QT version after MacOS brew upgrade #176

Open
freedomcondor opened this issue May 25, 2021 · 6 comments
Open

Lua and QT version after MacOS brew upgrade #176

freedomcondor opened this issue May 25, 2021 · 6 comments

Comments

@freedomcondor
Copy link
Contributor

freedomcondor commented May 25, 2021

Hi, Carlo,

I'm working with argos3 on a Macbook. Today I did "brew upgrade", and it automatically upgraded my lua to lua5.4, and qt to qt6. After that, when cmaking, argos is able to find lua5.4 and qt6.
Lua5.4 hasn’t shown its problem yet.
However, for qt6, after I recompiled and installed when I try to run argos, it says :
“Sorry, argos3 cannot run on this computer. Qt requires macOS 11.0.0 or later, you have macOS 10.16.0.”
That doesn't sound right, because I just upgraded my system to 11.3.1.

I tried to downgrade qt back by "brew remove qt", and "brew install qt5", but then argos don't find qt when cmaking.
I made a trick by changing this line from qt to qt@5 :
https://github.com/ilpincy/argos3/blob/master/src/cmake/FindARGoSQTOpenGL.cmake#L43
and then everything works. (with qt5 and lua5.4)

I also tried to downgrade lua to lua5.3, but I cannot manage to make argos find [email protected].

I guess the qt6 problem is between qt and macOS. Before they sort it out, do we have a better way to switch to qt5?
Also for lua, we haven't test our code with lua5.4, it would be safer to work with lua5.3. Is there a way to switch to lua5.3?

Best

Weixu

@allsey87
Copy link
Collaborator

@ilpincy
Copy link
Owner

ilpincy commented May 25, 2021

Thanks for the bugreport @freedomcondor! I don't have Big Sur on my Macs, so it's useful to know that compilation doesn't work.

To fix the problem, once you install Qt5 to circumvent the bugs of Qt6, you don't need to change anything in ARGoS. Just set the variable ARGOS_BREW_QT_CELLAR. So, to force qt@5, you simply need to run

cmake -DARGOS_BREW_QT_CELLAR=$(brew --cellar qt@5) ...

The code is written to honor the value of that variable if it's set (see here).

@ilpincy
Copy link
Owner

ilpincy commented May 25, 2021

Regarding Lua 5.4, I don't see the need to revert to Lua 5.3. This check only asks for Lua >= 5.3, so 5.4 and later are fine.

@ilpincy
Copy link
Owner

ilpincy commented May 25, 2021

If the issue is with your own code, just uninstall Lua 5.4 from your system and install Lua 5.3 instead. ARGoS won't mind, as long as you recompile it.

@freedomcondor
Copy link
Contributor Author

freedomcondor commented May 25, 2021

I think I got the answer:

For lua5.3, the easiest way is to unlink lua and link [email protected] (brew unlink lua, brew link [email protected]), then lua5.3 will be the default lua and found by argos.

For the tips about -DARGOS_BREW_QT_CELLAR=$(brew --cellar qt@5). It actually doesn't work. I had a rough look at the code around
https://github.com/ilpincy/argos3/blob/master/src/cmake/FindARGoSQTOpenGL.cmake#L43
I may be wrong, but it looks like
https://github.com/ilpincy/argos3/blob/master/src/cmake/FindARGoSQTOpenGL.cmake#L63
should end its IF before
https://github.com/ilpincy/argos3/blob/master/src/cmake/FindARGoSQTOpenGL.cmake#L47
so that ARGOS_BREW_QT_CELLAR provided either by user or by execute_process can be effective in either case, right?
I had a try and it worked, but I'm not sure whether it would affect other things.

@ilpincy
Copy link
Owner

ilpincy commented May 26, 2021

For lua5.3, the easiest way is to unlink lua and link [email protected] (brew unlink lua, brew link [email protected]), then lua5.3 will be the default lua and found by argos.

Yes, this is an acceptable workaround.

it looks like https://github.com/ilpincy/argos3/blob/master/src/cmake/FindARGoSQTOpenGL.cmake#L63
should end its IF before https://github.com/ilpincy/argos3/blob/master/src/cmake/FindARGoSQTOpenGL.cmake#L47 so that ARGOS_BREW_QT_CELLAR provided either by user or by execute_process can be effective in either case, right?

You're right indeed! I'll fix it as you suggest.

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

3 participants