Skip to contentSkip to conversation

configure: Assure existence of linux-headers/ build directory

PATCH In review Andreas Färber 2 participants 6 messages Jun 14, 2012 – Jun 20, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configure: Assure existence of linux-headers/ build directory

Commit ec5b06d (configure: ensure directory exists when creating symlinks) moved the creation of directories into the symlink() function but forgot the case where no symlink is created.

This leads to build errors on arm Linux due to -I../linux-headers.

Unbreak the build on arm Linux by reverting part of that commit.

---
 configure |    1 +
 1 file changed, 1 insertion(+)
configure +1 -0
index c2366ee..ba8cc7c 100755
@@ -3462,6 +3462,7 @@ done
 
 # use included Linux headers
 if test "$linux" = "yes" ; then
+  mkdir -p linux-headers
   case "$cpu" in
   i386|x86_64)
     symlink "$source_path/linux-headers/asm-x86" linux-headers/asm
Signature · 1 line
1.7.10.4
#1 lore raw

Am 14.06.2012 17:14, schrieb Andreas Färber:

Quoted 7 lines

Commit ec5b06d (configure: ensure directory exists when creating symlinks) moved the creation of directories into the symlink() function but forgot the case where no symlink is created.

This leads to build errors on arm Linux due to -I../linux-headers.

Unbreak the build on arm Linux by reverting part of that commit.

Er, "Unbreak the build by..." would suffice, no need to double-duplicate. ;)

/-F

Quoted 17 lines
---
 configure |    1 +
 1 file changed, 1 insertion(+)
configure +1 -0
index c2366ee..ba8cc7c 100755
@@ -3462,6 +3462,7 @@ done
 
 # use included Linux headers
 if test "$linux" = "yes" ; then
+  mkdir -p linux-headers
   case "$cpu" in
   i386|x86_64)
     symlink "$source_path/linux-headers/asm-x86" linux-headers/asm
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
#2 lore raw
In reply to Andreas Färber
Quoted 7 lines · Andreas Färber

Commit ec5b06d (configure: ensure directory exists when creating symlinks) moved the creation of directories into the symlink() function but forgot the case where no symlink is created.

This leads to build errors on arm Linux due to -I../linux-headers.

Unbreak the build on arm Linux by reverting part of that commit.

I think it would be better to just revert ec5b06d completely. The comment documenting the symlink() function says "# symbolically link $1 to $2. Portable version of "ln -sf" and "ln -sf" doesn't create the target directory, so symlink() should not either.

-- PMM

#3 lore raw

Am 19.06.2012 17:18, schrieb Peter Maydell:

Quoted 7 lines · Andreas Färber
Quoted 6 lines

Commit ec5b06d (configure: ensure directory exists when creating symlinks) moved the creation of directories into the symlink() function but forgot the case where no symlink is created.

This leads to build errors on arm Linux due to -I../linux-headers.

Quoted 7 lines
Quoted 1 line

Unbreak the build on arm Linux by reverting part of that commit.

I think it would be better to just revert ec5b06d completely. The comment documenting the symlink() function says "# symbolically link $1 to $2. Portable version of "ln -sf" and "ln -sf" doesn't create the target directory, so symlink() should not either.

I don't mind either way as long as the build gets fixed. Anthony?

/-F

Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
#4 lore raw
Quoted 10 lines · Andreas Färber

Am 19.06.2012 17:18, schrieb Peter Maydell:

Quoted 9 lines · Andreas Färber
Quoted 7 lines

Commit ec5b06d (configure: ensure directory exists when creating symlinks) moved the creation of directories into the symlink() function but forgot the case where no symlink is created.

This leads to build errors on arm Linux due to -I../linux-headers.

Unbreak the build on arm Linux by reverting part of that commit.

Quoted 7 lines
Quoted 5 lines

I think it would be better to just revert ec5b06d completely. The comment documenting the symlink() function says "# symbolically link $1 to $2.  Portable version of "ln -sf" and "ln -sf" doesn't create the target directory, so symlink() should not either.

I don't mind either way as long as the build gets fixed. Anthony?

It turns out that there are later changes to configure which rely on the auto-creation of the directory, so simple reversion isn't sufficient. Maybe your patch is the simplest fix after all.

-- PMM

Reviewed-by on v1 1/1
#5 lore raw
In reply to Andreas Färber
Quoted 9 lines · Andreas Färber

Commit ec5b06d (configure: ensure directory exists when creating symlinks) moved the creation of directories into the symlink() function but forgot the case where no symlink is created.

This leads to build errors on arm Linux due to -I../linux-headers.

Unbreak the build on arm Linux by reverting part of that commit.

I guess we get to have the usual argument about how build fixes get committed now :-)

-- PMM