Bug 270470 - audio/lmms: does not run on FreeBSD 13.2
Summary: audio/lmms: does not run on FreeBSD 13.2
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: Rodrigo Osorio
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-26 18:42 UTC by Manuel
Modified: 2023-06-18 15:32 UTC (History)
4 users (show)

See Also:
rodrigo: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Manuel 2023-03-26 18:42:03 UTC
Hi Hello Dear Developers of FreeBSD

I recently update to FreeBSD 13.2 but it seems there is an using running LMMS because i get the following error message :

LMMS on FreeBSD get this message: ~> lmms Notice: could not set realtime priority.
VST sync support disabled in your configuration
Unknown MIDI-client. Will use dummy-MIDI-client.
fish: Job 1, 'lmms' terminated by signal SIGSEGV (Address boundary error)

I just asked on the forums (not answer yet) and on twitter i asked to someone and he told me that when downloading and installed LMMS on his computer using FreeBSD 13.2 he gets the same error message, it may be posible a bug on the update or may be the program ?.
Comment 1 Rodrigo Osorio freebsd_committer freebsd_triage 2023-04-03 15:55:31 UTC
Thanks for the report, I'm looking at it
Comment 2 Manuel 2023-04-04 05:36:38 UTC
And thanks for answer, I hope this information is useful ! and I am just want to help the community !
Comment 3 genneko217 2023-05-31 14:04:07 UTC
Hi. I have a similar problem on 13.2.
I'm not sure when this issue came in because I haven't used LMMS for a while (maybe half a year).
Here is a lldb backtrace. Hope it helps!

$ uname -a
FreeBSD yomoneko 13.2-RELEASE FreeBSD 13.2-RELEASE releng/13.2-n254617-525ecfdad597 GENERIC amd64

$ lldb lmms
(lldb) target create "lmms"
Current executable set to 'lmms' (x86_64).
(lldb) run
Process 35913 launched: '/usr/local/bin/lmms' (x86_64)
Notice: could not set realtime priority.
libGL error: failed to authenticate magic 1
libGL error: failed to load driver: iris
Process 35913 stopped
* thread #1, name = 'lmms', stop reason = signal SIGSEGV: invalid address (fault address: 0x90ddf6f20)
    frame #0: 0x000000082c82fc3e libQt5Core.so.5`QCoreApplicationPrivate::sendThroughApplicationEventFilters(QObject*, QEvent*) + 222
libQt5Core.so.5`QCoreApplicationPrivate::sendThroughApplicationEventFilters:
->  0x82c82fc3e <+222>: callq  *0x30(%rax)
    0x82c82fc41 <+225>: testb  %al, %al
    0x82c82fc43 <+227>: je     0x82c82fbe0               ; <+128>
    0x82c82fc45 <+229>: movb   $0x1, %al
(lldb) bt
* thread #1, name = 'lmms', stop reason = signal SIGSEGV: invalid address (fault address: 0x90ddf6f20)
  * frame #0: 0x000000082c82fc3e libQt5Core.so.5`QCoreApplicationPrivate::sendThroughApplicationEventFilters(QObject*, QEvent*) + 222
    frame #1: 0x0000000826a9bc04 libQt5Widgets.so.5`QApplicationPrivate::notify_helper(QObject*, QEvent*) + 68
    frame #2: 0x0000000826a9d0a0 libQt5Widgets.so.5`QApplication::notify(QObject*, QEvent*) + 528
    frame #3: 0x000000082c82fa20 libQt5Core.so.5`QCoreApplication::notifyInternal2(QObject*, QEvent*) + 176
    frame #4: 0x0000000826ac8879 libQt5Widgets.so.5`QWidgetPrivate::setStyle_helper(QStyle*, bool) + 633
    frame #5: 0x0000000826ac85af libQt5Widgets.so.5`QWidgetPrivate::inheritStyle() + 511
    frame #6: 0x0000000826ac1979 libQt5Widgets.so.5`QWidget::setParent(QWidget*, QFlags<Qt::WindowType>) + 1449
    frame #7: 0x0000000826ac0457 libQt5Widgets.so.5`QWidgetPrivate::init(QWidget*, QFlags<Qt::WindowType>) + 711
    frame #8: 0x00000000003ede30 lmms`MainWindow::MainWindow() + 224
    frame #9: 0x00000000003e7a69 lmms`GuiApplication::GuiApplication() + 1305
    frame #10: 0x000000000048622a lmms`main + 8458
    frame #11: 0x00000000003242b0 lmms`_start + 256
(lldb)
Comment 4 Rodrigo Osorio freebsd_committer freebsd_triage 2023-06-17 16:02:43 UTC
The issue was caused by kwidgetsaddons >= 5.101.0,
but an issue was open on GH and we probably have a
patch to fix it.

https://github.com/LMMS/lmms/issues/6587
Comment 5 commit-hook freebsd_committer freebsd_triage 2023-06-17 16:55:07 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8827164af8acf5fb7255f51a175b2d39d0ce76ff

commit 8827164af8acf5fb7255f51a175b2d39d0ce76ff
Author:     Rodrigo Osorio <rodrigo@FreeBSD.org>
AuthorDate: 2023-06-17 16:33:18 +0000
Commit:     Rodrigo Osorio <rodrigo@FreeBSD.org>
CommitDate: 2023-06-17 16:42:06 +0000

    audio/lmms: Fix issue caused by kwidgetsaddons

    Add temporary patch to fix a crash at startup if kwidgetsaddons
    5.101.0 is installed. The patch was obtained from LMMS ticket
    related with this issue[1].

    [1] https://github.com/LMMS/lmms/issues/6587

    Since I'm here reorder Makefile to make linters happy.

    PR:             270470
    Reported by:    Manuel <gnuandbsdguy@gmail.com>
    MFH:        2023Q2

 audio/lmms/Makefile                                | 20 ++++------
 .../files/patch-src_gui_MainApplication.cpp (new)  | 21 +++++++++++
 .../lmms/files/patch-src_gui_MainWindow.cpp (new)  | 44 ++++++++++++++++++++++
 3 files changed, 73 insertions(+), 12 deletions(-)
