Skip to contentSkip to conversation

Fix header include for out of tree builds

PATCH New Anton Lundin 2 participants 9 messages May 16, 2023 – Jun 5, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix header include for out of tree builds

The relative include didn't match up for out of tree builds. The build tree include directory is in the include paths already.

---

Now the following works:

$ mkdir lvm2-build
$ cd lvm2-build
$ ../lvm2/configure
$ make

Please keep me on Cc on any related discussions because I'm not subscribed to the mailinglist.

 lib/commands/cmd_enum.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/commands/cmd_enum.h +1 -1
index 9e9902224..9d0937a50 100644
@@ -12,7 +12,7 @@
 
 enum {
 #define cmd(a, b) a ,
-#include "../../include/cmds.h"
+#include "cmds.h"
 #undef cmd
 };
 
Signature · 1 line
2.30.2
#1 lore raw

PATCH 1/1 Fix header include for out of tree builds

Dne 16. 05. 23 v 18:05 Anton Lundin napsal(a):

Quoted 10 lines

The relative include didn't match up for out of tree builds. The build tree include directory is in the include paths already.

---

Now the following works:

$ mkdir lvm2-build
$ cd lvm2-build
$ ../lvm2/configure

Hi

Your bug is actually in this command:

configure --srcdir=XXXXX

Quoted 2 lines
$ make

Otherwise srcdir is located in your builddir and you would actually get more errors in various parts of lvmb building - as we tend to use $(srcdir) inside makefiles..

Regards

Zdenek

#2 lore raw

PATCH 1/1 Fix header include for out of tree builds

Quoted 16 lines · On 17 May, 2023 - Zdenek Kabelac wrote:

Dne 16. 05. 23 v 18:05 Anton Lundin napsal(a):

Quoted 10 lines

The relative include didn't match up for out of tree builds. The build tree include directory is in the include paths already.

---

Now the following works:

$ mkdir lvm2-build
$ cd lvm2-build
$ ../lvm2/configure

Hi

Your bug is actually in this command:

Quoted 8 lines

configure --srcdir=XXXXX

Quoted 2 lines
$ make

Otherwise srcdir is located in your builddir and you would actually get more errors in various parts of lvmb building - as we tend to use $(srcdir) inside makefiles..

I might be misunderstanding you. Are your comment about the fix or the example on now to trigger the bug?

Just running configure from another directory will set srcdir automatically. At least in any kind of modern auto-tools.

//Anton

#3 lore raw

PATCH 1/1 Fix header include for out of tree builds

Dne 17. 05. 23 v 13:35 Anton Lundin napsal(a):

Quoted 21 lines · On 17 May, 2023 - Zdenek Kabelac wrote:
Quoted 20 lines

Dne 16. 05. 23 v 18:05 Anton Lundin napsal(a):

Quoted 10 lines

The relative include didn't match up for out of tree builds. The build tree include directory is in the include paths already.

---

Now the following works:

$ mkdir lvm2-build
$ cd lvm2-build
$ ../lvm2/configure

Hi

Your bug is actually in this command:

configure --srcdir=XXXXX

Quoted 2 lines
$ make
Quoted 8 lines
Quoted 3 lines

Otherwise srcdir is located in your builddir and you would actually get more errors in various parts of lvmb building - as we tend to use $(srcdir) inside makefiles..

I might be misunderstanding you. Are your comment about the fix or the example on now to trigger the bug?

Just running configure from another directory will set srcdir automatically. At least in any kind of modern auto-tools.

