* [Buildroot] [PATCH 1/3] Revert "Revert "libglib2: bump to version 2.50.0""
@ 2016-10-10 21:39 Gustavo Zacarias
2016-10-10 21:39 ` [Buildroot] [PATCH 2/3] Revert "Revert "libglib2: add host-util-linux for host variant"" Gustavo Zacarias
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Gustavo Zacarias @ 2016-10-10 21:39 UTC (permalink / raw)
To: buildroot
This reverts commit 40da5b434d0d25662b447f14b724245da04ed90d.
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
package/libglib2/Config.in | 2 ++
package/libglib2/libglib2.hash | 4 ++--
package/libglib2/libglib2.mk | 6 +++---
3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/package/libglib2/Config.in b/package/libglib2/Config.in
index 84ee816..80c7d67 100644
--- a/package/libglib2/Config.in
+++ b/package/libglib2/Config.in
@@ -5,6 +5,8 @@ config BR2_PACKAGE_LIBGLIB2
select BR2_PACKAGE_LIBFFI
select BR2_PACKAGE_PCRE
select BR2_PACKAGE_PCRE_UCP
+ select BR2_PACKAGE_UTIL_LINUX
+ select BR2_PACKAGE_UTIL_LINUX_LIBMOUNT
select BR2_PACKAGE_ZLIB
depends on BR2_USE_WCHAR # gettext
depends on BR2_TOOLCHAIN_HAS_THREADS
diff --git a/package/libglib2/libglib2.hash b/package/libglib2/libglib2.hash
index 35728e2..3bc4021 100644
--- a/package/libglib2/libglib2.hash
+++ b/package/libglib2/libglib2.hash
@@ -1,2 +1,2 @@
-# https://download.gnome.org/sources/glib/2.48/glib-2.48.2.sha256sum
-sha256 f25e751589cb1a58826eac24fbd4186cda4518af772806b666a3f91f66e6d3f4 glib-2.48.2.tar.xz
+# https://download.gnome.org/sources/glib/2.50/glib-2.50.0.sha256sum
+sha256 830b551fa626bda06e12729205b3c5bb0d82b924a8cf64d948945878f01b7d70 glib-2.50.0.tar.xz
diff --git a/package/libglib2/libglib2.mk b/package/libglib2/libglib2.mk
index 6b1a387..5bc6ed5 100644
--- a/package/libglib2/libglib2.mk
+++ b/package/libglib2/libglib2.mk
@@ -4,8 +4,8 @@
#
################################################################################
-LIBGLIB2_VERSION_MAJOR = 2.48
-LIBGLIB2_VERSION = $(LIBGLIB2_VERSION_MAJOR).2
+LIBGLIB2_VERSION_MAJOR = 2.50
+LIBGLIB2_VERSION = $(LIBGLIB2_VERSION_MAJOR).0
LIBGLIB2_SOURCE = glib-$(LIBGLIB2_VERSION).tar.xz
LIBGLIB2_SITE = http://ftp.gnome.org/pub/gnome/sources/glib/$(LIBGLIB2_VERSION_MAJOR)
LIBGLIB2_LICENSE = LGPLv2+
@@ -102,7 +102,7 @@ HOST_LIBGLIB2_CONF_OPTS = \
LIBGLIB2_DEPENDENCIES = \
host-pkgconf host-libglib2 host-gettext \
- libffi pcre zlib $(if $(BR2_NEEDS_GETTEXT),gettext)
+ libffi pcre util-linux zlib $(if $(BR2_NEEDS_GETTEXT),gettext)
HOST_LIBGLIB2_DEPENDENCIES = \
host-gettext host-libffi host-pcre host-pkgconf host-zlib
--
2.7.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 2/3] Revert "Revert "libglib2: add host-util-linux for host variant""
2016-10-10 21:39 [Buildroot] [PATCH 1/3] Revert "Revert "libglib2: bump to version 2.50.0"" Gustavo Zacarias
@ 2016-10-10 21:39 ` Gustavo Zacarias
2016-10-10 21:39 ` [Buildroot] [PATCH 3/3] util-linux: fix crc32 function collision Gustavo Zacarias
2016-10-11 9:22 ` [Buildroot] [PATCH 1/3] Revert "Revert "libglib2: bump to version 2.50.0"" Thomas Petazzoni
2 siblings, 0 replies; 4+ messages in thread
From: Gustavo Zacarias @ 2016-10-10 21:39 UTC (permalink / raw)
To: buildroot
This reverts commit 2f556ab99f51a0b90183610a7fecb9ed22ed4aa3.
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
package/libglib2/libglib2.mk | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/package/libglib2/libglib2.mk b/package/libglib2/libglib2.mk
index 5bc6ed5..f199a4a 100644
--- a/package/libglib2/libglib2.mk
+++ b/package/libglib2/libglib2.mk
@@ -105,7 +105,12 @@ LIBGLIB2_DEPENDENCIES = \
libffi pcre util-linux zlib $(if $(BR2_NEEDS_GETTEXT),gettext)
HOST_LIBGLIB2_DEPENDENCIES = \
- host-gettext host-libffi host-pcre host-pkgconf host-zlib
+ host-gettext \
+ host-libffi \
+ host-pcre \
+ host-pkgconf \
+ host-util-linux \
+ host-zlib
LIBGLIB2_CONF_OPTS = \
--with-pcre=system
--
2.7.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 3/3] util-linux: fix crc32 function collision
2016-10-10 21:39 [Buildroot] [PATCH 1/3] Revert "Revert "libglib2: bump to version 2.50.0"" Gustavo Zacarias
2016-10-10 21:39 ` [Buildroot] [PATCH 2/3] Revert "Revert "libglib2: add host-util-linux for host variant"" Gustavo Zacarias
@ 2016-10-10 21:39 ` Gustavo Zacarias
2016-10-11 9:22 ` [Buildroot] [PATCH 1/3] Revert "Revert "libglib2: bump to version 2.50.0"" Thomas Petazzoni
2 siblings, 0 replies; 4+ messages in thread
From: Gustavo Zacarias @ 2016-10-10 21:39 UTC (permalink / raw)
To: buildroot
When linking both zlib and libblkid statically in the same target a
collision occurs. Fix this by prefixing publicly-visible crc32 library
functions. Fixes:
http://autobuild.buildroot.net/results/25e/25efb79dd6ff1d93b5775baeccda23194d68c711/
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
.../0001-lib-crc32-prefix-public-functions.patch | 182 +++++++++++++++++++++
1 file changed, 182 insertions(+)
create mode 100644 package/util-linux/0001-lib-crc32-prefix-public-functions.patch
diff --git a/package/util-linux/0001-lib-crc32-prefix-public-functions.patch b/package/util-linux/0001-lib-crc32-prefix-public-functions.patch
new file mode 100644
index 0000000..fa68bd0
--- /dev/null
+++ b/package/util-linux/0001-lib-crc32-prefix-public-functions.patch
@@ -0,0 +1,182 @@
+From b39b4cac29dcc5d060d8e30344f693462502066a Mon Sep 17 00:00:00 2001
+From: Gustavo Zacarias <gustavo@zacarias.com.ar>
+Date: Mon, 10 Oct 2016 17:42:42 -0300
+Subject: [PATCH] lib/crc32: prefix public functions
+
+Make the publicly-visible crc32 library functions prefixed by ul_, such
+as crc32() -> ul_crc32().
+This is because it clashes with the crc32() function from zlib.
+For newer versions of glib (2.50+) zlib and libblkid are required
+dependencies and otherwise results in build failure when building
+statically.
+
+Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
+---
+Status: submitted upstream
+
+ disk-utils/fsck.cramfs.c | 12 ++++++------
+ disk-utils/mkfs.cramfs.c | 6 +++---
+ include/crc32.h | 4 ++--
+ lib/crc32.c | 4 ++--
+ libblkid/src/partitions/gpt.c | 2 +-
+ libblkid/src/superblocks/nilfs.c | 6 +++---
+ libfdisk/src/gpt.c | 2 +-
+ 7 files changed, 18 insertions(+), 18 deletions(-)
+
+diff --git a/disk-utils/fsck.cramfs.c b/disk-utils/fsck.cramfs.c
+index 12009f2..f34e79f 100644
+--- a/disk-utils/fsck.cramfs.c
++++ b/disk-utils/fsck.cramfs.c
+@@ -214,7 +214,7 @@ static void test_crc(int start)
+ return;
+ }
+
+- crc = crc32(0L, Z_NULL, 0);
++ crc = ul_crc32(0L, Z_NULL, 0);
+
+ buf =
+ mmap(NULL, super.size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0);
+@@ -231,8 +231,8 @@ static void test_crc(int start)
+ }
+ if (buf != MAP_FAILED) {
+ ((struct cramfs_super *)((unsigned char *) buf + start))->fsid.crc =
+- crc32(0L, Z_NULL, 0);
+- crc = crc32(crc, (unsigned char *) buf + start, super.size - start);
++ ul_crc32(0L, Z_NULL, 0);
++ crc = ul_crc32(crc, (unsigned char *) buf + start, super.size - start);
+ munmap(buf, super.size);
+ } else {
+ int retval;
+@@ -249,15 +249,15 @@ static void test_crc(int start)
+ break;
+ if (length == 0)
+ ((struct cramfs_super *)buf)->fsid.crc =
+- crc32(0L, Z_NULL, 0);
++ ul_crc32(0L, Z_NULL, 0);
+ length += retval;
+ if (length > (super.size - start)) {
+- crc = crc32(crc, buf,
++ crc = ul_crc32(crc, buf,
+ retval - (length -
+ (super.size - start)));
+ break;
+ }
+- crc = crc32(crc, buf, retval);
++ crc = ul_crc32(crc, buf, retval);
+ }
+ free(buf);
+ }
+diff --git a/disk-utils/mkfs.cramfs.c b/disk-utils/mkfs.cramfs.c
+index 4e6b3ab..55d6871 100644
+--- a/disk-utils/mkfs.cramfs.c
++++ b/disk-utils/mkfs.cramfs.c
+@@ -406,7 +406,7 @@ static unsigned int write_superblock(struct entry *root, char *base, int size)
+ super->size = size;
+ memcpy(super->signature, CRAMFS_SIGNATURE, sizeof(super->signature));
+
+- super->fsid.crc = crc32(0L, Z_NULL, 0);
++ super->fsid.crc = ul_crc32(0L, Z_NULL, 0);
+ super->fsid.edition = opt_edition;
+ super->fsid.blocks = total_blocks;
+ super->fsid.files = total_nodes;
+@@ -700,7 +700,7 @@ int main(int argc, char **argv)
+ loff_t fslen_ub = sizeof(struct cramfs_super);
+ unsigned int fslen_max;
+ char const *dirname, *outfile;
+- uint32_t crc = crc32(0L, Z_NULL, 0);
++ uint32_t crc = ul_crc32(0L, Z_NULL, 0);
+ int c;
+ cramfs_is_big_endian = HOST_IS_BIG_ENDIAN; /* default is to use host order */
+
+@@ -856,7 +856,7 @@ int main(int argc, char **argv)
+ sizeof(struct cramfs_super));
+
+ /* Put the checksum in. */
+- crc = crc32(crc, (unsigned char *) (rom_image+opt_pad), (offset-opt_pad));
++ crc = ul_crc32(crc, (unsigned char *) (rom_image+opt_pad), (offset-opt_pad));
+ ((struct cramfs_super *) (rom_image+opt_pad))->fsid.crc = u32_toggle_endianness(cramfs_is_big_endian, crc);
+ if (verbose)
+ printf(_("CRC: %x\n"), crc);
+diff --git a/include/crc32.h b/include/crc32.h
+index ff2dd99..2551f50 100644
+--- a/include/crc32.h
++++ b/include/crc32.h
+@@ -4,8 +4,8 @@
+ #include <sys/types.h>
+ #include <stdint.h>
+
+-extern uint32_t crc32(uint32_t seed, const unsigned char *buf, size_t len);
+-extern uint32_t crc32_exclude_offset(uint32_t seed, const unsigned char *buf, size_t len,
++extern uint32_t ul_crc32(uint32_t seed, const unsigned char *buf, size_t len);
++extern uint32_t ul_crc32_exclude_offset(uint32_t seed, const unsigned char *buf, size_t len,
+ size_t exclude_off, size_t exclude_len);
+
+ #endif
+diff --git a/lib/crc32.c b/lib/crc32.c
+index a5e3216..824693d 100644
+--- a/lib/crc32.c
++++ b/lib/crc32.c
+@@ -108,7 +108,7 @@ static inline uint32_t crc32_add_char(uint32_t crc, unsigned char c)
+ * and does __not__ xor at the end. Then individual users can do
+ * whatever they need.
+ */
+-uint32_t crc32(uint32_t seed, const unsigned char *buf, size_t len)
++uint32_t ul_crc32(uint32_t seed, const unsigned char *buf, size_t len)
+ {
+ uint32_t crc = seed;
+ const unsigned char *p = buf;
+@@ -121,7 +121,7 @@ uint32_t crc32(uint32_t seed, const unsigned char *buf, size_t len)
+ return crc;
+ }
+
+-uint32_t crc32_exclude_offset(uint32_t seed, const unsigned char *buf, size_t len,
++uint32_t ul_crc32_exclude_offset(uint32_t seed, const unsigned char *buf, size_t len,
+ size_t exclude_off, size_t exclude_len)
+ {
+ uint32_t crc = seed;
+diff --git a/libblkid/src/partitions/gpt.c b/libblkid/src/partitions/gpt.c
+index dcc04e6..e6baa59 100644
+--- a/libblkid/src/partitions/gpt.c
++++ b/libblkid/src/partitions/gpt.c
+@@ -105,7 +105,7 @@ struct gpt_entry {
+ static inline uint32_t count_crc32(const unsigned char *buf, size_t len,
+ size_t exclude_off, size_t exclude_len)
+ {
+- return (crc32_exclude_offset(~0L, buf, len, exclude_off, exclude_len) ^ ~0L);
++ return (ul_crc32_exclude_offset(~0L, buf, len, exclude_off, exclude_len) ^ ~0L);
+ }
+
+ static inline unsigned char *get_lba_buffer(blkid_probe pr,
+diff --git a/libblkid/src/superblocks/nilfs.c b/libblkid/src/superblocks/nilfs.c
+index ee5c5f9..95538ef 100644
+--- a/libblkid/src/superblocks/nilfs.c
++++ b/libblkid/src/superblocks/nilfs.c
+@@ -89,9 +89,9 @@ static int nilfs_valid_sb(blkid_probe pr, struct nilfs_super_block *sb, int is_b
+ if (bytes < crc_start || bytes > sizeof(struct nilfs_super_block))
+ return 0;
+
+- crc = crc32(le32_to_cpu(sb->s_crc_seed), (unsigned char *)sb, sumoff);
+- crc = crc32(crc, sum, 4);
+- crc = crc32(crc, (unsigned char *)sb + crc_start, bytes - crc_start);
++ crc = ul_crc32(le32_to_cpu(sb->s_crc_seed), (unsigned char *)sb, sumoff);
++ crc = ul_crc32(crc, sum, 4);
++ crc = ul_crc32(crc, (unsigned char *)sb + crc_start, bytes - crc_start);
+
+ return blkid_probe_verify_csum(pr, crc, le32_to_cpu(sb->s_sum));
+ }
+diff --git a/libfdisk/src/gpt.c b/libfdisk/src/gpt.c
+index 8377192..208699b 100644
+--- a/libfdisk/src/gpt.c
++++ b/libfdisk/src/gpt.c
+@@ -850,7 +850,7 @@ fail:
+ static inline uint32_t count_crc32(const unsigned char *buf, size_t len,
+ size_t ex_off, size_t ex_len)
+ {
+- return (crc32_exclude_offset(~0L, buf, len, ex_off, ex_len) ^ ~0L);
++ return (ul_crc32_exclude_offset(~0L, buf, len, ex_off, ex_len) ^ ~0L);
+ }
+
+ static inline uint32_t gpt_header_count_crc32(struct gpt_header *header)
+--
+2.7.3
+
--
2.7.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/3] Revert "Revert "libglib2: bump to version 2.50.0""
2016-10-10 21:39 [Buildroot] [PATCH 1/3] Revert "Revert "libglib2: bump to version 2.50.0"" Gustavo Zacarias
2016-10-10 21:39 ` [Buildroot] [PATCH 2/3] Revert "Revert "libglib2: add host-util-linux for host variant"" Gustavo Zacarias
2016-10-10 21:39 ` [Buildroot] [PATCH 3/3] util-linux: fix crc32 function collision Gustavo Zacarias
@ 2016-10-11 9:22 ` Thomas Petazzoni
2 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2016-10-11 9:22 UTC (permalink / raw)
To: buildroot
Hello,
On Mon, 10 Oct 2016 18:39:07 -0300, Gustavo Zacarias wrote:
> This reverts commit 40da5b434d0d25662b447f14b724245da04ed90d.
>
> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
> ---
> package/libglib2/Config.in | 2 ++
> package/libglib2/libglib2.hash | 4 ++--
> package/libglib2/libglib2.mk | 6 +++---
> 3 files changed, 7 insertions(+), 5 deletions(-)
Thanks a lot, all three patches applied!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-10-11 9:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-10 21:39 [Buildroot] [PATCH 1/3] Revert "Revert "libglib2: bump to version 2.50.0"" Gustavo Zacarias
2016-10-10 21:39 ` [Buildroot] [PATCH 2/3] Revert "Revert "libglib2: add host-util-linux for host variant"" Gustavo Zacarias
2016-10-10 21:39 ` [Buildroot] [PATCH 3/3] util-linux: fix crc32 function collision Gustavo Zacarias
2016-10-11 9:22 ` [Buildroot] [PATCH 1/3] Revert "Revert "libglib2: bump to version 2.50.0"" Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox