Skip to content

Compiler error with czmq and pcap #129

@nickbroon

Description

@nickbroon

built with DSUPPORT_ZMQ=ON enabled.

$ cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_INSTALL_PREFIX=/tmp -DCMAKE_BUILD_TYPE=RelWithDebInfo -DSUPPORT_JOURNALD=ON -DSUPPORT_DTLS=OFF -DSUPPORT_ZMQ=ON
$ make -k

Version of czmq and pcap installed:

$ dpkg -l | grep libczmq-dev
ii  libczmq-dev:amd64                          4.2.0-2                                amd64        High-level C binding for ZeroMQ (development files)
$ dpkg -l | grep libpcap-dev
ii  libpcap-dev:amd64                          1.9.1-2                                amd64        development library for libpcap (transitional package)

Resulting the following compilation failures:

In file included from /home/user1/work/vermont/src/modules/packet/PSAMPExporterCfg.cpp:22:                              
In file included from /home/user1/work/vermont/src/modules/packet/PSAMPExporterCfg.h:25:                                
In file included from /home/user1/work/vermont/src/modules/ipfix/CollectorCfg.h:33:                                     
In file included from /home/user1/work/vermont/src/modules/ipfix/IpfixReceiverZmq.hpp:32:                               
In file included from /usr/include/czmq.h:37:                                                                           
In file included from /usr/include/czmq_library.h:23:                                                                   
/usr/include/czmq_prelude.h:665:13: error: cannot combine with previous 'int' declaration specifier                     
typedef int SOCKET;                                                                                                     
            ^                                                                                                           
/usr/include/pcap/socket.h:79:20: note: expanded from macro 'SOCKET'                                                    
    #define SOCKET int                                                                                                  
                   ^                                                                                                    
1 error generated.                                                                                                      
make[2]: *** [src/modules/CMakeFiles/modules.dir/build.make:544: src/modules/CMakeFiles/modules.dir/packet/PSAMPExporterCfg.cpp.o] Error 1                                                                                                     
                                                                                                                        
In file included from /home/user1/work/vermont/src/modules/ipfix/IpfixCollectorCfg.cpp:22:                              
In file included from /home/user1/work/vermont/src/modules/ipfix/CollectorCfg.h:33:                                     
In file included from /home/user1/work/vermont/src/modules/ipfix/IpfixReceiverZmq.hpp:32:                               
In file included from /usr/include/czmq.h:37:                                                                           
In file included from /usr/include/czmq_library.h:23:                                                                   
/usr/include/czmq_prelude.h:665:13: error: cannot combine with previous 'int' declaration specifier                     
typedef int SOCKET;                                                                                                     
            ^                                                                                                           
/usr/include/pcap/socket.h:79:20: note: expanded from macro 'SOCKET'                                                    
    #define SOCKET int                                                                                                  
                   ^                                                                                                    
1 error generated.                                                                                                      
make[2]: *** [src/modules/CMakeFiles/modules.dir/build.make:804: src/modules/CMakeFiles/modules.dir/ipfix/IpfixCollectorCfg.cpp.o] Error 1                                                                                                     
                                                                                                                        
In file included from /home/user1/work/vermont/src/modules/ipfix/IpfixExporterCfg.cpp:25:                               
In file included from /home/user1/work/vermont/src/modules/ipfix/IpfixExporterCfg.h:25:                                 
In file included from /home/user1/work/vermont/src/modules/ipfix/CollectorCfg.h:33:                                     
In file included from /home/user1/work/vermont/src/modules/ipfix/IpfixReceiverZmq.hpp:32:                               
In file included from /usr/include/czmq.h:37:                                                                           
In file included from /usr/include/czmq_library.h:23:                                                                   
/usr/include/czmq_prelude.h:665:13: error: cannot combine with previous 'int' declaration specifier                     
typedef int SOCKET;                                                                                                     
            ^                                                                                                           
/usr/include/pcap/socket.h:79:20: note: expanded from macro 'SOCKET'                                                    
    #define SOCKET int                                                                                                  
                   ^                                                                                                    
1 error generated.                                                                                                      
make[2]: *** [src/modules/CMakeFiles/modules.dir/build.make:843: src/modules/CMakeFiles/modules.dir/ipfix/IpfixExporterCfg.cpp.o] Error 1  

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions