Forums » Linux

Help with VO on FreeBSD

12»
Jan 23, 2007 FatStrat85 link
I just recently started using PC-BSD (FreeBSD 6.1 & KDE). I have no other experience with UNIX and am having trouble getting VO to run. I know other people have got it to work, so I was hoping someone could help me.

I browsed through the other older threads on running VO on FreeBSD and installed some of the ports they said were required (some of them I couldn't find though, possibly outdated). My graphics Card (NVIDIA GeForce FX 5200) is working and my Linux compatibility is working (I think).

I got the installer to work but when I go to try to run the executable it installed from the Konsole, I get this error:

/home/****/bin/vendetta: error while loading shared libraries: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory

The file "libgtk-x11-2.0.so.0" does exist in /usr/local/lib/ as well as in several program folders. However, VO was installed in my home folder. I actually had to create a /bin directory in my home folder so the VO installer could put the executable there (which I thought was very strange).

I'd appreciate any help or advice you guys could offer. Like I said, I'm fairly new to UNIX, so it'd be helpful if you could explain things and give instructions in simple terms. Thanks in advance.

Here are some other related threads:
http://www.vendetta-online.com/x/msgboard/6/9237
http://www.vendetta-online.com/x/msgboard/6/13431
http://www.vendetta-online.com/x/msgboard/6/7314
Jan 24, 2007 trocade link
Have you tried to issue this command:

export LD_LIBRARY_PATH=/usr/local/lib

And then try again, it makes the program also look in that directory for libs.

Also I don't use FreeBSD but there might be a file called /etc/ld.so.conf add /usr/local/lib to the end of that file and run the command ldconfig (as root)
Jan 24, 2007 FatStrat85 link
I tried typing "export LD_LIBRARY_PATH=/usr/local/lib" in the Konsole and it said:

export: Command not found.

Also, there is no ld.so.conf in my /etc folder. There is however a /etc/ld-elf.so.conf. I don't know if that is the same thing. That file only has one line and it's:

/usr/local/lib/compat

Should I add /usr/local/lib to the end of that file?
Jan 25, 2007 mr_spuck link
no idea how the the linux compatibility works exactly .. maybe you have to install the linux version of gtk2
Jan 25, 2007 trocade link
What shell are you running? echo $SHELL would give you the answer.

For example, if it is csh/tcsh the command would be setenv LD_LIBRARY_PATH /usr/local/lib instead.

I don't know if ld-elf.so.conf is the same, but it can be worth a try.
Jan 25, 2007 FatStrat85 link
My shell is /bin/csh. However, "setenv LD_LIBRARY_PATH /usr/local/lib" seemed to work (or at least was a recognized command). I also then installed gtk2 like mr_spuck suggested. Doing that gave me this error when I tried to run VO:

------------------
(update.rlb:1271): Pango-WARNING **: No builtin or dynamically loaded modules
were found. Pango will not work correctly. This probably means
there was an error in the creation of:
'/etc/pango/pango.modules'
You may be able to recreate this file by running pango-querymodules.

(update.rlb:1271): GLib-GObject-CRITICAL **: g_object_ref: assertion `G_IS_OBJECT (object)' failed

(update.rlb:1271): Pango-CRITICAL **: _pango_engine_shape_shape: assertion `PANGO_IS_FONT (font)' failed

Pango-ERROR **: file shape.c: line 75 (pango_shape): assertion failed: (glyphs->num_glyphs > 0)
aborting...
Abort
------------------

So then I ran "pango-querymodules" like the error suggested. When I then went back to try to run VO, I got this error:

------------------
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

(vendetta:1423): Gtk-WARNING **: cannot open display:
------------------

Then I did some searching on google and someone suggested to type "cp /home/youraccount/.Xauthority ~/". I did that and now I get:

------------------
Xlib: connection to ":0.0" refused by server
Xlib: Invalid MIT-MAGIC-COOKIE-1 key

(vendetta:1493): Gtk-WARNING **: cannot open display:
------------------

I only get this error when I try to run VO as root. Otherwise, I get the initial long pango error.
Jan 26, 2007 mr_spuck link
try xhost +localhost with the user that started the X server. that's supposed to be insecure though. But I don't know the details why. :P

you ran pango-query modules as root?
Jan 26, 2007 trocade link
First, never use root for anything except admin stuff. With that off, this info might help :)

xhost +localhost would let anyone open up or read what is on your X display, so very insecure.

What you can do as root is to issue this command:
setenv XAUTHORITY ~yourusername/.Xauthority
Jan 26, 2007 FatStrat85 link
The reason I must of ran pango-querymodules as root was that I was in the same Konsole window as when I installed gtk2. I don't know the command to log out of root and just didn't think enough to open a new window.

I tried to run pango-querymodules as user but it doesn't seem to do anything. I still only get the pango error as that user. I have to be logged in as root to get the xlib error.

