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

Issue with REALM_SCHEMA usage #89

Closed
pduvalla opened this issue Aug 29, 2023 · 10 comments
Closed

Issue with REALM_SCHEMA usage #89

pduvalla opened this issue Aug 29, 2023 · 10 comments

Comments

@pduvalla
Copy link

I am observing an issue with REALM_SCHEMA usage in Coffee project , details below

SDK: V0.2.0 preview for SDK c++
Ubuntu 20.04
Qt Creator 4.11.1

ISSUE: realm_models.hpp:17:5: error: reference to local variable 'ptr' declared in enclosing lambda expression
macros.hpp:273:5: note: expanded from macro 'REALM_SCHEMA'
macros.hpp:303:26: note: expanded from macro 'DECLARE_REALM_SCHEMA'
realm_models.hpp:17:5: note: 'ptr' declared here
macros.hpp:273:5: note: expanded from macro 'REALM_SCHEMA'
macros.hpp:301:39: note: expanded from macro 'DECLARE_REALM_SCHEMA'

@leemaguire
Copy link
Contributor

Hi @pduvalla which gcc version are you using?

@pduvalla
Copy link
Author

gcc 9.4.0

@leemaguire
Copy link
Contributor

We only support a minimum of GCC 11.

@pduvalla
Copy link
Author

Seeing the following error with gcc 11
In file included from /usr/include/c++/11/bits/stl_algo.h:59,
from /usr/include/c++/11/algorithm:62,
from ../../../../Qt5.14.2/5.14.2/gcc_64/include/QtCore/qglobal.h:142,
from ../../../../Qt5.14.2/5.14.2/gcc_64/include/QtGui/qtguiglobal.h:43,
from ../../../../Qt5.14.2/5.14.2/gcc_64/include/QtGui/qguiapplication.h:43,
from ../../../../Qt5.14.2/5.14.2/gcc_64/include/QtGui/QGuiApplication:1,
from ../coffee/main.cpp:4:
/usr/include/c++/11/cstdlib:75:15: fatal error: stdlib.h: No such file or directory
75 | #include_next <stdlib.h>
| ^~~~~~~~~~

@leemaguire
Copy link
Contributor

These errors aren't related to Realm, you might need some configuration in your Qt project, maybe this SO post might have some answers for you.

@pduvalla
Copy link
Author

Thanks! fatal error: stdlib.h: No such file or directory is resolved but still seeing ...
realm_models.hpp:17:5: error: reference to local variable 'ptr' declared in enclosing lambda expression
macros.hpp:273:5: note: expanded from macro 'REALM_SCHEMA'
macros.hpp:303:26: note: expanded from macro 'DECLARE_REALM_SCHEMA'
realm_models.hpp:17:5: note: 'ptr' declared here
macros.hpp:273:5: note: expanded from macro 'REALM_SCHEMA'
macros.hpp:301:39: note: expanded from macro 'DECLARE_REALM_SCHEMA'

Can you share the build environment used to verify this example , like the QT version, and gcc version etc

@leemaguire
Copy link
Contributor

I verified the example on macOS 13, Qt 6.4.1, and clang 14.0.3

@pduvalla
Copy link
Author

@leemaguire , Is there a work around to make it work with
Ubuntu 20.04
Qt Creator 4.11.1
gcc 11 and g++ 11

I see the same error in hello world example too.

Thanks

@leemaguire
Copy link
Contributor

I will have to test it out on Ubuntu 20.04 and get back to you, the minimum Ubuntu version we test on currently is 22.04

@sync-by-unito sync-by-unito bot closed this as completed Feb 9, 2024
Copy link

sync-by-unito bot commented Feb 9, 2024

➤ Kenneth Geisshirt commented:

We support gcc 8.3 and later.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants