msgpack / msgpack Goto Github PK
View Code? Open in Web Editor NEWMessagePack is an extremely efficient object serialization library. It's like JSON, but very fast and small.
Home Page: http://msgpack.org/
MessagePack is an extremely efficient object serialization library. It's like JSON, but very fast and small.
Home Page: http://msgpack.org/
It would be handy if msgpack provided CMakeLists.txt files used by the CMake build-system for the C and C++ libraries. CMake has the advantage of not using autoconf or libtool, fast build-times and an ncurses configuration interface. Also, CMake can integrate with VisualStudios for Windows builds.
I did on master (96bb4cf) in the cpp directory: ./bootstrap && ./configure && make && make check
And I have this test failure:
[ RUN ] convert.enum_member
convert.cc:72: Failure
Value of: to.flag
Actual: 1
Expected: enum_member::B
Which is: 1
[ FAILED ] convert.enum_member (0 ms)
I know it looks weird and it might be a gtest bug. I have no idea how to fix this.
When I tried to run rpc server by maven commad "mvn exec:java", it thrown the NotFoundException below.
If I make jar file and run it by "java -jar server.jar", it runs correctly.
org.msgpack.template.TemplateBuildException: javassist.NotFoundException: org.msgpack.template.JavassistTemplateBuilder$JavassistTemplate at org.msgpack.template.JavassistTemplateBuilder$BuildContextBase.build(JavassistTemplateBuilder.java:112) at org.msgpack.template.JavassistTemplateBuilder$BuildContext.buildTemplate(JavassistTemplateBuilder.java:237) at org.msgpack.template.JavassistTemplateBuilder.buildTemplate(JavassistTemplateBuilder.java:547) at org.msgpack.template.TemplateBuilder.buildTemplate(TemplateBuilder.java:127) at org.msgpack.template.TemplateBuilder.buildTemplate(TemplateBuilder.java:132) at org.msgpack.template.TemplateBuilder.build(TemplateBuilder.java:199) at org.msgpack.template.TemplateRegistry.lookupImpl(TemplateRegistry.java:122) at org.msgpack.template.TemplateRegistry.lookup(TemplateRegistry.java:77) at org.msgpack.rpc.reflect.ReflectionInvokerBuilder.buildInvoker(ReflectionInvokerBuilder.java:249) at org.msgpack.rpc.reflect.InvokerBuilder.buildInvoker(InvokerBuilder.java:129) at org.msgpack.rpc.reflect.InvokerBuilder.build(InvokerBuilder.java:162) at org.msgpack.rpc.reflect.Reflect.reflectInvoker(Reflect.java:32) at org.msgpack.rpc.dispatcher.MethodDispatcher.(MethodDispatcher.java:51) at org.msgpack.rpc.dispatcher.MethodDispatcher.(MethodDispatcher.java:42) at org.msgpack.rpc.dispatcher.MethodDispatcher.(MethodDispatcher.java:36) at org.msgpack.rpc.Server.serve(Server.java:61) at com.hoge.msgpacktest.Main.main(Main.java:30) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:290) at java.lang.Thread.run(Thread.java:619) Caused by: javassist.NotFoundException: org.msgpack.template.JavassistTemplateBuilder$JavassistTemplate at javassist.ClassPool.get(ClassPool.java:436) at org.msgpack.template.JavassistTemplateBuilder.getCtClass(JavassistTemplateBuilder.java:68) at org.msgpack.template.JavassistTemplateBuilder$BuildContext.setSuperClass(JavassistTemplateBuilder.java:241) at org.msgpack.template.JavassistTemplateBuilder$BuildContextBase.buildClass(JavassistTemplateBuilder.java:123) at org.msgpack.template.JavassistTemplateBuilder$BuildContextBase.build(JavassistTemplateBuilder.java:97)
Fail:
use Test::More; my $data = 'x' x 8193; use Data::MessagePack; my $packed = Data::MessagePack->pack($data); my $unpacker = Data::MessagePack::Unpacker->new; my $nread = $unpacker->execute(substr($packed, 0, 8192), 0); $unpacker->execute($packed, 8192); ok $unpacker->is_finished; # fail done_testing;
I encountered this issue when it is used in AnyEvent::MessagePack. (actually, I can't determine this problem was caused by whichever)
This is very dangerous, :(
import msgpack
msgpack.loads(msgpack.dumps(45234928034723904723906))
18446744073709551615L
I'm getting a exc_bad_access in line 226
case CS_DOUBLE: {
union { uint64_t i; double f; } mem;
mem.i = _msgpack_load64(uint64_t,n);
push_fixed_value(_double, mem.f); }
I'm running the code on an iPad (armv7). It works fine in the simulator. I'll tinker with it and hopefully find a fix -- might just be something stupid in my project configuration.
In the Go bindings, attempting to parse an invalid stream or encode an incompatible data type results in a runtime panic. The methods that perform both of these operations return an os.Error object. Shouldn't the library return an error of some type instead of a panic?
Without this consideration, developers will need to make sure they handle panics as well as errors returned which is not common practice in Go code.
Hello,
it would be great (for me, at least...) to add a common base class to msgpack::type::tuple or a specific static tag in order to differentiate MessagePack tuples from other tuples (by using Boost.TypeTraits or Boost.MPL).
I was thinking about something like:
// Base Class
struct tuple_base {};
template <>
struct tuple<> : public tuple_base {
tuple() {}
tuple(object o) { o.convert(this); }
typedef tuple<> value_type;
};
// Specific tag
struct tuple_tag {};
template <>
struct tuple<> {
tuple() {}
tuple(object o) { o.convert(this); }
typedef tuple<> value_type;
typedef tuple_tag tag;
};
Thank you for this great piece of software.
msgpack/java/ivy.xml is missing dependencies for javassist and sl4j-api:
<dependencies>
<dependency org="junit" name="junit" rev="4.8.1" conf="test->default"/>
<dependency org="javassist" name="javassist" rev="3.12.1.GA"/>
<dependency org="org.slf4j" name="slf4j-api" rev="1.4.3"/>
</dependencies>
json/pickle/marshal all use dump/load + dumps/loads, msgpack uses (un)pack
I am currently unable to compile a statically linked executable with libmsgpack.a from msgpack-0.4.2.
gcc -static example_msgpack.c -lmsgpack
/tmp/cc0jssL4.o: In function `main':
example_msgpack.c:(.text+0xc0): undefined reference to `msgpack_pack_object'
example_msgpack.c:(.text+0xf4): undefined reference to `msgpack_unpacker_new'
collect2: ld returned 1 exit status
it should instead consume a single object from the stream (which is usually a array/mapping)
I just upgraded to msgpack 0.5.0 and discovered that some constants had changed (in 0.4.2 MSGPACK_POSITIVE_INTEGER was 0x03, but now is 0x02). This in turn broke some of the tests for my "ffi-msgpack":http://github.com/postmoderm/ffi-msgpack FFI Ruby library.
It would be very helpful in the future to provide a const char * msgpack_version();
function, which I could call from my library to determine which version of libmsgpack was loaded.
I haven't compiled the latest master for some time. I am currently getting a build error of sysdep.h not found on a clean checkout and compile.
Keys Stream Memory Keys % Stream % Mem %
===== ======== ======== ======= ======== ==========
100 0.00146s 0.00710s 100.00% 100.00% 100.00%
200 0.00068s 0.02805s 200.00% 46.92% 395.11%
400 0.00103s 0.11208s 400.00% 70.21% 1579.09%
800 0.00255s 0.46684s 800.00% 174.86% 6577.04%
1600 0.00403s 1.76855s 1600.00% 275.75% 24916.23%
3200 0.00716s 7.11156s 3200.00% 490.48% 100191.01%
And the code I used to generate this:
require 'msgpack'
# Generate a random 32-byte string
def random_string
(rand(1_000_000_000).to_s * 32)[0..31]
end
n = 100
base_stream = 0
base_mem = 0
mem_elapsed = 0
puts " Keys Stream Memory Keys % Stream % Mem %"
puts " ===== ======== ======== ======= ======== =========="
while mem_elapsed < 5
obj = {}
n.times { obj[random_string] = random_string }
# Write to disk
File.open("obj.mpac", "w+") { |f| f.write obj.to_msgpack }
# Use the streaming interface
start = Time.now
d = nil
File.open("obj.mpac") do |f|
pac = MessagePack::Unpacker.new(f)
begin
pac.each do |obj|
d = obj
end
rescue EOFError
end
end
stream_elapsed = Time.now - start
base_stream = stream_elapsed if n == 100
# Use the non-streaming interface
bytes = IO.read("obj.mpac")
start = Time.now
c = MessagePack.unpack(bytes)
mem_elapsed = Time.now - start
base_mem = mem_elapsed if n == 100
# Report
puts " #{"%4d" % n} #{"%.5f" % stream_elapsed}s #{"%.5f" % mem_elapsed}s #{"%4d" % n}.00% #{"%7.2f" % ((stream_elapsed / base_stream) * 100)}% #{"%10.2f" % ((mem_elapsed / base_mem) * 100)}%"
n *= 2
end
And version info:
$ ruby -v
ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-darwin10.5.0]
# I'm on Mac OS X 10.6.5. Apparently the kernel is Darwin 10.5.0
$ gem list msgpack
*** LOCAL GEMS ***
msgpack (0.4.4)
I'm trying to install msgpack 0.1.9 on ActiveState Python 2.7 on Windows, using mingw32.
I get the following stack trace:
C:\Users\Administrator\Downloads\msgpack-python-0.1.9.tar\msgpack-python-0.1.9\m
sgpack-python-0.1.9>python setup.py clean
running clean
removing 'build\temp.win32-2.7' (and everything under it)
C:\Users\Administrator\Downloads\msgpack-python-0.1.9.tar\msgpack-python-0.1.9\m
sgpack-python-0.1.9>python setup.py install
running install
running build
running build_py
copying msgpack\__version__.py -> build\lib.win32-2.7\msgpack
running build_ext
skipping 'msgpack\_msgpack.c' Cython extension (up-to-date)
building 'msgpack._msgpack' extension
creating build\temp.win32-2.7
creating build\temp.win32-2.7\Release
creating build\temp.win32-2.7\Release\msgpack
C:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IC:\Python27\include -IC:\Pytho
n27\PC -c msgpack\_msgpack.c -o build\temp.win32-2.7\Release\msgpack\_msgpack.o
msgpack\_msgpack.c: In function '__Pyx_RaiseArgtupleInvalid':
msgpack\_msgpack.c:4905:9: warning: unknown conversion type character 'z' in for
mat
msgpack\_msgpack.c:4905:9: warning: format '%s' expects type 'char *', but argum
ent 5 has type 'Py_ssize_t'
msgpack\_msgpack.c:4905:9: warning: unknown conversion type character 'z' in for
mat
msgpack\_msgpack.c:4905:9: warning: too many arguments for format
msgpack\_msgpack.c: In function '__Pyx_RaiseNeedMoreValuesError':
msgpack\_msgpack.c:5041:18: warning: unknown conversion type character 'z' in fo
rmat
msgpack\_msgpack.c:5041:18: warning: format '%s' expects type 'char *', but argu
ment 3 has type 'Py_ssize_t'
msgpack\_msgpack.c:5041:18: warning: too many arguments for format
msgpack\_msgpack.c: In function '__Pyx_RaiseTooManyValuesError':
msgpack\_msgpack.c:5049:13: warning: unknown conversion type character 'z' in fo
rmat
msgpack\_msgpack.c:5049:13: warning: too many arguments for format
writing build\temp.win32-2.7\Release\msgpack\_msgpack.def
C:\MinGW\bin\gcc.exe -mno-cygwin -shared -s build\temp.win32-2.7\Release\msgpack
\_msgpack.o build\temp.win32-2.7\Release\msgpack\_msgpack.def -LC:\Python27\libs
-LC:\Python27\PCbuild -lws2_32 -lpython27 -lmsvcr90 -o build\lib.win32-2.7\msgp
ack\_msgpack.pyd
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x3e): undefin
ed reference to `_imp___Py_NoneStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x84): undefin
ed reference to `_imp___Py_NoneStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0xfb): undefin
ed reference to `_imp___Py_NoneStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x196): undefi
ned reference to `_imp___Py_NoneStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x1c6): undefi
ned reference to `_imp___Py_NoneStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x1f0): more u
ndefined references to `_imp___Py_NoneStruct' follow
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x30d): undefi
ned reference to `_imp___PyThreadState_Current'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x4ff): undefi
ned reference to `_imp___Py_NoneStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x52b): undefi
ned reference to `_imp__PyTraceBack_Type'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x53d): undefi
ned reference to `_imp__PyExc_TypeError'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x55b): undefi
ned reference to `_imp___Py_NoneStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x57b): undefi
ned reference to `_imp__PyExc_TypeError'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x5aa): undefi
ned reference to `_imp__PyExc_BaseException'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x5cd): undefi
ned reference to `_imp__PyExc_TypeError'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x5e9): undefi
ned reference to `_imp___PyThreadState_Current'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x6b2): undefi
ned reference to `_imp___Py_NoneStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x835): undefi
ned reference to `_imp___Py_NoneStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x86c): undefi
ned reference to `_imp___Py_NoneStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x932): undefi
ned reference to `_imp___Py_NoneStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x9d7): undefi
ned reference to `_imp__PyExc_TypeError'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0xa24): undefi
ned reference to `_imp__PyString_Type'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0xa6b): undefi
ned reference to `_imp__PyExc_TypeError'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0xa9e): undefi
ned reference to `_imp__PyExc_TypeError'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0xaeb): undefi
ned reference to `_imp___Py_NoneStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0xc5f): undefi
ned reference to `_imp___Py_NoneStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0xe32): undefi
ned reference to `_imp__PyString_Type'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0xf5e): undefi
ned reference to `_imp__PyExc_TypeError'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0xf84): undefi
ned reference to `_imp__PyExc_TypeError'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0xfba): undefi
ned reference to `_imp__PyExc_TypeError'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x115b): undef
ined reference to `_imp___Py_NoneStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x1258): undef
ined reference to `_imp___Py_NoneStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x1263): undef
ined reference to `_imp___Py_NoneStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x13b2): undef
ined reference to `_imp___Py_TrueStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x13be): undef
ined reference to `_imp___Py_ZeroStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x13cc): undef
ined reference to `_imp___Py_NoneStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x158a): undef
ined reference to `_imp___Py_NoneStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x1664): undef
ined reference to `_imp___Py_NoneStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x16cb): undef
ined reference to `_imp___Py_NoneStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x17a1): undef
ined reference to `_imp___Py_NoneStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x1936): more
undefined references to `_imp___Py_NoneStruct' follow
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x1f6d): undef
ined reference to `_imp__PyExc_NameError'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x214c): undef
ined reference to `_imp___Py_NoneStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x21b9): undef
ined reference to `_imp__PyExc_ValueError'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x2248): undef
ined reference to `_imp__PyExc_TypeError'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x2283): undef
ined reference to `_imp__PyExc_TypeError'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x22d6): undef
ined reference to `_imp__PyExc_OverflowError'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x230c): undef
ined reference to `_imp__PyExc_OverflowError'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x252c): undef
ined reference to `_imp___Py_NoneStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x253c): undef
ined reference to `_imp___Py_ZeroStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x2574): undef
ined reference to `_imp___Py_TrueStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x30d6): undef
ined reference to `_imp___Py_NoneStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x313b): undef
ined reference to `_imp__PyCFunction_Type'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x3222): undef
ined reference to `_imp___Py_NoneStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x3594): undef
ined reference to `_imp___Py_NoneStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x368d): undef
ined reference to `_imp___Py_NoneStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x36a8): undef
ined reference to `_imp___Py_TrueStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x36b4): undef
ined reference to `_imp___Py_ZeroStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x37d7): undef
ined reference to `_imp___Py_NoneStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x380e): undef
ined reference to `_imp___Py_NoneStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x389e): undef
ined reference to `_imp___Py_NoneStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x3adf): undef
ined reference to `_imp___Py_NoneStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x3b21): undef
ined reference to `_imp___Py_TrueStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x3b30): undef
ined reference to `_imp___Py_ZeroStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x3cba): undef
ined reference to `_imp___Py_TrueStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x3cc6): undef
ined reference to `_imp___Py_NoneStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x3ccf): undef
ined reference to `_imp___Py_ZeroStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x426f): undef
ined reference to `_imp___Py_NoneStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x444d): undef
ined reference to `_imp___Py_NoneStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x4483): undef
ined reference to `_imp___Py_TrueStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x4491): undef
ined reference to `_imp___Py_ZeroStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x4604): undef
ined reference to `_imp___Py_NoneStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x487f): undef
ined reference to `_imp___Py_NoneStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x48f9): undef
ined reference to `_imp___Py_NoneStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x4a8e): undef
ined reference to `_imp___Py_NoneStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x4ac7): undef
ined reference to `_imp___Py_TrueStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x4ad5): undef
ined reference to `_imp___Py_ZeroStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x4d0c): undef
ined reference to `_imp___Py_TrueStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x4d16): undef
ined reference to `_imp___Py_ZeroStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x4f32): undef
ined reference to `_imp___Py_NoneStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x50c5): undef
ined reference to `_imp___Py_TrueStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x50d1): undef
ined reference to `_imp___Py_ZeroStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x521f): undef
ined reference to `_imp___Py_TrueStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x522b): undef
ined reference to `_imp___Py_ZeroStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x52b9): undef
ined reference to `_imp__PyExc_OverflowError'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x52ed): undef
ined reference to `_imp__PyExc_OverflowError'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x5ea0): undef
ined reference to `_imp__PyFloat_Type'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x656f): undef
ined reference to `_imp__PyDict_Type'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x6585): undef
ined reference to `_imp__PyExc_TypeError'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x65c8): undef
ined reference to `_imp___Py_NoneStruct'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x6777): undef
ined reference to `_imp__PyList_Type'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x6784): undef
ined reference to `_imp__PyTuple_Type'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x681f): undef
ined reference to `_imp__PyTuple_Type'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x689c): undef
ined reference to `_imp__PyTuple_Type'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x6a1b): undef
ined reference to `_imp__PyExc_ValueError'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x6d67): undef
ined reference to `_imp__PyList_Type'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x6d74): undef
ined reference to `_imp__PyTuple_Type'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x6e09): undef
ined reference to `_imp__PyTuple_Type'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x795c): undef
ined reference to `_imp__PyExc_TypeError'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x79e2): undef
ined reference to `_imp__PyExc_ValueError'
build\temp.win32-2.7\Release\msgpack\_msgpack.o:_msgpack.c:(.text+0x8223): undef
ined reference to `_imp__PyExc_ImportError'
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
I can't work out if this a bug with the source, or a problem with my installation. Any pointers?
FYI http://msgpack.org/ is down. Is there an alternative url for documentation?
code:
public class SerializaionTests
{
@MessagePackMessage
public static class SerTest
{
public String str;
public SerTest2 serTest2;
}
@MessagePackMessage
public static class SerTest2
{
public String str;
public Bam bam;
}
@MessagePackMessage
public static enum Bam
{
BUM,BLE
}
public static void main(String [] args) throws IOException {
SerTest serTest = new SerTest();
serTest.str = "tetete";
serTest.serTest2 = new SerTest2();
serTest.serTest2.str = "qwqw";
serTest.serTest2.bam = Bam.BLE;
File outFile = new File("serialization.out");
if(outFile.exists())
{
outFile.delete();
}
outFile.createNewFile();
FileOutputStream out = new FileOutputStream(outFile);
byte [] raw = MessagePack.pack(serTest);
out.write(raw);
out.close();
}
}
produce:
Exception in thread "main" org.msgpack.template.TemplateBuildException: Cannot compile: { xx.xxxxxx.xxxxxxx.tests.communication.SerializaionTests$Bam _$$_t;if(
at org.msgpack.template.builder.BuildContextBase.build(BuildContextBase.java:85)
2011-06-26 18:00:13,922 ERROR JavassistTemplateBuilder - builder: { xx.xxxxxx.xxxxxxx.tests.communication.SerializaionTests$Bam _$$_t;if(
at org.msgpack.template.builder.BuildContext.buildTemplate(BuildContext.java:48)
javassist.CannotCompileException: [source error] no such a constructor
at org.msgpack.template.builder.BuildContext.buildTemplate(BuildContext.java:32)
at javassist.CtBehavior.setBody(CtBehavior.java:409)
at org.msgpack.template.builder.JavassistTemplateBuilder.buildTemplate(JavassistTemplateBuilder.java:149)
at javassist.CtBehavior.setBody(CtBehavior.java:375)
at org.msgpack.template.builder.CustomTemplateBuilder.buildTemplate(CustomTemplateBuilder.java:53)
at javassist.CtNewMethod.make(CtNewMethod.java:137)
at org.msgpack.template.TemplateRegistry.lookupImpl(TemplateRegistry.java:136)
at org.msgpack.template.builder.BuildContextBase.buildUnpackMethod(BuildContextBase.java:137)
at org.msgpack.template.TemplateRegistry.lookup(TemplateRegistry.java:92)
at org.msgpack.template.builder.BuildContextBase.build(BuildContextBase.java:78)
at org.msgpack.template.builder.JavassistTemplateBuilder.toTemplate(JavassistTemplateBuilder.java:159)
at org.msgpack.template.builder.BuildContext.buildTemplate(BuildContext.java:48)
at org.msgpack.template.builder.JavassistTemplateBuilder.loadTemplate(JavassistTemplateBuilder.java:202)
at org.msgpack.template.builder.BuildContext.buildTemplate(BuildContext.java:32)
at org.msgpack.template.builder.JavassistTemplateBuilder.loadTemplate(JavassistTemplateBuilder.java:198)
at org.msgpack.template.builder.JavassistTemplateBuilder.buildTemplate(JavassistTemplateBuilder.java:149)
at org.msgpack.template.TemplateRegistry.lookupImpl(TemplateRegistry.java:129)
at org.msgpack.template.builder.CustomTemplateBuilder.buildTemplate(CustomTemplateBuilder.java:53)
at org.msgpack.template.TemplateRegistry.lookup(TemplateRegistry.java:92)
at org.msgpack.template.TemplateRegistry.lookupImpl(TemplateRegistry.java:136)
at org.msgpack.template.TemplateRegistry.lookup(TemplateRegistry.java:92)
at org.msgpack.template.builder.JavassistTemplateBuilder.toTemplate(JavassistTemplateBuilder.java:159)
at org.msgpack.template.builder.JavassistTemplateBuilder.loadTemplate(JavassistTemplateBuilder.java:202)
at org.msgpack.template.builder.JavassistTemplateBuilder.loadTemplate(JavassistTemplateBuilder.java:198)
at org.msgpack.template.TemplateRegistry.lookupImpl(TemplateRegistry.java:129)
at org.msgpack.template.TemplateRegistry.lookup(TemplateRegistry.java:92)
at org.msgpack.template.builder.JavassistTemplateBuilder.toTemplate(JavassistTemplateBuilder.java:159)
at org.msgpack.template.builder.JavassistTemplateBuilder.loadTemplate(JavassistTemplateBuilder.java:202)
at org.msgpack.template.builder.JavassistTemplateBuilder.loadTemplate(JavassistTemplateBuilder.java:198)
at org.msgpack.template.TemplateRegistry.lookupImpl(TemplateRegistry.java:129)
at org.msgpack.template.TemplateRegistry.lookup(TemplateRegistry.java:88)
at org.msgpack.Packer.pack(Packer.java:532)
at org.msgpack.MessagePack.pack(MessagePack.java:31)
at xx.xxxxxx.xxxxxxx.tests.communication.SerializaionTests.main(SerializaionTests.java:55)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: compile error: no such a constructor
at javassist.compiler.MemberCodeGen.atMethodCallCore2(MemberCodeGen.java:593)
at javassist.compiler.MemberCodeGen.atMethodCallCore(MemberCodeGen.java:575)
at javassist.compiler.MemberCodeGen.atNewExpr(MemberCodeGen.java:301)
at javassist.compiler.ast.NewExpr.accept(NewExpr.java:72)
at javassist.compiler.CodeGen.atAssignCore(CodeGen.java:859)
at javassist.compiler.CodeGen.atVariableAssign(CodeGen.java:792)
at javassist.compiler.CodeGen.atAssignExpr(CodeGen.java:746)
at javassist.compiler.CodeGen.atStmnt(CodeGen.java:331)
at javassist.compiler.ast.Stmnt.accept(Stmnt.java:49)
at javassist.compiler.CodeGen.atStmnt(CodeGen.java:350)
at javassist.compiler.ast.Stmnt.accept(Stmnt.java:49)
at javassist.compiler.CodeGen.atIfStmnt(CodeGen.java:390)
at javassist.compiler.CodeGen.atStmnt(CodeGen.java:354)
at javassist.compiler.ast.Stmnt.accept(Stmnt.java:49)
at javassist.compiler.CodeGen.atStmnt(CodeGen.java:350)
at javassist.compiler.ast.Stmnt.accept(Stmnt.java:49)
at javassist.compiler.CodeGen.atMethodBody(CodeGen.java:291)
at javassist.compiler.Javac.compileBody(Javac.java:222)
at javassist.CtBehavior.setBody(CtBehavior.java:401)
... 28 more
at org.msgpack.template.builder.JavassistTemplateBuilder.toTemplate(JavassistTemplateBuilder.java:159)
at org.msgpack.template.builder.JavassistTemplateBuilder.loadTemplate(JavassistTemplateBuilder.java:202)
at org.msgpack.template.builder.JavassistTemplateBuilder.loadTemplate(JavassistTemplateBuilder.java:198)
at org.msgpack.template.TemplateRegistry.lookupImpl(TemplateRegistry.java:129)
at org.msgpack.template.TemplateRegistry.lookup(TemplateRegistry.java:88)
at org.msgpack.Packer.pack(Packer.java:532)
at org.msgpack.MessagePack.pack(MessagePack.java:31)
at xx.xxxxxx.xxxxxxx.tests.communication.SerializaionTests.main(SerializaionTests.java:55)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: javassist.CannotCompileException: [source error] no such a constructor
at javassist.CtBehavior.setBody(CtBehavior.java:409)
at javassist.CtBehavior.setBody(CtBehavior.java:375)
at javassist.CtNewMethod.make(CtNewMethod.java:137)
at org.msgpack.template.builder.BuildContextBase.buildUnpackMethod(BuildContextBase.java:137)
at org.msgpack.template.builder.BuildContextBase.build(BuildContextBase.java:78)
... 24 more
Caused by: compile error: no such a constructor
at javassist.compiler.MemberCodeGen.atMethodCallCore2(MemberCodeGen.java:593)
at javassist.compiler.MemberCodeGen.atMethodCallCore(MemberCodeGen.java:575)
at javassist.compiler.MemberCodeGen.atNewExpr(MemberCodeGen.java:301)
at javassist.compiler.ast.NewExpr.accept(NewExpr.java:72)
at javassist.compiler.CodeGen.atAssignCore(CodeGen.java:859)
at javassist.compiler.CodeGen.atVariableAssign(CodeGen.java:792)
at javassist.compiler.CodeGen.atAssignExpr(CodeGen.java:746)
at javassist.compiler.CodeGen.atStmnt(CodeGen.java:331)
at javassist.compiler.ast.Stmnt.accept(Stmnt.java:49)
at javassist.compiler.CodeGen.atStmnt(CodeGen.java:350)
at javassist.compiler.ast.Stmnt.accept(Stmnt.java:49)
at javassist.compiler.CodeGen.atIfStmnt(CodeGen.java:390)
at javassist.compiler.CodeGen.atStmnt(CodeGen.java:354)
at javassist.compiler.ast.Stmnt.accept(Stmnt.java:49)
at javassist.compiler.CodeGen.atStmnt(CodeGen.java:350)
at javassist.compiler.ast.Stmnt.accept(Stmnt.java:49)
at javassist.compiler.CodeGen.atMethodBody(CodeGen.java:291)
at javassist.compiler.Javac.compileBody(Javac.java:222)
at javassist.CtBehavior.setBody(CtBehavior.java:401)
... 28 more
/tmp$ sudo easy_install msgpack
Searching for msgpack
Reading http://pypi.python.org/simple/msgpack/
Reading http://msgpack.sourceforge.jp/
Best match: msgpack 0.4.2
Downloading http://dl.sourceforge.jp/msgpack/46155/msgpack-0.4.2.tar.gz
Processing msgpack-0.4.2.tar.gz
error: Couldn't find a setup script in /tmp/easy_install-Sy9Fkt/msgpack-0.4.2.tar.gz
Valgrind show next errors for streaming feature example from http://wiki.msgpack.org/pages/viewpage.action?pageId=1081387 :
==11325== 1 errors in context 1 of 2:
==11325== Mismatched free() / delete / delete []
==11325== at 0x48CC919: operator delete(void_) (vg_replace_malloc.c:387)
==11325== by 0x804A623: std::auto_ptrmsgpack::zone::reset(msgpack::zone_) (auto_ptr.h:242)
==11325== by 0x804A2E1: msgpack::unpacker::next(msgpack::unpacked_) (unpack.hpp:229)
==11325== by 0x8049E93: main (pack2.cpp:24)
==11325== Address 0x6e447c0 is 0 bytes inside a block of size 8,220 alloc'd
==11325== at 0x48CD876: malloc (vg_replace_malloc.c:236)
==11325== by 0x48DABC9: msgpack_zone_new (zone.c:198)
==11325== by 0x48D811F: msgpack_unpacker_release_zone (unpack.c:333)
==11325== by 0x804A3DA: msgpack::unpacker::release_zone() (unpack.hpp:261)
==11325== by 0x804A31C: msgpack::unpacker::next(msgpack::unpacked_) (unpack.hpp:234)
==11325== by 0x8049E93: main (pack2.cpp:24)
==11325==
==11325==
==11325== 2 errors in context 2 of 2:
==11325== Mismatched free() / delete / delete []
==11325== at 0x48CC919: operator delete(void_) (vg_replace_malloc.c:387)
==11325== by 0x804A623: std::auto_ptrmsgpack::zone::reset(msgpack::zone_) (auto_ptr.h:242)
==11325== by 0x804A335: msgpack::unpacker::next(msgpack::unpacked*) (unpack.hpp:234)
==11325== by 0x8049E93: main (pack2.cpp:24)
==11325== Address 0x6e3c5c0 is 0 bytes inside a block of size 8,220 alloc'd
==11325== at 0x48CD876: malloc (vg_replace_malloc.c:236)
==11325== by 0x48DABC9: msgpack_zone_new (zone.c:198)
==11325== by 0x48D8211: msgpack_unpacker_init (unpack.c:194)
==11325== by 0x804A08D: msgpack::unpacker::unpacker(unsigned int) (unpack.hpp:187)
==11325== by 0x8049DC5: main (pack2.cpp:15)
From looking at the source it seems that TemplateRegistry.unregister(Class<?>) should be synchronized.
I'm trying to install msgpack 0.1.9 on CPython 2.7 on Windows 7 65 bits, using VisualStudio 2008. It seems the C code is not to the liking of Microsoft's C compiler.
This is a log of the installation:
Searching for msgpack-python
Reading http://pypi.python.org/simple/msgpack-python/
Reading http://msgpack.sourceforge.net/
Reading http://msgpack.sourceforge.jp/
Best match: msgpack-python 015final
Downloading http://pypi.python.org/packages/source/m/msgpack-python/msgpack-python-015final.tar.gz#md5=74f0928b51fa5b980b5721b39e276925
Processing msgpack-python-015final.tar.gz
Running msgpack-python-015final\setup.py -q bdist_egg --dist-dir c:\temp\easy_install-gnm1y1\msgpack-python-015final\egg-dist-tmp-iwjjkl
_msgpack.c
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(36) : error C2054: expected '(' to follow 'inline'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(36) : error C2085: 'msgpack_pack_short' : not in formal parameter list
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(37) : error C2082: redefinition of formal parameter 'inline'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(37) : error C2143: syntax error : missing ';' before 'type'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(37) : error C2085: 'msgpack_pack_int' : not in formal parameter list
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(38) : error C2082: redefinition of formal parameter 'inline'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(38) : error C2143: syntax error : missing ';' before 'type'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(38) : error C2085: 'msgpack_pack_long' : not in formal parameter list
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(39) : error C2082: redefinition of formal parameter 'inline'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(39) : error C2143: syntax error : missing ';' before 'type'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(39) : error C2085: 'msgpack_pack_long_long' : not in formal parameter list
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(40) : error C2082: redefinition of formal parameter 'inline'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(40) : error C2143: syntax error : missing ';' before 'type'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(40) : error C2085: 'msgpack_pack_unsigned_short' : not in formal parameter list
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(41) : error C2082: redefinition of formal parameter 'inline'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(41) : error C2143: syntax error : missing ';' before 'type'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(41) : error C2085: 'msgpack_pack_unsigned_int' : not in formal parameter list
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(42) : error C2082: redefinition of formal parameter 'inline'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(42) : error C2143: syntax error : missing ';' before 'type'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(42) : error C2085: 'msgpack_pack_unsigned_long' : not in formal parameter list
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(43) : error C2082: redefinition of formal parameter 'inline'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(43) : error C2143: syntax error : missing ';' before 'type'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(43) : error C2085: 'msgpack_pack_unsigned_long_long' : not in formal parameter list
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(45) : error C2082: redefinition of formal parameter 'inline'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(45) : error C2143: syntax error : missing ';' before 'type'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(45) : error C2085: 'msgpack_pack_uint8' : not in formal parameter list
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(46) : error C2082: redefinition of formal parameter 'inline'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(46) : error C2143: syntax error : missing ';' before 'type'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(46) : error C2085: 'msgpack_pack_uint16' : not in formal parameter list
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(47) : error C2082: redefinition of formal parameter 'inline'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(47) : error C2143: syntax error : missing ';' before 'type'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(47) : error C2085: 'msgpack_pack_uint32' : not in formal parameter list
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(48) : error C2082: redefinition of formal parameter 'inline'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(48) : error C2143: syntax error : missing ';' before 'type'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(48) : error C2085: 'msgpack_pack_uint64' : not in formal parameter list
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(49) : error C2082: redefinition of formal parameter 'inline'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(49) : error C2143: syntax error : missing ';' before 'type'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(49) : error C2085: 'msgpack_pack_int8' : not in formal parameter list
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(50) : error C2082: redefinition of formal parameter 'inline'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(50) : error C2143: syntax error : missing ';' before 'type'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(50) : error C2085: 'msgpack_pack_int16' : not in formal parameter list
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(51) : error C2082: redefinition of formal parameter 'inline'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(51) : error C2143: syntax error : missing ';' before 'type'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(51) : error C2085: 'msgpack_pack_int32' : not in formal parameter list
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(52) : error C2082: redefinition of formal parameter 'inline'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(52) : error C2143: syntax error : missing ';' before 'type'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(52) : error C2085: 'msgpack_pack_int64' : not in formal parameter list
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(54) : error C2082: redefinition of formal parameter 'inline'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(54) : error C2143: syntax error : missing ';' before 'type'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(54) : error C2085: 'msgpack_pack_float' : not in formal parameter list
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(55) : error C2082: redefinition of formal parameter 'inline'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(55) : error C2143: syntax error : missing ';' before 'type'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(55) : error C2085: 'msgpack_pack_double' : not in formal parameter list
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(57) : error C2082: redefinition of formal parameter 'inline'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(57) : error C2143: syntax error : missing ';' before 'type'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(57) : error C2085: 'msgpack_pack_nil' : not in formal parameter list
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(58) : error C2082: redefinition of formal parameter 'inline'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(58) : error C2143: syntax error : missing ';' before 'type'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(58) : error C2085: 'msgpack_pack_true' : not in formal parameter list
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(59) : error C2082: redefinition of formal parameter 'inline'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(59) : error C2143: syntax error : missing ';' before 'type'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(59) : error C2085: 'msgpack_pack_false' : not in formal parameter list
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(61) : error C2082: redefinition of formal parameter 'inline'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(61) : error C2143: syntax error : missing ';' before 'type'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(61) : error C2085: 'msgpack_pack_array' : not in formal parameter list
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(63) : error C2082: redefinition of formal parameter 'inline'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(63) : error C2143: syntax error : missing ';' before 'type'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(63) : error C2085: 'msgpack_pack_map' : not in formal parameter list
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(65) : error C2082: redefinition of formal parameter 'inline'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(65) : error C2143: syntax error : missing ';' before 'type'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(65) : error C2085: 'msgpack_pack_raw' : not in formal parameter list
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(66) : error C2082: redefinition of formal parameter 'inline'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(66) : error C2143: syntax error : missing ';' before 'type'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(66) : error C2085: 'msgpack_pack_raw_body' : not in formal parameter list
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(68) : error C2082: redefinition of formal parameter 'inline'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(68) : error C2143: syntax error : missing ';' before 'type'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(69) : error C2085: 'msgpack_pack_write' : not in formal parameter list
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack.h(69) : error C2143: syntax error : missing ';' before '{'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack_template.h(335) : error C2054: expected '(' to follow 'inline'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack_template.h(336) : error C2085: 'msgpack_pack_uint8' : not in formal parameter list
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack_template.h(336) : error C2143: syntax error : missing ';' before '{'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack_template.h(340) : error C2054: expected '(' to follow 'inline'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack_template.h(341) : error C2085: 'msgpack_pack_uint16' : not in formal parameter list
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack_template.h(341) : error C2143: syntax error : missing ';' before '{'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack_template.h(345) : error C2054: expected '(' to follow 'inline'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack_template.h(346) : error C2085: 'msgpack_pack_uint32' : not in formal parameter list
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack_template.h(346) : error C2143: syntax error : missing ';' before '{'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack_template.h(350) : error C2054: expected '(' to follow 'inline'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack_template.h(351) : error C2085: 'msgpack_pack_uint64' : not in formal parameter list
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack_template.h(351) : error C2143: syntax error : missing ';' before '{'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack_template.h(355) : error C2054: expected '(' to follow 'inline'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack_template.h(356) : error C2085: 'msgpack_pack_int8' : not in formal parameter list
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack_template.h(356) : error C2143: syntax error : missing ';' before '{'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack_template.h(360) : error C2054: expected '(' to follow 'inline'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack_template.h(361) : error C2085: 'msgpack_pack_int16' : not in formal parameter list
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack_template.h(361) : error C2143: syntax error : missing ';' before '{'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack_template.h(365) : error C2054: expected '(' to follow 'inline'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack_template.h(366) : error C2085: 'msgpack_pack_int32' : not in formal parameter list
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack_template.h(366) : error C2143: syntax error : missing ';' before '{'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack_template.h(370) : error C2054: expected '(' to follow 'inline'
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack_template.h(371) : error C2085: 'msgpack_pack_int64' : not in formal parameter list
c:\temp\easy_install-gnm1y1\msgpack-python-015final\msgpack\pack_template.h(371) : fatal error C1003: error count exceeds 100; stopping compilation
Hi,
Since I'm usually use msgpack as a replacement of json, it's better to unpack string in messages as unicode values instead of bytes. So I propose to add a keyword argument encoding=
for both packer and unpacker, which if not None will mean encode/decode all raw values using specified encoding
Using the command line: python setup.py -c mingw32
Reason:
-lws2_32 flag is missing
Msgpack solution does not build proper DLL under Windows, only static LIB file. This makes it unusable under frameworks such as FFI, that need proper DLL.
See this issue for details:
postmodern/ffi-msgpack#2 (comment)
Is it possible to modify the solution to build proper DLL under Windows, not static LIB?
Numpy integers operate almost exactly like Python integers in all circumstances, but msgpack doesn't handle them. That's fine, but the error message that gets thrown is fairly confusing.
>>> import numpy
>>> five = numpy.int32(5)
>>> five
5
>>> type(five)
<type 'numpy.int32'>
>>> msgpack.dumps(five)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "_msgpack.pyx", line 151, in msgpack._msgpack.packb (msgpack/_msgpack.c:1607)
File "_msgpack.pyx", line 135, in msgpack._msgpack.Packer.pack (msgpack/_msgpack.c:1363)
File "_msgpack.pyx", line 130, in msgpack._msgpack.Packer._pack (msgpack/_msgpack.c:1305)
TypeError: can't serialize 5
It's not really msgpack's problem per se, but I think handling it more gracefully would be nice, since numpy is in very widespread use. I'd suggest adding type information to the TypeError, so the error message would read something like:
TypeError: can't serialize 5 (<type 'numpy.int32'>)
That's make debugging this and other similar problems easier.
Actually treating numpy integers (and other numpy scalar types) as integers would be a bonus.
the msgpack and msgpack-rpc there are any plans to support for nodejs?
msgpack supports most of the common data types found in Ruby, like hashes and fixnums, but support for symbols is absent. I realize most other languages may not have a parallel to symbols, but perhaps in such cases, unpacking could simply treat the data type as a string?
https://github.com/msgpack/msgpack/blob/master/msgpack/sysdep.h#L87-89
Currently it is:
# define _msgpack_be16(x) \
( ((((uint16_t)x) << 8) ) | \
((((uint16_t)x) >> 8) )
But it should be (notice an additional parentheses at the end of the last line):
# define _msgpack_be16(x) \
( ((((uint16_t)x) << 8) ) | \
((((uint16_t)x) >> 8) ) )
Otherwise it fails to compile on MingW (from Qt Creator on Windows).
Seems when data is larger than Unpackers read_size unpacking process breaks.
I can observe it for 6 strings and read_size=16 and 8000 strings for default read_size=1024*1024.
gcc version 4.5.2 20101218 (release) (PLD-Linux)
python-Cython-0.14
Hope I will be able attach my test code.
Wondering if there are plans to add date & datetime parsing support? It currently just doesn't handle them at all
Hi,
I try to use msgpack (0.4.3) on mips arch but there big warning messages when trying to include msgpack.h (and so indirectly pack_template.h) from my program:
mips-openwrt-linux-uclibc-gcc -Os -pipe -mips32 -mtune=mips32 -funit-at-a-time -fhonour-copts -msoft-float -std=gnu99 -D_GNU_SOURCE -Wall -Wextra -Wshadow -Wcast-qual -Wold-style-definition -Wmissing-noreturn -Wstrict-prototypes -Waggregate-return -Wformat=2 -Wundef -Wunused-parameter -Wnonnull -Wpointer-arith -DNDEBUG -I/home/homer242/dev/openwrt/build_dir/target-mips_uClibc-0.9.30.1_openwrt/c4n-20100427/common/include/ -I/home/homer242/dev/openwrt/build_dir/target-mips_uClibc-0.9.30.1_openwrt/c4n-20100427/server/include/ -c -o server.o server.c In file included from /home/homer242/dev/openwrt/staging_dir/target-mips_uClibc-0.9.30.1_openwrt/usr/include/msgpack/pack.h:89, from /home/homer242/dev/openwrt/staging_dir/target-mips_uClibc-0.9.30.1_openwrt/usr/include/msgpack.h:20, from /home/homer242/dev/openwrt/build_dir/target-mips_uClibc-0.9.30.1_openwrt/c4n-20100427/server/include/seq.h:6, from /home/homer242/dev/openwrt/build_dir/target-mips_uClibc-0.9.30.1_openwrt/c4n-20100427/server/include/query.h:6, from server.c:8: /home/homer242/dev/openwrt/staging_dir/target-mips_uClibc-0.9.30.1_openwrt/usr/include/msgpack/pack_template.h: In function 'msgpack_pack_short': /home/homer242/dev/openwrt/staging_dir/target-mips_uClibc-0.9.30.1_openwrt/usr/include/msgpack/pack_template.h:392: warning: comparison is always false due to limited range of data type /home/homer242/dev/openwrt/staging_dir/target-mips_uClibc-0.9.30.1_openwrt/usr/include/msgpack/pack_template.h:392: warning: comparison is always true due to limited range of data type /home/homer242/dev/openwrt/staging_dir/target-mips_uClibc-0.9.30.1_openwrt/usr/include/msgpack/pack_template.h:394: warning: comparison is always false due to limited range of data type /home/homer242/dev/openwrt/staging_dir/target-mips_uClibc-0.9.30.1_openwrt/usr/include/msgpack/pack_template.h:394: warning: comparison is always false due to limited range of data type /home/homer242/dev/openwrt/staging_dir/target-mips_uClibc-0.9.30.1_openwrt/usr/include/msgpack/pack_template.h:394: warning: comparison is always true due to limited range of data type /home/homer242/dev/openwrt/staging_dir/target-mips_uClibc-0.9.30.1_openwrt/usr/include/msgpack/pack_template.h:394: warning: comparison is always true due to limited range of data type /home/homer242/dev/openwrt/staging_dir/target-mips_uClibc-0.9.30.1_openwrt/usr/include/msgpack/pack_template.h: In function 'msgpack_pack_int': /home/homer242/dev/openwrt/staging_dir/target-mips_uClibc-0.9.30.1_openwrt/usr/include/msgpack/pack_template.h:415: warning: comparison is always false due to limited range of data type /home/homer242/dev/openwrt/staging_dir/target-mips_uClibc-0.9.30.1_openwrt/usr/include/msgpack/pack_template.h:415: warning: comparison is always true due to limited range of data type /home/homer242/dev/openwrt/staging_dir/target-mips_uClibc-0.9.30.1_openwrt/usr/include/msgpack/pack_template.h: In function 'msgpack_pack_long': /home/homer242/dev/openwrt/staging_dir/target-mips_uClibc-0.9.30.1_openwrt/usr/include/msgpack/pack_template.h:436: warning: comparison is always false due to limited range of data type /home/homer242/dev/openwrt/staging_dir/target-mips_uClibc-0.9.30.1_openwrt/usr/include/msgpack/pack_template.h:436: warning: comparison is always true due to limited range of data type /home/homer242/dev/openwrt/staging_dir/target-mips_uClibc-0.9.30.1_openwrt/usr/include/msgpack/pack_template.h: In function 'msgpack_pack_unsigned_short': /home/homer242/dev/openwrt/staging_dir/target-mips_uClibc-0.9.30.1_openwrt/usr/include/msgpack/pack_template.h:476: warning: comparison is always true due to limited range of data type /home/homer242/dev/openwrt/staging_dir/target-mips_uClibc-0.9.30.1_openwrt/usr/include/msgpack/pack_template.h:478: warning: comparison is always true due to limited range of data type /home/homer242/dev/openwrt/staging_dir/target-mips_uClibc-0.9.30.1_openwrt/usr/include/msgpack/pack_template.h:478: warning: comparison is always true due to limited range of data type /home/homer242/dev/openwrt/staging_dir/target-mips_uClibc-0.9.30.1_openwrt/usr/include/msgpack/pack_template.h: In function 'msgpack_pack_unsigned_int': /home/homer242/dev/openwrt/staging_dir/target-mips_uClibc-0.9.30.1_openwrt/usr/include/msgpack/pack_template.h:499: warning: comparison is always true due to limited range of data type /home/homer242/dev/openwrt/staging_dir/target-mips_uClibc-0.9.30.1_openwrt/usr/include/msgpack/pack_template.h: In function 'msgpack_pack_unsigned_long': /home/homer242/dev/openwrt/staging_dir/target-mips_uClibc-0.9.30.1_openwrt/usr/include/msgpack/pack_template.h:520: warning: comparison is always true due to limited range of data type
Packing all strings as raw byte arrays makes it very difficult to figure out how to unpack them correctly. In particular, it is impossible to know what encoding was used when encoding the string as a sequence of bytes. To address this, it would be nice to have a first-class MSGPACK_OBJECT_STRING type with a mandatory encoding (say, UTF-8).
I built the latest MsgPack CPP with the (trivial) node.js bindings and ran the benchmarks:
msgpack pack: 5616 ms
msgpack unpack: 1540 ms
json pack: 1111 ms
json unpack: 1009 ms
Pack performance seems to be particularly bad with long arrays.
why is not add nodejs support?
It looks like all value types MUST be annotated with @MessagePackMessage or equivalents; otherwise a cryptic exception is thrown. This does not seem to be mentioned anywhere, either on Wiki or javadocs. It would be good to improve exception message, too, to suggest adding annotations.
Also: why are such annotations even needed in the first place? They can not necessarily be added by developers when using 3rd party libraries; and they seem redundant -- there is no additional information provided by @MessagePackMessage so it can't be very useful for generating packers/unpackers.
~/msgpack/python$ python setup.py install
running install
running build
running build_py
running build_ext
building 'msgpack._msgpack' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.6 -c msgpack/_msgpack.c -o build/temp.linux-i686-2.6/msgpack/_msgpack.o
gcc: msgpack/_msgpack.c: No such file or directory
gcc: no input files
error: command 'gcc' failed with exit status 1
The reflection package has been refactored on the later versions of go.
Please see error below.
8g version weekly.2011-06-02 8629
$ make
8g -o go.8 pack.go unpack.go
pack.go:460: undefined: reflect.ArrayOrSliceValue
pack.go:498: undefined: reflect.MapValue
pack.go:504: typechecking loop
pack.go:515: typechecking loop
pack.go:526: typechecking loop
pack.go:539: cannot convert nil to type reflect.Value
pack.go:540: cannot type switch on non-interface value value (type reflect.Value)
pack.go:541: undefined: reflect.BoolValue
pack.go:541: _value.Get undefined (type reflect.Value has no field or method Get)
pack.go:542: undefined: reflect.UintValue
pack.go:542: too many errors
make: *** [go.8] Error 1
I've just tried installing the msgpack Ruby Gem on two different new (not upgraded from 10.6, so no cruft in the system in theory) Macs running OS X 10.7. They both failed with an error message similar to the following:
$ sudo gem install msgpack
Building native extensions. This could take a while...
ERROR: Error installing msgpack:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
creating Makefile
make
gcc -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin11.0 -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin11.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -arch i386 -arch x86_64 -g -Os -pipe -fno-common -DENABLE_DTRACE -fno-common -pipe -fno-common -I.. -Wall -O4 -DMESSAGEPACK_VERSION=\"0.4.5\" -g -c pack.c
lipo: can't figure out the architecture type of: /var/tmp//cc5N3hDx.out
make: *** [pack.o] Error 1
Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/msgpack-0.4.5 for inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/msgpack-0.4.5/ext/gem_make.out`
Currently, the maintainer of LL bindings receives every issue post for msgpack/msgpack repo. I don't want to receive issue report for Java, haskell, or other languages.
I suggest to spit repository by bindings.
With an earlier version, you supported the encoding of a symbol in the message as a String. Unpacking a symbol does not return a symbol.
String scenario
a = {"first" => 1}
=> {"first"=>1}
b = a.to_msgpack
=> "\201\245first\001"
c = MessagePack::unpack(b)
=> {"first"=>1}
p a==c
=> true
Symbol scenario
a = { :first => 1 }
b = a.to_msgpack
=> "\201\245first\001"
c = MessagePack::unpack(b)
=> {"first"=>1}
p a==c
false (not what I was expecting)
What am I missing?
It would be super helpful to have a pure JavaScript implementation of msgpack. This would put msgpack on par with JSON.
A bit of a shot in the dark, but has anyone come across problems with utf8 + msgpack? I'm using the Ruby bindings. Logged ~500 GB of data in zmpac format (stream + zlib), in ~200mb chunks (~1GB uncompressed). Trying to read the data back, and running into parse errors on random files.
Haven't had much luck tracking down the culprit so far, but if I try to sysread chunks of the file 1024 bytes at a time, and parse out the messages.. once the message is thrown, and I dump the buffer, I am seeing chinese characters, etc.
Same behavior under 1.8 and under 1.9. Any suggestions for how to recover this data, and/or any other tips?
MsgPack is having segmentation fault problems in msgpack_zone_new on Ubuntu 10.04 x64 and 10.10 x64
Someone ran the code under Mac OSX without problems.
I have this project which uses the C Streaming API
https://github.com/aikar/wormhole/
It's for the Node.JS platform ( http://nodejs.org ).
I've followed the streaming C example code and test file almost
identically, and my code seems to work...
except on attempt of reading a 3rd message, it segfaults.
When i run my example, i can get it to work successfully 2 times, then
on 3rd, crash.
Stack trace:
https://gist.github.com/9bf2d54215deb3fbcdf6
The lines that look like this:
2695cb5 - 65515 - 17
was
Buffer Address - Buffer Capacity - Length written to buffer.
which looks correct
its always on msgpack_unpacker_next chain that segfaults, and always on 3rd
attempt.
I'm running Ubuntu 10.10 x64 on desktop where first found it, and reconfirmed on my server with Ubuntu 10.04 x64.
Any ideas?
If you want to run my lib and do not have node.js installed.
cd /tmp
git clone git://github.com/joyent/node.git
cd node && ./configure && JOBS=4 make && sudo make install
cd /tmp
git clone git://github.com/aikar/wormhole.git
cd wormhole && make
node examples/wormhole.js
Packer.java, line 335 assumes incoming String is not null; but apparently it can come as null when using DynamicPacker. Either caller has to serialize nulls some other way (or ignore), or method has to check for nulls.
Relevant part of stack trace is:
java.lang.NullPointerException
at org.msgpack.Packer.packString(Packer.java:335)
at org.msgpack.template.StringTemplate.pack(StringTemplate.java:27)
at data.media.Media_$$Template2.pack(Media$$Template2.java)
at data.media.MediaContent$$Template1.pack(MediaContent$$_Template1.java)
at serializers.MsgPack$GenericSerializer.serialize(MsgPack.java:44)
...
The error messages:
<type 'buffer'>
Traceback (most recent call last):
File "revs-refresh.py", line 39, in <module>
main()
File "revs-refresh.py", line 36, in main
int(r[0]), int(r[1]), int(r[2]))
File "/root/src/ps2/svnstat.py", line 507, in do_refresh_revs_with_mysql_cache
ti = msgpack.unpacks(rc.info)['texts']
File "_msgpack.pyx", line 174, in msgpack._msgpack.unpackb(msgpack/_msgpack.c:1653)
TypeError: expected string or Unicode object, buffer found
I got the serialized data from mysql blob field, it's buffer type in Python. and buffer to string
converting is very slow. I done a small batchmark, msgpack is faster than bson(module from mongo db python driver), but msgpack is slower than bson when input is buffer object.
there's any flex/as3 language support for msgpack?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.