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

Bug#653441: marked as done (error: 'epoll_create1' was not declared in this scope)



Your message dated Wed, 1 Feb 2012 23:05:28 +0100
with message-id <20120201220528.GA24919@ohm.aurel32.net>
and subject line Re: epoll_create1() available in C, not C++ (on alpha)?
has caused the Debian Bug report #653441,
regarding error: 'epoll_create1' was not declared in this scope
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
653441: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=653441
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: libboost1.48-dev
Version: 1.48.0-2
Severity: normal


hi,

flann fails to build with:

[ 55%] Building CXX object src/cpp/CMakeFiles/flann_mpi_client.dir/flann/mpi/flann_mpi_client.cpp.o
cd /build/buildd-flann_1.7.0-4-alpha-gzklli/flann-1.7.0/obj-alpha-linux-gnu/src/cpp && /usr/bin/c++   -D_FLANN_VERSION=1.7.0 -DHAVE_MPI -g -O2 -Wformat -Wformat-security -Werror=format-security  -O2 -g -I/usr/lib/openmpi/include -I/usr/lib/openmpi/include/openmpi -I/build/buildd-flann_1.7.0-4-alpha-gzklli/flann-1.7.0/src/cpp    -Wall -o CMakeFiles/flann_mpi_client.dir/flann/mpi/flann_mpi_client.cpp.o -c /build/buildd-flann_1.7.0-4-alpha-gzklli/flann-1.7.0/src/cpp/flann/mpi/flann_mpi_client.cpp
In file included from /usr/include/boost/asio/detail/epoll_reactor.hpp:242:0,
                 from /usr/include/boost/asio/detail/reactor.hpp:21,
                 from /usr/include/boost/asio/detail/impl/task_io_service.ipp:24,
                 from /usr/include/boost/asio/detail/task_io_service.hpp:199,
                 from /usr/include/boost/asio/impl/io_service.hpp:71,
                 from /usr/include/boost/asio/io_service.hpp:767,
                 from /usr/include/boost/asio/basic_io_object.hpp:19,
                 from /usr/include/boost/asio/basic_socket.hpp:19,
                 from /usr/include/boost/asio/basic_datagram_socket.hpp:20,
                 from /usr/include/boost/asio.hpp:20,
                 from /build/buildd-flann_1.7.0-4-alpha-gzklli/flann-1.7.0/src/cpp/flann/mpi/client.h:34,
                 from /build/buildd-flann_1.7.0-4-alpha-gzklli/flann-1.7.0/src/cpp/flann/mpi/flann_mpi_client.cpp:8:
/usr/include/boost/asio/detail/impl/epoll_reactor.ipp: In static member function 'static int boost::asio::detail::epoll_reactor::do_epoll_create()':
/usr/include/boost/asio/detail/impl/epoll_reactor.ipp:468:39: error: 'epoll_create1' was not declared in this scope
make[3]: *** [src/cpp/CMakeFiles/flann_mpi_client.dir/flann/mpi/flann_mpi_client.cpp.o] Error 1


It would be nice if header file /usr/include/boost/asio/detail/impl/epoll_reactor.ipp was fixed

Thanks

-- System Information:
Debian Release: 6.0.1
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable'), (200, 'testing'), (100, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash



--- End Message ---
--- Begin Message ---
Version: 2.13-25

On Wed, Jan 04, 2012 at 10:52:57PM -0600, Steve M. Robbins wrote:
> Hi,
> 
> By private mail, I got the suggestion that maybe Alpha's epoll.h lacks
> "extern C"; I diff'd the two files and that's not the case.  However,
> I did find the following:
> 
> On Alpha:
> 
> /* Same as epoll_create but with an additional FLAGS parameter.  */
> extern int epoll_create2 (int __size, int __flags) __THROW;
> 
> On AMD:
> 
> /* Same as epoll_create but with an FLAGS parameter.  The unused SIZE
>    parameter has been dropped.  */
> extern int epoll_create1 (int __flags) __THROW;
> 
> And, in fact, epoll_create2() does not exist.  I changed the
> test code to "... int fd = epoll_create2(0,0);" and the Alpha
> machine fails to compile:
> 
> gcc try-epoll.c 
> /tmp/cckkq2Mc.o: In function `main':
> (.text+0x2c): undefined reference to `epoll_create2'
> 
> 
> > I've boiled it down to the following test code:
> > 
> >   #include <sys/epoll.h>
> > 
> >   int main(int ac, char* av[])
> >   {
> >       int fd = epoll_create1(0);
> >       return 0;
> >   }
> > 
> > This can be successfully compiled using "gcc" on both alpha (tested in sid chroot of albeniz.debian.org) and on my amd64 machine.
> 
> It turns out that the only reason it "works" on Alpha is due
> to C's rules for implict function definition:
> 
>   gcc -Wall try-epoll.c 
>   try-epoll.c: In function ~main~:
>   try-epoll.c:5: warning: implicit declaration of function ~epoll_create1~
> 
> 
> This looks like a bug in glibc, specifically that the following patch
> was never applied:
> http://www.cygwin.com/ml/libc-ports/2011-09/msg00017.html
> 
> 

This has been fixed in eglibc 2.13-25.

-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net


--- End Message ---

Reply to: