Hi, this commit https://github.com/dovecot/core/commit/c9d76e2baf653fa5504d6849e5c1aae32eff3c53 added code which can not be compiled with uclibc-ng 1.0.26 using buildroot: make[3]: Entering directory '/home/bernd/buildroot/br4/output/build/dovecot-2.2.33.2/src/lib-test' /bin/bash ../../libtool --tag=CC --mode=compile /home/bernd/buildroot/br4/output/host/bin/i586-buildroot-linux-uclibc-gcc -DHAVE_CONFIG_H -I. -I../.. -I../../src/lib -I../../src/lib-charset -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -std=gnu99 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast -fno-builtin-strftime -Wstrict-aliasing=2 -I/home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include -c -o test-common.lo test-common.c libtool: compile: /home/bernd/buildroot/br4/output/host/bin/i586-buildroot-linux-uclibc-gcc -DHAVE_CONFIG_H -I. -I../.. -I../../src/lib -I../../src/lib-charset -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -std=gnu99 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast -fno-builtin-strftime -Wstrict-aliasing=2 -I/home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include -c test-common.c -fPIC -DPIC -o .libs/test-common.o In file included from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/bits/byteswap-common.h:34:0, from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/bits/byteswap.h:55, from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/byteswap.h:22, from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/endian.h:59, from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/bits/waitstatus.h:72, from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/stdlib.h:41, from ../../src/lib/lib.h:11, from test-common.c:3: ../../src/lib/byteorder.h:32:24: error: expected identifier or '(' before '__extension__' static inline uint16_t bswap_16(uint16_t in); ^ In file included from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/endian.h:59:0, from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/bits/waitstatus.h:72, from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/stdlib.h:41, from ../../src/lib/lib.h:11, from test-common.c:3: ../../src/lib/byteorder.h:92:24: error: redefinition of '__bswap_64' static inline uint64_t bswap_64(uint64_t in) ^ In file included from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/bits/byteswap.h:55:0, from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/byteswap.h:22, from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/endian.h:59, from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/bits/waitstatus.h:72, from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/stdlib.h:41, from ../../src/lib/lib.h:11, from test-common.c:3: /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/bits/byteswap-common.h:75:1: note: previous definition of '__bswap_64' was here __bswap_64 (__uint64_t __bsx) ^~~~~~~~~~ In file included from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/endian.h:59:0, from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/bits/waitstatus.h:72, from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/stdlib.h:41, from ../../src/lib/lib.h:11, from test-common.c:3: ../../src/lib/byteorder.h:104:24: error: redefinition of '__bswap_32' static inline uint32_t bswap_32(uint32_t in) ^ In file included from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/bits/byteswap.h:55:0, from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/byteswap.h:22, from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/endian.h:59, from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/bits/waitstatus.h:72, from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/stdlib.h:41, from ../../src/lib/lib.h:11, from test-common.c:3: /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/bits/byteswap-common.h:44:1: note: previous definition of '__bswap_32' was here __bswap_32 (unsigned int __bsx) ^~~~~~~~~~ In file included from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/bits/byteswap-common.h:34:0, from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/bits/byteswap.h:55, from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/byteswap.h:22, from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/endian.h:59, from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/bits/waitstatus.h:72, from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/stdlib.h:41, from ../../src/lib/lib.h:11, from test-common.c:3: ../../src/lib/byteorder.h:112:24: error: expected identifier or '(' before '__extension__' static inline uint16_t bswap_16(uint16_t in) ^ Makefile:491: recipe for target 'test-common.lo' failed To reproduce try something like this: $ git clone git://git.buildroot.net/buildroot $ cd buildroot $ echo "BR2_PACKAGE_DOVECOT=y" > dovecot.defconfig $ make defconfig BR2_DEFCONFIG=dovecot.defconfig Patch buildroot: diff --git a/package/dovecot/dovecot.hash b/package/dovecot/dovecot.hash index 184745b394..3dbc50739c 100644 --- a/package/dovecot/dovecot.hash +++ b/package/dovecot/dovecot.hash @@ -1,2 +1,2 @@ # Locally computed after checking signature -sha256 034be40907748128d65088a4f59789b2f99ae7b33a88974eae0b6a68ece376a1 dovecot-2.2.31.tar.gz +sha256 fe1e3b78609a56ee22fc209077e4b75348fa1bbd54c46f52bde2472a4c4cee84 dovecot-2.2.33.2.tar.gz diff --git a/package/dovecot/dovecot.mk b/package/dovecot/dovecot.mk index 4cc6ae4de7..25a78b9f78 100644 --- a/package/dovecot/dovecot.mk +++ b/package/dovecot/dovecot.mk @@ -5,7 +5,7 @@ ################################################################################ DOVECOT_VERSION_MAJOR = 2.2 -DOVECOT_VERSION = $(DOVECOT_VERSION_MAJOR).31 +DOVECOT_VERSION = $(DOVECOT_VERSION_MAJOR).33.2 DOVECOT_SITE = http://www.dovecot.org/releases/$(DOVECOT_VERSION_MAJOR) DOVECOT_INSTALL_STAGING = YES DOVECOT_LICENSE = LGPL-2.1 Start the build using "make dovecot" and get some coffee/tee ;) Regards, Bernd
Josef 'Jeff' Sipek
2017-Nov-13 20:40 UTC
Building dovecot 2.2.33.2 is broken with uclibc-ng
On Mon, Nov 13, 2017 at 20:07:00 +0100, Bernd Kuhls wrote:> Hi, > > this commit > https://github.com/dovecot/core/commit/c9d76e2baf653fa5504d6849e5c1aae32eff3c53 > > added code which can not be compiled with uclibc-ng 1.0.26 using buildroot:Hrm... ok. It'll be probably faster for you to try a test build instead of me setting up buildroot... What happens if in dovecot's byteorder.h you add this before line 30: #undef bswap_8 #undef bswap_16 #undef bswap_32 #undef bswap_64 Hopefully that does it. Jeff.> > make[3]: Entering directory '/home/bernd/buildroot/br4/output/build/dovecot-2.2.33.2/src/lib-test' > /bin/bash ../../libtool --tag=CC --mode=compile /home/bernd/buildroot/br4/output/host/bin/i586-buildroot-linux-uclibc-gcc -DHAVE_CONFIG_H -I. -I../.. -I../../src/lib -I../../src/lib-charset -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -std=gnu99 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast -fno-builtin-strftime -Wstrict-aliasing=2 -I/home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include -c -o test-common.lo test-common.c > libtool: compile: /home/bernd/buildroot/br4/output/host/bin/i586-buildroot-linux-uclibc-gcc -DHAVE_CONFIG_H -I. -I../.. -I../../src/lib -I../../src/lib-charset -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -std=gnu99 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast -fno-builtin-strftime -Wstrict-aliasing=2 -I/home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include -c test-common.c -fPIC -DPIC -o .libs/test-common.o > In file included from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/bits/byteswap-common.h:34:0, > from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/bits/byteswap.h:55, > from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/byteswap.h:22, > from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/endian.h:59, > from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/bits/waitstatus.h:72, > from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/stdlib.h:41, > from ../../src/lib/lib.h:11, > from test-common.c:3: > ../../src/lib/byteorder.h:32:24: error: expected identifier or '(' before '__extension__' > static inline uint16_t bswap_16(uint16_t in); > ^ > In file included from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/endian.h:59:0, > from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/bits/waitstatus.h:72, > from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/stdlib.h:41, > from ../../src/lib/lib.h:11, > from test-common.c:3: > ../../src/lib/byteorder.h:92:24: error: redefinition of '__bswap_64' > static inline uint64_t bswap_64(uint64_t in) > ^ > In file included from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/bits/byteswap.h:55:0, > from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/byteswap.h:22, > from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/endian.h:59, > from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/bits/waitstatus.h:72, > from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/stdlib.h:41, > from ../../src/lib/lib.h:11, > from test-common.c:3: > /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/bits/byteswap-common.h:75:1: note: previous definition of '__bswap_64' was here > __bswap_64 (__uint64_t __bsx) > ^~~~~~~~~~ > In file included from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/endian.h:59:0, > from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/bits/waitstatus.h:72, > from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/stdlib.h:41, > from ../../src/lib/lib.h:11, > from test-common.c:3: > ../../src/lib/byteorder.h:104:24: error: redefinition of '__bswap_32' > static inline uint32_t bswap_32(uint32_t in) > ^ > In file included from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/bits/byteswap.h:55:0, > from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/byteswap.h:22, > from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/endian.h:59, > from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/bits/waitstatus.h:72, > from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/stdlib.h:41, > from ../../src/lib/lib.h:11, > from test-common.c:3: > /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/bits/byteswap-common.h:44:1: note: previous definition of '__bswap_32' was here > __bswap_32 (unsigned int __bsx) > ^~~~~~~~~~ > In file included from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/bits/byteswap-common.h:34:0, > from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/bits/byteswap.h:55, > from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/byteswap.h:22, > from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/endian.h:59, > from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/bits/waitstatus.h:72, > from /home/bernd/buildroot/br4/output/host/i586-buildroot-linux-uclibc/sysroot/usr/include/stdlib.h:41, > from ../../src/lib/lib.h:11, > from test-common.c:3: > ../../src/lib/byteorder.h:112:24: error: expected identifier or '(' before '__extension__' > static inline uint16_t bswap_16(uint16_t in) > ^ > Makefile:491: recipe for target 'test-common.lo' failed > > > To reproduce try something like this: > > $ git clone git://git.buildroot.net/buildroot > $ cd buildroot > $ echo "BR2_PACKAGE_DOVECOT=y" > dovecot.defconfig > $ make defconfig BR2_DEFCONFIG=dovecot.defconfig > > Patch buildroot: > > diff --git a/package/dovecot/dovecot.hash b/package/dovecot/dovecot.hash > index 184745b394..3dbc50739c 100644 > --- a/package/dovecot/dovecot.hash > +++ b/package/dovecot/dovecot.hash > @@ -1,2 +1,2 @@ > # Locally computed after checking signature > -sha256 034be40907748128d65088a4f59789b2f99ae7b33a88974eae0b6a68ece376a1 dovecot-2.2.31.tar.gz > +sha256 fe1e3b78609a56ee22fc209077e4b75348fa1bbd54c46f52bde2472a4c4cee84 dovecot-2.2.33.2.tar.gz > diff --git a/package/dovecot/dovecot.mk b/package/dovecot/dovecot.mk > index 4cc6ae4de7..25a78b9f78 100644 > --- a/package/dovecot/dovecot.mk > +++ b/package/dovecot/dovecot.mk > @@ -5,7 +5,7 @@ > ################################################################################ > > DOVECOT_VERSION_MAJOR = 2.2 > -DOVECOT_VERSION = $(DOVECOT_VERSION_MAJOR).31 > +DOVECOT_VERSION = $(DOVECOT_VERSION_MAJOR).33.2 > DOVECOT_SITE = http://www.dovecot.org/releases/$(DOVECOT_VERSION_MAJOR) > DOVECOT_INSTALL_STAGING = YES > DOVECOT_LICENSE = LGPL-2.1 > > Start the build using "make dovecot" and get some coffee/tee ;) > > Regards, Bernd-- NT is to UNIX what a doughnut is to a particle accelerator.
Am Mon, 13 Nov 2017 15:40:14 -0500 schrieb Josef 'Jeff' Sipek:> What happens if in dovecot's byteorder.h you add this before line 30: > > #undef bswap_8 > #undef bswap_16 > #undef bswap_32 > #undef bswap_64 > > Hopefully that does it.Hi Jeff, adding these four lines fixes the build error, thanks! Regards, Bernd
Apparently Analagous Threads
- Building dovecot 2.2.33.2 is broken with uclibc-ng
- Building an LLVM/CLANG cross compiler for legacy GCC toolchain
- Dovecots header files not optimized for external plugins
- [LLVMdev] llvm cross compilation and simplescalar simulation for ARM
- Two Problems Cross-compiling