I tried "xhost +localhost" as user and root. It didn't work. If I try it as root after the xlib error, I get this:

------------------
Xlib: connection to ":0.0" refused by server
Xlib: Invalid MIT-MAGIC-COOKIE-1 key
xhost: unable to open display ":0.0"
------------------

Then trying to run VO again gives the original xlib error.

I tried "setenv XAUTHORITY ~yourusername/.Xauthority" as root and it got rid of the xlib error. Then trying to run VO just gives me the original pango error again as both user and root until I open a new Konsole window and start over again.

Is there any hope?
Jan 26, 2007 trocade link
The changes you do with setenv is only affecting the current Konsole your are using.

pango-querymodules creates a file, or tries to create the file /etc/pango/pango.modules. But I read that it is not created if pango is not compiled with module support.

Also have you had posted the error message to any freebsd mailing list or messageboard?

Did you install everything using ports, or did you download individual packets and installed them one by one?

Edit:

Have you read this page? It explains how to set up linux support in FreeBSD.

http://os.newsforge.com/os/06/03/22/1531252.shtml?tid=8&tid=2
Jan 26, 2007 Antz link
When you finish and get it working, could you make an easy to follow guide to getting it up and running, so FreeBSD users can be pointed to it in the future?
Jan 26, 2007 FatStrat85 link
My Linux compatibility is working.

Maybe there is something more simple that's wrong. Maybe it didn't install properly. A couple of things struck me as very weird. I'll try to remember what happened.

I saved the installer script to a folder on my desktop. Then I ran it from the terminal by typing "sh vendetta-linux-ia32-installer.sh".

At first it didn't work. It just kept repeating that it couldn't create the file because the folder /home/****/bin could not be found. It just kept repeating that over and over, filling up my Konsole window. I had to close the Konsole to stop it. So I just went in and created a /bin folder in my home directory. Then the installer seemed to run OK.

However, it only created 1 file. The /bin folder I created only had an executable labeled "vendetta" that is only 71.7 KB. I expected to have support files and folders in there too.

So is all that normal? Did I make a mistake early on? I have to admit that I was unprepared for Magical Cookie errors and whatnot when I got into this.

Antz, once I get VO up and running, I will absolutely type up a step-by-step how-to thread. However, me ever getting VO to run is highly theoretical at this point, much like cold fusion and fat-free bacon.
Jan 27, 2007 trocade link
It created a executable under bin/vendetta.

But you also has a ~/.vendetta where all the data is.

However, I can not really help you any further, since I am not using FreeBSD myself, and trying to solve a problem without access to the machine is really hard.

But did you install the pango from ports btw? Since that would be the freebsd version, from what I read in the guide for Linux compatibility they used the rpm's from feodora core for linux.
Jan 27, 2007 Syylk link
I wonder why a clueless noob (who doesn't know how to close a root session, or how to create his home bin dir, or doesn't know that "cp /home/$USER/.Xauthority ~/" copies a file over itself, or that programs put stuff into hidden dirs, whose names start with a dot) tries his luck with an objectively hard to master OS like *BSD, instead of sticking to a more mundane Kubuntu or Fedora, at least to learn the ropes.

I could try and help by asking what his $PATH is, or what's the output of xhost(1) (hint, "xhost +" helps), or what libraries is vendetta linked against (hint, "ldd ~/bin/vendetta"), but I doubt we'd go very far.

What about windows?
Jan 27, 2007 FatStrat85 link
Ok, I've already been using VO on both OS X and Windows for months. I decided to enter the UNIX world and chose FreeBSD because I heard it was stable and secure. I wanted to challenge myself and learn something new.

So far I've been doing fine. I've only been using it for a week or two but have successfully installed my graphics card drivers, wireless card drivers (using NdisWrapper), and my printer drivers, all without asking for any help. I have every application that I need (or some version of it at least) working smoothly. The only thing that I haven't gotten to work on my own so far is VO.

Anyway...

$PATH as root says "/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin:/root/bin: Command not found."

$PATH as user says "/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin:/home/****/bin: Command not found."

xhost says "access control disabled, clients can connect from any host"

[EDIT] After I restarted, xhost and xhost + give me the second xlib/magic-cookie error.

ldd ~/bin/vendetta says:

