From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20336 invoked by alias); 27 Jan 2014 21:57:12 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 20326 invoked by uid 89); 27 Jan 2014 21:57:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.6 required=5.0 tests=AWL,BAYES_00,TVD_RCVD_IP autolearn=ham version=3.3.2 X-HELO: mail.eliteswa.com Received: from 50-56-214-247.static.cloud-ips.com (HELO mail.eliteswa.com) (50.56.214.247) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 27 Jan 2014 21:57:09 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.eliteswa.com (Postfix) with ESMTP id 6B5215A00A for ; Mon, 27 Jan 2014 13:57:07 -0800 (PST) Received: from mail.eliteswa.com ([127.0.0.1]) by localhost (mail.eliteswa.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MMXTrOi8lNgd for ; Mon, 27 Jan 2014 13:57:05 -0800 (PST) Received: from [10.23.12.118] (unknown [4.31.192.130]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.eliteswa.com (Postfix) with ESMTPSA id 5B2625A009 for ; Mon, 27 Jan 2014 13:57:04 -0800 (PST) Message-ID: <52E6D62D.30804@johndubchak.com> Date: Mon, 27 Jan 2014 21:57:00 -0000 From: John Dubchak User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: gcc-help@gcc.gnu.org Subject: Compile error: 'siginfo_t' is not declared using gcc-4.8.2 on RedHat, 6.4 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-01/txt/msg00103.txt.bz2 Hi, I apologize if this seems like a cross-post from g++-help, but that seems to be the wrong list for my question. I used the following configure statement to build the latest gcc 4.8.2, with C++ 11 support on RedHat 6.4, which came with the default installed gcc 4.4.7: ../configure--prefix=/usr/local/gcc-4.8.2 \ --program-suffix=-48 \ --enable-bootstrap \ --enable-shared \ --enable-threads=posix \ --enable-checking=release \ --with-system-zlib \ --enable-__cxa_atexit \ --enable-languages=c,c++ \ --disable-multilib \ --with-tune=generic \ --with-arch_32=i686 \ --build=x86_64-redhat-linux However, after installing it with 'make' and 'make install' and compiling with C++11 support using: /usr/local/gcc-4.8.2/bin/g++-48 -v -std=c++11 -c -I . -I ./workspace/http/http-server/src -I ./jsoncpp-src-0.5.0/include -Wall main.cpp -o main.o I get this error: In file included from main.cpp:14: /usr/include/sys/wait.h:155:52: error: 'siginfo_t' has not been declared extern int waitid (idtype_t __idtype, __id_t __id, siginfo_t *__infop, ^ Here is the code that generates the error: #include static void sig_handler(int sig) { if (sig == SIGINT) { int status = 0; int savedErrno = errno; while (waitpid(-1, &status, WNOHANG) > 0) continue; errno = savedErrno; } else if (sig == SIGHUP) { int status = 0; int savedErrno = errno; while (waitpid(-1, &status, WNOHANG) > 0) continue; errno = savedErrno; } } I have spent several days on this issue and can neither identify what causes it nor what I should to do resolve it.Ideally, I'd like to have the gcc-4.8.2 be available as an alternative compiler on this RedHat host. I have included the output of adding both -v and -E arguments to gcc [1]. Any help is greatly appreciated. Thanks, John [1] $ make g++-48 -v -std=c++11 -o ../bin/http_server main.o http_funcs.o error_utils.o fs/fs_utils.o -I . -I /home/ec2-user/devel/cpp/projects-workspace/http/http-server/src -I /home/ec2-user/devel/cpp/jsoncpp-src-0.5.0/include -lpthread /home/ec2-user/devel/cpp/jsoncpp-src-0.5.0/libs/libjson.a -Wall Using built-in specs. COLLECT_GCC=g++-48 COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.2/lto-wrapper Target: x86_64-redhat-linux Configured with: ../configure --prefix=/usr --program-suffix=-48 --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux Thread model: posix gcc version 4.8.2 (GCC) COMPILER_PATH=/usr/libexec/gcc/x86_64-redhat-linux/4.8.2/:/usr/libexec/gcc/x86_64-redhat-linux/4.8.2/:/usr/libexec/gcc/x86_64-redhat-linux/:/usr/lib/gcc/x86_64-redhat-linux/4.8.2/:/usr/lib/gcc/x86_64-redhat-linux/ LIBRARY_PATH=/usr/lib/gcc/x86_64-redhat-linux/4.8.2/:/usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../:/lib/:/usr/lib/ COLLECT_GCC_OPTIONS='-v' '-std=c++11' '-o' '../bin/http_server' '-I' '.' '-I' '/home/ec2-user/devel/cpp/projects-workspace/http/http-server/src' '-I' '/home/ec2-user/devel/cpp/jsoncpp-src-0.5.0/include' '-Wall' '-shared-libgcc' '-mtune=generic' '-march=x86-64' /usr/libexec/gcc/x86_64-redhat-linux/4.8.2/collect2 --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o ../bin/http_server /usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../lib64/crt1.o /usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/4.8.2/crtbegin.o -L/usr/lib/gcc/x86_64-redhat-linux/4.8.2 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../.. main.o http_funcs.o error_utils.o fs/fs_utils.o -lpthread /home/ec2-user/devel/cpp/jsoncpp-src-0.5.0/libs/libjson.a -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-redhat-linux/4.8.2/crtend.o /usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../lib64/crtn.o [ec2-user@ip-10-234-6-159 src]$ rm main.o || true && make g++-48 -v -std=c++11 -c -I . -I /home/ec2-user/devel/cpp/projects-workspace/http/http-server/src -I /home/ec2-user/devel/cpp/jsoncpp-src-0.5.0/include -Wall main.cpp -o main.o Using built-in specs. COLLECT_GCC=g++-48 Target: x86_64-redhat-linux Configured with: ../configure --prefix=/usr --program-suffix=-48 --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux Thread model: posix gcc version 4.8.2 (GCC) COLLECT_GCC_OPTIONS='-v' '-std=c++11' '-c' '-I' '.' '-I' '/home/ec2-user/devel/cpp/projects-workspace/http/http-server/src' '-I' '/home/ec2-user/devel/cpp/jsoncpp-src-0.5.0/include' '-Wall' '-o' 'main.o' '-shared-libgcc' '-mtune=generic' '-march=x86-64' /usr/libexec/gcc/x86_64-redhat-linux/4.8.2/cc1plus -quiet -v -I . -I /home/ec2-user/devel/cpp/projects-workspace/http/http-server/src -I /home/ec2-user/devel/cpp/jsoncpp-src-0.5.0/include -D_GNU_SOURCE main.cpp -quiet -dumpbase main.cpp -mtune=generic -march=x86-64 -auxbase-strip main.o -Wall -std=c++11 -version -o /tmp/ccO8lGjC.s GNU C++ (GCC) version 4.8.2 (x86_64-redhat-linux) compiled by GNU C version 4.8.2, GMP version 4.3.2, MPFR version 2.4.2, MPC version 0.8.1 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../x86_64-redhat-linux/include" ignoring duplicate directory "/home/ec2-user/devel/cpp/projects-workspace/http/http-server/src" #include "..." search starts here: #include <...> search starts here: . /home/ec2-user/devel/cpp/jsoncpp-src-0.5.0/include /usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../include/c++/4.8.2 /usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../include/c++/4.8.2/x86_64-redhat-linux /usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../include/c++/4.8.2/backward /usr/lib/gcc/x86_64-redhat-linux/4.8.2/include /usr/local/include /usr/lib/gcc/x86_64-redhat-linux/4.8.2/include-fixed /usr/include End of search list. GNU C++ (GCC) version 4.8.2 (x86_64-redhat-linux) compiled by GNU C version 4.8.2, GMP version 4.3.2, MPFR version 2.4.2, MPC version 0.8.1 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: 1546ef0d67f553d18b0c7aa67816401f In file included from http_server_signals.hpp:12:0, from http_server.hpp:21, from http_service_traits.hpp:15, from main.cpp:14: /usr/include/sys/wait.h:155:52: error: 'siginfo_t' has not been declared extern int waitid (idtype_t __idtype, __id_t __id, siginfo_t *__infop, ^ make: *** [main.o] Error 1