LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 11-11-2004, 09:46 PM   #1
starionwolf
Member
 
Registered: Nov 2004
Location: Washington D.C., USA
Distribution: S.u.S.E, Ubantu, Puppy
Posts: 47

Rep: Reputation: 15
Can't compile Alsa


Alsa 0.9 doesn't detect my SoundBlaster 16 PCI card. Alsaconf did not find the sound card. My Amigo Linux 2.0 is based on ZipSlack 9.1. The version of the Linux Kernel is 2.4.25. modinfo soundcore displays some information. I can see some references to ens1371 and the IRQ settings. dev/sndstat is empty.

I followed some people's advice and download the latest drivers from Alsa. When I try to compile version 1.0.6 or 1.0.7 of Alsa, I see errors.

I downloaded GCC, make and gawk. It seems that I am missing a program or directory called "as." What directory and file is "as" in? I can't find it. Do I need anything else to compile programs?

Here is the relevent section of my config.log file in the Alsa folder:

configure:1591: $? = 0
configure:1593: gcc -v </dev/null >&5
Reading specs from /usr/lib/gcc-lib/i486-slackware-linux/3.2.3/specs
Configured with: ../gcc-3.2.3/configure --prefix=/usr --enable-shared --enable-threads=posix --enable-__cxa_atexit --disable-checking --with-gnu-ld --verbose --target=i486-slackware-linux --host=i486-slackware-linux
Thread model: posix
gcc version 3.2.3
configure:1596: $? = 0
configure:1598: gcc -V </dev/null >&5
gcc: argument to `-V' is missing
configure:1601: $? = 1
configure:1625: checking for C compiler default output
configure:1628: gcc conftest.c >&5
gcc: installation problem, cannot exec `as': No such file or directory




This is what I saw on the output window if anyone needs it:

bash-205# ./configure --with-cards=ens1371 --with sequencer=yes;make;make install
checking for gcc... gcc
checking for C compiler defualt output... configure: error: C compiler cannot
create executables
See 'config.log' for details


If anyone needs my entire log files or anything else, let me know. Let me know if I can try using another command to display the configuration of my bus system.

Last edited by starionwolf; 11-11-2004 at 09:48 PM.
 
Old 11-12-2004, 02:24 AM   #2
ugenn
Member
 
Registered: Apr 2002
Posts: 549

Rep: Reputation: 30
as is the assembler. It's from the binutils package.
 
Old 11-12-2004, 02:58 AM   #3
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,752

Rep: Reputation: 463Reputation: 463Reputation: 463Reputation: 463Reputation: 463
Make sure you have the kernel-headers installed, glibc, make, binutils and gcc. You should already have gawk, findutils and all else you need. To compile some programs you need the full kernel-source installed also.
If you succeed, can you upload them as a package for other Amigo users? If so, I'll tell you how.
 
Old 11-12-2004, 05:23 AM   #4
motub
Senior Member
 
Registered: Sep 2003
Location: The Netherlands
Distribution: Gentoo (main); SuSE 9.3 (fallback)
Posts: 1,607