------------------
libgtk-x11-2.0.so.0 => /usr/lib/libgtk-x11-2.0.so.0 (0x28078000)
libgdk-x11-2.0.so.0 => /usr/lib/libgdk-x11-2.0.so.0 (0x28370000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x283f4000)
libm.so.6 => /lib/obsolete/linuxthreads/libm.so.6 (0x284d0000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x284f6000)
libc.so.6 => /lib/obsolete/linuxthreads/libc.so.6 (0x28500000)
libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0 (0x2861f000)
libatk-1.0.so.0 => /usr/lib/libatk-1.0.so.0 (0x28636000)
libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0x2864d000)
libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x28689000)
libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x28712000)
libpangoxft-1.0.so.0 => /usr/lib/libpangoxft-1.0.so.0 (0x287e5000)
libpangox-1.0.so.0 => /usr/lib/libpangox-1.0.so.0 (0x287eb000)
libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0 (0x287f7000)
libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0x2882d000)
libdl.so.2 => /lib/libdl.so.2 (0x28831000)
libXrandr.so.2 => /usr/X11R6/lib/libXrandr.so.2 (0x28835000)
libXi.so.6 => /usr/X11R6/lib/libXi.so.6 (0x28839000)
libXinerama.so.1 => /usr/X11R6/lib/libXinerama.so.1 (0x28841000)
libXft.so.2 => /usr/X11R6/lib/libXft.so.2 (0x28845000)
libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x28858000)
libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x288c0000)
libXfixes.so.3 => /usr/X11R6/lib/libXfixes.so.3 (0x288ea000)
libXcursor.so.1 => /usr/X11R6/lib/libXcursor.so.1 (0x288ef000)
libXrender.so.1 => /usr/X11R6/lib/libXrender.so.1 (0x288f9000)
libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x28902000)
/lib/ld-linux.so.2 (0x28059000)
libpangoft2-1.0.so.0 => /usr/lib/libpangoft2-1.0.so.0 (0x28911000)
libexpat.so.0 => /usr/lib/libexpat.so.0 (0x28936000)
libz.so.1 => /usr/lib/libz.so.1 (0x28955000)
------------------

Thanks for the hints, Syylk. Any further advice or assistance you could offer would be appreciated.

I didn't install pango. I guess I should do that? I have it under /ports/x11-toolkits/. I assumed it was already installed or installed with something else since the files seem to be there already.
Jan 27, 2007 trocade link
If you are going to run it in emulated linux mode, you need to have a linux compiled(elf) pango, since the freebsd version of pango can not use linux compiled modules for pango.

That is why I pasted the link on how to enable linux compatbility, it explains everything you need. So read it and then try again with the correct libraries and linux enviroment.

"For a Linux binary, these dependencies must be met by shared libraries compiled for Linux (the ones already installed on your FreeBSD system won't do) and they must be the same versions of the libraries that were used when the binary was compiled.

You should resist the temptation to copy Linux libraries off your nearest Linux system into /usr/lib or /usr/local/lib -- it's a recipe for disaster to mingle foreign libraries with native FreeBSD libraries. On FreeBSD, foreign binaries are cordoned off under /compat/linux, a directory that's created and populated when you install a base Linux compatibility environment."

reading this and then looking at your ldd, you do not have functional linux compatbility.
Jan 27, 2007 FatStrat85 link
Ahh, ok. I thought I was all set on the linux compat side of things becasue when I typed "kldload linux" or "kldstat", it told me that it was compiled and loaded. I didn't realize I needed the libraries too. Thanks.

Do you think I should install "/usr/ports/emulators/linux_base-8" (Red Hat 8 i386 binary RPM packages)? Will that work with VO and give me what I need?

Also, what is the difference between "make install" and "make install && make clean"? When I've been installing ports, I've just been using "make install". Is that bad? Is my system dirty now?
Jan 27, 2007 mr_spuck link
make clean removes compiled objects from the source tree. so you'll just save some disk space if you do that.

I'd just install linux pango now if that isn't enough possibly glib and atk as well.
Jan 27, 2007 trocade link
Try to take a recent build base, Red Hat 8 is really old ... Feodora Core would be wiser to use.

But as mr_spuck says, try with just installing pango first.
Jan 27, 2007 FatStrat85 link
OK, I tried to install /usr/ports/emulators/linux_base-fc4 (Fedora Core). It didn't seem to make a difference. I'm getting the same errors when I go try to run VO.

I'm actually not sure if everything installed properly. It downloaded a whole bunch of files but it ended weird. It ended with:

------------------
===> linux_base-fc-4_9 depends on file: /usr/local/bin/rpm2cpio - found
===> Patching for linux_base-fc-4_9
===> Configuring for linux_base-fc-4_9
===> Building for linux_base-fc-4_9
===> Installing for linux_base-fc-4_9
===> Generating temporary packing list
===> Checking if emulators/linux_base-fc4 already installed
===> linux_base-fc-4_9 is already installed
You may wish to ``make deinstall'' and install this port again
by ``make reinstall'' to upgrade it properly.
If you really wish to overwrite the old port of emulators/linux_base-fc4
without deleting it first, set the variable "FORCE_PKG_REGISTER"
in your environment or the "make install" command line.
*** Error code 1

Stop in /usr/ports/emulators/linux_base-fc4.
------------------

I remember it said the same thing when I tried to install pango too. Does it just mean that it was already installed?