Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 330722

Summary: dsh_filter fails to compile on Linux
Product: [Tools] PTP Reporter: Greg Watson <g.watson>
Component: SCIAssignee: Tu Hong Jun <tuhongj>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ronglli, tuhongj
Version: 5.0   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Added required header files into the test case g.watson: iplog+

Description Greg Watson CLA 2010-11-19 17:54:18 EST
When I try to compile dsh_filter on Linux, I get the following errors:

$ make all_32
g++ -g -m32 -I/usr/local/sci/include -o dsh_fe dsh_fe.cpp levenshtein.cpp dsh_packer.cpp -L/usr/local/sci/lib -ldl -lpthread -lsci
g++ -g -m32 -I/usr/local/sci/include -o dsh_be dsh_be.cpp levenshtein.cpp dsh_packer.cpp -L/usr/local/sci/lib -ldl -lpthread -lsci
g++ -g -m32 -I/usr/local/sci/include -fpic -shared -o dsh_filter.so dsh_filter.cpp levenshtein.cpp dsh_packer.cpp -L/usr/local/sci/lib -ldl -lpthread -lsci
In file included from dsh_filter.cpp:27:
dsh_header.hpp: In member function ?DshMessage& DshMessage::readFromString(const char*, int)?:
dsh_header.hpp:240: error: ?strstr? was not declared in this scope
dsh_header.hpp:242: error: ?strlen? was not declared in this scope
dsh_header.hpp:245: error: ?strncpy? was not declared in this scope
dsh_header.hpp:257: error: ?strlen? was not declared in this scope
dsh_header.hpp:259: error: ?strncpy? was not declared in this scope
dsh_header.hpp: In member function ?void DshMessage::chomp(char*)?:
dsh_header.hpp:427: error: ?strlen? was not declared in this scope
dsh_filter.cpp: In function ?int filter_input(void*, sci_group_t, void*, int)?:
dsh_filter.cpp:83: error: ?memcpy? was not declared in this scope
make: *** [dsh_filter.so] Error 1
Comment 1 rong li CLA 2011-01-26 21:51:07 EST
I reproduced this issue on my node. And attached the patch here.
This issue is caused by the sample case lacking of certain header files.
Comment 2 rong li CLA 2011-01-26 22:11:32 EST
Created attachment 187708 [details]
Added required header files into the test case

Attached the patch
Comment 3 Greg Watson CLA 2011-03-18 10:45:35 EDT
Please apply patch and close bug if fixed.
Comment 4 Tu Hong Jun CLA 2011-03-20 22:17:32 EDT
This fix seems to have been already in the source code.