From alsa-devel-owner@alsa.jcu.cz  Fri Oct  2 03:34:47 1998
Received: from rdaneel.dyn.ml.org (res-1097.usc.edu [128.125.245.177])
	by marvin.jcu.cz (8.9.1a/8.9.1) with ESMTP id DAA02479
	for <alsa-devel@alsa.jcu.cz>; Fri, 2 Oct 1998 03:34:38 +0200
Received: from localhost (brion@localhost)
	by rdaneel.dyn.ml.org (8.8.7/8.8.7) with ESMTP id SAA26756
	for <alsa-devel@alsa.jcu.cz>; Thu, 1 Oct 1998 18:34:31 -0700
Date: Thu, 1 Oct 1998 18:34:31 -0700 (PDT)
From: Brion Vibber <brion@pobox.com>
To: alsa-devel@alsa.jcu.cz
Subject: ALSA installation problems
Message-ID: <Pine.LNX.4.03.9810011759480.23405-300000@rdaneel.dyn.ml.org>
MIME-Version: 1.0
Content-Type: MULTIPART/MIXED; BOUNDARY="2105586165-424153915-907292071=:23405"
Reply-To: alsa-devel@alsa.jcu.cz
Sender: alsa-devel-owner@alsa.jcu.cz
Precedence: list

  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

--2105586165-424153915-907292071=:23405
Content-Type: TEXT/PLAIN; charset=US-ASCII

I stumbled on ALSA today and noticed to my joy the existence of drivers for
the AudioPCI in it. Being unsatisfied with the limitations of the es1370
driver in the Linux kernel and not having gotten OSS/Linux to work since about
a dozen kernel versions ago (maybe more), I figured I'd give it a try with the
latest v0.2.0pre8 ALSA drivers on my 2.1.121 kernel.

Well, I got the driver installed, and it loaded just fine. But I got no
sound. Using OSS-based mixers seemed to have no effect, so per the
instructions I went looking for an ALSA-native mixer... the fOX mixer
won't compile since I need libraries that it doesn't bother to tell me
about, and besides I hate the Windows 95 mixer, why would I want a clone?
So I looked on the FTP site and found 'alsa-utils' which includes
command-line and ncurses mixers... Ran the configure script and was told
to install alsa-lib.

Downloaded alsa-lib, ran the configure... and was told to install alsa-driver:

  Fatal error: Install alsa-driver v0.2.0pre6+ package at first...

"Umm, I did that half an hour ago... the modules are LOADED IN MEMORY RIGHT
NOW," I thought to myself, "Surely it left some trace of its installation!"
To be sure, I went back and re-ran 'make install' for the driver. Same annoying
message. Re-ran the driver's configure script and made sure I specified the
same prefix (/usr/local) as on the other packages. 'make clean; make;
make install'. Went back to alsa-lib... SAME FRIGGIN ERROR.

Well, I now decide to rip out configure's guts and find out what it's trying to
do. Turns out that it's compiling a program that checks something from the
linux/asound.h header file. Presumably this should have been installed as
/usr/local/include/linux/asound.h, but it's not there. I look in
/usr/include/linux just in case, not there either. Nor is it just in the
include directory straight on... Eventually I notice there is a *file*
named 'linux' in /usr/local/include!

I groan as I realize how UTTERLY STUPID the installation had been! It assumed
that $prefix/include/linux existed as a directory and copied its include
files to $prefix/include/linux without specifying the target _file_
specifically - since the directory did _not_ exist it copied them TO THAT
FILE, overwriting the first with the second no less. Removing the file,
creating the directory, and re-running the driver's 'make install' solved
this little problem, and alsa-lib now configures, makes, and installs quite
happily.

Alsa-utils is another story however. It still refuses to configure, telling me:

  Fatal error: Install alsa-lib package at first...

Guess what? The EXACT same problem is happening! It's running a test program
that includes 'sys/asoundlib.h', and /usr/local/include/sys did not exist.
Delete the file, create the directory, works like a charm.

Figured out how to unmute things, and so far everything's great! The internal
line in that my TV card is hooked up to even works at last! Good work 
everyone! Except for that install trouble... ;)

I'm attaching patches that should fix this; $prefix/include/linux (for the
driver) and $prefix/include/sys (for the library) are created, and all
installed files (that I noticed offhand) that only specified target
directory now specify an exact target filename, so if the directory
doesn't exist you'll get an error message instead of an incorrect
installation with a false okay.

There are probably more such problems, but those are the only that have 
bitten me so far...

-- brion vibber (brion@pobox.com)

--2105586165-424153915-907292071=:23405
Content-Type: TEXT/PLAIN; charset=US-ASCII; name=driverfix
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.03.9810011834310.23405@rdaneel.dyn.ml.org>
Content-Description: Makefile fix for alsa-driver-0.2.0.pre8
Content-Disposition: attachment; filename=driverfix

LS0tIC4uL29sZC9hbHNhLWRyaXZlci0wLjIuMC1wcmU4L01ha2VmaWxlCVRo
dSBTZXAgMjQgMTQ6MjA6MzIgMTk5OA0KKysrIGFsc2EtZHJpdmVyLTAuMi4w
LXByZTgvTWFrZWZpbGUJVGh1IE9jdCAgMSAxODoyMzoxNyAxOTk4DQpAQCAt
MzQsOCArMzQsOSBAQA0KIAlybSAtZiAkKG1vZGRpcikvc25kKi5vICQobW9k
ZGlyKS9wZXJzaXN0Lm8NCiAJY3AgbW9kdWxlcy8qLm8gJChtb2RkaXIpDQog
CS9zYmluL2RlcG1vZCAtYSAkKGt2ZXJzaW9uKS4kKGtwYXRjaGxldmVsKS4k
KGtzdWJsZXZlbCkNCi0JaW5zdGFsbCAtbSA2NDQgaW5jbHVkZS9hc291bmQu
aCAkKHByZWZpeCkvaW5jbHVkZS9saW51eA0KLQlpbnN0YWxsIC1tIDY0NCBp
bmNsdWRlL2Fzb3VuZGlkLmggJChwcmVmaXgpL2luY2x1ZGUvbGludXgNCisJ
aW5zdGFsbCAtZCAtbSA3NTUgLW8gcm9vdCAtZyByb290ICQocHJlZml4KS9p
bmNsdWRlL2xpbnV4DQorCWluc3RhbGwgLW0gNjQ0IGluY2x1ZGUvYXNvdW5k
LmggJChwcmVmaXgpL2luY2x1ZGUvbGludXgvYXNvdW5kLmgNCisJaW5zdGFs
bCAtbSA2NDQgaW5jbHVkZS9hc291bmRpZC5oICQocHJlZml4KS9pbmNsdWRl
L2xpbnV4L2Fzb3VuZGlkLmgNCiAJY2F0IFdBUk5JTkcNCiANCiBjbGVhbjoN
Cg==
--2105586165-424153915-907292071=:23405
Content-Type: TEXT/PLAIN; charset=US-ASCII; name=libfix
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.03.9810011834311.23405@rdaneel.dyn.ml.org>
Content-Description: Makefile fix for alsa-lib
Content-Disposition: attachment; filename=libfix

LS0tIC4uL29sZC9hbHNhLWxpYi9NYWtlZmlsZQlNb24gQXVnIDMxIDA3OjQ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