PDA

View Full Version : Compilation problems under HDD install of Knoppix



karl
05-23-2004, 03:13 PM
Right - I'm always very careful to search before I ask, and I've done so as best I can, so I'm sorry if this has been answered before. :oops:

Basically I've had to re-write my sources.list file to try to get apt-get working, and I can't install anything because I have dependancy problems - Ie the mirrors I've managed to get working (Not many!) Don't have the packages I'm after. For example - I've been trying for days to get MPlayer installed. I can't apt-get install it because it tells me there are packages that I can't install. libavcodecs is one of these packages that I can't find anywhere. OK I say, I'll try and find it myself. So off I go to find MPlayer, and come across a Gzip archive. I extract it into a folder using gzip and tar, and run ./configure.

Everything seems to configure fine. I try to run a make, and it all goes boobs up.

It tells me that it can't find linux/errno.h in errno.h. :\

I look in the errno.h source in /usr/include/bits/errno.h and sure enough, there is a line that says #include <linux/errno.h>. I'm not a complete stranger to c, so know bits and pieces, and can't see why it would need to include itself. Is this to do with symbolic links? Do I need to create one? Also, I've used apt-setup to configure my sources.list file, but of course uk.debian.org doesn't have the above library packages!

Also while I'm thinking about it, knoppix will only let me view resolutions up to 1024x768. Is there a way I can increase this to let me view in 1280x1024? I've seen a number of solutions, but I was wondering if there was a definative config file that I can edit, perhaps in etc/X11?

Can anybody give me a hint on the above? If I can be helped with this little issue I'll be well on my way!

Thanks

Karl.

kelmo
05-24-2004, 09:42 AM
Sources.list file I use to grab many multimedia apps, of which I highly rate kaffiene.


# Security updates for "stable"
deb http://security.debian.org stable/updates main contrib non-free
deb http://security.debian.org testing/updates main contrib non-free

# Stable
deb http://ftp.de.debian.org/pub/debian stable main contrib non-free
deb http://ftp.de.debian.org/pub/debian-non-US stable/non-US main contrib non-free

# Stable Sources
deb-src http://ftp.de.debian.org/pub/debian stable main contrib non-free
deb-src http://ftp.de.debian.org/pub/debian-non-US stable/non-US main contrib non-free

# Testing
deb http://ftp.de.debian.org/pub/debian testing main contrib non-free
deb http://ftp.de.debian.org/pub/debian-non-US testing/non-US main contrib non-free

# Testing Sources
deb-src http://ftp.de.debian.org/pub/debian testing main contrib non-free
deb-src http://ftp.de.debian.org/pub/debian-non-US testing/non-US main contrib non-free

# Unstable
deb http://ftp.de.debian.org/debian unstable main contrib non-free
deb http://ftp.de.debian.org/debian-non-US unstable/non-US main contrib non-free

# Unstable Sources
deb-src http://ftp.de.debian.org/debian unstable main contrib non-free
deb-src http://ftp.de.debian.org/debian-non-US unstable/non-US main contrib non-free

##RAREWARES MAIN (libvorbis, lame, lame-ha, lame-cvs, lamip, cue2toc, shntool)
deb http://www.rarewares.org/debian/packages/unstable ./

##RAREWARES AAC/MP4 (faad2, faac, aac/mp4 playback plugins)
deb http://pessoal.onda.com.br/rjamorim/debian/ ./

# OpenOfice.org Debian Repository
deb http://ftp.freenet.de/pub/debian-openoffice/ unstable main contrib

# MARILLAT (lame, transcode, mplayer, w32codecs, etc.)
# deb ftp://ftp.nerim.net/debian-marillat/ stable main
deb ftp://ftp.nerim.net/debian-marillat/ testing main
deb ftp://ftp.nerim.net/debian-marillat/ unstable main
deb-src http://perso.wanadoo.fr/debian/ unstable main

# giFT
deb http://apt.cerkinfo.be/ unstable main non-free
deb-src http://apt.cerkinfo.be/ unstable main non-free


/etc/X11/XF86Config-4 is the file that holds the answers to your display question. But be warned, know what you are changing before you do.

user unknown
05-24-2004, 04:07 PM
This file doesn't include itself:


/usr/include/bits/errno.h
linux/errno.h


linux/errno.h should be the errno.h of your kernel, which is normally in:


/usr/src/linux-2.x.y/include/linux/errno.h

Try


locate linux/errno.h

to find out, where your kernel-sources are.

Perhaps you installed without kernel-sources, or the configuration-script didn't find them. If you're familar with gcc, you may tell 'configure' where to look for additional Include-dirs. './configure --help' shows possible options.

karl
05-25-2004, 09:01 AM
Thanks guys, that's really helpful. Somehow I've lost the symbolic link to my kernel source. Next job is to work out how to re-create it. I'll let you know how I get on, and if this fixes the problem. :)

Karl.

user unknown
05-25-2004, 02:45 PM
ln -s /usr/src/linux-2.6.5 /usr/src/linux

i.e.

karl
05-26-2004, 07:34 PM
OK thanks to "User unknown :D" I've re-established a correct symbolic link. I am now faced with the error below when I run a configure.

configure: error: C preprocessor "/lib/cpp" fails sanity check

I look in the config.log and find:

configure:2923: gcc -c -g -O2 conftest.c >&5
conftest.c:2: error: parse error before "me"
configure: failed program was:
| #ifndef __cplusplus
| choke me
| #endif
configure:3037: checking dependency style of gcc
configure:3120: result: gcc3
configure:3139: checking for strerror in -lcposix
configure:3170: gcc -o conftest -g -O2 conftest.c -lcposix >&5
/usr/bin/ld: cannot find -lcposix
collect2: ld returned 1 exit status
configure:3173: $? = 1
configure: failed program was:
| #line 3146 "configure"
| /* confdefs.h. */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define XINE_MAJOR 1
| #define XINE_MINOR 0
| #define XINE_SUB 0
| #define PACKAGE "xine-lib"
| #define VERSION "1-rc4a"
| /* end confdefs.h. */
|
| /* Override any gcc2 internal prototype to avoid an error. */
| #ifdef __cplusplus
| extern "C"
| #endif
| /* We use char because int might match the return type of a gcc2
| builtin and then its argument prototype would still apply. */
| char strerror ();
| int
| main ()
| {
| strerror ();
| ;
| return 0;
| }

I think the rest buggered up as a result of the above. :(

user unknown
05-27-2004, 02:32 AM
Well, when I run:


cat choke.c

#ifndef __cplusplus
choke me
#endif

gcc -c choke.c
parse error before 'me'

//but when I run
g++ -c choke.c

everything is fine.

Hm.
I guess 'configure' should know whether you shall compile with 'g++' or 'gcc', and '*.c' normally indicates gcc, while g++ uses '*.cc'-files.

Did you manipulate some globale CC-Variables?

/lib/cpp is a symbolic link again on my system, to -> /usr/bin/cpp-3.3
and
/lib/cpp --version says:
cpp (GCC) 3.3.2 (Debian)

Hm.

karl
06-14-2004, 11:25 AM
I reckon I've buggered something up, so I might back up onto my larger hdd and start again. It'll only take about half an hour, but it means that things will be a bit easier to see. I've stuck a few unstable sources in my list file which might be why, mplayer crashes on startup and so on. Thanks for all the help guys, I tend to break things and learn from my mistakes. :oops: