Skip to contentSkip to conversation

btrfs-tools Makefile: 1) remove duplicate of '-o $@' option from CC cmdline; 2) disable "bttfs-fragments" tool compilation

PATCH In review Ivan Efimov 2 participants 3 messages Feb 20, 2019 – Feb 22, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 btrfs-tools Makefile: 1) remove duplicate of '-o $@' option from CC cmdline; 2) disable "bttfs-fragments" tool compilation

1) Command line for target "libbtrfsutil/%.o" contained double usage of '-o $@' option and causes error:

cc1: error: too many filenames given

2) "btrfs-fragments" tool depends on library "gd", but there is no "gd" recipe in Yocto Poky. "btrfs-fragments" has been excluded from list of tools for compilation ("progs" Makefile variable)

---
 ...1-Makefile-disable-btrfs-fragments-compilation.patch | 15 +++++++++++++++
 ...01-Makefile-fix-double-o-compiler-option-using.patch | 17 +++++++++++++++++
 meta/recipes-devtools/btrfs-tools/btrfs-tools_4.19.1.bb |  2 ++
 3 files changed, 34 insertions(+)
 create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Makefile-disable-btrfs-fragments-compilation.patch
 create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Makefile-fix-double-o-compiler-option-using.patch
meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Makefile-disable-btrfs-fragments-compilation.patch new file +15 -0
new file mode 100644
index 0000000000..c20bde967d
@@ -0,0 +1,15 @@
+"btrfs-fragments" tool requires library "gd" for compilation, but 
+  there is no "gd" recipe in Yocto Poky
+Index: git/Makefile
+===================================================================
+--- git.orig/Makefile
++++ git/Makefile
+@@ -217,7 +217,7 @@ progs_build = $(progs_install) btrfsck b
+ 
+ # All programs. Use := instead of = so that this is expanded before we reassign
+ # progs_build below.
+-progs := $(progs_build) btrfs-convert btrfs-fragments
++progs := $(progs_build) btrfs-convert
+ 
+ ifneq ($(DISABLE_BTRFSCONVERT),1)
+ progs_install += btrfs-convert
meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Makefile-fix-double-o-compiler-option-using.patch new file +17 -0
new file mode 100644
index 0000000000..335067bc1f
@@ -0,0 +1,17 @@
+Command line for target "libbtrfsutil/%.o" contained double usage
+  of '-o $@' option and caused error:
+    cc1: error: too many filenames given
+
+Index: git/Makefile
+===================================================================
+--- git.orig/Makefile
++++ git/Makefile
+@@ -414,7 +414,7 @@ libbtrfs.so.0 libbtrfs.so: libbtrfs.so.0
+ 
+ libbtrfsutil/%.o: libbtrfsutil/%.c
+ 	@echo "    [CC]     $@"
+-	$(Q)$(CC) $(LIBBTRFSUTIL_CFLAGS) -o $@ -c $< -o $@
++	$(Q)$(CC) $(LIBBTRFSUTIL_CFLAGS) -c $< -o $@
+ 
+ libbtrfsutil.so.$(libbtrfsutil_version): $(libbtrfsutil_objects)
+ 	@echo "    [LD]     $@"
meta/recipes-devtools/btrfs-tools/btrfs-tools_4.19.1.bb +2 -0
index 2f59a0c13e..6b77ee796f 100644
@@ -19,6 +19,8 @@ SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git \
            file://0001-Makefile-build-mktables-using-native-gcc.patch \
            file://0001-Add-LDFLAGS-when-building-libbtrfsutil.so.patch \
            file://0001-Add-a-possibility-to-specify-where-python-modules-ar.patch \
+           file://0001-Makefile-disable-btrfs-fragments-compilation.patch \
+           file://0001-Makefile-fix-double-o-compiler-option-using.patch \
            "
 
 inherit autotools-brokensep pkgconfig manpages distutils3-base
Signature · 8 lines
2.14.1

[ https://inango.com/ |    ] 
Ivan Efimov 
Architect, Arch Group 
[email protected] 
T +7 343 298 0147 C +7 904 9 888 350 
[ https://inango.com/ | inango.com ] [ https://www.linkedin.com/company/inango ]
#1 lore raw

oe-core patches to go the [email protected] mailing list.

You'll need to rebase onto the btrfs-tools 4.20.1 that is now in master.

The patches you're applying are missing Upstream-Status and Signed-off-by tags.

Also if gd isn't in oe-core and btrfs-fragments depends on it, how does the current recipe build?

Ross

Quoted 88 lines · Ivan Efimov

1) Command line for target "libbtrfsutil/%.o" contained double usage of '-o $@' option and causes error:

cc1: error: too many filenames given

2) "btrfs-fragments" tool depends on library "gd", but there is no "gd" recipe in Yocto Poky. "btrfs-fragments" has been excluded from list of tools for compilation ("progs" Makefile variable)

