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

Error while compiling #45

Open
serpaldom opened this issue Dec 26, 2020 · 0 comments
Open

Error while compiling #45

serpaldom opened this issue Dec 26, 2020 · 0 comments

Comments

@serpaldom
Copy link

serpaldom commented Dec 26, 2020

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

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

1 participant