You are not logged in.

#1 2018-07-16 04:54:22

Vancelot
Member
Registered: 2018-07-16
Posts: 5

[SOLVED]Unity3d game build crashes on run - libgtk-x11-2-so.0:

Hey all! I've been looking everywhere for answers but haven't had any luck.

I installed Unity3d from AUR and everything was working fine. I tried to build my first game project for class and it ran just fine. I then tried to install unity-windows from AUR and it wouldn't work from the build settings, in addition it broke the build settings window and I couldn't change it back to Linux build so I uninstalled the windows module. After that I tried to build for Linux again and that's when the problem started.

When I tried to run the built game I get an error, and the shell crashs. CTRL-C doesn't even make it snap out of it.

Set current directory to /home/n01/Documents/unity
Found path: /home/n01/Documents/unity/shooter.x86
Mono path[0] = '/home/n01/Documents/unity/shooter_Data/Managed'
Mono config path = '/home/n01/Documents/unity/shooter_Data/Mono/etc'
Unable to preload the following plugins:
	ScreenSelector.so
Logging to /home/n01/.config/unity3d/DefaultCompany/New Unity Project/Player.log

And the output to the log file

Error loading /home/n01/Documents/unity/shooter_Data/Plugins/x86/ScreenSelector.so: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory
Desktop is 0 x 0 @ 0 Hz

So I go to the program and the offending plugin and run

$ ldd shooter.x86
	linux-gate.so.1 (0xf7f8e000)
	libdl.so.2 => /usr/lib32/libdl.so.2 (0xf7f56000)
	libpthread.so.0 => /usr/lib32/libpthread.so.0 (0xf7f37000)
	librt.so.1 => /usr/lib32/librt.so.1 (0xf7f2d000)
	libstdc++.so.6 => /usr/lib32/libstdc++.so.6 (0xf7db0000)
	libm.so.6 => /usr/lib32/libm.so.6 (0xf7ce3000)
	libgcc_s.so.1 => /usr/lib32/libgcc_s.so.1 (0xf7cc7000)
	libc.so.6 => /usr/lib32/libc.so.6 (0xf7aec000)
	/lib/ld-linux.so.2 => /usr/lib/ld-linux.so.2 (0xf7f90000)

$ ldd ScreenSelector.so
	linux-gate.so.1 (0xf7f38000)
	libgtk-x11-2.0.so.0 => not found
	libgdk_pixbuf-2.0.so.0 => not found
	libgobject-2.0.so.0 => not found
	libglib-2.0.so.0 => not found
	libstdc++.so.6 => /usr/lib32/libstdc++.so.6 (0xf7d7d000)
	libc.so.6 => /usr/lib32/libc.so.6 (0xf7ba2000)
	libm.so.6 => /usr/lib32/libm.so.6 (0xf7ad5000)
	/usr/lib/ld-linux.so.2 (0xf7f3a000)
	libgcc_s.so.1 => /usr/lib32/libgcc_s.so.1 (0xf7ab9000)

So I go to /usr/lib and I have libgtk-x11-2.0.so, libgtk-x11-2.0.so.0, and libgtk-x11-2.0.so.0.2400.32

from the /usr/lib directory I run

$ sudo ldconfig -v | grep libgtk
	ldconfig: Path '/usr/lib64' given more than once
	ldconfig: Can't stat /usr/libx32: No such file or directory
	libgtksharpglue-2.so -> libgtksharpglue-2.so
	libgtkmm-3.0.so.1 -> libgtkmm-3.0.so.1.1.0
	libgtk-3.so.0 -> libgtk-3.so.0.2200.30
	libgtkmm-2.4.so.1 -> libgtkmm-2.4.so.1.1.0
	libgtkspell.so.0 -> libgtkspell.so.0.0.0
	libgtkspell3-3.so.0 -> libgtkspell3-3.so.0.2.0
	libgtk-x11-2.0.so.0 -> libgtk-x11-2.0.so.0.2400.32
	libgtksourceview-3.0.so.1 -> libgtksourceview-3.0.so.1.8.0

I run

$ pacman -Qo libgtk-x11-2.so
	/usr/lib/libgtk-x11-2.0.so is owned by gtk2 2.24.32-1

Then I run sudo pacman -S gtk2 to reinstall, ldconfig again, and ldd on the plugin but no change. It still says the library is not found.
After that I used pacman to uninstall unity-editor and reinstalled it from the package I had built from AUR but still no luck.

I feel like I can see the problem, but no idea what else to do to fix it.

Last edited by Vancelot (2018-07-16 19:22:02)

Offline

#2 2018-07-16 06:34:26

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,843

Re: [SOLVED]Unity3d game build crashes on run - libgtk-x11-2-so.0:

Because you're building a 32bit ELF… You need /usr/lib32/libgtk-x11-2.0.so, ie. the multilib version of gtk2 (and its deps)

Offline

#3 2018-07-16 09:19:42

Vancelot
Member
Registered: 2018-07-16
Posts: 5

Re: [SOLVED]Unity3d game build crashes on run - libgtk-x11-2-so.0:

I thought that but I could not find the gtk package for 32 bit with pacman

Offline

#4 2018-07-16 09:37:32

Vancelot
Member
Registered: 2018-07-16
Posts: 5

Re: [SOLVED]Unity3d game build crashes on run - libgtk-x11-2-so.0:

Ok I figured it out. I had to enable multilib

https://wiki.archlinux.org/index.php/multilib

looks better now but it's saying

Gtk-Message: 02:29:00.271: Failed to load module: "canberra-gtk-module"

Offline

#5 2018-07-16 09:44:51

Vancelot
Member
Registered: 2018-07-16
Posts: 5

Re: [SOLVED]Unity3d game build crashes on run - libgtk-x11-2-so.0:

Figured it out.
Needed the lib32-mesa package.
Launches but no sound

Offline

#6 2018-07-16 09:53:26

Vancelot
Member
Registered: 2018-07-16
Posts: 5

Re: [SOLVED]Unity3d game build crashes on run - libgtk-x11-2-so.0:

I feel really dumb at this point...
I realized somewhere in there the build settings in unity had changed the default to 32 bit build and not 64.
Thanks for the help Seth!

Offline

#7 2018-07-16 12:15:27

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,435

Re: [SOLVED]Unity3d game build crashes on run - libgtk-x11-2-so.0:

Please mark as [SOLVED] by editing the title in your initial post. For the issue with the 32bit build you really just have to install the corresponding lib32 variants of any dependency used, i.e. for sound lib32-alsa-lib (and/or lib32-alsa-plugins lib32-libpulse if you use pulse)

Offline

Board footer

Powered by FluxBB