---
 ...1-Makefile-disable-btrfs-fragments-compilation.patch | 15 +++++++++++++++
 ...01-Makefile-fix-double-o-compiler-option-using.patch | 17 +++++++++++++++++
 meta/recipes-devtools/btrfs-tools/btrfs-tools_4.19.1.bb |  2 ++
 3 files changed, 34 insertions(+)
 create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Makefile-disable-btrfs-fragments-compilation.patch
 create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Makefile-fix-double-o-compiler-option-using.patch
meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Makefile-disable-btrfs-fragments-compilation.patch new file +15 -0
new file mode 100644
index 0000000000..c20bde967d
@@ -0,0 +1,15 @@
+"btrfs-fragments" tool requires library "gd" for compilation, but
+  there is no "gd" recipe in Yocto Poky
+Index: git/Makefile
+===================================================================
+--- git.orig/Makefile
++++ git/Makefile
+@@ -217,7 +217,7 @@ progs_build = $(progs_install) btrfsck b
+
+ # All programs. Use := instead of = so that this is expanded before we reassign
+ # progs_build below.
+-progs := $(progs_build) btrfs-convert btrfs-fragments
++progs := $(progs_build) btrfs-convert
+
+ ifneq ($(DISABLE_BTRFSCONVERT),1)
+ progs_install += btrfs-convert
meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Makefile-fix-double-o-compiler-option-using.patch new file +17 -0
new file mode 100644
index 0000000000..335067bc1f
@@ -0,0 +1,17 @@
+Command line for target "libbtrfsutil/%.o" contained double usage
+  of '-o $@' option and caused error:
+    cc1: error: too many filenames given
+
+Index: git/Makefile
+===================================================================
+--- git.orig/Makefile
++++ git/Makefile
+@@ -414,7 +414,7 @@ libbtrfs.so.0 libbtrfs.so: libbtrfs.so.0
+
+ libbtrfsutil/%.o: libbtrfsutil/%.c
+       @echo "    [CC]     $@"
+-      $(Q)$(CC) $(LIBBTRFSUTIL_CFLAGS) -o $@ -c $< -o $@
++      $(Q)$(CC) $(LIBBTRFSUTIL_CFLAGS) -c $< -o $@
+
+ libbtrfsutil.so.$(libbtrfsutil_version): $(libbtrfsutil_objects)
+       @echo "    [LD]     $@"
meta/recipes-devtools/btrfs-tools/btrfs-tools_4.19.1.bb +2 -1
index 2f59a0c13e..6b77ee796f 100644
@@ -19,6 +19,8 @@ SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git \
            file://0001-Makefile-build-mktables-using-native-gcc.patch \
            file://0001-Add-LDFLAGS-when-building-libbtrfsutil.so.patch \
            file://0001-Add-a-possibility-to-specify-where-python-modules-ar.patch \
+           file://0001-Makefile-disable-btrfs-fragments-compilation.patch \
+           file://0001-Makefile-fix-double-o-compiler-option-using.patch \
            "
 
 inherit autotools-brokensep pkgconfig manpages distutils3-base
--

2.14.1

[ https://inango.com/ | ]
Ivan Efimov
Architect, Arch Group
[email protected]
T +7 343 298 0147 C +7 904 9 888 350
[ https://inango.com/ | inango.com ] [ https://www.linkedin.com/company/inango ] --
_______________________________________________
poky mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/poky

#2 lore raw

Hi, Ross,

Thanks, i'll find the answer for your question and send my patch to [email protected].

Best regards,
Ivan

----- Original Message -----
From: "Burton, Ross" <[email protected]>
To: "Ivan Efimov" <[email protected]>
Cc: "poky" <[email protected]>, "Architecture group" <[email protected]>
Sent: Thursday, February 21, 2019 5:37:52 PM
Subject: Re: [poky] [PATCH 1/1] btrfs-tools Makefile: 1) remove duplicate of '-o $@' option from CC cmdline; 2) disable "bttfs-fragments" tool compilation