While we certainly can push this minor change? (and I'll likely push this change upstream with my next changeset) - the usage should be based on srcdir settings - which I'm setting myself for a long time? - as there were always some problems if this was not set properly.

So I could try if this got eventually better over time? - but lvm2 is using somewhat hybrid approach - as we only use 'autoconf' but not 'automake'? historically.

Regards

Zdenek

#4 lore raw

PATCH 1/1 Fix header include for out of tree builds

Quoted 32 lines · On 17 May, 2023 - Zdenek Kabelac wrote:

Dne 17. 05. 23 v 13:35 Anton Lundin napsal(a):

Quoted 21 lines · On 17 May, 2023 - Zdenek Kabelac wrote:
Quoted 20 lines

Dne 16. 05. 23 v 18:05 Anton Lundin napsal(a):

Quoted 10 lines

The relative include didn't match up for out of tree builds. The build tree include directory is in the include paths already.

---

Now the following works:

$ mkdir lvm2-build
$ cd lvm2-build
$ ../lvm2/configure

Hi

Your bug is actually in this command:

configure --srcdir=XXXXX

Quoted 2 lines
$ make
Quoted 8 lines
Quoted 3 lines

Otherwise srcdir is located in your builddir and you would actually get more errors in various parts of lvmb building - as we tend to use $(srcdir) inside makefiles..

I might be misunderstanding you. Are your comment about the fix or the example on now to trigger the bug?

Just running configure from another directory will set srcdir automatically. At least in any kind of modern auto-tools.

Quoted 8 lines

While we certainly can push this minor change? (and I'll likely push this change upstream with my next changeset) - the usage should be based on srcdir settings - which I'm setting myself for a long time? - as there were always some problems if this was not set properly.

So I could try if this got eventually better over time? - but lvm2 is using somewhat hybrid approach - as we only use 'autoconf' but not 'automake'? historically.

With this fix out of tree builds works with or without --srcdir= , and if I revert this fix on my local tree the builds fails with or without --srcdir= like:

In file included from ../../lvm2/lib/commands/toolcontext.h:21,

                 from ../../lvm2/lib/integrity/integrity.c:17:
				 ../../lvm2/lib/commands/cmd_enum.h:15:10: fatal error:
				 ../../include/cmds.h: No such file or directory
				    15 | #include "../../include/cmds.h"

//Anton

#5 lore raw

PATCH 1/1 Fix header include for out of tree builds

Dne 17. 05. 23 v 13:50 Anton Lundin napsal(a):

Quoted 45 lines · On 17 May, 2023 - Zdenek Kabelac wrote:
Quoted 32 lines

Dne 17. 05. 23 v 13:35 Anton Lundin napsal(a):

Quoted 21 lines · On 17 May, 2023 - Zdenek Kabelac wrote:
Quoted 20 lines

Dne 16. 05. 23 v 18:05 Anton Lundin napsal(a):

Quoted 10 lines

The relative include didn't match up for out of tree builds. The build tree include directory is in the include paths already.

---

Now the following works:

$ mkdir lvm2-build
$ cd lvm2-build
$ ../lvm2/configure

Hi

Your bug is actually in this command:

configure --srcdir=XXXXX

Quoted 2 lines
$ make
Quoted 8 lines
Quoted 3 lines

Otherwise srcdir is located in your builddir and you would actually get more errors in various parts of lvmb building - as we tend to use $(srcdir) inside makefiles..

I might be misunderstanding you. Are your comment about the fix or the example on now to trigger the bug?

Just running configure from another directory will set srcdir automatically. At least in any kind of modern auto-tools.

Quoted 8 lines

While we certainly can push this minor change? (and I'll likely push this change upstream with my next changeset) - the usage should be based on srcdir settings - which I'm setting myself for a long time? - as there were always some problems if this was not set properly.

So I could try if this got eventually better over time? - but lvm2 is using somewhat hybrid approach - as we only use 'autoconf' but not 'automake' historically.

With this fix out of tree builds works with or without --srcdir= , and if I revert this fix on my local tree the builds fails with or without --srcdir= like:

Quoted 7 lines

In file included from ../../lvm2/lib/commands/toolcontext.h:21,

                  from ../../lvm2/lib/integrity/integrity.c:17:
				 ../../lvm2/lib/commands/cmd_enum.h:15:10: fatal error:
				 ../../include/cmds.h: No such file or directory
				    15 | #include "../../include/cmds.h"

//Anton

Can you please provide? corresponding??? 'make V=1' log ?

Zdenek

#6 lore raw

PATCH 1/1 Fix header include for out of tree builds

Dne 17. 05. 23 v 14:09 Zdenek Kabelac napsal(a):

Quoted 53 lines

Dne 17. 05. 23 v 13:50 Anton Lundin napsal(a):

Quoted 52 lines · On 17 May, 2023 - Zdenek Kabelac wrote:
Quoted 33 lines

Dne 17. 05. 23 v 13:35 Anton Lundin napsal(a):

Quoted 25 lines · On 17 May, 2023 - Zdenek Kabelac wrote:
Quoted 16 lines

Dne 16. 05. 23 v 18:05 Anton Lundin napsal(a):

Quoted 10 lines

The relative include didn't match up for out of tree builds. The build tree include directory is in the include paths already.

---

Now the following works:

$ mkdir lvm2-build
$ cd lvm2-build
$ ../lvm2/configure

Hi

Your bug is actually in this command:

Quoted 8 lines

configure --srcdir=XXXXX

Quoted 2 lines
$ make

Otherwise srcdir is located in your builddir and you would actually get more
errors in various parts of lvmb building - as we tend to use $(srcdir) inside makefiles..

Quoted 5 lines

I might be misunderstanding you. Are your comment about the fix or the example on now to trigger the bug?

Just running configure from another directory will set srcdir automatically. At least in any kind of modern auto-tools.

Quoted 8 lines

While we certainly can push this minor change? (and I'll likely push this change upstream with my next changeset) - the usage should be based on srcdir settings - which I'm setting myself for a long time? - as there were always some problems if this was not set properly.

So I could try if this got eventually better over time? - but lvm2 is using somewhat hybrid approach - as we only use 'autoconf' but not 'automake' historically.

With this fix out of tree builds works with or without --srcdir= , and if I revert this fix on my local tree the builds fails with or without --srcdir= like:

In file included from ../../lvm2/lib/commands/toolcontext.h:21, ????????????????? from ../../lvm2/lib/integrity/integrity.c:17:
???????????????? ../../lvm2/lib/commands/cmd_enum.h:15:10: fatal error:
???????????????? ../../include/cmds.h: No such file or directory ??????????????????? 15 | #include "../../include/cmds.h"

Quoted 4 lines
Quoted 1 line

//Anton

Can you please provide? corresponding??? 'make V=1' log ?

Actuallly not needed - reproduced myself.

Zdenek

#7 lore raw

PATCH 1/1 Fix header include for out of tree builds

Quoted 54 lines · On 17 May, 2023 - Zdenek Kabelac wrote:

Dne 17. 05. 23 v 14:09 Zdenek Kabelac napsal(a):

Quoted 53 lines

Dne 17. 05. 23 v 13:50 Anton Lundin napsal(a):

Quoted 52 lines · On 17 May, 2023 - Zdenek Kabelac wrote:
Quoted 33 lines

Dne 17. 05. 23 v 13:35 Anton Lundin napsal(a):

Quoted 25 lines · On 17 May, 2023 - Zdenek Kabelac wrote:
Quoted 16 lines

Dne 16. 05. 23 v 18:05 Anton Lundin napsal(a):

Quoted 10 lines

The relative include didn't match up for out of tree builds. The build tree include directory is in the include paths already.

---

Now the following works:

$ mkdir lvm2-build
$ cd lvm2-build
$ ../lvm2/configure

Hi

Your bug is actually in this command:

Quoted 8 lines

configure --srcdir=XXXXX

Quoted 2 lines
$ make

Otherwise srcdir is located in your builddir and you
would actually get more
errors in various parts of lvmb building - as we tend to use $(srcdir) inside makefiles..

Quoted 5 lines

I might be misunderstanding you. Are your comment about the fix or the example on now to trigger the bug?

Just running configure from another directory will set srcdir automatically. At least in any kind of modern auto-tools.

Quoted 8 lines

While we certainly can push this minor change? (and I'll likely push this change upstream with my next changeset) - the usage should be based on srcdir settings - which I'm setting myself for a long time? - as there were always some problems if this was not set properly.

So I could try if this got eventually better over time? - but lvm2 is using somewhat hybrid approach - as we only use 'autoconf' but not 'automake' historically.

With this fix out of tree builds works with or without --srcdir= , and if I revert this fix on my local tree the builds fails with or without --srcdir= like:

In file included from ../../lvm2/lib/commands/toolcontext.h:21, ????????????????? from ../../lvm2/lib/integrity/integrity.c:17:
???????????????? ../../lvm2/lib/commands/cmd_enum.h:15:10: fatal error:
???????????????? ../../include/cmds.h: No such file or directory ??????????????????? 15 | #include "../../include/cmds.h"

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

//Anton

Can you please provide? corresponding??? 'make V=1' log ?

Actuallly not needed - reproduced myself.

I haven't seen this patch pused out, or anything like it. Is there anything I can help out with?

//Anton

#8 lore raw

PATCH 1/1 Fix header include for out of tree builds

Dne 02. 06. 23 v 19:30 Anton Lundin napsal(a):

Quoted 55 lines · On 17 May, 2023 - Zdenek Kabelac wrote:
Quoted 54 lines

Dne 17. 05. 23 v 14:09 Zdenek Kabelac napsal(a):

Quoted 52 lines

Dne 17. 05. 23 v 13:50 Anton Lundin napsal(a):

Quoted 51 lines · On 17 May, 2023 - Zdenek Kabelac wrote:
Quoted 32 lines

Dne 17. 05. 23 v 13:35 Anton Lundin napsal(a):

Quoted 25 lines · On 17 May, 2023 - Zdenek Kabelac wrote:
Quoted 16 lines

Dne 16. 05. 23 v 18:05 Anton Lundin napsal(a):

Quoted 10 lines

The relative include didn't match up for out of tree builds. The build tree include directory is in the include paths already.

---

Now the following works:

$ mkdir lvm2-build
$ cd lvm2-build
$ ../lvm2/configure

Hi

Your bug is actually in this command:

Quoted 8 lines

configure --srcdir=XXXXX

Quoted 2 lines
$ make

Otherwise srcdir is located in your builddir and you
would actually get more
errors in various parts of lvmb building - as we tend to use $(srcdir) inside makefiles..

Quoted 5 lines

I might be misunderstanding you. Are your comment about the fix or the example on now to trigger the bug?

Just running configure from another directory will set srcdir automatically. At least in any kind of modern auto-tools.

Quoted 8 lines

While we certainly can push this minor change? (and I'll likely push this change upstream with my next changeset) - the usage should be based on srcdir settings - which I'm setting myself for a long time? - as there were always some problems if this was not set properly.

So I could try if this got eventually better over time? - but lvm2 is using somewhat hybrid approach - as we only use 'autoconf' but not 'automake' historically.

With this fix out of tree builds works with or without --srcdir= , and if I revert this fix on my local tree the builds fails with or without --srcdir= like:

In file included from ../../lvm2/lib/commands/toolcontext.h:21,
????????????????? from ../../lvm2/lib/integrity/integrity.c:17:
???????????????? ../../lvm2/lib/commands/cmd_enum.h:15:10: fatal error:
???????????????? ../../include/cmds.h: No such file or directory ??????????????????? 15 | #include "../../include/cmds.h"

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line

//Anton

Can you please provide? corresponding??? 'make V=1' log ?

Actuallly not needed - reproduced myself.

I haven't seen this patch pused out, or anything like it. Is there anything I can help out with?

Hi

Still sitting in my queue - I'm working on another patch - so will go together when the patch will be ready for more testing.

Maybe I could extract already some bits worth pushing...

Zdenek