Rep: Reputation: 46
It also sounds like you might need ISAPnP support compiled into your kernel (given that I don't think it's there by default, as most current motherboards don't even have ISA slots).
 
Old 11-12-2004, 12:10 PM   #5
starionwolf
Member
 
Registered: Nov 2004
Location: Washington D.C., USA
Distribution: S.u.S.E, Ubantu, Puppy
Posts: 47

Original Poster
Rep: Reputation: 15
Ah, I forgot to download binutils from /slackware-9.1/slackware/d I rembered to download the gcc. I thought I downloaded mawk too, but I downloaded gawk instead. Opps!

I'll download binutils now and glibc just in case I don't have it.

I'll let you know if I succed sot that I can package everything. If make doen't work, then I'll download the huge kernel source file.

I might need ISAPnP support because Pentium III / Celeron motherboard has one ISA slot. I'll try using my card without ISAPnp first and see what happens. If t he card doesn't work, then I'll try to compile the source with ISAPnP support. I already found a few helpful webpages about compiling Kernels, but nothing about enabling ISAPnP support.

Do I need extract the kernel source in a specific directory? Some websites suggest that I put it in /usr/linux.

The really strange part is that I was able to compile the Alsa Utilities by accident. Now, I can't compile the new version of Alsa Utilities. Weird.

Thanks for the information everyone!

Last edited by starionwolf; 11-12-2004 at 12:26 PM.
 
Old 11-12-2004, 01:22 PM   #6
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,752

Rep: Reputation: 463Reputation: 463Reputation: 463Reputation: 463Reputation: 463
Kernel source code should go in /usr/src and there should be a link /usr/src/linux to the version-directory.
Don't worry about ISAPnP support unless you want to USE that ISA slot.
 
Old 11-12-2004, 03:20 PM   #7
starionwolf
Member
 
Registered: Nov 2004
Location: Washington D.C., USA
Distribution: S.u.S.E, Ubantu, Puppy
Posts: 47

Original Poster
Rep: Reputation: 15
Ok, thanks. I didn't want to extract the kernel archive into the wrong directory.

I double checked my system using pkgtool. I do have glibc, make, binutils and gcc installed. I sometimes see a message about mawk not installed. I can't find mawk in the Slackware Package Browser. I'm looking for a Slackware (tgz or tar.gz) package of Mawk now.

I forgot to mention that I recieve similar errors when I try to compile alsa-driver-1.0.7 and alsa-driver-0.9.6 under Slackware 9.1.

I think I do need the source because I saw this error in config.log:

Code:
## ----------- ##
## Core tests. ##
## ----------- ##

configure:1315: checking for gcc
configure:1331: found /usr/bin/gcc
configure:1341: result: gcc
configure:1585: checking for C compiler version
configure:1588: gcc --version </dev/null >&5
gcc (GCC) 3.2.3

conftest.c:2: syntax error before "me"
configure:2028: $? = 1
configure: failed program was:
| #ifndef __cplusplus
|   choke me
| #endif
configure:2178: checking for ranlib
configure:2194: found /usr/bin/ranlib
configure:2205: result: ranlib
configure:2254: checking for a BSD-compatible install
configure:2308: result: /usr/bin/ginstall -c
configure:2331: checking how to run the C preprocessor
configure:2367: gcc -E  conftest.c
In file included from /usr/include/bits/posix1_lim.h:126,
                 from /usr/include/limits.h:144,
                 from /usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/limits.h:132,
                 from /usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/syslimits.h:7,
                 from /usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/limits.h:11,
                 from configure:2362:
/usr/include/bits/local_lim.h:36:26: linux/limits.h: No such file or directory
configure:2373: $? = 1
configure: failed program was:
| #line 2353 "configure"
| /* confdefs.h.  */

More errors:

configure:2367: gcc -E -traditional-cpp  conftest.c
/usr/include/sys/cdefs.h:31: #error "You need a ISO C conforming compiler to use the glibc headers"
configure:2373: $? = 1
configure: failed program was:
| #line 2353 "configure"
| /* confdefs.h.  */

I would post the entire contents of the config.log file, but it's 16 KB and several pages long.

If you need anything else, let me know. I'll do my best to look for and capture other error messages. I don't know anything about gcc or compiling programs under Linux.


Update:
I downloaded the source and extracted it to the /usr/src directory. All of the files are in /usr/src/linux. I don't see a limits.h file in /usr/src/linux.

However, the compiler still canit find linux/limits.h

Did I put the Kernel source in the wrong folder?

I found the limits.h file in these directories:

/usr/include
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include
/src/linux/include/linux

Maybe I downloaded the wrong source. I downloaded the 2.4.25 kernel source from http://www.linuxhq.com/kernel/v2.4/index.html.

Last edited by starionwolf; 11-12-2004 at 07:48 PM.
 
Old 11-12-2004, 10:00 PM   #8
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,752

Rep: Reputation: 463Reputation: 463Reputation: 463Reputation: 463Reputation: 463
Do you have gawk installed? That should take care of mawk, although I've never seen any of the errors you give above.
Sounds like it needs autoconf, so you'll need automake, autoconf, m4, libtool, and perl...
 
Old 11-15-2004, 05:04 PM   #9
starionwolf
Member
 
Registered: Nov 2004
Location: Washington D.C., USA
Distribution: S.u.S.E, Ubantu, Puppy
Posts: 47

Original Poster
Rep: Reputation: 15
After I installed the suggested tools, the "./config" command still complains that it can't find /linux/limits.h. Where should I put this file? Do I need to create a direcotry called limits? And which limits.h file do I need to copy to the /linux folder?


Again, I found three limits.h files in these directories:

/usr/include
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include
/src/linux/include/linux
 
Old 11-15-2004, 05:34 PM   #10
motub
Senior Member
 
Registered: Sep 2003
Location: The Netherlands
Distribution: Gentoo (main); SuSE 9.3 (fallback)
Posts: 1,607

Rep: Reputation: 46
Do you have the source code for your currently-running kernel installed? The basic way this is set up is that you have a symlink to that extracted source (/usr/src/linux points to /usr/src/kernel-version.you.extracted). All programs that must compile against the kernel know to look for /usr/src/linux (which avoids having to know which specific kernel you are compiling against, or what the folder is named).

Programs that compile against the kernel also compile into/against the /include folder, and since this is all known to these types of programs, they don't need to specify "/usr/src/linux/include", because these are absolutely strict and standard locations for kernel files.

The file alsa is are looking for should be in /usr/src/linux/include/linux. If it is not, there could be a couple of reasons:

1. You have extracted the source to the wrong place, and/or not created the symlink to /usr/src/linux;

2. This is an uncompiled kernel source (meaning it is not the source for your currently-running kernel), thus the file has not been created (it may be one of the files that is created after compilation), or is the wrong version (meaning the file that exists in /usr/include/linux, which seems to be where the compiled kernel module files are installed to, is not the same version as the source code, because the kernel source is not the same version as the compiled kernel you are actually running).

So the first thing you want to do is type uname -r into a terminal and see what your kernel version is, and compare that to the version of the source you installed. We'll go further from there.

Hang in there. It's a tedious task, but don't give up yet; your (perfectly understandable) mistakes are just making it look much harder than it really is (though it's still tedious, and much more so for a stupid annoying thing like the desire for sound on your PC) .


The file it's looking for is in

Last edited by motub; 11-15-2004 at 05:36 PM.
 
Old 11-29-2004, 12:17 AM   #11
starionwolf
Member
 
Registered: Nov 2004
Location: Washington D.C., USA
Distribution: S.u.S.E, Ubantu, Puppy
Posts: 47

Original Poster
Rep: Reputation: 15
Sorry for the late reply. The number I see is: 2.4.25
 
Old 11-29-2004, 04:07 AM   #12
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 242Reputation: 242Reputation: 242
What is your output with :

ls -al /usr/src
 
Old 12-04-2004, 11:17 PM   #13
starionwolf
Member
 
Registered: Nov 2004
Location: Washington D.C., USA
Distribution: S.u.S.E, Ubantu, Puppy
Posts: 47

Original Poster
Rep: Reputation: 15
The output is:


total 12
drwxr-xr-x 3 root root 4096 Dec 5 00:07 .
drwxr-xr-x 18 root root 4096 Dec 5 00:13 ..
drwxr-xr-x 15 root root 4096 Dec 5 00:11 linux
 
Old 12-05-2004, 03:23 AM   #14
motub
Senior Member
 
Registered: Sep 2003
Location: The Netherlands
Distribution: Gentoo (main); SuSE 9.3 (fallback)
Posts: 1,607

Rep: Reputation: 46
This would seem to indicate that you have no source code for any kernel installed; not only is "linux" not a symlink to a folder containing source code, there is no other folder for "linux" to link to.

To explain, here is the output on my system:

[root@Gentoo] 09:44 AM #ls -al /usr/src
total 24196
drwxr-xr-x 11 root root 984 Dec 2 01:08 .
drwxr-xr-x 18 root root 544 Dec 5 02:30 ..
lrwxrwxrwx 1 root root 25 Nov 29 23:43 linux -> /usr/src/linux-2.6.10-rc2
drwxr-xr-x 19 root root 2184 Nov 29 20:11 linux-2.6.10-rc1
drwxr-xr-x 19 root root 2144 Nov 30 11:48 linux-2.6.10-rc2
drwxr-xr-x 2 root root 336 Dec 2 02:11 linux-2.6.10-rc2-mm3
drwxr-xr-x 18 root root 664 Dec 2 01:37 linux-2.6.10-rc2-mm4
drwxr-xr-x 19 root root 1520 Oct 29 14:19 linux-2.6.8.1-ck9
drwxrwx--- 18 root root 600 Nov 25 16:09 linux-2.6.9
drwxr-xr-x 18 root root 656 Oct 31 13:43 linux-2.6.9-ck2
drwxr-xr-x 18 root root 664 Nov 5 16:10 linux-2.6.9-gentoo-r3
rwxr-xr-x 3 root root 72 Nov 18 03:04 xorg-x11-6.7.0-r3
[root@Gentoo] 09:52 AM #

As you see, "linux" is a symlink to /usr/src/linux-2.6.10-rc2, which is the source code for the kernel of that version. I could recompile any of the kernels whose source I have installed (2.6.10-rc1, 2.6.10-rc2-mm3, 2.6.10-rc2-mm4, 2.6.8.1-ck9, 2.6.9, 2.6.9-ck2, 2.6.9-gentoo-r3) by changing the target of the symlink from linux-2.6.10-rc2 to whichever kernel source folder I wanted to work with.

So what you need to do is install the kernel-source for 2.4.25. If this is the kernel that came with Slackware, you should be able to find it on the Slackware CDs or repositiories. Interestingly, the Slackware Package browser indicates 2.4.26 for Slackware 10.0 base, and 2.4.27 in Slackware-current. So if you are using Slackware 10, you've downloaded what seems to be the wrong kernel anyway. In fact, no version of Slackware offers 2.4.25 in the package browser (I checked them all). So it's possible that you are getting a false version reading based on the fact that kernel 2.4.25 is the one in /usr/src/linux (I don't know where uname gets its kernel information from).

Alternatively, if you download it from www.kernel.org, it should be extracted to /usr/src, which should result in a folder /usr/src/linux(or_kernel)-2.4.2*. However, I would choose to do a package search using the Slackware Package Browser and use a "certified Slackware" kernel, just to be sure. I also wouldn't worry about the upgrade-- at this point, you're already doing so much work, you might as well get a kernel upgrade out of it, even if it's only a couple of points (2.4.25 to 2.4.27 is not really a major upgrade, after all). You might also consider upgrading to a 2.6-series kernel, which uses ALSA by default, but that might be a big step for you; do your research before making the change.

You should then delete the /linux folder, and create a symlink in /usr/src to /linux(or_kernel)-2.4.2*, in /usr/src/, called "linux".

You will need to configure this kernel; you can try a make oldconfig to use your current settings and only be prompted for new ones if you have upgraded your kernel. You might, once that is finished, want to do a make menuconfig to both confirm your settings, and also see if there is an option for ISAPnP support (which I assume you need, as the SB 16 that we are discussing is an ISA part afaik, even if it's onboard). You might also want to check out the instructions for the SB 16 on the ALSA Project site, to make sure your kernel has the correct options enabled/disabled so that the alsa-drivers package will install properly later on.

Once you have configured the kernel, you should follow the instructions to compile and install it (it's been a long time since I've compiled a 2.4-series kernel, and the procedure is different from the 2.6-series, so I will not give you instructions that I am not sure of-- however, the Slackware Essentials online Book does give instructions), then try installing the alsa packages again.

Hope this helps.
 
Old 12-05-2004, 11:24 AM   #15
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 52
well....maybe he has the source-tree with the name " /usr/src/linux "
( and that should be ok to work )
look at " ls -l /usr/src/linux ", i think it's there .?

egag
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ALSA compile problem Ziggydisturbed Linux - Software 3 07-25-2005 02:53 PM
Can't compile Alsa under Slack 10.0 ProtoformX Slackware 8 11-28-2004 04:30 AM
Can't Compile ALSA Drivers AFI_Flame Linux - General 3 07-01-2004 02:59 PM
Do We Have to Compile ALSA As a Module? johnleemk Linux - Hardware 1 02-04-2004 01:06 PM
compile alsa 0.5.12a under RH 8.0 ? null_mind Linux - Hardware 0 01-01-2003 09:07 PM


All times are GMT -5. The time now is 11:57 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration