Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiler error with czmq and pcap #129

Open
nickbroon opened this issue Dec 19, 2019 · 2 comments
Open

Compiler error with czmq and pcap #129

nickbroon opened this issue Dec 19, 2019 · 2 comments

Comments

@nickbroon
Copy link
Contributor

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  
@nickbroon
Copy link
Contributor Author

Question about this at: https://gitter.im/zeromq/czmq?at=5dfb74b1d2dadb389342f5de

@bluca
Copy link
Contributor

bluca commented Feb 3, 2020

order of includes? The prelude.h should have never been a public header...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants