Archive

Archive for the ‘Linux from Scratch’ Category

Installing glib-1.2.10 in LFS to get XMMS working

November 3rd, 2011 1 comment

So I wanted to install XMMS in Linux From Scratch, as it’s one of the more reliable MP3 players and one of the first multimedia Linux apps I’ve used. It’s very reminiscent of Winamp 2:

If you would also like to get it installed, you’ll need the source and glib-1.2.10. Then, check out a common problem when installing glib, and a patch to fix the ./configure step.




I am currently running Ubuntu 14.04 LTS for a home server, with a mix of Windows, OS X and Linux clients for both work and personal use.
I prefer Ubuntu LTS releases without Unity - XFCE is much more my style of desktop interface.
Check out my profile for more information.

LFS, pre-KDE: Fixing libmng with -fPIC and xine with a header

November 2nd, 2011 No comments

Fixing libmng with -fPIC

In preparation for getting KDE4 (and Qt4, and all the other dependencies) working with my Linux from Scratch install, I noticed an issue when compiling libmng:

/usr/bin/ld: libmng_chunk_io.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
libmng_chunk_io.o: could not read symbols: Bad valuecollect2: ld returned 1 exit status
make: *** [libmng.so.1.1.0.9] Error 1

To fix this, you’ll have to edit the makefile in /sources/libmng-1.0.10/makefiles/makefile.linux as per this osdir mailing list thread. Line 47 currently reads:

FLAGS=-I$(ZLIBINC) -I$(JPEGINC) -I$(LCMSINC) -Wall -O3 -funroll-loops \

Add the -fPIC flag instead:

FLAGS=-I$(ZLIBINC) -I$(JPEGINC) -I$(LCMSINC) -Wall -O3 -fPIC -funroll-loops \

Then change back to /sources/libmng-1.0.10 and run make clean; cp makefiles/makefile.linux Makefile && make to successfully compile the library.

And Xine

Xine appears to be missing a header, causing an xmcc compilation error. Check out the original solution and add the line with the + where indicated:

Index: src/video_out/xxmc.h
src/video_out/xxmc.h 2011-01-23 17:55:01.333928003 +0100
+++ src/video_out/xxmc.h 2011-01-23 17:54:48.509926463 +0100
@@ -79,6 +79,7 @@
#include <X11/extensions/Xvlib.h>
#ifdef HAVE_VLDXVMC
#include <X11/extensions/vldXvMC.h>
+ #include <X11/extensions/XvMClib.h>
#else
#include <X11/extensions/XvMClib.h>
#include <X11/extensions/XvMC.h>




I am currently running Ubuntu 14.04 LTS for a home server, with a mix of Windows, OS X and Linux clients for both work and personal use.
I prefer Ubuntu LTS releases without Unity - XFCE is much more my style of desktop interface.
Check out my profile for more information.

LFS, pre-KDE: Errors Compiling qca-2.0.3

November 2nd, 2011 No comments

If you’re going through the Beyond Linux From Scratch guide, and run into this error while compiling qca-2.0.3 (and I assume many other versions of qca), I think I can help.

You don’t seem to have ‘make’ or ‘gmake’ in your PATH.
Cannot proceed.

The fix is relatively easy. Just make sure to have which installed on the machine. Jake found this out the hard way by looking through the configure script. Doing this experiment on Linux From Scratch has really given me an appreciation for distributions that come with basic utilities such as which.

Since which is very difficult to find on Google, here is a link: http://www.linuxfromscratch.org/blfs/view/svn/general/which.html


I am currently running ArchLinux (x86_64).
Check out my profile for more information.

Linux from Scratch: A Cautionary Tale, Part 2

November 1st, 2011 3 comments

What Next? Chroot

Once you get into the chroot environment, you will get the incredibly annoying PC speaker beep every time you foul up a command.

When compiling glibc in section 6.9, first ensure that there’s no “lib64″ directory in your root; for some reason I had a symlink of lib64 pointing to itself. Make sure you’ve run the sed script correctly or the “make install” portion will fail. Specifically, use -Wl (the letter l) in the command, not -W1 (the number 1). After you fix the idiotic transposition of 1 and L, remove both the glibc-build and glibc-2.14.1 directories under /sources and restart section 6.9 from the beginning. If you don’t restart from the beginning, you’ll still get “glibc cannot find dynamic linker” even though the file exists in /lib64.

Keep Watching What You Type

In section 6.10, when running the grep command to ensure the correct startfiles are used, make sure you use [1in] with a one and not [lin] with an L in the command:

grep -o '/usr/lib.*/crt[1in].*succeeded' dummy.log

