-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Fix vestige by removing linux shm and semaphores and use Qt ones. Fixes #1875 #2304
Conversation
@Narfinger we use travis to meet our Ubuntu, Win32 and Mac dependencies. Can you see if you can get the Linux build to pass by putting the appropriate dependency here: https://github.com/LMMS/lmms/blob/master/.travis/linux..install.sh#L10 |
@Narfinger Thanks for your help on this issue. Some feedback on this Pull Request:
Hope that feedback is well received. Thanks again for your continued work on this issue. @Wallacoloo @lukas-w @Umcaruje @tobydox what I'm about to say is probably best left for the bug report, but I'm mentioning it here where the code is. This change brings with it a 32-bit Qt dependency for all platforms as it moves our shared memory logic to a pure Qt implementation. This simplifies our codebase but does add the new dependency. This may also make VST available on Mac down the road (disabled via CMakeLists.txt currently), once we fix the winegcc problems ( #698 (comment)) |
MESSAGE( | ||
"\n" | ||
"-----------------------------------------------------------------\n" | ||
"IMPORTANT:\n" | ||
"after installing missing packages, remove CMakeCache.txt before\n" | ||
"running cmake again!\n" | ||
"For VST we need 32bit QtCore libraries installed but cmake will not check for 32bit version.\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Via this thread, we may need to temporarily switch out the path to qmake
, do a find_package
and then switch back. If someone can find a command line switch for locating the 32-bit libs, I can help write up a CMake command to execute and return the value as well.
I strongly vote against merging this. We developed a dedicated non-Qt-based version of RemotePlugin in order to allow building RemotePlugins for foreign platforms without additional dependencies. Adding Qt dependency on the WINE side adds complexity and increases chances, things will fail in combination with WINE. When using native mechanisms in the winegcc-based binaries (which run as normal Linux processes), we can be sure, SHM/IPC mechanisms do work. Furthermore building will be almost impossible on most distributions where wine-dev is all we have. No distribution ships Qt binaries for Win32 or Win64 and no distribution will accept source packages where these binaries are bundled. |
Fair enough, but what about these cases where SHM/IPC doesn't work? That is what sparked this change to begin with. |
Then we could switch to the proposed behaviour manually using a cmake define such as "REMOTE_PLUGIN_QT_IPC_ONLY". This define could be used in CMake files as well as source files. The default build behaviour should not be touched for the reasons mentioned. |
But if I'm reading your previous post correctly, we'll still have to distribute win32 QT libraries with releases for affected distros (assumng they want VST) right? |
No idea how this will be handled. Shipping binaries is a no-go either way and will lead us to big problems with all major distribution's source package policies (such as Debian/Ubuntu, Fedora etc.). There will have to be a documentation for manually grabbing this file (+ all includes...!) from somewhere and putting things at the proper place. |
This is already a problem for VST tho, no? |
It's about source packages not binary packages. Our source package does not contain any compiled files but only source files ;-) Of course the resulting binary packages contain binaries of all kinds but even here I guess the Debian people would blame us for including a big Windows binary which somehow got in. |
So the fear from a packaging perspective is that source would get a DLL bundled? I wouldn't allow that 😉 but if this is the case, how is it working on Arch for this PR? The issue which sparked this move claims to have Sylenth working, but the report said nothing about cherry-picking QtCore.dll from PPA. How can wine use this without having it to link against? What am I missing?
Understood. |
I'm not sure whether RemoteVstPlugin.exe is linked against native QtCore binary (32 bit) or QtCore.dll. In either case, the native mechanism could should be kept and the Qt-only version only used where neccessary. |
Ok, I didn't know you could link against native i386 ELF libraries with winegcc. This changes my opinion about the new approach a little. I still think the current approach should be kept because usually there won't be a 32 bit Qt installation while basic syscalls are available as soon as you have winegcc. But using Qt-only for IPC as an alternative method seems OK and is mainly a question of properly setting up the build system. I don't know whether CMake supports multi-arch builds. |
From what I'm gathering, Fedora's On a KDE Ubuntu system, the 32-bit libs weigh in at 3.5MB (fetch) and 12MB installed. From the OSX side of the fence, I looked this up on Homebrew and MacPorts and from what I'm gathering, they both require building Qt from source to obtain the 32-bit QtCore library (not sure how relevant this is since we haven't made it far enough to test wine + IPC on Apple). So adding a 32-bit Qt dependency could make our apple build environment quite difficult to create if it ever sees win32 VST support. -Tres |
You still need WINE for building RemoteVstPlugin even when linking against 32 bit Qt4Core. |
I was trying to illustrate the dependency severity of using 32-bit Qt libraries. |
I'll elaborate a bit... I was only trying to illustrate the dependency impact/severity of using 32-bit Qt libraries since your previous statement claimed they won't have it to begin with. From my research, they CAN meet this dependency with relative ease; hence spelling out the footprint that the 32-bit Qt libraries have on various platforms. Mac was the only platform I researched without an easy QtCore-32-bit installation candidate. Yes, I understand Wine is needed and this comparison against Wine wasn't meant to be a mutually exclusive comparison but rather as a benchmark comparison in terms of meeting dependencies from a bandwidth and disk space perspective. I guess what I'm saying is, if someone wants VST on Linux, the additional 32-bit QtCore dependency is moot in nearly all cases because the packaging providers have it ready to download and install. I understand the desire to keep things native and perhaps @Narfinger can do the best of both worlds and do a flag such as |
Sorry I did not reply earlier. I will try to incorporate some changes discussed here when I have time. But I am not sure keeping the old approach in there is a good idea. The code is not very readable as it is and with additional ifdefs this is still not very readable. Secondly, the problem seems to crop up in more distributions than just arch as the bug report mentions xubuntu 15.04. I strongly assume there is some bug and changes in some of the core libraries trigger it. Or there was an implicit assumption somewhere in the code which is not valid anymore with new libraries. |
Or perhaps we separate the logic entirely (or attempt to subclass it). I agree, the |
Ok I will see if I can split the logic. That at least is easier for the moment than handling cmake/qmake issue. |
As mentioned in the bug thread, there is still a problem.
Compiling on a Linux x64 without qt4 32bit version installed will fail with a linker error. Nothing I tried really worked to fix this so I just added a big warning in the main cmake file.
Perhaps somebody else who knows cmake better can take a stab at it.