alsa-driver git repo: Build problems when copying symlink to itself
PATCH 1/1 alsa-driver git repo: Build problems when copying symlink to itself
Hi,
After doing a "simple":
git clone alsa-driver
git clone alsa-kernel
cd alsa-driver
./gitcompile --with-debug=full --with-isapnp=yes --with-sequencer=yes --with-moddir=updates/alsa:
The build bombed out pretty quickly with the following error.
The attached patch fixes it.
Hacking autoconf.h...
make[1]: Entering directory `/home/colin/Development/Personal/ALSA/alsa-driver/include' make -C sound prepare
make[2]: Entering directory `/home/colin/Development/Personal/ALSA/alsa-driver/include/sound' make prepare2
make[3]: Entering directory `/home/colin/Development/Personal/ALSA/alsa-driver/include/sound' cp ../../alsa-kernel/include/ac97_codec.h .
patch -p0 -i ac97_codec.patch ac97_codec.h
patching file ac97_codec.h
Hunk #1 succeeded at 650 (offset 5 lines).
cp ../../alsa-kernel/include/core.h .
patch -p0 -i core.patch core.h
patching file core.h
cp ../../alsa-kernel/include/info.h .
cp: ../../alsa-kernel/include/info.h' and ./info.h' are the same file make[3]: *** [info.h] Error 1
make[3]: Leaving directory `/home/colin/Development/Personal/ALSA/alsa-driver/include/sound' make[2]: *** [prepare] Error 2
make[2]: Leaving directory `/home/colin/Development/Personal/ALSA/alsa-driver/include/sound' make[1]: *** [prepare] Error 2
make[1]: Leaving directory `/home/colin/Development/Personal/ALSA/alsa-driver/include'
make: *** [dep] Error 1
Signature · 10 lines
Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mageia Contributor [http://www.mageia.org/] PulseAudio Hacker [http://www.pulseaudio.org/] Trac Hacker [http://trac.edgewall.org/]
Quoted 1 line
From
c8d828633824d1dc9eb1739c676fb1a8b961c523Mon Sep 17 00:00:00 2001
From: Colin Guthrie <[email protected]>
Date: Sat, 12 Mar 2011 10:28:38 +0000
Subject: [PATCH] Fix broken build due to cp+symlink behaviour
Sometimes the destination file is a symlink to the source file. If this happens cp may complain:
cp: ./info.h' are the same file
This patch just adds a safety rm -f before hand which wont do any harm.
--- include/sound/Makefile | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
include/sound/Makefile +1 -0
@@ -27,6 +27,7 @@ version.h: ../version.h b=$$(basename $$s .h); \ if test -f $$b.patch; then \ echo "$$s: $$i $$b.patch" >> $@; \ + echo " rm -f \$$@" >> $@; \ echo " cp \$$(INCSRC)/\$$@ ." >> $@; \ echo " patch -p0 -i $$b.patch \$$@" >> $@; \ echo >> $@; \
Signature · 1 line
1.7.4.1
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
'Twas brillig, and Colin Guthrie at 12/03/11 10:30 did gyre and gimble:
Quoted 9 lines
Hi,
After doing a "simple":
git clone alsa-driver
git clone alsa-kernel
cd alsa-driver
./gitcompile --with-debug=full --with-isapnp=yes --with-sequencer=yes --with-moddir=updates/alsa:
Quoted 3 lines
The build bombed out pretty quickly with the following error.
The attached patch fixes it.
And here is another error I stumbled on. The attached patch fixes this.
Hacking autoconf.h...
make[1]: Entering directory `/home/colin/Development/Personal/ALSA/alsa-driver/include' make -C sound prepare
make[2]: Entering directory `/home/colin/Development/Personal/ALSA/alsa-driver/include/sound' make prepare2
make[3]: Entering directory `/home/colin/Development/Personal/ALSA/alsa-driver/include/sound' ln -s ../../alsa-kernel/include/alc5623.h
ln: failed to create symbolic link `./alc5623.h': File exists make[3]: *** [alc5623.h] Error 1
make[3]: Leaving directory `/home/colin/Development/Personal/ALSA/alsa-driver/include/sound' make[2]: *** [prepare] Error 2
make[2]: Leaving directory `/home/colin/Development/Personal/ALSA/alsa-driver/include/sound' make[1]: *** [prepare] Error 2
make[1]: Leaving directory `/home/colin/Development/Personal/ALSA/alsa-driver/include'
make: *** [dep] Error 1
Signature · 10 lines
Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mageia Contributor [http://www.mageia.org/] PulseAudio Hacker [http://www.pulseaudio.org/] Trac Hacker [http://trac.edgewall.org/]
Quoted 1 line
From
d7b95b81a62faeab1e565946d91e4771b8128ce0Mon Sep 17 00:00:00 2001
From: Colin Guthrie <[email protected]>
Date: Sat, 12 Mar 2011 10:46:39 +0000
Subject: [PATCH] Ensure the destination of the symlink doesn't yet exists.
Similar to my last patch, the symlinking process can also fail due to the destination file already being present. This ensures we wipe the file first.
--- include/sound/Makefile | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
include/sound/Makefile +1 -0
@@ -16,6 +16,7 @@ version.h: ../version.h patch -p0 -i $< $@ %.h: + rm -f $@ ln -s $(INCSRC)/$@ .includes.tmp:
Signature · 1 line
1.7.4.1
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
At Sat, 12 Mar 2011 10:30:48 +0000,
Quoted 11 lines · Colin Guthrie
Hi,
After doing a "simple":
git clone alsa-driver
git clone alsa-kernel
cd alsa-driver
./gitcompile --with-debug=full --with-isapnp=yes --with-sequencer=yes --with-moddir=updates/alsa:The build bombed out pretty quickly with the following error.
Can't reproduced with my trees. Could you try the GIT trees below instead?
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/alsa-driver-build.gitgit://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git
Takashi
'Twas brillig, and Takashi Iwai at 14/03/11 09:43 did gyre and gimble:
Quoted 12 lines
At Sat, 12 Mar 2011 10:30:48 +0000,
Quoted 10 lines · Colin Guthrie
Hi,
After doing a "simple":
git clone alsa-driver
git clone alsa-kernel
cd alsa-driver
./gitcompile --with-debug=full --with-isapnp=yes --with-sequencer=yes --with-moddir=updates/alsa:
Quoted 7 lines
Quoted 1 line
The build bombed out pretty quickly with the following error.
Can't reproduced with my trees. Could you try the GIT trees below instead?
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/alsa-driver-build.gitgit://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git
OK, so I should have explained it a bit better - tho' in actual fact my fixes wont really help much....
I was using the trees @
git://git.alsa-project.org/alsa-driver.git
andgit://git.alsa-project.org/alsa-kernel.git
I tried cloning the repos you suggested and ran the script and all was well.
The problem I generally encountered was that as time passes (as it has since the last time I used my clones) and you do a git pull, the patches that are needed change.
When these change, the file alsa-driver/includes/sound/.includes (which is generated by alsa-driver/includes/sound/Makefile) is *not* updated. Therefore, the patch information is bogus and incorrect.
Really the build script needs to rm that file or the Makefile has to be able to update it accordingly.
I also run into the same problem when trying to chase down a regression (a pre-bisect checks). I was not able to rebuild the older drivers easily without rm'ing the above .includes file. Obviously even with the two patches I attached previously, it only papers over the problem as the .include file is simply out of date. Correcting the .include file should avoid the need for my changes.
Am I missing a trick here or is it part of the bi-secting process?
Also please see my other mail about *how* to do a bisect here - while keeping alsa-driver and alsa-kernel in sync....
In an ideal world I need to downgrade to 1.0.23 or 1.0.22 of ALSA to check to see if the problem still existed, but can't find a super easy way to do that (other than perhaps just building myself a really old kernel from my distro's VCS).
Col
Signature · 10 lines
Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mageia Contributor [http://www.mageia.org/] PulseAudio Hacker [http://www.pulseaudio.org/] Trac Hacker [http://trac.edgewall.org/]
At Mon, 14 Mar 2011 13:16:43 +0000,
Quoted 35 lines · Colin Guthrie
'Twas brillig, and Takashi Iwai at 14/03/11 09:43 did gyre and gimble:
Quoted 12 lines
At Sat, 12 Mar 2011 10:30:48 +0000,
Quoted 10 lines · Colin Guthrie
Hi,
After doing a "simple":
git clone alsa-driver
git clone alsa-kernel
cd alsa-driver
./gitcompile --with-debug=full --with-isapnp=yes --with-sequencer=yes --with-moddir=updates/alsa:Quoted 7 lines
Quoted 1 line
The build bombed out pretty quickly with the following error.
Can't reproduced with my trees. Could you try the GIT trees below instead?
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/alsa-driver-build.gitgit://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.gitOK, so I should have explained it a bit better - tho' in actual fact my fixes wont really help much....
I was using the trees @
git://git.alsa-project.org/alsa-driver.git
andgit://git.alsa-project.org/alsa-kernel.gitI tried cloning the repos you suggested and ran the script and all was well.
Quoted 7 lines
The problem I generally encountered was that as time passes (as it has since the last time I used my clones) and you do a git pull, the patches that are needed change.
When these change, the file alsa-driver/includes/sound/.includes (which is generated by alsa-driver/includes/sound/Makefile) is *not* updated. Therefore, the patch information is bogus and incorrect.
But you did clean up before update, right?
"make clean" should remove .includes file.
Quoted 10 lines
Really the build script needs to rm that file or the
Makefilehas to be able to update it accordingly.I also run into the same problem when trying to chase down a regression (a pre-bisect checks). I was not able to rebuild the older drivers easily without rm'ing the above .includes file. Obviously even with the two patches I attached previously, it only papers over the problem as the .include file is simply out of date. Correcting the .include file should avoid the need for my changes.
Quoted 4 lines
Am I missing a trick here or is it part of the bi-secting process?
Also please see my other mail about *how* to do a bisect here - while keeping alsa-driver and alsa-kernel in sync....
Use alsa-kmirror.
Takashi
'Twas brillig, and Takashi Iwai at 14/03/11 13:21 did gyre and gimble:
Quoted 7 lines
At Mon, 14 Mar 2011 13:16:43 +0000,
Quoted 3 lines
When these change, the file alsa-driver/includes/sound/.includes (which is generated by alsa-driver/includes/sound/Makefile) is *not* updated. Therefore, the patch information is bogus and incorrect.
But you did clean up before update, right?
"make clean" should remove .includes file.
Hmm, I probably didn't actually. :s
I guess the bisecting process etc. for this repos must be a bit different to other areas? Would I need a full make clean and recompile at each stage of a bisect (not that it takes all that long).
Quoted 10 lines
Quoted 10 lines
Really the build script needs to rm that file or the
Makefilehas to be able to update it accordingly.I also run into the same problem when trying to chase down a regression (a pre-bisect checks). I was not able to rebuild the older drivers easily without rm'ing the above .includes file. Obviously even with the two patches I attached previously, it only papers over the problem as the .include file is simply out of date. Correcting the .include file should avoid the need for my changes.
Quoted 6 lines
Quoted 4 lines
Am I missing a trick here or is it part of the bi-secting process?
Also please see my other mail about *how* to do a bisect here - while keeping alsa-driver and alsa-kernel in sync....
Use alsa-kmirror.
Hmmm, OK. Any page describing how to do this anywhere? e.g. how to clone, bisect etc. on older versions of the drivers?
Trying to find out the details of how to debug and bisect alsa drivers seems to be pretty hard (and I don't consider myself a total noob here, tho' it feels like it!)
Thanks for any insights :)
Col
Signature · 10 lines
Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mageia Contributor [http://www.mageia.org/] PulseAudio Hacker [http://www.pulseaudio.org/] Trac Hacker [http://trac.edgewall.org/]
At Mon, 14 Mar 2011 15:06:30 +0000,
Quoted 7 lines · Colin Guthrie
'Twas brillig, and Takashi Iwai at 14/03/11 13:21 did gyre and gimble:
Quoted 5 lines
At Mon, 14 Mar 2011 13:16:43 +0000,
Quoted 3 lines
When these change, the file alsa-driver/includes/sound/.includes (which is generated by alsa-driver/includes/sound/Makefile) is *not* updated. Therefore, the patch information is bogus and incorrect.
Quoted 8 lines
Quoted 2 lines
But you did clean up before update, right?
"make clean" should remove .includes file.Hmm, I probably didn't actually. :s
I guess the bisecting process etc. for this repos must be a bit different to other areas? Would I need a full make clean and recompile at each stage of a bisect (not that it takes all that long).
Yes. But bisecting is difficult with the combined tree.
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
Really the build script needs to rm that file or the
Makefilehas to be able to update it accordingly.I also run into the same problem when trying to chase down a regression (a pre-bisect checks). I was not able to rebuild the older drivers easily without rm'ing the above .includes file. Obviously even with the two patches I attached previously, it only papers over the problem as the .include file is simply out of date. Correcting the .include file should avoid the need for my changes.
Am I missing a trick here or is it part of the bi-secting process?
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Also please see my other mail about *how* to do a bisect here - while keeping alsa-driver and alsa-kernel in sync....
Use alsa-kmirror.
Hmmm, OK. Any page describing how to do this anywhere? e.g. how to clone, bisect etc. on older versions of the drivers?
It's not trivial because these are basically two individual trees. They aren't always in sync. alsa-driver tree is fixed once when some build errors are detected, for example. So, the only sane way would be to use alsa-kmirror. This is often still not trivial because of build breakage...
Nowadays usually the bisect is done inside the kernel tree.
Takashi
Jaroslav Kysela
maintainerQuoted 23 lines · Colin Guthrie
Hi,
After doing a "simple":
git clone alsa-driver
git clone alsa-kernel
cd alsa-driver
./gitcompile --with-debug=full --with-isapnp=yes --with-sequencer=yes --with-moddir=updates/alsa:The build bombed out pretty quickly with the following error.
The attached patch fixes it.
Hacking
autoconf.h...
make[1]: Entering directory `/home/colin/Development/Personal/ALSA/alsa-driver/include' make -C sound prepare
make[2]: Entering directory `/home/colin/Development/Personal/ALSA/alsa-driver/include/sound' make prepare2
make[3]: Entering directory `/home/colin/Development/Personal/ALSA/alsa-driver/include/sound' cp../../alsa-kernel/include/ac97_codec.h.
Quoted 8 lines
patch -p0 -i ac97_codec.patch
ac97_codec.h
patching fileac97_codec.h
Hunk #1 succeeded at 650 (offset 5 lines).
cp../../alsa-kernel/include/core.h.
patch -p0 -i core.patchcore.h
patching filecore.h
cp../../alsa-kernel/include/info.h.
cp:../../alsa-kernel/include/info.h' and./info.h' are the same file
I don't see this error using 'alsa-compile.sh --git' on Fedora 14... Make sure that the alsa-driver tree is clean before build.
Jaroslav
-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project, Red Hat, Inc.
'Twas brillig, and Jaroslav Kysela at 14/03/11 09:54 did gyre and gimble:
Quoted 34 lines · Colin Guthrie
Quoted 24 lines
Hi,
After doing a "simple":
git clone alsa-driver
git clone alsa-kernel
cd alsa-driver
./gitcompile --with-debug=full --with-isapnp=yes --with-sequencer=yes --with-moddir=updates/alsa:The build bombed out pretty quickly with the following error.
The attached patch fixes it.
Hacking
autoconf.h...
make[1]: Entering directory `/home/colin/Development/Personal/ALSA/alsa-driver/include' make -C sound prepare
make[2]: Entering directory `/home/colin/Development/Personal/ALSA/alsa-driver/include/sound' make prepare2
make[3]: Entering directory `/home/colin/Development/Personal/ALSA/alsa-driver/include/sound' cp../../alsa-kernel/include/ac97_codec.h.Quoted 8 lines
patch -p0 -i ac97_codec.patch
ac97_codec.h
patching fileac97_codec.h
Hunk #1 succeeded at 650 (offset 5 lines).
cp../../alsa-kernel/include/core.h.
patch -p0 -i core.patchcore.h
patching filecore.h
cp../../alsa-kernel/include/info.h.
cp:../../alsa-kernel/include/info.h' and./info.h' are the same file
Quoted 2 lines
I don't see this error using '
alsa-compile.sh--git' on Fedora 14... Make sure that the alsa-driver tree is clean before build.
Both trees are clean.
They are clones from
git://git.alsa-project.org/alsa-driver.git
andgit://git.alsa-project.org/alsa-kernel.git
I'm trying Takashi's other repos, now but the sound-2.6 clone is taking about 2h and counting....
Also Jaroslav, are you the list admin? I've always send mails to this list via gmane, but as reply-all is the etiquette, I want to make sure I'm registered and such for posting. But the mailman admin page wont let me subscribe or send me password reminders (and thus wont let me unsubscribe to resubscribe either :s) Not sure how to deal with the chicken and egg problem (other than changing my email address which I'll probably do at some point soon for other reasons anyway).
Cheers
Col
Signature · 10 lines
Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mageia Contributor [http://www.mageia.org/] PulseAudio Hacker [http://www.pulseaudio.org/] Trac Hacker [http://trac.edgewall.org/]
Jaroslav Kysela
maintainerQuoted 38 lines · Colin Guthrie
'Twas brillig, and Jaroslav Kysela at 14/03/11 09:54 did gyre and gimble:
Quoted 34 lines · Colin Guthrie
Quoted 24 lines
Hi,
After doing a "simple":
git clone alsa-driver
git clone alsa-kernel
cd alsa-driver
./gitcompile --with-debug=full --with-isapnp=yes --with-sequencer=yes --with-moddir=updates/alsa:The build bombed out pretty quickly with the following error.
The attached patch fixes it.
Hacking
autoconf.h...
make[1]: Entering directory `/home/colin/Development/Personal/ALSA/alsa-driver/include' make -C sound prepare
make[2]: Entering directory `/home/colin/Development/Personal/ALSA/alsa-driver/include/sound' make prepare2
make[3]: Entering directory `/home/colin/Development/Personal/ALSA/alsa-driver/include/sound' cp../../alsa-kernel/include/ac97_codec.h.Quoted 8 lines
patch -p0 -i ac97_codec.patch
ac97_codec.h
patching fileac97_codec.h
Hunk #1 succeeded at 650 (offset 5 lines).
cp../../alsa-kernel/include/core.h.
patch -p0 -i core.patchcore.h
patching filecore.h
cp../../alsa-kernel/include/info.h.
cp:../../alsa-kernel/include/info.h' and./info.h' are the same fileQuoted 2 lines
I don't see this error using '
alsa-compile.sh--git' on Fedora 14... Make sure that the alsa-driver tree is clean before build.
Quoted 7 lines
Both trees are clean.
They are clones from
git://git.alsa-project.org/alsa-driver.git
andgit://git.alsa-project.org/alsa-kernel.git
What's 'alsa-driver/include/sound/info.h' in your tree after the error? It's a symlink?
I tried compilation from both of my kmirror/kernel git repos and it looks OK.
Quoted 3 lines
Also Jaroslav, are you the list admin? I've always send mails to this list via gmane, but as reply-all is the etiquette, I want to make sure I'm registered and such for posting. But the mailman admin page wont let
I subscribed your address '[email protected]' manually.
Jaroslav
-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project, Red Hat, Inc.
At Mon, 14 Mar 2011 11:25:02 +0000,
Quoted 41 lines · Colin Guthrie
'Twas brillig, and Jaroslav Kysela at 14/03/11 09:54 did gyre and gimble:
Quoted 34 lines · Colin Guthrie
Quoted 24 lines
Hi,
After doing a "simple":
git clone alsa-driver
git clone alsa-kernel
cd alsa-driver
./gitcompile --with-debug=full --with-isapnp=yes --with-sequencer=yes --with-moddir=updates/alsa:The build bombed out pretty quickly with the following error.
The attached patch fixes it.
Hacking
autoconf.h...
make[1]: Entering directory `/home/colin/Development/Personal/ALSA/alsa-driver/include' make -C sound prepare
make[2]: Entering directory `/home/colin/Development/Personal/ALSA/alsa-driver/include/sound' make prepare2
make[3]: Entering directory `/home/colin/Development/Personal/ALSA/alsa-driver/include/sound' cp../../alsa-kernel/include/ac97_codec.h.Quoted 8 lines
patch -p0 -i ac97_codec.patch
ac97_codec.h
patching fileac97_codec.h
Hunk #1 succeeded at 650 (offset 5 lines).
cp../../alsa-kernel/include/core.h.
patch -p0 -i core.patchcore.h
patching filecore.h
cp../../alsa-kernel/include/info.h.
cp:../../alsa-kernel/include/info.h' and./info.h' are the same fileQuoted 2 lines
I don't see this error using '
alsa-compile.sh--git' on Fedora 14... Make sure that the alsa-driver tree is clean before build.Both trees are clean.
Quoted 8 lines
They are clones from
git://git.alsa-project.org/alsa-driver.git
andgit://git.alsa-project.org/alsa-kernel.gitI'm trying Takashi's other repos, now but the sound-2.6 clone is taking about 2h and counting....
If you have another kernel git tree, you can clone more quickly via --reference option.
% git clone --reference /somewhere/linus-2.6.git ..../sound-2.6.git
Takashi