-
Notifications
You must be signed in to change notification settings - Fork 5
Install
For gentoo users there is a portage overlay. Use layman to install:
layman -f -a glc -o 'http://nullkey.ath.cx/glc/overlays.xml'
If you don't have layman installed:
emerge layman
echo "source /usr/portage/local/layman/make.conf" >> /etc/make.conf
If you are running stable, unmask glc, packetstream and elfhacks:
echo "media-video/glc ~x86 ~amd64
dev-libs/packetstream ~x86 ~amd64
dev-libs/elfhacks ~x86 ~amd64" >> /etc/portage/package.keywords
And just emerge it:
emerge glc
There are regular release and live git packages for glc.
Install the following dependencies to allow the install of the 32bit libraries as root or sudo:
pacman -S gcc-multilib gcc-libs-multilib binutils-multilib libtool-multilib lib32-glibc
Then install from build script for non-gentooers (again as root or sudo):
wget https://github.com/nullkey/glc/raw/master/scripts/glc-build.sh
chmod a+x glc-build.sh
./glc-build.sh
to ensure glc will successfully run after reboot include the following line in you .bashrc file in your home folder:
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/lib64:/usr/lib32"
A ppa with packages for glc and the required libraries are available at
Source for packaging is available at
- https://github.com/ienorand/glc
- https://github.com/ienorand/packetstream
- https://github.com/ienorand/elfhacks
(Report packaging bugs there ;)
There is a build script:
wget https://github.com/nullkey/glc/raw/master/scripts/glc-build.sh
chmod a+x glc-build.sh
./glc-build.sh
Once you have installed glc you might want to know how to Capture.
Ubuntu users need following packages installed in order to compile glc:
sudo apt-get install build-essential cmake libx11-dev libxxf86vm-dev libgl1-mesa-dev libasound2-dev libpng12-dev
Additionally on 64-bit Ubuntu 12.04 following commands are necessary:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
sudo ln -s /usr/lib/i386-linux-gnu/libasound.so.2 /usr/lib/i386-linux-gnu/libasound.so
sudo ln -s /usr/lib/i386-linux-gnu/libXxf86vm.so.1 /usr/lib/i386-linux-gnu/libXxf86vm.so
sudo ln -s /usr/lib/i386-linux-gnu/libX11.so.6 /usr/lib/i386-linux-gnu/libX11.so
sudo ln -s /lib/i386-linux-gnu/libpng12.so.0 /lib/i386-linux-gnu/libpng.so
For older 64-bit Ubuntu versions see 64-bit systems
On other 64-bit systems following commands are necessary:
sudo apt-get install gcc-multilib
sudo ln -s /usr/lib32/libGL.so.1 /usr/lib32/libGL.so
sudo ln -s /usr/lib32/libasound.so.2 /usr/lib32/libasound.so
sudo ln -s /usr/lib32/libXxf86vm.so.1 /usr/lib32/libXxf86vm.so
sudo ln -s /usr/lib32/libX11.so.6 /usr/lib32/libX11.so
sudo ln -s /usr/lib32/libpng12.so.0 /usr/lib32/libpng.so
Note that as of Ubuntu 11.10 64-bit (possibly before), you only need to do libasound.so - the others are already existing files/links.
After Building
In newer versions (11.10, possibly before), you must link the /usr/lib64 versions of the built libraries (or lib32, if you're trying to run the 32-bit version - I did not test this, so I'm not sure it's necessary on 32-bit) to /usr/lib as follows (substitute path for wherever you built them, I built them in the /usr tree):
sudo ln -s /usr/lib64/libglc-capture.so.0 /usr/lib/libglc-capture.so.0
sudo ln -s /usr/lib64/libglc-capture.so.0 /usr/lib/libglc-capture.so.
sudo ln -s /usr/lib64/libglc-core.so.0 /usr/lib/libglc-core.so.0
sudo ln -s /usr/lib64/libglc-core.so.0 /usr/lib/libglc-core.so
sudo ln -s /usr/lib64/libglc-export.so.0 /usr/lib/libglc-export.so.0
sudo ln -s /usr/lib64/libglc-export.so.0 /usr/lib/libglc-export.so
sudo ln -s /usr/lib64/libglc-hook.so.0 /usr/lib/libglc-hook.so.0
sudo ln -s /usr/lib64/libglc-hook.so.0 /usr/lib/libglc-hook.so
sudo ln -s /usr/lib64/libglc-play.so.0 /usr/lib/libglc-play.so.0
sudo ln -s /usr/lib64/libglc-play.so.0 /usr/lib/libglc-play.so
sudo ln -s /usr/lib64/libpacketstream.so.0 /usr/lib/libpacketstream.so.0
sudo ln -s /usr/lib64/libpacketstream.so.0 /usr/lib/libpacketstream.so
glc-play looks for the .so.0 variants, while glc-capture looks for the plain .so variants.
This could probably be avoided with the right linker flags (seems to be hardcoded to lib rather than lib64 and lib32 as on 64-bit *buntu), but I (Yushatak) am not proficient enough with C/C++ compilation to solve it myself.
For Pardus 2011 users there is a custom repo which contains glc, elfhacks, and packetstream. To use this repo and install glc:
sudo pisi ar happy-kitty http://happy-kitty.googlecode.com/svn/trunk/pisi-index.xml.xz
sudo pisi em glc
Some additional tricks were required to get glc compiling correctly under Fedora 64-bit. Firstly, you'll need to get the system to stop complaining about gcc-multilib. Multilib should already be installed and working on Fedora, but you'll probably need the 32-bit development tools for the script to compile correctly. The command:
yum install glibc-devel.i686
should take care of that.
You'll need to make a couple changes to the build script, firstly by changing the GIT_CLONE and GIT_PULL variables under the gitfetch() function (line 39 or so) to this:
GIT_CLONE=`git clone`
GIT_PULL=`git pull`
Which skips using the nonincluded dashed syntax variants of the git command. Then, edit the line around 117:
GIT_CLONE=`which git-clone 2> /dev/null`
to this:
GIT_CLONE=`which git 2> /dev/null`
which will prevent the script from failing due to the lack of the git-clone command.
Then, you'll need to grab the 32-bit dependencies listed above in the Ubuntu section; my method was to simply execute:
yum provides */libGL.so
Or similar for each of the unlocatable dependencies shown after attempting to compile (and shown above) and install the corresponding .i686 package to provide 32-bit variants of the necessary files. Depending on which package you get you might need to add an extra symbolic link or two (I had to for the nvidia version of libGL.so that I grabbed) so check the /usr/lib folder to make sure everything is in its correct place. If you used a non-default installation directory be sure to listen to the installer and add the export lines to your .bashrc so you can run glc from anywhere easily.
Like the above instructions, download the glc-build.sh script.
wget https://github.com/nullkey/glc/raw/master/scripts/glc-build.sh
In the same directory you downloaded the glc-build.sh create a file called diff-glc-build. Cut and paste the following into that file.
Because the code tags suck, the diff has been placed on pastebin for your convenience. :D http://pastebin.com/XysdYfc8
Alternatively you can download it like this as well.
wget http://pastebin.com/raw.php?i=XysdYfc8 -O diff-glc-build
Now to patch the file with the diff.
patch -p1 glc-build.sh < diff-glc-build
Pastebin wasn't letting me have the linebreak that is at the end of the actual diff file i created so you will get patch warnings.
(Stripping trailing CRs from patch.)
patching file glc-build.sh
Hunk #12 succeeded at 337 with fuzz 1.
Ignore the above errors and execute the build script.
chmod a+x glc-build.sh
./glc-build.sh
This will create a slackware package and put it in the /tmp directory. Go ahead and install like you normally would!
upgradepkg --reinstall --install-new /tmp/glc-git-0.5.8-x86_64-1_AC.tgz
Enjoy using glc!
**Feel free to make a slackbuild for this, I was just too lazy. :D -agentc0re