Skip to contentSkip to conversation

lvm2: disable statical building because it fails

PATCH New Fabio Porcedda 2 participants 5 messages Dec 17, 2013 – Dec 19, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lvm2: disable statical building because it fails

Fixes:
http://autobuild.buildroot.net/results/b0b/b0b386969459dda9c294f1ccb4927ca225fa6bdd/

---
 package/lvm2/Config.in | 1 +
 1 file changed, 1 insertion(+)
package/lvm2/Config.in +1 -0
index 5d6209fc1..29b80ee 100644
@@ -2,6 +2,7 @@ config BR2_PACKAGE_LVM2
 	bool "lvm2 & device mapper"
 	depends on BR2_LARGEFILE
 	depends on BR2_USE_MMU # needs fork()
+	depends on !BR2_PREFER_STATIC_LIB # It fails to build statically
 	help
 	  This is LVM2, the rewrite of The Linux Logical Volume Manager.
 	  LVM supports enterprise level volume management of disk and disk
Signature · 1 line
1.8.5
#1 lore raw

PATCH 1/1 lvm2: disable statical building because it fails

Dear Fabio Porcedda,

Quoted 13 lines · Fabio Porcedda

Fixes:
http://autobuild.buildroot.net/results/b0b/b0b386969459dda9c294f1ccb4927ca225fa6bdd/

---
 package/lvm2/Config.in | 1 +
 1 file changed, 1 insertion(+)
package/lvm2/Config.in +0 -0
index 5d6209fc1..29b80ee 100644

package/lvm2/Config.in config BR2_PACKAGE_LVM2 · line 8

Quoted 7 lines
package/lvm2/Config.in +1 -0
@@ -2,6 +2,7 @@ config BR2_PACKAGE_LVM2
 	bool "lvm2 & device mapper"
 	depends on BR2_LARGEFILE
 	depends on BR2_USE_MMU # needs fork()
+	depends on !BR2_PREFER_STATIC_LIB # It fails to build statically
 	help
 	  This is LVM2, the rewrite of The Linux Logical Volume Manager.
 	  LVM supports enterprise level volume management of disk and disk

Thanks, but you forgot to propagate this new dependency to the reverse dependencies of lvm2, and you forgot to add the corresponding comment. See
http://buildroot.org/downloads/manual/manual.html#dependencies-target-toolchain-options.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#2 lore raw

PATCH 1/1 lvm2: disable statical building because it fails

Quoted 20 lines · Thomas Petazzoni

Dear Fabio Porcedda,

Quoted 17 lines · Fabio Porcedda

Fixes:
http://autobuild.buildroot.net/results/b0b/b0b386969459dda9c294f1ccb4927ca225fa6bdd/

---
 package/lvm2/Config.in | 1 +
 1 file changed, 1 insertion(+)
package/lvm2/Config.in +1 -0
index 5d6209fc1..29b80ee 100644
@@ -2,6 +2,7 @@ config BR2_PACKAGE_LVM2
      bool "lvm2 & device mapper"
      depends on BR2_LARGEFILE
      depends on BR2_USE_MMU # needs fork()
+     depends on !BR2_PREFER_STATIC_LIB # It fails to build statically
Quoted 8 lines

package/lvm2/Config.in config BR2_PACKAGE_LVM2 · line 8

Quoted 3 lines
package/lvm2/Config.in +0 -0
      help
        This is LVM2, the rewrite of The Linux Logical Volume Manager.
        LVM supports enterprise level volume management of disk and disk

Thanks, but you forgot to propagate this new dependency to the reverse dependencies of lvm2, and you forgot to add the corresponding comment. See
http://buildroot.org/downloads/manual/manual.html#dependencies-target-toolchain-options.

Ok, thanks, i will send an updated patch.

Best regards

Signature · 1 line
Fabio Porcedda
#3 lore raw

PATCH 1/1 lvm2: disable statical building because it fails

Dear Fabio Porcedda,

Quoted 6 lines · Fabio Porcedda
Quoted 4 lines

Thanks, but you forgot to propagate this new dependency to the reverse dependencies of lvm2, and you forgot to add the corresponding comment. See
http://buildroot.org/downloads/manual/manual.html#dependencies-target-toolchain-options.

Ok, thanks, i will send an updated patch.

Looking more at the problem, isn't it possible to fix the static build of LVM2, rather than preventing LVM2 from being selected in this case?

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#4 lore raw

PATCH 1/1 lvm2: disable statical building because it fails

Quoted 9 lines · Thomas Petazzoni

Dear Fabio Porcedda,

Quoted 5 lines · Fabio Porcedda
Quoted 4 lines

Thanks, but you forgot to propagate this new dependency to the reverse dependencies of lvm2, and you forgot to add the corresponding comment. See
http://buildroot.org/downloads/manual/manual.html#dependencies-target-toolchain-options.

Quoted 4 lines
Quoted 1 line

Ok, thanks, i will send an updated patch.

Looking more at the problem, isn't it possible to fix the static build of LVM2, rather than preventing LVM2 from being selected in this case?

Yes, i've found a way to fix that.

First is a fix to buildroot adding:
+LVM2_CONF_OPT += --enable-static_link

The second one is a bug within lvm2 when using static building.

(quoted diff) +0 -0

b/output/build/lvm2-2.02.103/libdm/Makefile.in
index 7b40bde..bddb0a0 100644

output/build/lvm2-2.02.103/libdm/Makefile.in renamed from home/fabiopo/tmp/Makefile.in +0 -1
@@ -40,7 +40,6 @@ endif
 
 ifeq ("@STATIC_LINK@", "yes")
 LIB_STATIC = $(interface)/libdevmapper.a
-TARGETS += libdevmapper.a
 endif
 
 LIB_SHARED = $(interface)/libdevmapper.$(LIB_SUFFIX)
@@ -65,9 +64,6 @@ device-mapper: all
 libdevmapper.$(LIB_SUFFIX) libdevmapper.$(LIB_SUFFIX).$(LIB_VERSION):

$(LIB_SHARED)

        $(LN_S) -f $< $@

-libdevmapper.a: $(LIB_STATIC)
- $(LN_S) -f $< $@
-

I will prepare a patch to fix lvm2 static building.

Best regards

Signature · 1 line
Fabio Porcedda