Comment 6 Rodrigo Osorio freebsd_committer freebsd_triage 2023-06-17 16:57:38 UTC
Patch works for me (FreeBSD 13.1 amd64), I was able to run lmms and play some samples. The fix will be MFH to the current quarter branch.
Comment 7 commit-hook freebsd_committer freebsd_triage 2023-06-17 17:03:09 UTC
A commit in branch 2023Q2 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=28b08ddf0154fc3efc9df02ad0085f0cdcc5ad2f

commit 28b08ddf0154fc3efc9df02ad0085f0cdcc5ad2f
Author:     Rodrigo Osorio <rodrigo@FreeBSD.org>
AuthorDate: 2023-06-17 16:33:18 +0000
Commit:     Rodrigo Osorio <rodrigo@FreeBSD.org>
CommitDate: 2023-06-17 16:50:05 +0000

    audio/lmms: Fix issue caused by kwidgetsaddons

    Add temporary patch to fix a crash at startup if kwidgetsaddons
    5.101.0 is installed. The patch was obtained from LMMS ticket
    related with this issue[1].

    [1] https://github.com/LMMS/lmms/issues/6587

    Since I'm here reorder Makefile to make linters happy.

    PR:             270470
    Reported by:    Manuel <gnuandbsdguy@gmail.com>
    MFH:        2023Q2

    (cherry picked from commit 8827164af8acf5fb7255f51a175b2d39d0ce76ff)

 audio/lmms/Makefile                                | 20 ++++------
 .../files/patch-src_gui_MainApplication.cpp (new)  | 21 +++++++++++
 .../lmms/files/patch-src_gui_MainWindow.cpp (new)  | 44 ++++++++++++++++++++++
 3 files changed, 73 insertions(+), 12 deletions(-)
Comment 8 Tomoaki AOKI 2023-06-18 09:21:25 UTC
Unfortunately, this fails packaging on poudriere, regardless OPTIONs are default or PULSEAUDIO is ON.

The error log is as below. The missing file does not appear elsewhere in the log.


=>> Building audio/lmms
build started at Sun Jun 18 18:02:52 JST 2023
port directory: /usr/ports/audio/lmms
package name: lmms-1.2.2_7,2
building for: FreeBSD 13amd64-default-job-01 13.2-STABLE FreeBSD 13.2-STABLE 1302505 amd64
maintained by: rodrigo@FreeBSD.org
Makefile datestamp: -rw-r--r--  1 root  wheel  3020 Jun 18 07:26 /usr/ports/audio/lmms/Makefile
Ports top last git commit: 73f13ae4a53f
Ports top unclean checkout: yes
Port dir last git commit: 8827164af8ac
Port dir unclean checkout: no
Poudriere version: poudriere-git-3.3.99.20220831
Host OSVERSION: 1302505
Jail OSVERSION: 1302505
Job Id: 01

     (snip)

=======================<phase: package        >============================
===== env: 'PKG_NOTES=build_timestamp ports_top_git_hash ports_top_checkout_unclean port_git_hash port_checkout_unclean built_by' 'PKG_NOTE_build_timestamp=2023-06-18T09:02:52+0000' 'PKG_NOTE_ports_top_git_hash=73f13ae4a53f' 'PKG_NOTE_ports_top_checkout_unclean=yes' 'PKG_NOTE_port_git_hash=8827164af8ac' 'PKG_NOTE_port_checkout_unclean=no' 'PKG_NOTE_built_by=poudriere-git-3.3.99.20220831' NO_DEPENDS=yes USER=nobody UID=65534 GID=65534
===>  Building package for lmms-1.2.2_7,2
pkg-static: Unable to access file /wrkdirs/usr/ports/audio/lmms/work/stage/usr/local/lib/lmms/libgigplayer.so:No such file or directory
*** Error code 1

Stop.
make: stopped in /usr/ports/audio/lmms
=>> Cleaning up wrkdir
===>  Cleaning for lmms-1.2.2_7,2
build of audio/lmms | lmms-1.2.2_7,2 ended at Sun Jun 18 18:06:11 JST 2023
build time: 00:03:19
!!! build failure encountered !!!
Comment 9 Rodrigo Osorio freebsd_committer freebsd_triage 2023-06-18 13:46:37 UTC
(In reply to Tomoaki AOKI from comment #8)
Hi,

This is strange, I didn't saw such error in my poudriere builds.

What I know is that lmms is very sensitive when you change the default
settings, so you must ensure the options are cleared before a new build
of lmms.

In the meantime I saw other lib issues around libgig I will
commit in HEAD in the upcoming hours.

Thank's for the heads-up.

Cheers,
-- rodrigo
Comment 10 Tomoaki AOKI 2023-06-18 15:32:49 UTC
(In reply to Rodrigo Osorio from comment #9)

I've missed on my previous post that I've confirmed audio/lmms/Makefile that default OPTION is OSS only and I had OSS and PULSEAUDIO set at the fisrt failure, and then tried turning off PULSEAUDIO, that matches the default, and it failed the same way on poudriere.

And now I can report that updating with pkg_replace on bare-metal environment (not in any jails) succeeded with OPTIONs OSS and PULSEAUDIO set. `make package` succeeded, too.
So this would be specific for jailed environment like poudriere.

This usually means something are missed as dependencies.
Builds on bare-metal environment that has enough dependencies installed succeeds in these cases.