In section 6.11 and 6.12, I had to run ldconfig before the new libraries were picked up. It seems like the same problem encountered on this mailing list but I’d confirmed that my PATH was set correctly. The same applied for section 6.22; run ldconfig before attempting the configure/make/make install process for E2fsprogs.

For procps-3.2.8, when applying the sed command in chapter 6.27.1, make sure you’ve copied and pasted it (or at least check your typing.) I missed a forward slash in the regex about four times, causing an error during make:

...undefined reference to `get_pid_digits'
collect2: ld returned 1 exit status

But hey, at least I have things sort of working:

My next few posts will deal with specific problems with reasonable solutions.




I am currently running Ubuntu 14.04 LTS for a home server, with a mix of Windows, OS X and Linux clients for both work and personal use.
I prefer Ubuntu LTS releases without Unity - XFCE is much more my style of desktop interface.
Check out my profile for more information.

Linux From Scratch : The Beginning…

October 31st, 2011 1 comment

Hi Everyone,

If you don’t remember me, I’m Dave. Last time for the experiment I used SuSE, which I regretted. This time I decided to use Linux From Scratch like Jake, as I couldn’t think of another distribution that I haven’t used in some way or another before. Let me tell you… It’s been quite the experience so far.

The Initial Setup

Unlike Jake, I opted not to use the LFS Live CD, as I figured it would be much easier to start with a Debian Live CD. By the sounds of it, I made a good decision. I had network right out of the gate, which made it easy to copy and paste awful sed commands.

The initial part of the install was relatively painless for me. Well, except that one of the LFS mirrors had a version from 2007 listed as their latest stable build, setting me back about an hour. I followed the book, waited quite a while for some stuff to compile, and I was in my brand new … command-line. Ok, it it’s not very exciting at first, but I was jumping for joy when I ran the following command and got the result I did:

root [ ~ ]# ping google.ca
PING google.ca (74.125.226.82): 56 data bytes
64 bytes from 74.125.226.82: icmp_seq=0 ttl=56 time=32.967 ms
64 bytes from 74.125.226.82: icmp_seq=1 ttl=56 time=33.127 ms
64 bytes from 74.125.226.82: icmp_seq=2 ttl=56 time=40.045 ms

 

Series of Tubes

The internet was working! Keep reading if you want to hear what awful thing happened next…

Read more…


I am currently running ArchLinux (x86_64).
Check out my profile for more information.

Linux from Scratch: A Cautionary Tale, Part 1

October 30th, 2011 1 comment

And I’m started with Linux from Scratch! Here are some helpful pointers for anyone considering running LFS on their own. Caution: this is highly nerdy and keyworded to hell to hopefully allow your favourite search engine to grab solutions from this post.

Getting Started, AKA: Use a Distribution You Know

LFS needs an existing Linux environment. Don’t try and use unetbootin on the LFS liveCD (I used lfslivecd-x86_64-6.3-r2145-min.iso to get started, but there is a newer revision 2160 available on one of the mirrors.) unetbootin in this configuration is just a bag of hurt and you’ll spend an inordinate amount of time trying to get your root volume to work, so just burn a CD.

If I was building LFS again I’d have started from a stable Debian base or other Linux distribution where I’m comfortable and have network access – there are a number of reasons below I suggest this, but you really want your host system kernel to be 2.6.25 or higher.

Make sure to have all the patches from linuxfromscratch.org/lfs/view/stable/chapter03/patches.html are downloaded and in a location you can access from your host distribution. USB sticks are OK for this if you don’t have network access (mount the stick, and then copy the patches and packages to the sources directory). Use DownThemAll or a similar mass downloading application/extension on the patches page to save time and grief.

Watch What You Mount

Augh, out of space! It’s quite possible to mount /mnt/lfs on two partitions at the same time by missing a directory, like this:

$ mount /dev/sdb3 /mnt/lfs
$ mount /dev/sdb1 /mnt/lfs

Oops – I missed /boot at the end of the second mount command. To confirm this before copying any files, “mount” should show only one partition active at /mnt/lfs. Since my /dev/sdb1 partition was only 200MB I got to the GCC extraction step and was promptly disappointed. I ended up unmounting everything, recreating the filesystem (mke2fs -v /dev/sdb1) and then remounting (mkdir -pv /mnt/lfs/boot; mount -t ext2 /dev/sdb1 /mnt/lfs/boot).

For more tales of installation havoc, keep reading…

Read more…




I am currently running Ubuntu 14.04 LTS for a home server, with a mix of Windows, OS X and Linux clients for both work and personal use.
I prefer Ubuntu LTS releases without Unity - XFCE is much more my style of desktop interface.
Check out my profile for more information.