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

qt4 dropped on Ubuntu 20.04, Qfsm needs port to qt5 #1

Open
AaronErhardt opened this issue Jun 2, 2020 · 3 comments
Open

qt4 dropped on Ubuntu 20.04, Qfsm needs port to qt5 #1

AaronErhardt opened this issue Jun 2, 2020 · 3 comments

Comments

@AaronErhardt
Copy link
Owner

qt4 is no longer available for Ubuntu 20.04, which means that Qfsm no longer works with the latest Ubuntu releases. graphviz is not affected by this change.
There seems to be no reasonable workaround for this problem so far, so the best solution would be to port Qfsm to qt5 (which has been around since 2012!!) or even directly to qt6 which will be released in a few months.
Anyway, I don't have time to solve this right now (nor do I have a lot of experience with qt), so any help would be much appreciated :)

@AaronErhardt
Copy link
Owner Author

As a short term solution I have added an AppImage package to the latest release that works across all modern Linux distributions. This doesn't change the fact however that Qfsm needs to be ported to newer requirements in future - qt4 will die out sooner or later.
I hope we can soon start porting Qfsm to newer requirements soon. And as always: any help in this direction would be much appreciated :)

ajs124 added a commit to helsinki-systems/nixpkgs that referenced this issue Nov 14, 2022
there seems to be an active fork. see AaronErhardt/qfsm#1
for their progress on qt5 support
ajs124 added a commit to helsinki-systems/nixpkgs that referenced this issue Dec 7, 2022
there seems to be an active fork. see AaronErhardt/qfsm#1
for their progress on qt5 support
ajs124 added a commit to helsinki-systems/nixpkgs that referenced this issue Dec 9, 2022
there seems to be an active fork. see AaronErhardt/qfsm#1
for their progress on qt5 support
ajs124 added a commit to helsinki-systems/nixpkgs that referenced this issue Jan 12, 2023
there seems to be an active fork. see AaronErhardt/qfsm#1
for their progress on qt5 support
ajs124 added a commit to helsinki-systems/nixpkgs that referenced this issue Jan 13, 2023
there seems to be an active fork. see AaronErhardt/qfsm#1
for their progress on qt5 support
ajs124 added a commit to helsinki-systems/nixpkgs that referenced this issue Feb 2, 2023
there seems to be an active fork. see AaronErhardt/qfsm#1
for their progress on qt5 support
@paulie-g
Copy link

paulie-g commented Feb 8, 2023

As an FYI, the AppImage fails to run on current Arch with:

./Qfsm-x86_64.appimage 
Cannot mix incompatible Qt library (version 0x40807) with this library (version 0x40806)

I'm not quite sure what's going wrong here. I had a look at the extracted squashfs and ldd qfsm:

	linux-vdso.so.1 (0x00007ffc55b5a000)
	libQt3Support.so.4 => /home/paul/sw/qfsm/squashfs-root/usr/bin/../lib/libQt3Support.so.4 (0x00007f435aa00000)
	libQtSvg.so.4 => /home/paul/sw/qfsm/squashfs-root/usr/bin/../lib/libQtSvg.so.4 (0x00007f435a600000)
	libQtGui.so.4 => /home/paul/sw/qfsm/squashfs-root/usr/bin/../lib/libQtGui.so.4 (0x00007f4359800000)
	libQtXml.so.4 => /home/paul/sw/qfsm/squashfs-root/usr/bin/../lib/libQtXml.so.4 (0x00007f4359400000)
	libQtCore.so.4 => /home/paul/sw/qfsm/squashfs-root/usr/bin/../lib/libQtCore.so.4 (0x00007f4358e00000)
	libgvc.so.6 => /home/paul/sw/qfsm/squashfs-root/usr/bin/../lib/libgvc.so.6 (0x00007f4358a00000)
	libcgraph.so.6 => /home/paul/sw/qfsm/squashfs-root/usr/bin/../lib/libcgraph.so.6 (0x00007f4358600000)
	libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f4358200000)
	libm.so.6 => /usr/lib/libm.so.6 (0x00007f435af24000)
	libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f435a9e0000)
	libc.so.6 => /usr/lib/libc.so.6 (0x00007f4358819000)
	libQtSql.so.4 => /home/paul/sw/qfsm/squashfs-root/usr/bin/../lib/libQtSql.so.4 (0x00007f4357e00000)
	libQtNetwork.so.4 => /home/paul/sw/qfsm/squashfs-root/usr/bin/../lib/libQtNetwork.so.4 (0x00007f4357a00000)
	libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f435af1d000)
	libz.so.1 => /usr/lib/libz.so.1 (0x00007f435a9c6000)
	libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x00007f435a978000)
	libaudio.so.2 => /home/paul/sw/qfsm/squashfs-root/usr/bin/../lib/libaudio.so.2 (0x00007f4357600000)
	libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x00007f43596c1000)
	libpng12.so.0 => /home/paul/sw/qfsm/squashfs-root/usr/bin/../lib/libpng12.so.0 (0x00007f4357200000)
	libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00007f435a8a9000)
	libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0x00007f435a59f000)
	libSM.so.6 => /usr/lib/libSM.so.6 (0x00007f435a89e000)
	libICE.so.6 => /usr/lib/libICE.so.6 (0x00007f435a87e000)
	libXi.so.6 => /home/paul/sw/qfsm/squashfs-root/usr/bin/../lib/libXi.so.6 (0x00007f4356e00000)
	libXrender.so.1 => /home/paul/sw/qfsm/squashfs-root/usr/bin/../lib/libXrender.so.1 (0x00007f4356a00000)
	libXext.so.6 => /home/paul/sw/qfsm/squashfs-root/usr/bin/../lib/libXext.so.6 (0x00007f4356600000)
	libX11.so.6 => /usr/lib/libX11.so.6 (0x00007f4358cbd000)
	libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f435a877000)
	librt.so.1 => /usr/lib/librt.so.1 (0x00007f435a872000)
	/lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007f435b06a000)
	libltdl.so.7 => /home/paul/sw/qfsm/squashfs-root/usr/bin/../lib/libltdl.so.7 (0x00007f4356200000)
	libcdt.so.5 => /home/paul/sw/qfsm/squashfs-root/usr/bin/../lib/libcdt.so.5 (0x00007f4355e00000)
	libpathplan.so.4 => /home/paul/sw/qfsm/squashfs-root/usr/bin/../lib/libpathplan.so.4 (0x00007f4355a00000)
	libexpat.so.1 => /usr/lib/libexpat.so.1 (0x00007f435a574000)
	libXt.so.6 => /home/paul/sw/qfsm/squashfs-root/usr/bin/../lib/libXt.so.6 (0x00007f4355600000)
	libXau.so.6 => /home/paul/sw/qfsm/squashfs-root/usr/bin/../lib/libXau.so.6 (0x00007f4355200000)
	libpcre2-8.so.0 => /usr/lib/libpcre2-8.so.0 (0x00007f4359365000)
	libbz2.so.1.0 => /usr/lib/libbz2.so.1.0 (0x00007f435a561000)
	libpng16.so.16 => /usr/lib/libpng16.so.16 (0x00007f4359688000)
	libharfbuzz.so.0 => /usr/lib/libharfbuzz.so.0 (0x00007f4358517000)
	libbrotlidec.so.1 => /usr/lib/libbrotlidec.so.1 (0x00007f435a860000)
	libffi.so.8 => /usr/lib/libffi.so.8 (0x00007f435a556000)
	libuuid.so.1 => /usr/lib/libuuid.so.1 (0x00007f435a54d000)
	libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007f435965d000)
	libgraphite2.so.3 => /usr/lib/libgraphite2.so.3 (0x00007f4359343000)
	libbrotlicommon.so.1 => /usr/lib/libbrotlicommon.so.1 (0x00007f4359320000)
	libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007f435a545000)

