[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#695541: tarantool: FTBFS(kfreebsd): error: 'O_CLOEXEC' undeclared (first use in this function)



Package: src:tarantool
Version: 1.4.8+20121207-1
Control: -1 notfound 1.4.6+20120629+2158-1
Severity: serious
Tags: sid wheezy patch
User: debian-bsd@lists.debian.org
Usertags: kfreebsd
X-Debbugs-Cc: debian-bsd@lists.debian.org
Justification: fails to build from source (but built successfully in the
past)

Hi,

The updated, embedded copy of libeio now has the same problem as in seen
in libio-aio-perl (Bug#645543) :

> make[3]: Entering directory `/build/buildd-tarantool_1.4.8+20121207-1-kfreebsd-amd64-nhFOgv/tarantool-1.4.8+20121207/build-area'
> /usr/bin/cmake -E cmake_progress_report /build/buildd-tarantool_1.4.8+20121207-1-kfreebsd-amd64-nhFOgv/tarantool-1.4.8+20121207/build-area/CMakeFiles 24
> [ 59%] Building C object src/CMakeFiles/eio.dir/tarantool_eio.c.o
> cd /build/buildd-tarantool_1.4.8+20121207-1-kfreebsd-amd64-nhFOgv/tarantool-1.4.8+20121207/build-area/src && /usr/bin/gcc   -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DCORO_ASM -fno-omit-frame-pointer -fno-stack-protector -fexceptions -funwind-tables -fgnu89-inline -DNDEBUG -DNVALGRIND -pthread -ggdb -O2 -I/build/buildd-tarantool_1.4.8+20121207-1-kfreebsd-amd64-nhFOgv/tarantool-1.4.8+20121207/third_party/libobjc -I/build/buildd-tarantool_1.4.8+20121207-1-kfreebsd-amd64-nhFOgv/tarantool-1.4.8+20121207/third_party/luajit/src -I/build/buildd-tarantool_1.4.8+20121207-1-kfreebsd-amd64-nhFOgv/tarantool-1.4.8+20121207 -I/build/buildd-tarantool_1.4.8+20121207-1-kfreebsd-amd64-nhFOgv/tarantool-1.4.8+20121207/include -I/build/buildd-tarantool_1.4.8+20121207-1-kfreebsd-amd64-nhFOgv/tarantool-1.4.8+20121207/build-area/include -I/build/buildd-tarantool_1.4.8+20121207-1-kfreebsd-amd64-nhFOgv/tarantool-1.4.8+20121207/connector/c/include    -o CMakeFiles/eio.dir/tarantool_eio.c.o   -c /build/bu
 ildd-tara
ntool_1.4.8+20121207-1-kfreebsd-amd64-nhFOgv/tarantool-1.4.8+20121207/src/tarantool_eio.c
> In file included from /build/buildd-tarantool_1.4.8+20121207-1-kfreebsd-amd64-nhFOgv/tarantool-1.4.8+20121207/src/tarantool_eio.c:30:0:
> /build/buildd-tarantool_1.4.8+20121207-1-kfreebsd-amd64-nhFOgv/tarantool-1.4.8+20121207/third_party/libeio/eio.c: In function 'eio__scandir':
> /build/buildd-tarantool_1.4.8+20121207-1-kfreebsd-amd64-nhFOgv/tarantool-1.4.8+20121207/third_party/libeio/eio.c:1782:54: error: 'O_CLOEXEC' undeclared (first use in this function)
> /build/buildd-tarantool_1.4.8+20121207-1-kfreebsd-amd64-nhFOgv/tarantool-1.4.8+20121207/third_party/libeio/eio.c:1782:54: note: each undeclared identifier is reported only once for each function it appears in
> In file included from /build/buildd-tarantool_1.4.8+20121207-1-kfreebsd-amd64-nhFOgv/tarantool-1.4.8+20121207/src/tarantool_eio.c:30:0:
> /build/buildd-tarantool_1.4.8+20121207-1-kfreebsd-amd64-nhFOgv/tarantool-1.4.8+20121207/third_party/libeio/eio.c: In function 'eio__wd_open_sync':
> /build/buildd-tarantool_1.4.8+20121207-1-kfreebsd-amd64-nhFOgv/tarantool-1.4.8+20121207/third_party/libeio/eio.c:2044:34: error: 'O_CLOEXEC' undeclared (first use in this function)
> /build/buildd-tarantool_1.4.8+20121207-1-kfreebsd-amd64-nhFOgv/tarantool-1.4.8+20121207/third_party/libeio/eio.c: In function 'eio__truncateat':
> /build/buildd-tarantool_1.4.8+20121207-1-kfreebsd-amd64-nhFOgv/tarantool-1.4.8+20121207/third_party/libeio/eio.c:2092:44: error: 'O_CLOEXEC' undeclared (first use in this function)
> /build/buildd-tarantool_1.4.8+20121207-1-kfreebsd-amd64-nhFOgv/tarantool-1.4.8+20121207/third_party/libeio/eio.c: In function 'eio__statvfsat':
> /build/buildd-tarantool_1.4.8+20121207-1-kfreebsd-amd64-nhFOgv/tarantool-1.4.8+20121207/third_party/libeio/eio.c:2106:44: error: 'O_CLOEXEC' undeclared (first use in this function)
> make[3]: *** [src/CMakeFiles/eio.dir/tarantool_eio.c.o] Error 1
> make[3]: Leaving directory `/build/buildd-tarantool_1.4.8+20121207-1-kfreebsd-amd64-nhFOgv/tarantool-1.4.8+20121207/build-area'

The same patch can be used here (have just completed a test build on
kfreebsd-amd64) :

http://patch-tracker.debian.org/patch/series/view/libio-aio-perl/4.15-1/workaround-missing-O_CLOEXEC.patch

It just needs the path adjusting.  Please find amended version attached.

Thanks!
Regards,
-- 
Steven Chamberlain
steven@pyro.eu.org
Description: Fix FTBS on platforms not having O_CLOEXEC.
Origin: vendor
Author: Alessandro Ghedini <al3xbio@gmail.com>
Last-Update: 2012-12-09

--- a/third_party/libeio/eio.c
+++ b/third_party/libeio/eio.c
@@ -73,6 +73,10 @@
 # define ELOOP EDOM
 #endif
 
+#ifndef O_CLOEXEC
+# define O_CLOEXEC 0
+#endif
+
 #if !defined(ENOTSOCK) && defined(WSAENOTSOCK)
 # define ENOTSOCK WSAENOTSOCK
 #endif

Reply to: