Archive

Archive for the ‘God Damnit Linux’ 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 various *BSD variants for this Experiment.
I currently run a mix of Windows, OS X and Linux systems for both work and personal use.
For Linux, I prefer Ubuntu LTS releases without Unity and still keep Windows 7 around for gaming.
Check out my profile for more information.

LFS, pre-KDE: kdebindings and kdebase-runtime

November 2nd, 2011 No comments

kdebindings

Are you running into the following problem when compiling kdebindings? Well, you’re probably not, because you picked a saner distribution than LFS, but here goes anyway!

ASSERT failure in QList::at: “index out of range”, file /qt/trunk/include/QtCore/qlist.h, line 456
/bin/sh: line 1: 7841 Aborted (core dumped)

From http://old.nabble.com/Smokegen-core-dump-td30797484.html, you can fix this with a patch to indexedstring.cpp:

--- generator/parser/indexedstring.cpp.orig 2011-02-23 22:12:38.695255708 +0100
+++ generator/parser/indexedstring.cpp 2011-02-24 02:36:09.035361151 +0100
@@ -195,12 +195,15 @@
}

QByteArray IndexedString::byteArray() const {
+  qDebug() << "strings()->size():" << strings()->size() << ", m_index:" << m_index;
if(!m_index)
return QByteArray();
else if((m_index & 0xffff0000) == 0xffff0000)
return QString(QChar((char)m_index & 0xff)).toUtf8();
-  else
+  else if (m_index < strings()->size())
return strings()->at(m_index).toUtf8(); /*arrayFromItem(globalIndexedStringRepository->itemFromIndex(m_index));*/
+  else
+    return QByteArray();
}

unsigned int IndexedString::hashString(const char* str, unsigned short length) {

I ended up removing the first qDebug() line before the if statement as I don’t need my compiler to be that chatty – I just need this package to compile properly. Reconfigure and attempt to make with:

cmake -DCMAKE_INSTALL_PREFIX=$KDE4_PREFIX \
    -DKDE_DEFAULT_HOME=.kde4 \
    -DSYSCONF_INSTALL_DIR=/etc/kde4 \
    .. &&
make

kdebase-runtime

You can patch away your problems if you run into the following message:

[ 39%] Building CXX object kioslave/nfs/CMakeFiles/kio_nfs.dir/kio_nfs.o
In file included from /sources/kdebase-runtime-4.6.0/kioslave/nfs/kio_nfs.cpp:21:0:
/sources/kdebase-runtime-4.6.0/kioslave/nfs/kio_nfs.h:33:21: fatal error: rpc/rpc.h: No such file or directory
compilation terminated.

First, get libtirpc installed to make this work, but then again, you could have just guessed that you needed it, right? ;)

Used under Creative Commons NC license from zhenech

