Skip to contentSkip to conversation

configure: create fsdev/ directory

PATCH Superseded Michael Tokarev 3 participants 5 messages Oct 11, 2013 – Oct 13, 2013

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configure: create fsdev/ directory

In some cases when building with parallelism (make -jN), build fails because the directory where output files are supposed to be does not exist. In particular, when make decides to build virtfs-proxy-helper.1 before other files in fsdev/, build will fail with the following error:

perl -Ww -- BUILDDIR/scripts/texi2pod.pl BUILDDIR/fsdev/virtfs-proxy-helper.texi fsdev/virtfs-proxy-helper.pod && pod2man --utf8 --section=1 --center=" " --release=" " fsdev/virtfs-proxy-helper.pod > fsdev/virtfs-proxy-helper.1 opening "fsdev/virtfs-proxy-helper.pod": No such file or directory

Create the `fsdev' subdir the same way as other "conditional" subdirs (eg, dtc or pixman) are created in configure.

Might be better to extract all dirs from $tools and other common vars and run mkdir on all of these, but this needs some review/restructuring first.

---
 configure |    1 +
 1 file changed, 1 insertion(+)
configure +1 -0
index 23dbaaf..203084a 100755
@@ -3576,6 +3576,7 @@ if test "$softmmu" = yes ; then
     if test "$cap" = yes && test "$linux" = yes && test "$attr" = yes ; then
       virtfs=yes
       tools="$tools fsdev/virtfs-proxy-helper\$(EXESUF)"
+      mkdir -p fsdev
     else
       if test "$virtfs" = yes; then
         error_exit "VirtFS is supported only on Linux and requires libcap-devel and libattr-devel"
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 5 lines · [email protected] writes:

In some cases when building with parallelism (make -jN), build fails because the directory where output files are supposed to be does not exist. In particular, when make decides to build virtfs-proxy-helper.1 before other files in fsdev/, build will fail with the following error:

<snip>

Isn't this the sort of think Make dependencies are for?

Signature · 1 line
Alex Bennée
#2 lore raw
In reply to Michael Tokarev

Il 11/10/2013 11:05, Michael Tokarev ha scritto:

Quoted 27 lines

In some cases when building with parallelism (make -jN), build fails because the directory where output files are supposed to be does not exist. In particular, when make decides to build virtfs-proxy-helper.1 before other files in fsdev/, build will fail with the following error:

perl -Ww -- BUILDDIR/scripts/texi2pod.pl BUILDDIR/fsdev/virtfs-proxy-helper.texi fsdev/virtfs-proxy-helper.pod && pod2man --utf8 --section=1 --center=" " --release=" " fsdev/virtfs-proxy-helper.pod > fsdev/virtfs-proxy-helper.1 opening "fsdev/virtfs-proxy-helper.pod": No such file or directory

Create the `fsdev' subdir the same way as other "conditional" subdirs (eg, dtc or pixman) are created in configure.

Might be better to extract all dirs from $tools and other common vars and run mkdir on all of these, but this needs some review/restructuring first.

---
 configure |    1 +
 1 file changed, 1 insertion(+)
configure +0 -0
index 23dbaaf..203084a 100755

configure if test "$softmmu" = yes ; then · line 3582

Quoted 7 lines
configure +1 -0
@@ -3576,6 +3576,7 @@ if test "$softmmu" = yes ; then
     if test "$cap" = yes && test "$linux" = yes && test "$attr" = yes ; then
       virtfs=yes
       tools="$tools fsdev/virtfs-proxy-helper\$(EXESUF)"
+      mkdir -p fsdev
     else
       if test "$virtfs" = yes; then
         error_exit "VirtFS is supported only on Linux and requires libcap-devel and libattr-devel"

Please modify around

DIRS="tests tests/tcg tests/tcg/cris tests/tcg/lm32 tests/libqos tests/qapi-schema tests/tcg/xtensa tests/qemu-iotests" DIRS="$DIRS pc-bios/optionrom pc-bios/spapr-rtas pc-bios/s390-ccw" DIRS="$DIRS roms/seabios roms/vgabios"
DIRS="$DIRS qapi-generated"

instead.

Paolo

#3 lore raw
Quoted 1 line · Paolo Bonzini

Il 11/10/2013 11:05, Michael Tokarev ha scritto:

[]

Quoted 14 lines

configure if test "$softmmu" = yes ; then · line 3582

Quoted 11 lines
configure +1 -0
@@ -3576,6 +3576,7 @@ if test "$softmmu" = yes ; then
      if test "$cap" = yes && test "$linux" = yes && test "$attr" = yes ; then
        virtfs=yes
        tools="$tools fsdev/virtfs-proxy-helper\$(EXESUF)"
+      mkdir -p fsdev
      else
        if test "$virtfs" = yes; then
          error_exit "VirtFS is supported only on Linux and requires libcap-devel and libattr-devel"

Please modify around

Quoted 7 lines

DIRS="tests tests/tcg tests/tcg/cris tests/tcg/lm32 tests/libqos tests/qapi-schema tests/tcg/xtensa tests/qemu-iotests" DIRS="$DIRS pc-bios/optionrom pc-bios/spapr-rtas pc-bios/s390-ccw" DIRS="$DIRS roms/seabios roms/vgabios"
DIRS="$DIRS qapi-generated"

instead.

I considered doing it there initially, but decided to add it to the other place, because that's where virtfs variable is set. The place you're referring to will need to have a condition `if' based on $virtfs value.

Also, there are other places below this virtfs test (which I modified) which runs mkdir (dtc, pixman), so this is not something unusual.

Thanks,

/mjt

#4 lore raw

Il 12/10/2013 21:05, Michael Tokarev ha scritto:

Quoted 4 lines

I considered doing it there initially, but decided to add it to the other place, because that's where virtfs variable is set. The place you're referring to will need to have a condition `if' based on $virtfs value.

It's harmless to create a directory that won't be used.

Quoted 3 lines

Also, there are other places below this virtfs test (which I modified) which runs mkdir (dtc, pixman), so this is not something unusual.

I didn't check the code, and dtc+pixman are both submodules so there may be something special there. But in general, let's avoid the "it's bad so it's okay to make it worse" argument.

Paolo