OmixVisualization / qtjambi

QtJambi is a wrapper for using Qt in Java.
http://www.qtjambi.io
Other
347 stars 39 forks source link

[BUG] Error building QtJambi 6.6.2 with local build of Qt5.15.12 #198

Closed proussel-matawan closed 4 months ago

proussel-matawan commented 4 months ago

Hi,

I'm trying a full build of Qt5.15.12 and QtJambi 6.6.2, first for my host (x86_64 linux machine) and then cross-compiling for my target (linux armhf).

ant library.native fails with build errors as if it's trying to build stuff for missing Qt objects, probably because I trimmed my Qt build as much as I could.

Qt is configured with

./configure -release -prefix /home/philou/buildqtjambi/qt5-x86 -skip qtconnectivity -skip qt3d -skip activeqt -skip qtwayland -skip qtwebchannel -skip qtwebview -skip qtwebengine -skip qtspeech -skip qtquick3d -skip qtlottie -skip qtpurchasing -skip qtdatavis3d -skip qtgraphicaleffects -skip qtgamepad -skip qtdoc -skip qtcharts -skip qtandroidextras -skip qtwebglplugin -opensource -confirm-license -skip qttools -skip qtlocation -skip qtmultimedia -skip qtremoteobjects -skip qtscript -skip qtscxml -skip qtsvg -skip qtserialbus -skip qtxmlpatterns -nomake examples -nomake tests -no-dbus -no-opengl

and I have this in build.properties

''' qtjambi.force.debug.info=false generator.debug.run=true qtjambi.skipped.modules=activex,bodymovin,xmlpatterns,macextras,winextras,x11extras,serialport,script,scripttools,networkauth,help,multimedia,dbus,designer,test,webengine,webenginecore,webenginewidgets,webview,remoteobjects,gamepad,scxml,nfc,texttospeech,serialbus,sensors,location,positioning,bluetooth,qt3d,qt3dcore,qt3dlogic,qt3dquickextras,qt3dquickrender,qt3dquickscene2d,qt3dquick,qt3dinput,qt3drender,qt3danimation,qt3dextras,websockets,webchannel,purchasing,quickcontrols2,statemachine,charts,datavisualization,virtualkeyboard,quicktest,quick3d,opengl,openglwidgets,quick,quickwidgets,svg,svgwidgets,printsupport,xml,network,sql,qml,concurrent,uitools,pdf,pdfwidgets,httpserver,spatialaudio,grpc,protobuf,graphs '''

Attached is the log of the second run of ant library.native to keep it small.

build_2024-04-30_17-21-24.log

Any idea where those build errors come from ?

omix commented 4 months ago

It looks to me as if there is no QOpenGLDebugMessage and QOpenGLFramebufferObjectFormat in QtGui as expected. I never saw the sourcecode of Qt 5.15.12 but in Qt 5.15.2 the classes exist. I am not sure why this error appears: call of overloaded ‘qHash(const QTextLength::Type&)’ is ambiguous However you could do an int cast to solve this: int(value.type()).

proussel-matawan commented 4 months ago

The classes do exist in 5.15.12 but weren't compiled in because I configured Qt without opengl. I guess QtJambi build system doesn't see that some part of Qt are missing and generates wrappers for non compiled classes.

After rebuilding Qt I'm now having another build failure when running ant library.java, see the attached log. Any help would be appreciated. build_2024-05-02_10-39-40.log

omix commented 4 months ago

Ok, that's interesting. Qt has a hugh amount of festures that can be disabled as build configuration. I was not able to respect all these options in QtJambi.

I read your latest build log and I see following error of the Java compiler:

An exception has occurred in the compiler (17.0.9). Please file a bug against the Java compiler via the Java bug reporting page (https://bugreport.java.com) after checking the Bug Database (https://bugs.java.com) for duplicates. Include your program, the following diagnostic, and the parameters passed to the Java compiler in your report. Thank you.
/home/philou/buildqtjambi/qtjambi-6.6.2/5.15.19/build/generator/java/qtjambi/io/qt/core: Value too large for defined data type

Sorry, but I've no idea. I never say this kind of error. Maybe this is a low memory issue? Try to change the value of memorymaximumsize in modules.xml (multiple occurences). Otherwise, maybe another version JDK fixes it. I can't remember if I ever used JDK 17 to build QtJambi....

proussel-matawan commented 4 months ago

I already tried changing memorymaximumsize, the build error remained. The strange thing is that I successfully built QtJambi (but version 6.4.4) with the same setup 2 months ago so I thought maybe you modified something in the build system that makes this build error appear.

I guess I'll try to go back to 6.4.4.

What JDK version do you use when building ?

omix commented 4 months ago

No, I don't think I changed anything that explains this issue. I use either the latest JDK (=21) or 11. There was a change from 6.4.4 to 6.5.0: Nullness annotations. They rely on third-party annotation library. What happens if you remove any memorymaximumsize="..."?

proussel-matawan commented 4 months ago

I got something working with QtJambi 6.5.3, I will try others versions when the build will be automated. Thanks.