Hi, I just installed this on Fedora, had some small issues.
1. I had to first download and compile SSLPP - you'll find it in the repository alongside hessiancpp - place it at the same level as hessiancpp in your filesystem
2. Add, CFLAGS=-I/usr/local/libsslpp/include/ under SSLPP=../sslpp in the Makefile
3. Change
CXXFLAGS=$(CDEFS) $(CFLAGS) $(COPTS) $(CINCS)
Should compile now,
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry about that!
Thanks for putting this up, maybe i'll help others as well.
I'll have to get serious about getting this to compile on a few different releases out of the box, maybe handle sslpp and all little better. If only I had the time!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2011-07-13
some recent testing of java to c++ interoperability has revealed what seems like a possible bug in wrapper.cpp (I believe… Not looking at the source at the moment). The problem manifests itself under Centos 5.6 with the current gcc-g++ from yum. The string constructor used in the to_string method to pad the string out to the target size is not invoking the correct constructor. The problem seems to be easily fixable by adding on the missing optional argument from the intended constructor. without said optional argument, the unintended constructor call overwrites the string buffer and corrupts memory, causing clients to eventually core on reading in a String object.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Unfortunately I don't have the time to reproduce and investigate this right now. I'd appreciate it if you could provide more details. I'm looking at wrappers.cpp now and I see:
line#
247 string str(" ", more_cap(wlen));
with
more_cap()
returning
int
. Looking here at the ctor signatures this will match the
string(const char* s, size_t n)
call, which is described as
"Content is initialized to a copy of the string formed by the first n characters in the array of characters pointed by s".
So if
more_cap()
returns anything larger than 1, the ctor will read lots of characters from the static data section of the program and copy those into the new string, won't it?…
I believe this is a problem indeed. I cannot see what the optional argument you're mentioning is or could be, but the ctor is definitely the wrong one, as we want the
string (size_t n, char c);
one. I believe line 247 should read:
247 string str(more_cap(wlen), ' ');
Could you please make this change and retry your testing? Much appreciated!
Radu
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, I just installed this on Fedora, had some small issues.
1. I had to first download and compile SSLPP - you'll find it in the repository alongside hessiancpp - place it at the same level as hessiancpp in your filesystem
2. Add, CFLAGS=-I/usr/local/libsslpp/include/ under SSLPP=../sslpp in the Makefile
3. Change
CXXFLAGS=$(CDEFS) $(CFLAGS) $(COPTS) $(CINCS)
Should compile now,
I can't figure out how to edit this, small typo:
Change:
CXXFLAGS=$(CDEFS) $(COPTS) $(CINCS)
To
CXXFLAGS=$(CDEFS) $(CFLAGS) $(COPTS) $(CINCS)
Sorry about that!
Thanks for putting this up, maybe i'll help others as well.
I'll have to get serious about getting this to compile on a few different releases out of the box, maybe handle sslpp and all little better. If only I had the time!
some recent testing of java to c++ interoperability has revealed what seems like a possible bug in wrapper.cpp (I believe… Not looking at the source at the moment). The problem manifests itself under Centos 5.6 with the current gcc-g++ from yum. The string constructor used in the to_string method to pad the string out to the target size is not invoking the correct constructor. The problem seems to be easily fixable by adding on the missing optional argument from the intended constructor. without said optional argument, the unintended constructor call overwrites the string buffer and corrupts memory, causing clients to eventually core on reading in a String object.
Unfortunately I don't have the time to reproduce and investigate this right now. I'd appreciate it if you could provide more details. I'm looking at wrappers.cpp now and I see:
line#
with
returning
. Looking here at the ctor signatures this will match the
call, which is described as
So if
returns anything larger than 1, the ctor will read lots of characters from the static data section of the program and copy those into the new string, won't it?…
I believe this is a problem indeed. I cannot see what the optional argument you're mentioning is or could be, but the ctor is definitely the wrong one, as we want the
one. I believe line 247 should read:
Could you please make this change and retry your testing? Much appreciated!
Radu
Sorry for the annoying overuse of the "code" tag, I was expecting more of an typewriter font effect than this.