All the Qt libs appear to be coming from the AppImage squashfs, so not sure how it ends up loading the system Qt libraries. Dynamic loading maybe? Might want to include all of Qt in the AppImage in case that's what it is.

NB: It's a perfectly valid strategy to use AppImage instead of porting to Qt5/6. There's no reason to spend time on porting instead of feature development or bugfixing, ie the core functionality.

@paulie-g
Copy link

paulie-g commented Feb 8, 2023

OK, tracked it down:
LD_DEBUG=libs ./Qfsm-x86_64.appimage produces the following relevant output:

 3012896:	calling init: /usr/lib/qt4/plugins/styles/adwaita.so
   3012896:	
Cannot mix incompatible Qt library (version 0x40807) with this library (version 0x40806)

So it's reading my systemwide Qt styling, using the adwaita theme plugin pursuant to that, and horribly failing since my system has a slightly newer Qt4. Theme plugins tend to use private Qt headers so are ABI incompatible across minor version bumps.

I have not figured out how to launch it with whatever the default is. Unsetting QT_QPA_PLATFORMTHEME=qt5ct doesn't work, nor does QT_STYLE_OVERRIDE since iirc it's Qt5+ and I've no idea what to set it to so it's the built-in theme.

I'm not sure what the 'correct' fix is for this. Options would be:

  • rebuild the AppImage against the current latest Qt4 (will fix immediate problem on rolling release distros, but will continue to be brittle and is not the 'ideally correct' fix)
  • include common style plugins in the AppImage matching your Qt version
  • hard set a theme in qfsm and include that theme

For me, I just built qfsm from source since I use a non-broken distro and have Qt4. As an FYI, you have CMake artifacts from an in-progress build checked into the repo in build.

PS: Qfsm looks very nice, thank you for writing it. Playing around with Verilog will be fun. The Ragel export might also come in handy. Assuming it all works as advertised, of course ;)

ajs124 added a commit to helsinki-systems/nixpkgs that referenced this issue Jul 25, 2023
there seems to be an active fork. see AaronErhardt/qfsm#1
for their progress on qt5 support
ajs124 added a commit to helsinki-systems/nixpkgs that referenced this issue Aug 23, 2023
there seems to be an active fork. see AaronErhardt/qfsm#1
for their progress on qt5 support
ajs124 added a commit to helsinki-systems/nixpkgs that referenced this issue Aug 23, 2023
there seems to be an active fork. see AaronErhardt/qfsm#1
for their progress on qt5 support
ajs124 added a commit to helsinki-systems/nixpkgs that referenced this issue Sep 4, 2023
there seems to be an active fork. see AaronErhardt/qfsm#1
for their progress on qt5 support
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

2 participants