ipfixcol2 icon indicating copy to clipboard operation
ipfixcol2 copied to clipboard

Error while compiling

Open serpaldom opened this issue 5 years ago • 0 comments

Hello everyone.

I am trying to install this project on a Centos 7. I have followed all the steps you indicate, previously installing the libfds library:

$ git clone https://github.com/CESNET/libfds.git $ cd libfds $ mkdir build && cd build && cmake .. -DCMAKE_INSTALL_PREFIX=/usr $ make

In addition, I have installed the packages that you indicate

yum install gcc gcc-c++ cmake make python3-docutils zlib-devel

However, once the library is installed, I have tried to install ipfixcol2 and the following compilation error has occurred in one of the files

[ 69%] Building CXX object src/plugins/output/json/CMakeFiles/json-output.dir/src/Storage.cpp.o /home/dit/ipfixcol2/src/plugins/output/json/src/Storage.cpp: In member function ‘void Storage::convert_tmplt_rec(fds_tset_iter*, uint16_t, const fds_ipfix_msg_hdr*)’: /path/to/ipfixcol2/src/plugins/output/json/src/Storage.cpp:223:59: error: expected ‘)’ before ‘PRIu16’ snprintf(field, LOCAL_BSIZE, ""ipfix:templateId":%" PRIu16, tmplt->id); ^ /path/to/ipfixcol2/src/plugins/output/json/src/Storage.cpp:226:64: error: expected ‘)’ before ‘PRIu16’ snprintf(field, LOCAL_BSIZE, ","ipfix:scopeCount":%" PRIu16, tmplt->fields_cnt_scope); ^ /path/to/ipfixcol2/src/plugins/output/json/src/Storage.cpp:244:62: error: expected ‘)’ before ‘PRIu16’ snprintf(field, LOCAL_BSIZE, ""ipfix:elementId":%" PRIu16, current.id); ^ /path/to/ipfixcol2/src/plugins/output/json/src/Storage.cpp:246:66: error: expected ‘)’ before ‘PRIu32’ snprintf(field, LOCAL_BSIZE, ","ipfix:enterpriseId":%" PRIu32, current.en); ^ /path/to/ipfixcol2/src/plugins/output/json/src/Storage.cpp:248:65: error: expected ‘)’ before ‘PRIu16’ snprintf(field, LOCAL_BSIZE, ","ipfix:fieldLength":%" PRIu16, current.length); ^

/path/to/ipfixcol2/src/plugins/output/json/src/Storage.cpp: In member function ‘void Storage::addDetailedInfo(const fds_ipfix_msg_hdr*)’: /path/to/ipfixcol2/src/plugins/output/json/src/Storage.cpp:396:60: error: expected ‘)’ before ‘PRIu32’ snprintf(field, LOCAL_BSIZE, ","ipfix:exportTime":%" PRIu32, ntohl(hdr->export_time)); ^ /path/to/ipfixcol2/src/plugins/output/json/src/Storage.cpp:399:59: error: expected ‘)’ before ‘PRIu32’ snprintf(field, LOCAL_BSIZE, ","ipfix:seqNumber":%" PRIu32, ntohl(hdr->seq_num)); ^ /path/to/ipfixcol2/src/plugins/output/json/src/Storage.cpp:402:54: error: expected ‘)’ before ‘PRIu32’ snprintf(field, LOCAL_BSIZE, ","ipfix:odid":%" PRIu32, ntohl(hdr->odid)); ^ /path/to/ipfixcol2/src/plugins/output/json/src/Storage.cpp:405:59: error: expected ‘)’ before ‘PRIu16’ snprintf(field, LOCAL_BSIZE, ","ipfix:msgLength":%" PRIu16, ntohs(hdr->length)); ^ /path/to/ipfixcol2/src/plugins/output/json/src/Storage.cpp: In member function ‘void Storage::convert(fds_drec&, const fds_iemgr_t*, fds_ipfix_msg_hdr*, bool)’: /path/to/ipfixcol2/src/plugins/output/json/src/Storage.cpp:448:64: error: expected ‘)’ before ‘PRIu16’ snprintf(field, LOCAL_BSIZE, ","ipfix:templateId":%" PRIu16, rec.tmplt->id); ^ make[2]: *** [src/plugins/output/json/CMakeFiles/json-output.dir/src/Storage.cpp.o] Error 1 make[1]: *** [src/plugins/output/json/CMakeFiles/json-output.dir/all] Error 2 make: *** [all] Error 2

I've been browsing the file looking for some syntactic errors but haven't found anything. So I'm afraid it might have been a mistake on my part at installation time.

Has anyone else received this error? How do I solve it?

thank you everyone

serpaldom avatar Dec 26 '20 17:12 serpaldom