oe-core patches to go the [email protected] mailing list.

You'll need to rebase onto the btrfs-tools 4.20.1 that is now in master.

The patches you're applying are missing Upstream-Status and Signed-off-by tags.

Also if gd isn't in oe-core and btrfs-fragments depends on it, how does the current recipe build?

Ross

Quoted 88 lines · Ivan Efimov

1) Command line for target "libbtrfsutil/%.o" contained double usage of '-o $@' option and causes error:

cc1: error: too many filenames given

2) "btrfs-fragments" tool depends on library "gd", but there is no "gd" recipe in Yocto Poky. "btrfs-fragments" has been excluded from list of tools for compilation ("progs" Makefile variable)

---
 ...1-Makefile-disable-btrfs-fragments-compilation.patch | 15 +++++++++++++++
 ...01-Makefile-fix-double-o-compiler-option-using.patch | 17 +++++++++++++++++
 meta/recipes-devtools/btrfs-tools/btrfs-tools_4.19.1.bb |  2 ++
 3 files changed, 34 insertions(+)
 create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Makefile-disable-btrfs-fragments-compilation.patch
 create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Makefile-fix-double-o-compiler-option-using.patch
meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Makefile-disable-btrfs-fragments-compilation.patch new file +15 -0
new file mode 100644
index 0000000000..c20bde967d
@@ -0,0 +1,15 @@
+"btrfs-fragments" tool requires library "gd" for compilation, but
+  there is no "gd" recipe in Yocto Poky
+Index: git/Makefile
+===================================================================
+--- git.orig/Makefile
++++ git/Makefile
+@@ -217,7 +217,7 @@ progs_build = $(progs_install) btrfsck b
+
+ # All programs. Use := instead of = so that this is expanded before we reassign
+ # progs_build below.
+-progs := $(progs_build) btrfs-convert btrfs-fragments
++progs := $(progs_build) btrfs-convert
+
+ ifneq ($(DISABLE_BTRFSCONVERT),1)
+ progs_install += btrfs-convert
meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Makefile-fix-double-o-compiler-option-using.patch new file +17 -0
new file mode 100644
index 0000000000..335067bc1f
@@ -0,0 +1,17 @@
+Command line for target "libbtrfsutil/%.o" contained double usage
+  of '-o $@' option and caused error:
+    cc1: error: too many filenames given
+
+Index: git/Makefile
+===================================================================
+--- git.orig/Makefile
++++ git/Makefile
+@@ -414,7 +414,7 @@ libbtrfs.so.0 libbtrfs.so: libbtrfs.so.0
+
+ libbtrfsutil/%.o: libbtrfsutil/%.c
+       @echo "    [CC]     $@"
+-      $(Q)$(CC) $(LIBBTRFSUTIL_CFLAGS) -o $@ -c $< -o $@
++      $(Q)$(CC) $(LIBBTRFSUTIL_CFLAGS) -c $< -o $@
+
+ libbtrfsutil.so.$(libbtrfsutil_version): $(libbtrfsutil_objects)
+       @echo "    [LD]     $@"
meta/recipes-devtools/btrfs-tools/btrfs-tools_4.19.1.bb +2 -1
index 2f59a0c13e..6b77ee796f 100644
@@ -19,6 +19,8 @@ SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git \
            file://0001-Makefile-build-mktables-using-native-gcc.patch \
            file://0001-Add-LDFLAGS-when-building-libbtrfsutil.so.patch \
            file://0001-Add-a-possibility-to-specify-where-python-modules-ar.patch \
+           file://0001-Makefile-disable-btrfs-fragments-compilation.patch \
+           file://0001-Makefile-fix-double-o-compiler-option-using.patch \
            "
 
 inherit autotools-brokensep pkgconfig manpages distutils3-base
--

2.14.1

[ https://inango.com/ | ]
Ivan Efimov
Architect, Arch Group
[email protected]
T +7 343 298 0147 C +7 904 9 888 350
[ https://inango.com/ | inango.com ] [ https://www.linkedin.com/company/inango ] --
_______________________________________________
poky mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/poky

Signature · 6 lines
[ https://inango.com/ |    ] 
Ivan Efimov 
Architect, Arch Group 
[email protected] 
T +7 343 298 0147 C +7 904 9 888 350 
[ https://inango.com/ | inango.com ] [ https://www.linkedin.com/company/inango ]