hydraulic-software / conveyor

Gradle plugin, user guide and discussion forums for Conveyor
https://conveyor.hydraulic.dev
Apache License 2.0
123 stars 9 forks source link

[Linux] conveyor 9.3 broke debian dependencies #84

Closed ennerf closed 11 months ago

ennerf commented 11 months ago

I'm having some issues with Linux builds when building with Conveyor versions 9.3 through 11.4. The last working version was 9.2. It happened with ubuntu-latest on GH-Actions as well as local builds on 20.04.

>lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.4 LTS
Release:        20.04
Codename:       focal

Creating and installing a debian package:

conveyor make debian-package
sudo apt install ./output/<name>.deb

Issue:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'hebi-robotics-scope' instead of './output/hebi-robotics-scope_1.9.0_amd64.deb'
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 hebi-robotics-scope : Depends: libavcodec-extra54 but it is not installable or
                                libavcodec-54 but it is not installable or
                                libavcodec-extra55 but it is not installable or
                                libavcodec-55 but it is not installable or
                                libavcodec-extra56 but it is not installable or
                                libavcodec-56 but it is not installable or
                                libavcodec-extra57 but it is not installable or
                                libavcodec-57 but it is not installable or
                                libavcodec-extra58 but it is not going to be installed or
                                libavcodec-58 but it is not installable or
                                libavcodec-extra59 but it is not installable or
                                libavcodec-59 but it is not installable or
                                libavcodec-extra60 but it is not installable or
                                libavcodec-60 but it is not installable or
                                libavcodec-extra61 but it is not installable or
                                libavcodec-61 but it is not installable or
                                libavcodec-extra62 but it is not installable or
                                libavcodec-62 but it is not installable or
                                libavcodec-extra63 but it is not installable or
                                libavcodec-63 but it is not installable or
                                libavcodec-extra64 but it is not installable or
                                libavcodec-64 but it is not installable or
                                libavcodec-extra65 but it is not installable or
                                libavcodec-65 but it is not installable or
                                libavcodec-extra66 but it is not installable or
                                libavcodec-66 but it is not installable or
                                libavcodec-extra67 but it is not installable or
                                libavcodec-67 but it is not installable or
                                libavcodec-extra68 but it is not installable or
                                libavcodec-68 but it is not installable or
                                libavcodec-extra69 but it is not installable or
                                libavcodec-69 but it is not installable or
                                libavcodec-extra70 but it is not installable or
                                libavcodec-70 but it is not installable or
                                libavcodec-extra71 but it is not installable or
                                libavcodec-71 but it is not installable or
                                libavcodec-extra72 but it is not installable or
                                libavcodec-72 but it is not installable or
                                libavcodec-extra73 but it is not installable or
                                libavcodec-73 but it is not installable or
                                libavcodec-extra74 but it is not installable or
                                libavcodec-74 but it is not installable or
                                libavcodec-extra75 but it is not installable or
                                libavcodec-75 but it is not installable or
                                libavcodec-extra76 but it is not installable or
                                libavcodec-76 but it is not installable or
                                libavcodec-extra77 but it is not installable or
                                libavcodec-77 but it is not installable
E: Unable to correct problems, you have held broken packages.

Is there any log output that'd be helpful?

mikehearn commented 11 months ago

Is this an issue on later versions of Ubuntu as well?

The reason for the change was to fix things on newer Ubuntus, see here:

https://github.com/mkpaz/atlantafx/issues/55

ennerf commented 11 months ago

Building on 22.04 has the same issue when installing on 20.04. I don't have newer test machines on hand. If you have one, you can try build 133 built on 22.04:

wget https://hebifiles.z13.web.core.windows.net/download/scope/snapshot/hebi-robotics-scope_1.9.0-133_amd64.deb
sudo apt install ./hebi-robotics-scope_1.9.0-133_amd64.deb
mikehearn commented 11 months ago

I mean does the deb install on ubuntu's newer than 20.04?

ennerf commented 11 months ago

I rarely use Ubuntu, and my test machines are all on 20.04, so I can't easily test it.

mikehearn commented 11 months ago

OK, we'll take a look, I thought the change was compatible with 20 LTS as well as the other newer releases but perhaps not, or perhaps something regressed. It's specific to apps that use javafx.media on Ubuntu 20, as far as I know, which most of our users aren't doing.

ennerf commented 11 months ago

I just double-checked, but I'm not using javafx.media either. Logged jlink command:

Linking a distribution JVM for Java 21 targeting linux.amd64.glibc

$ jlink '--strip-native-commands' '--no-man-pages' '--no-header-files' '--compress=1' '--add-modules' 'ALL-MODULE-PATH' '--limit-modules' 'jdk.accessibility,java.base,java.desktop,java.logging,java.datatransfer,java.xml,java.scripting,java.instrument,java.management,java.prefs,java.net.http,jdk.unsupported,jdk.crypto.cryptoki,java.sql,jdk.jdwp.agent,jdk.jshell,jdk.zipfs,jdk.jfr,jdk.httpserver,javafx.base,javafx.controls,javafx.fxml,javafx.graphics,javafx.swing,hydraulic.conveyor.launcher,dev.hydraulic.conveyor.control' '--compress=2' '--no-header-files' '--no-man-pages' '--strip-debug' '--vm=server'

ennerf commented 11 months ago

I did some more testing, and removing the dependencies via app.linux.debian.control.Depends = [ ] fixes the issue for my particular app

Conveyor Ubuntu 20.04 Ubuntu 22.04
9.2 ok ok
11.4 fails ok
11.4 + no deps ok ok
mikehearn commented 11 months ago

I tried the generated sample javafx app and it can install OK for me on my Ubuntu 20 VM so maybe there is a configuration difference between the two setups. Is it possible that you don't have the universe repository enabled? Media codecs and Linux often don't work well due to licensing hangups.

Arguably we should only be applying this hack if javafx.media is actually used, but it's done via static config and seemed harmless to always depend on. I'm not sure how far this should be considered a Conveyor bug vs just Ubuntu being user unfriendly. The whole concept of a core vs a "universe" vs a "multiverse" repository is pretty obscure.

ennerf commented 11 months ago

Yes, I'm testing on a stock install without extra repositories. I'm not fond of the behavior, but it's not a big issue as long as I can easily disable it. If it has to be static, maybe it could work as a include required("/stdlib/jvm/javafx/media.conf") config?

Thanks for looking into it.