-
Notifications
You must be signed in to change notification settings - Fork 18
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
qt4 issue with missing 2 required positional arguments #45
Comments
Rerun with |
|
Nothing in the stack trace is qt4.. Can you make a small reproducer? |
@bdbaddog : Thanks for looking into this. The error happens if there is both a *.h file and *.cpp (e.g. hello.h and hello.cpp). The following example reproduces the error. If the hello.h file is renamed, the compile is fine. |
Builds for me.
I did have to modify SConstruct to fit my environment.. You should have
instead of
btw. I installed qt4 via the instructions here: And just used the ubuntu 20.04 default gcc. Try changing your SConstruct as above and report back? |
Can you attach the full log of your reproducer running on your system excluding the stack trace? |
This is running on CentOS 7.6, python-3.10.2, qt-4.8.7 with everything built with gcc-10.2.0. For both of the below runs, I also set scons was installed by first downloading the source and then installing:
Updated example: example3.tar.gz for debug setting and to be able to test both Qt4 and Qt5. Failed run with scons-4.3.0:
Good run with scons-4.1.0.post1:
|
Try commenting this line out from the q4/init.py
See if the error goes away. |
And/or try changing it to
|
Both suggestions worked! Is one recommended over the other? Is there a reason the problem appeared on my system but not yours, without the change? |
The latter is more correct as we added SOURCES and TARGETS as arguments to _defines() to allow the logic to use those values when expanding defines lists. |
Likewise we should probably add a default value for _defines() in scons to avoid such failures, but that is proper calling signature going forward (with TARGET, SOURCE) |
Thanks. Will you be making the fixes in the code, or should I submit the code fix/pull request? |
I'd do it. |
See SCons/scons#3790 and SCons/scons#3949 |
Closing |
…d for expanding among other things CPPDEFINES). source and target arguements were previously added to allow those values to be used by alternative definitions for _defines. This broke previous usage, including scons-contribs qt4 and qt5 tools. (See SCons/scons-contrib#45 )
We just upgraded to scons-4.3.0 (using python-3.10.2) and also updated the qt4 tool as well. I'm getting many errors such as:
scons: *** [build/linux_x86_64_rhel7/Optimized/gui/moc_GUBase.cc] TypeError `_defines() missing 2 required positional arguments: 'target' and 'source'' trying to evaluate `${_defines(QT4_MOCDEFPREFIX, CPPDEFINES, QT4_MOCDEFSUFFIX, __env__)}'
Is there something obvious that I can fix? We are using qt-4.8.7.
The text was updated successfully, but these errors were encountered: