Bug 236512 - audio/audacity: GTK+ 2.x and GTK+ 3 in the same process is not supported
Summary: audio/audacity: GTK+ 2.x and GTK+ 3 in the same process is not supported
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs mailing list
URL:
Keywords:
: 236503 238009 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-03-13 18:08 UTC by gja822
Modified: 2019-11-11 22:20 UTC (History)
9 users (show)

See Also:
xxjack12xx: maintainer-feedback-


Attachments
Disable dynamic load of libgnomeui and libgnome this fixes audacity (530 bytes, patch)
2019-11-09 13:41 UTC, lenzi.sergio
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description gja822 2019-03-13 18:08:29 UTC
After upgrade to audacity-2.3.1 from ports (that was quiet and finished O.K.) I've found out that audacity is no more usable. The output is:

$ audacity

(Audacity:31278): Gtk-ERROR **: 17:30:23.542: GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported
Trace/BPT trap (core dumped)

No mentioning of future problem was in /usr/ports/UPDATING. I've tried to uninstall some "GTK2-looks-like" that are no dependencies to anything else, but without luck.

May be some guided way to upgrade audacity (and may be other GTK2-stuck ports?)?

latest ports' tree on FreeBSD 11.2-STABLE amd64
Comment 1 Jack 2019-03-13 19:32:42 UTC
What packages do you have installed? How did you upgrade audacity? Maybe there is installation ordering problem, can you try reinstalling it and see if the issue persists? I'm not able to reproduce on 12.0-STABLE
Comment 2 gja822 2019-03-14 02:49:42 UTC
(In reply to xxjack12xx from comment #1)
I have a bunch of packages. I am using 'portsnap fetch update' and 'portupgrade' then.
Deinstalling, reinstalling dependencies and installing audacity again do not help.

Here people say the same problem for them:

https://forums.freebsd.org/threads/audacity-failed-to-build-upgrade-because-of-dependencies.69890/

What about sequence? How can I modify it?

pkg info -r gtk2-2.24.32
gtk2-2.24.32:
	gtkimageview-1.6.4_5
	pybookreader-0.5.0_7
	py27-gtksourceview-2.10.1_2
	libsocialweb-0.25.21_3
	swfdec-0.8.4_6
	galculator-2.1.4
	libcanberra-0.30_4
	libcanberra-gtk3-0.30_4
	gmtp-1.3.10
	gtkspell-2.0.16_6
	libgnomecanvas-2.30.3_4
	libsexy-0.1.11_10
	vte-0.28.2_3
	gtkperf-0.40_10
	py27-vte-0.28.2_3
	gtk-murrine-engine-0.98.2_5
	libwnck-2.30.7_1
	unique-1.1.6_7
	policykit-gnome-0.9.2_8
	gnome-mount-0.8_13
	gstreamer-plugins-gconf-0.10.31_2,3
	gtk-engines2-2.20.2_3
	gtksourceview2-2.10.5_5
	libgtkhtml-2.11.1_8
	swfdec-gnome-2.30.1_2
	lxappearance-0.6.3
	xscreensaver-gnome-hacks-5.12_3
	denemo-2.0.6_2
	apcupsd-3.14.14_2
	fontforge-20170731
	lash-0.5.4_13
	mate-themes-3.22.14
	pinentry-gtk2-1.1.0
	libglade2-2.6.4_9
	libgnome-2.32.1
	libbonoboui-2.24.5_1
	py27-gtk2-2.24.0_5
	py27-notify-0.1.1_12
	zenmap-7.70
	pinentry-gnome3-1.1.0
	uhttpmock-0.5.1_1
	gimp-gutenprint-5.2.14
	lv2-1.14.0_1
	py27-avahi-0.7
	qt4-gui-4.8.7_6
	cinepaint-1.0.4_14
	gtkmm24-2.24.5_1
	gtkglext-1.2.0_19
	nspluginwrapper-1.4.4_7
	gnome-vfs-2.24.4_10
	avahi-gtk-0.7_1
	py27-gimp-2.10.8_1
	pulseaudio-12.2_2
	gimp-app-2.10.8_1,1
	fuse-1.5.7
	libgnomeui-2.24.5
	audacious-3.10.1
	xvattr-1.3_10
	p5-Gtk2-1.24992
	pidgin-2.13.0
	w3m-0.5.3.20190105
	libreoffice-6.0.7_6
	gconf2-3.2.6_5
	webkit2-gtk3-2.22.6
	thunderbird-60.5.2_1
	firefox-65.0.2,1
	wx31-gtk3-3.1.2_1
	ibus-1.5.18_3
	audacious-plugins-3.10.1_1
	ufraw-0.22_10
	wx28-gtk2-common-2.8.12_7
	wx28-gtk2-2.8.12_7
	wx28-gtk2-contrib-common-2.8.12_7
	wx28-gtk2-contrib-2.8.12_7
	py27-matplotlib-2.1.2_5
	opencv-3.4.1_14
	gimp-gmic-plugin-1.6.9_19
	oss-4.2.b2019
Comment 3 Jack 2019-03-14 05:04:02 UTC
What is the full list of pkgs you have installed? That forum post was before the port was upgraded officially. What happens if you uninstall wx30-gtk then reinstall audacity?

im still trying to reproduce the issue here in 12-STABLE which doesnt seem to have this issue.
Comment 4 gja822 2019-03-14 05:37:13 UTC
(In reply to xxjack12xx from comment #3)
I suppose, the problem could be in the order of installation and time of upgrading pkgs (ports in my case, I use only ports).

I do not have wx30-gtk now.

But I have wx28-gtk2, which is (was?) needed by opencv-3.4.1_14 via gimp-gmic-plugin-1.6.9_19 -> opencv-3.4.1_14 ->  gdcm-2.8.9_1 ->  vtk6-6.2.0_7 -> py27-matplotlib-2.1.2_5 -> py27-wxPython28-2.8.12.1_11 ... chain.

I assume the problem is in that chain (including opencv with chosen GTK2 option).

But if you really need all my ports installed, please instruct me where to upload the attachment with 1730 items.
Comment 5 Jack 2019-03-14 06:18:07 UTC
Let me install wx28-gtk here and see what happens.
Comment 6 Jack 2019-03-14 06:42:35 UTC
I suspect it may be opencv

https://github.com/CMU-Perceptual-Computing-Lab/openpose/issues/117

Can you try uninstalling wx-gtk28 and opencv, then reinstall opencv and see if you still get the error?
Comment 7 gja822 2019-03-14 07:34:50 UTC
(In reply to xxjack12xx from comment #6)
No, this didn't help. I've uninstalled opencv and wx28, then built audacity and still..

$ pkg info -Ix opencv
opencvs-20151230               BSD-licensed CVS implementation
$ pkg info -Ix wx
wx31-gtk3-3.1.2_1              GUI toolkit (wxWidgets) with GTK+ bindings
$ audacity

(Audacity:91465): Gtk-ERROR **: 14:32:49.302: GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported
Trace/BPT trap (core dumped)


Where it can get this wrong mixture of symbols?
Comment 8 Jack 2019-03-14 07:36:09 UTC
I'm not sure, can you attach a build log of audacity and the options you chose?
Comment 9 Jack 2019-03-14 07:47:30 UTC
Also, what is the output of ldd /usr/local/bin/audacity
Comment 10 gja822 2019-03-14 08:12:58 UTC
(In reply to xxjack12xx from comment #9)
Here I put build log, options and ldd output.

ftp://gaidov.info/audacity_.tar.xz
Comment 11 Jack 2019-03-14 08:26:49 UTC
I just upgraded audacity from 2.3.0_5 to 2.3.1 on FreeBSD 12-STABLE and still can't reproduce. Maybe this is something with 11.2 and gtk strangeness?

Try this, portupgrade -fu gtk2-2.24.32 and see if that works.
Comment 12 Jack 2019-03-14 08:32:29 UTC
It seems this is a common problem.
https://forums.wxwidgets.org/viewtopic.php?t=40233

Have you tried reinstalling wx31-gtk also?
Comment 13 gja822 2019-03-14 08:57:21 UTC
(In reply to Jack from comment #12)
Yes, I rebuilt it several times already. By the way, your link is not new, it dates back to 2014. But the problem looks quite the same.
Comment 14 gja822 2019-03-14 09:15:03 UTC
(In reply to Jack from comment #11)
No, it doesn't work also.
Comment 15 Walter Schwarzenfeld freebsd_triage 2019-03-14 09:51:46 UTC
*** Bug 236503 has been marked as a duplicate of this bug. ***
Comment 16 Robert Cina 2019-03-14 17:41:53 UTC
I have a similar situation on my stable-12 amd64 system. Audacity does not start for me as well. I get the following error:

(Audacity:50257): Gtk-ERROR **: 13:30:37.994: GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported
Trace/BPT trap (core dumped)

However, I only build all my packages using poudriere. I uninstalled audacity and reinstalled it but that didn't help. I also reinstalled all my packages using pkg upgrade -f. But the issue still persists.  I also have the following installed:

wx28-gtk2-2.8.12_7             The wxWidgets GUI toolkit with GTK+ bindings
wx28-gtk2-common-2.8.12_7      The wxWidgets GUI toolkit (common files)
wx30-gtk3-3.0.4_7              The wxWidgets GUI toolkit with GTK+ bindings
wx31-gtk3-3.1.2_1


Removing the above packages and reinstalling each did not solve my problem as well. I'm not sure what else to try at this point to fix it.

Any other hints I would be glad to try.
Comment 17 Jack 2019-03-14 19:17:40 UTC
I'm running a portupgrade -Rf audacity to see if I can reproduce. Can someone try that also and see if that resolves the issue? I don't think this is an audacity specific problem.
Comment 18 Tatsuki Makino 2019-03-14 22:54:09 UTC
pkg check -d -a -n (pkg check --dependencies --all --dry-run)
This is useful when dependencies are messed up.

pkg autoremove
This is useful for cleaning out build dependencies only.

Please use these to improve your prospects. :)
Comment 19 Jack 2019-03-15 20:37:39 UTC
portupgrade -Rf audacity finished here and it still works fine, has anyone tried this to see if that solves the issues?
Comment 20 gja822 2019-03-17 02:17:50 UTC
(In reply to Jack from comment #19)
Just finished  portupgrade -Rf audacity  , for you have asked.

No, this do not help. Just the same error.
(Though I had doubts. Why it should help, if it's just the same with the same options built again?)
Comment 21 Jack 2019-03-17 03:33:57 UTC
That's really strange. There must be something in a dependency that's causing this. So far I've installed/upgraded 6 machines (that had audacity 2.3.0_5 previously) to 2.3.1 and still haven't been able to reproduce. All of them are running FreeBSD 12-STABLE amd64. I'm going to have to try and install a new clean machine to see if I can reproduce.
Comment 22 gja822 2019-03-17 06:18:47 UTC
(In reply to Jack from comment #21)
May be it is connected with some ports' options, although?
Comment 23 Jack 2019-03-17 07:19:01 UTC
(In reply to gja822 from comment #22)
I must be, but I'm unsure which dependency and what option.
Comment 24 gja822 2019-03-17 09:09:05 UTC
(In reply to Jack from comment #23)
Have built audacity with (almost) default options (except for VAMP=off for me) with the same error result.
Comment 25 Jack 2019-03-18 02:35:46 UTC
I just installed the binary from the FreeBSD package site via pkg install audacity and it does not give any gtk issues, can you try installing it via pkg and see if that makes a difference?
Comment 26 gja822 2019-03-18 16:21:58 UTC
(In reply to Jack from comment #25)
I am sorry, but this stage I'll pass. It propose to delete great pack of my installed ports.

# pkg install audio/audacity
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Updating database digests format: 100%
pkg: noto-lite has a missing dependency: mkfontdir
The following 128 package(s) will be affected (of 0 checked):

Installed packages to be REMOVED:
	qt5-gui-5.12.1
	oyranos-0.9.6_7
	caja-1.20.2_1
	rpm4-4.14.2.1
	autotrace-0.31.1_32
	pstoedit-3.70_9
	audacious-plugins-3.10.1_1
	swfdec-gnome-2.30.1_2
	swfdec-0.8.4_6
	gstreamer-plugins-core-0.10_13
	atril-1.20.2
	farsight2-0.0.31_3
	libnice-gst010-0.1.13
	telepathy-gabble-0.18.3_5
	libreoffice-6.0.7_6
	file-roller-3.28.1,1
	nautilus-3.28.1_2
	qt4-assistant-4.8.7_2
	qt4-webkit-4.8.7_3
	qt4-declarative-4.8.7_2
	qt4-xmlpatterns-4.8.7_2
	qt4-network-4.8.7_10
	qt4-linguist-4.8.7_2
	qt4-qt3support-4.8.7_2
	qt4-help-4.8.7_2
	thunderbird-60.5.3
	fusefs-simple-mtpfs-0.3.0_4
	vlc-3.0.6_6,4
	qt5-x11extras-5.12.1
	mate-base-1.20.3
	mate-control-center-1.20.3_1
	libmatekbd-1.20.2
	mate-settings-daemon-1.20.3
	gimp-app-2.10.8_1,1
	py27-gimp-2.10.8_1
	scantailor-0.9.11.1_15
	tesseract-3.05.02_4
	gnome-settings-daemon-3.28.1
	mate-power-manager-1.20.2
	gthumb-3.6.1_5
	qt5-webkit-5.212.0.a2_19
	qt5-widgets-5.12.1
	qt5-printsupport-5.12.1
	djview-4.10.6_3
	qt5-declarative-5.12.1
	qt5-webchannel-5.12.1
	qt5-location-5.12.1
	phonon-qt5-4.10.2_3
	qt5-opengl-5.12.1
	phonon-gstreamer-qt5-4.9.0_5
	qt5-sensors-5.12.1
	qt5-svg-5.12.1
	doxygen-1.8.15_1,2
	suil-0.10.2_2
	gvfs-1.30.4
	libgdata-0.17.9
	libgnome-2.32.1
	libbonoboui-2.24.5_1
	gstreamer-plugins-a52dec-0.10.19_2,3
	gstreamer-plugins-dts-0.10.23_2,3
	avidemux-qt4-2.6.11_8
	eom-1.20.1_1
	mate-system-monitor-1.20.1_1
	marco-1.20.2
	metacity-3.18.3_1
	mate-utils-1.20.1
	mate-1.20.3
	mate-screensaver-1.20.2
	mate-applets-1.20.2_2
	pluma-1.20.3_1
	caja-extensions-1.20.1
	feh-3.1.3
	ufraw-0.22_11
	gimp-lensfun-plugin-0.2.4.d_8
	cinepaint-1.0.4_14
	engrampa-1.20.1
	gnome-online-accounts-3.28.0_1
	gnumeric-1.12.43
	ibus-qt-1.3.3_12
	qzeitgeist-0.8.0_2
	qt4-opengl-4.8.7_3
	qt4-designer-4.8.7_2
	qt4-qtconfig-4.8.7_2
	gstreamer-plugins-vp8-0.10.23_6,3
	libgnomeui-2.24.5
	firefox-66.0_1,1
	brasero-3.12.2
	fuse-1.5.7
	gimp-gutenprint-5.2.14
	gimp-2.10.8,2
	mate-notification-daemon-1.20.1
	gnome-screenshot-3.26.0
	gimp-wavelet-sharpen-plugin-0.1.2_3
	gimp-wavelet-denoise-plugin-0.3.1_3
	gimp-wavelet-decompose-plugin-0.1.2_3
	gstreamer-ffmpeg-0.10.13_6

New packages to be INSTALLED:
	audacity: 2.3.1
	gcc8: 8.3.0
	guile: 1.8.8_4
	libwmf-nox11: 0.2.8.4_15
	opencore-amr: 0.1.5
	pjsip-extsrtp: 2.8

Installed packages to be UPGRADED:
	avidemux-plugins: 2.6.11_11 -> 2.6.11_12

Installed packages to be REINSTALLED:
	pkg-1.10.5_5 (options changed)
	pango-1.42.4_1
	libXfont-1.5.4_2,2
	libXvMC-1.0.10_2
	snappy-1.1.6
	tex-ptexenc-1.3.3_2
	xterm-344 (options changed)
	libpci-3.6.2
	libnice-0.1.13
	newt-0.52.20
	popt-1.16_2
	libdv-1.0.0_6
	asterisk13-13.25.0 (options changed)
	db6-6.2.32_1
	gcr-3.28.0
	fluidsynth-2.0.3 (options changed)
	liba52-0.7.4_3
	libdvdnav-6.0.0
	libdca-0.0.6_1
	sane-backends-1.0.27_5 (options changed)
	json-c-0.13.1
	libpurple-2.13.0 (options changed)
	umem-1.0.1_4
	net-snmp-5.7.3_19 (options changed)
	p7zip-16.02_2 (options changed)

Number of packages to be removed: 96
Number of packages to be installed: 6
Number of packages to be upgraded: 1
Number of packages to be reinstalled: 25

The operation will free 1 GiB.
100 MiB to be downloaded.
Comment 27 Jack 2019-03-19 02:26:19 UTC
It definitely looks like some deps have issues. Try this to avoid pkg changing things

pkg fetch audacity
pkg delete audacity
pkg add /var/cache/pkg/audacity-2.3.1.txz
Comment 28 gja822 2019-03-19 04:58:07 UTC
(In reply to Jack from comment #27)
Well, with "changed options" it is O.K. for me, with pkgs being with default and mine (from ports) being with different sets of options.
With "INSTALL" section I also can understand that these ports are exclusive with mine installed (for example, I have libwmf but pkg wants libwmf-nox11).

But why should I completely delete (not reinstall) my ports?? it is out of my understanding. Or why should I reinstall just the same ports with the same options?
So, I consider it the very good advice not to mix ports and packages.
Is there any way to check ports' dependencies?  pkg check -B  looks O.K..

I'll try your conservative way later.
Comment 29 Jack 2019-03-19 05:36:25 UTC
I just wanted to test and verify the pkg version is not broken. Since the pkg version is working, I think it is a dependency that is messed up and not audacity that is messed up. I don't know which dependency is the problem but looking at how many pkgs pkg wants to change, it seems like something is out of date. I only use ports to install everything and never pkg, but when I pkg add audacity, it does not ask to do so much. I get this:

root@upstairs:/home/jack # pkg install audacity
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Updating database digests format: 100%
The following 6 package(s) will be affected (of 0 checked):

Installed packages to be REMOVED:
        xfce4-settings-4.12.4_3
        xfce4-mixer-4.11.0_4
        xfce4-appfinder-4.12.0_1

Installed packages to be REINSTALLED:
        pkg-1.10.5_5 (options changed)
        audacity-2.3.1 (options changed)
        libxfce4menu-4.12.1_2

Number of packages to be removed: 3
Number of packages to be reinstalled: 3

The process will require 10 MiB more space.
3 MiB to be downloaded.


Maybe try reinstalling all the pkgs that the pkg version tried to change and see if it makes a difference? I don't think this is something related to audacity exclusively.
Comment 30 gja822 2019-03-20 09:25:46 UTC
(In reply to Jack from comment #27)
Yes… the “conservative way” (pkg add /var/cache/pkg/audacity-2.3.1.txz) give just the same error results.
Comment 31 Jack 2019-03-20 09:34:32 UTC
Ok, then it's definitely a dependency problem and not audacity. I'm not sure which dependency it is but it is strange that

pkg install audacity

would produce so many changes.

How are you upgrading your ports and ports tree? Not sure what else to do other than to force upgrade everything and see if that resolves the issue.
Comment 32 Robert Cina 2019-03-20 17:45:03 UTC
I've managed to get audacity working again on my 12-stable amd64 system after a little trial and error. It boiled down to removing the port audio/tuxguitar and it's immediate dependencies from my system.

So basically this is what i did,

# pkg remove audio/tuxguitar 

and then
# pkg autoremove

I don't really know why the port of tuxguitar interferes with audacity but I at least have audacity working again.
Comment 33 gja822 2019-03-20 18:15:04 UTC
(In reply to Jack from comment #31)
(Well, why even for you pkg install audacity tries to delete all desktop manager - xfce in your case?)
May be the reason, I do have many ports installed.
I install only ports, no pkgs. Updating is by  portsnap fetch update  and then I watch  pkg version -v | grep need  output and  portupgrade  these ports.
But my first main problem was with audacity and after upgrade, no other port give that error (yet). Other huge ports like firefox, libreoffice or chromium work just like before. Lately I've noticed problem with MATE clock applet (it crashes when trying to set location) and with gimp (it starts but refuses to load images with "Procedure 'file-jpeg-load' returned no return values" dying plugin message). May be some corrupted configuration or other database-files?
Some other people had the same problem, although ( https://forums.freebsd.org/threads/audacity-failed-to-build-upgrade-because-of-dependencies.69890/post-419887 ).

Unfortunately, I do not have audio/tuxguitar to deinstall and try.
Comment 34 Robert Cina 2019-03-20 18:27:04 UTC
After looking at the dependencies of tuxguitar I have noticed that x11-toolkits/libgnomeui is at fault for me.

Do you have toolkits/libgnomeui installed? If so I think that may be the offending port.
Comment 35 Robert Cina 2019-03-20 18:28:10 UTC
Sorry for the typo is should have been x11-toolkits/libgnomeui.
Comment 36 gja822 2019-03-23 16:51:12 UTC
Hooray! After rebuilding a couple of hundreds of ports (direct and far dependencies and alike), audio/audacity now works again for me.
Comment 37 martin.dieringer 2019-04-03 21:03:58 UTC
I had to compile wx31-gtk3 without GSTREAMER, because that pulls in a gtk2 dependency. Why?
Comment 38 Jack 2019-04-04 00:38:23 UTC
(In reply to martin.dieringer from comment #37)
That would be a w31-gtk3 bug report, not an audacity bug.
Comment 39 Walter Schwarzenfeld freebsd_triage 2019-05-21 18:44:26 UTC
*** Bug 238009 has been marked as a duplicate of this bug. ***
Comment 40 Tomasz "CeDeROM" CEDRO 2019-05-21 19:03:45 UTC
+1 the same problem here :-)
Comment 41 Jack 2019-05-21 19:31:34 UTC
Perhaps there should be a pkg-message advising wx31-gtk3 to be compiled without gstreamer so it doesn't pull in the gtk2 dependency?
Comment 42 Jack 2019-05-21 19:33:22 UTC
Actually gstreamer support is enabled in my install without issue, maybe it's gstreamer that needs to be recompiled without gtk2 support.
Comment 43 Emanuel Haupt freebsd_committer 2019-09-27 18:19:43 UTC
+1

Same problem, 12.0-RELEASE, amd64 packages only.
Comment 44 lenzi.sergio 2019-11-09 13:41:20 UTC
Created attachment 208996 [details]
Disable dynamic load of libgnomeui and libgnome this fixes audacity

Audacity version 2.3.X only builds on gtk3, but there is a dlopen and subsequent initialization of gttk2 using dlopen from src/AudacityApp.cpp  This patch prevents audacity from dynamic load libgnomeui and libgnome  and initialize it.
Comment 45 Jack 2019-11-11 22:20:43 UTC
(In reply to lenzi.sergio from comment #44)
Appears to work fine. Thanks for finding the issue!