There are some LFS-specific instructions to follow before libtirpc will compile:

  • Unpack glibc-2.14.1
  • In its directory, execute:
    mkdir -p /usr/include/rpc{,svc}
    cp sunrpc/rpc/*.h /usr/include/rpc
    cp nis/rpcsvc/*.h /usr/include/rpcsvc
  • Compile libtirpc with ./configure --prefix=/usr && make && make install

Then from Sourcemage, linking to an old Bugzilla installation:

diff --git a/kioslave/nfs/CMakeLists.txt b/kioslave/nfs/CMakeLists.txt
index b973a73..6556769 100644
--- a/kioslave/nfs/CMakeLists.txt
+++ b/kioslave/nfs/CMakeLists.txt
@@ -3,8 +3,8 @@ set(kio_nfs_PART_SRCS kio_nfs.cpp mount_xdr.c nfs_prot_xdr.c )

 kde4_add_plugin(kio_nfs ${kio_nfs_PART_SRCS})

-
-target_link_libraries(kio_nfs   ${KDE4_KIO_LIBS})
+include_directories(/usr/include/tirpc)
+target_link_libraries(kio_nfs   ${KDE4_KIO_LIBS} tirpc)

 install(TARGETS kio_nfs  DESTINATION ${PLUGIN_INSTALL_DIR} )

Once this is complete you should be able to get kdebase-runtime compiled.




I am currently running various *BSD variants for this Experiment.
I currently run a mix of Windows, OS X and Linux systems for both work and personal use.
For Linux, I prefer Ubuntu LTS releases without Unity and still keep Windows 7 around for gaming.
Check out my profile for more information.
Categories: God Damnit Linux, Jake B, KDE Tags:

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 various *BSD variants for this Experiment.
I currently run a mix of Windows, OS X and Linux systems for both work and personal use.
For Linux, I prefer Ubuntu LTS releases without Unity and still keep Windows 7 around for gaming.
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.

Bye Bye Bodhi

November 1st, 2011 10 comments

Ah Linux

One website lists ten reasons to use linux my favourites of which are “Linux is easier to use than Windows” and “Linux is fun.” It is day three of the experiment and so far I haven’t installed Linux but I have taken a Dell Vostro 3350 apart about five times. I borrowed this laptop off a fellow comrade in this experiment, Jake B, as I will be sending my own netbook home this coming December.

Starting off I aimed to install both VectorLinux and Bodhi to compare them. I consider myself a relatively light computer user outside of the office and so comparing two different distributions would give me something to talk about. Alas this choice has come back to bite me in the…

I used unetbootin to begin with, on a USB key that was confirmed to be working. I then put Vector on the USB key and it brought up half a blue screen with the top of the vector logo just appearing above the black lower half of the display. After a couple of tries I figured it was corrupt files or a bad ISO so I reformated the USB in order to try Bodhi instead. Unfortunately I didn’t even get a logo this time. Next I burned a CD of Vector and got as far as the ‘find installation media’ screen but no matter how may refreshes or reloads I did it apparently couldn’t find the CD-ROM or configuration files.

From previously experiencing installers fail to find hard drives and USB keys because of the type of hard drive setting in the BIOS, I changed it from ACHI to ATA and low and behold finally some success. I managed to get the Vector installer to write partitions to the disk (using the CD at this point) after choosing the add-on applications I wanted to install. Again this failed so I tried once more with the USB key. This failed the same way except it said that it could not find live media. I even tried using the USB key and the CD together at the same time with no luck.

Switching between Bodhi and Vector in order to try and get a complete install and many, many CDs later I temporarily gave up. I downloaded a new distribution called Sabyon, a Gentoo based distro with the Enlightenment desktop environment, but alas I kept getting the same errors. I even tried Ubuntu 10.04 and Linux Mint and neither of them could not write to the disk.

Figuring it was a hard drive issue I took out the hard drive from the laptop and mounted it in an enclosure. After a quick reformat, which removed a random 500MB LVM partition that I believed to be corrupt, I put it back in the machine. Still no luck.

The errors I kept getting included disk, I/O, live media, cannot find CD-ROM, no useable media, no config file and a couple of others. Each time I tried installing it would fail at different sections of the install and the error would be different with each media used. Among all of the errors I’ve seen the main one seems to be “(initramfs) unable to find a medium containing a live filesystem”

On a whim I decided to test any other hardware errors by running diagnostics from the BIOS. No errors found. I even dug out my ancient XP Profession disc, and after a couple of BIOS changes and a couple of Blue Screens – that were my fault because I had changed the hard drive out so much – I got XP to successfully load, install, and commit changes to the hard drive.

Turning to Google, and with the help of a more advanced Linux Experiment comrade, I retried installing Linux by adding some commands to the installer boot options. Still no luck.

After more Googling I have found that there are a few possible reasons that this could be happening. I have read that it could be caused by the USB3 ports interfering with the bootable media  or that it cold be related to a CD-ROM master/slave setting. Either way, I still haven’t figured it out and I’m not willing to break someone else’s computer just to see if I can overcome this frustrating first experience with Linux. My next task is to try some ACPI hacks  and after finding this useful link, try to install the latest version of Ubuntu which seems to be compatible with the hardware of this machine. But for now its …

Windows 1 Linux 0

Men using Linux 1 Women using linux 0




I am currently running Mandriva 2011
Check out my profile for more information

Kernel Panic!

November 1st, 2011 2 comments

So like Tyler, I’ve decided to run Gentoo. Hey, it seemed like a good idea at the time.

My experience thus far can be summed up with a single word: frustrating. I spent my first day working through the (excellent) Gentoo Handbook. Like Jake, I found it handy to have run lshw on my system prior to installing Gentoo. This provided me with a list of my hardware that I could refer back to during the installation process, and saved me a few headaches.

At first, my live-cd environment lacked a network connection. My machine has two network interfaces in it. One uses the sky2 kernel module, while the other uses skge. I ran:

modprobe skge
net-setup eth1
[follow on-screen instructions]
ping google.com

and was successful.

On that first day of dicking about, I managed to get all the way to Chapter 10: Configuring the Bootloader. It was at this point, in subchapter 10.d, that I was instructed to reboot the system, as though it would be a relaxing, daisy-scented walk in the park. Not so.

Apparently, the kernel that I’ve managed to compile does not recognize the SATA interface on my motherboard. When I attempt to boot, GRUB hands control off to the kernel, which goes looking for my root partition on /dev/sda3. It then dies with a message like

Kernel panic – not syncing: VFS: Unable to mount root fs on unknown-block(8,3)

This error message is the bane of my existence.

After a great deal of head-vs-desk action, approximately 37 kernel compilations, and a great deal of googling, I managed to find a Gentoo wiki entry that instructs users of my chipset on how to compile their very own working kernel. Tonight, I intend to follow it, in hopes that I can get the system to boot some time soon.

At this rate, I’ll be lucky to have a working desktop by the end of the experiment.




On my Laptop, I am running Linux Mint 12.
On my home media server, I am running Ubuntu 12.04
Check out my profile for more information.
Categories: Gentoo, God Damnit Linux, Jon F, Linux Tags:

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 various *BSD variants for this Experiment.
I currently run a mix of Windows, OS X and Linux systems for both work and personal use.
For Linux, I prefer Ubuntu LTS releases without Unity and still keep Windows 7 around for gaming.
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 various *BSD variants for this Experiment.
I currently run a mix of Windows, OS X and Linux systems for both work and personal use.
For Linux, I prefer Ubuntu LTS releases without Unity and still keep Windows 7 around for gaming.
Check out my profile for more information.

Ubuntu 11.04 Installer Fail

August 24th, 2011 3 comments

So I decided to take a go at Ubuntu 11.04 in a virtual machine before taking the leap and installing it for real. As I understand it, the new Unity desktop is a pretty major departure from the Gnome 2.x desktop that I’m used to, and I want to see if it’s as bad as it looks in the screenshots.

Unfortunately, I’ve yet to make it to the desktop, as Ubuntu has decided that it will take 42 minutes to download some language packs that I neither want or need.

Didn’t I tell it what language I speak as the first step of the install process? Surely this can be done later.




On my Laptop, I am running Linux Mint 12.
On my home media server, I am running Ubuntu 12.04
Check out my profile for more information.
Categories: God Damnit Linux, Jon F, Ubuntu Tags: