satori-com / mzbench

MZ Benchmarking
BSD 3-Clause "New" or "Revised" License
271 stars 78 forks source link

Fetching wrong version of jiffy #27

Closed pzenden closed 8 years ago

pzenden commented 8 years ago

Hi,

I tried to get mzbench working but failed due to the wrong version of jiffy being downloaded. I get this compiler error: .. c_src/double-conversion/bignum.cc: In member function ‘void double_conversion::Bignum::AssignDecimalString(double_conversion::Vector)’: c_src/double-conversion/bignum.cc:101:6: error: assuming signed overflow does not occur when assuming that (X + c) < X is always false [-Werror=strict-overflow] void Bignum::AssignDecimalString(Vector value) { ^ cc1plus: all warnings being treated as errors ERROR: compile failed while processing /home/zendenp/work/mzbench/mzbench/server/_build/default/deps/jiffy: rebar_abort Makefile:29: recipe for target 'build' failed ..

This is caused by the fact that the wrong jiffy package is loaded. The correct version is skipped: .. ===> Fetching goldrush ({git,"git://github.com/DeadZen/goldrush.git", {tag,"0.1.7"}})
===> Skipping jiffy (from {git,"git://github.com/davisp/jiffy.git", {tag,"0.14.2"}}) as an app of the same name has already been fetched
..

I verified that the file jiffy/c_src_double-conversion/bignum.cc is indeed not the latest version: .. void Bignum::AssignDecimalString(Vector value) { // 2^64 = 18446744073709551616 > 10^19 const int kMaxUint64DecimalDigits = 19; Zero(); int length = value.length(); int pos = 0; //<====== should be unsigned int pos = 0; // Let's just say that each digit needs 4 bits. while (length >= kMaxUint64DecimalDigits) { ...

Same of course happens when building the node software.

Running on Kubuntu 15.10 64-bit, Erlang/OTP 18.

Regards Paul

timofey-barmin commented 8 years ago

Hi, thank you for your report

I don't see "Skipping jiffy" line in my log. Could you please show us full log of the following command: cd mzbench/server && make clean && make generate

timofey-barmin commented 8 years ago

I've changed version of jiffy to 14.2 in jiffy-14-2 branch , could you please try to build server from this branch?

pzenden commented 8 years ago

Hi Timofey

Thanx for looking into it. I’ll check building from jiffy-14-2 branch later this day.

Here is the output:

zendenp@ubuntu:~/work/mzbench$ cd mzbench/server && make clean && make generate /home/zendenp/work/mzbench/mzbench/bin/rebar3 clean ===> Cleaning out mzbench_api... rm -rf _build rm -rf .make rm -rf .make/git-rev-* mkdir -p .make && touch .make/git-rev-d697ade987d65a05dc867d5ccc99d56ce715143a /home/zendenp/work/mzbench/mzbench/bin/rebar3 compile ===> Fetching rebar_rsync_deps ({git, "https://github.com/ethercrow/rebar3_rsync_resource", {ref, "53eb6aa50db8e0de7cf5833a48e48c205f5c8d56"}}) ===> Compiling rebar_rsync_deps /home/zendenp/work/mzbench/mzbench/server/_build/default/plugins/rebar_rsync_deps/src/rebar_rsync_resource.erl:14: Warning: variable 'Dir' is unused /home/zendenp/work/mzbench/mzbench/server/_build/default/plugins/rebar_rsync_deps/src/rebar_rsync_resource.erl:17: Warning: variable 'State' is unused /home/zendenp/work/mzbench/mzbench/server/_build/default/plugins/rebar_rsync_deps/src/rebar_rsync_resource.erl:29: Warning: variable 'Dir' is unused

===> Verifying dependencies... ===> Fetching cowboy ({git,"git://github.com/ninenines/cowboy.git", {ref, "90ae31998e8d0887b9efe4b441136ac047708bb9"}}) ===> Fetching erlcloud ({git,"git://github.com/gleber/erlcloud.git", {ref, "da1810425b5daf48f21aebed70a898737d7ee4de"}}) ===> Fetching gen_smtp ({git,"git://github.com/Vagabond/gen_smtp.git", {ref, "f62f2b7b99afdd9b6041e58043740af2f899da6c"}}) ===> Fetching hamcrest ({git, "git://github.com/hyperthunk/hamcrest-erlang", {ref, "908a24fda4a46776a5135db60ca071e3d783f9f6"}}) ===> Plugin header_generator not available. It will not be used. ===> Plugin eqc_resolver not available. It will not be used. ===> Fetching jiffy ({git,"git://github.com/davisp/jiffy.git", {ref,"137d3d94b6ee10001d761d412cbbe7f665680c98"}}) ===> Plugin rebar_gdb_plugin not available. It will not be used. ===> Fetching lager ({git,"git://github.com/basho/lager.git", {ref,"f65dde85523b6aa6a259db1c93518187ae366515"}}) ===> Fetching meck ({git,"https://github.com/eproxus/meck.git", {ref,"dde759050eff19a1a80fd854d7375174b191665d"}}) ===> Fetching mzbench_language ({rsync, "../common_apps/mzbench_language/"}) ===> Fetching mzbench_utils ({rsync,"../common_apps/mzbench_utils/"}) ===> Fetching cowlib ({git,"git://github.com/ninenines/cowlib.git", {ref, "0bd62c8920cd7c0f901207320f07229452cc5681"}}) ===> Fetching goldrush ({git,"git://github.com/DeadZen/goldrush.git", {ref, "64864ba7fcf40988361340e48680b49a2c2938cf"}}) ===> Fetching jsx ({git,"git://github.com/talentdeficit/jsx.git", {ref,"3074d4865b3385a050badf7828ad31490d860df5"}}) ===> Fetching lhttpc ({git,"git://github.com/talko/lhttpc", {ref, "2d01a5f9c7543b77bdd57f44c92e72801f46e423"}}) ===> Fetching pretty_errors ({git, "git://github.com/ethercrow/pretty_errors", {ref, "445d2aa1c10dd8e0fc1cc811b248a7494f838cc9"}}) ===> Fetching ranch ({git,"git://github.com/ninenines/ranch.git", {ref,"adf1822defc2b7cfdc7aca112adabfa1d614043c"}}) ===> Compiling cowlib ===> Compiling ranch ===> Compiling meck ===> Compiling lhttpc ===> Compiling jsx ===> Compiling erlcloud /home/zendenp/work/mzbench/mzbench/server/_build/default/deps/erlcloud/src/erlcloud_sdb.erl:336: Warning: erlang:now/0: Deprecated BIF. See the "Time and Time Correction in Erlang" chapter of the ERTS User's Guide for more information. /home/zendenp/work/mzbench/mzbench/server/_build/default/deps/erlcloud/src/erlcloud_sdb.erl:349: Warning: erlang:now/0: Deprecated BIF. See the "Time and Time Correction in Erlang" chapter of the ERTS User's Guide for more information.

/home/zendenp/work/mzbench/mzbench/server/_build/default/deps/erlcloud/src/erlcloud_util.erl:38: Warning: crypto:md5/1 is deprecated and will be removed in in a future release; use crypto:hash/2

===> Compiling gen_smtp /home/zendenp/work/mzbench/mzbench/server/_build/default/deps/gen_smtp/src/smtp_util.erl:65: Warning: crypto:md5_mac/2 is deprecated and will be removed in in a future release; use crypto:hmac/3 /home/zendenp/work/mzbench/mzbench/server/_build/default/deps/gen_smtp/src/smtp_util.erl:107: Warning: erlang:now/0: Deprecated BIF. See the "Time and Time Correction in Erlang" chapter of the ERTS User's Guide for more information. /home/zendenp/work/mzbench/mzbench/server/_build/default/deps/gen_smtp/src/smtp_util.erl:113: Warning: erlang:now/0: Deprecated BIF. See the "Time and Time Correction in Erlang" chapter of the ERTS User's Guide for more information.

/home/zendenp/work/mzbench/mzbench/server/_build/default/deps/gen_smtp/src/smtp_server_example.erl:134: Warning: erlang:now/0: Deprecated BIF. See the "Time and Time Correction in Erlang" chapter of the ERTS User's Guide for more information.

===> Compiling pretty_errors ===> Compiling mzbench_utils ===> Compiling goldrush ===> Compiling lager ===> Compiling jiffy ===> Compiling mzbench_language ===> Compiling hamcrest ===> Compiling cowboy ===> Compiling mzbench_api make -C _build/default/deps/jiffy # Until https://github.com/davisp/jiffy/issues/96 is resolved make[1]: Entering directory '/home/zendenp/work/mzbench/mzbench/server/_build/default/deps/jiffy' ==> jiffy (get-deps) Pulling proper from {git,"git://github.com/manopapad/proper.git","master"} Cloning into 'proper'... ==> proper (get-deps) ./rebar compile ==> proper (compile) make[2]: Entering directory '/home/zendenp/work/mzbench/mzbench/server/_build/default/deps/jiffy/deps/proper' ./write_compile_flags include/compile_flags.hrl make[2]: Leaving directory '/home/zendenp/work/mzbench/mzbench/server/_build/default/deps/jiffy/deps/proper' Compiled src/strip_types.erl Compiled src/vararg.erl Compiled src/proper_prop_remover.erl Compiled src/proper_transformer.erl Compiled src/proper_unused_imports_remover.erl Compiled src/proper_statem.erl Compiled src/proper_fsm.erl Compiled src/proper_dict.erl Compiled src/proper_queue.erl Compiled src/proper_orddict.erl Compiled src/proper_symb.erl Compiled src/proper_gb_sets.erl Compiled src/proper_gb_trees.erl Compiled src/proper_shrink.erl Compiled src/proper_ordsets.erl Compiled src/proper_unicode.erl Compiled src/proper.erl Compiled src/proper_sets.erl Compiled src/proper_gen.erl Compiled src/proper_arith.erl Compiled src/proper_array.erl Compiled src/proper_types.erl Compiled src/proper_typeserver.erl ==> jiffy (compile) Compiling c_src/decoder.c Compiling c_src/encoder.c Compiling c_src/jiffy.c Compiling c_src/utf8.c Compiling c_src/util.c Compiling c_src/doubles.cc Compiling c_src/double-conversion/bignum-dtoa.cc Compiling c_src/double-conversion/bignum.cc c_src/double-conversion/bignum.cc: In member function ‘void double_conversion::Bignum::AssignDecimalString(double_conversion::Vector)’: c_src/double-conversion/bignum.cc:101:6: error: assuming signed overflow does not occur when assuming that (X + c) < X is always false [-Werror=strict-overflow] void Bignum::AssignDecimalString(Vector value) { ^ cc1plus: all warnings being treated as errors ERROR: compile failed while processing /home/zendenp/work/mzbench/mzbench/server/_build/default/deps/jiffy: rebar_abort Makefile:29: recipe for target 'build' failed make[1]: * [build] Error 1 make[1]: Leaving directory '/home/zendenp/work/mzbench/mzbench/server/_build/default/deps/jiffy' Makefile:46: recipe for target '.make/compilation-up-to-date' failed make: * [.make/compilation-up-to-date] Error 2 zendenp@ubuntu:~/work/mzbench/mzbench/server$

pzenden commented 8 years ago

Hi Timofey,

Building the tiffy-12-2 branch works: zendenp@ubuntu:~/work/mzbench$ git clone -b jiffy-14-2 https://github.com/machinezone/mzbench mzbench_jiffy-14-2 Cloning into 'mzbench_jiffy-14-2'... remote: Counting objects: 6077, done. remote: Compressing objects: 100% (106/106), done. remote: Total 6077 (delta 47), reused 0 (delta 0), pack-reused 5971 Receiving objects: 100% (6077/6077), 4.88 MiB | 2.11 MiB/s, done. Resolving deltas: 100% (3976/3976), done. Checking connectivity... done. zendenp@ubuntu:~/work/mzbench$ ls mzbench mzbench_jiffy-14-2 zendenp@ubuntu:~/work/mzbench$ sudo pip install -r mzbench_jiffy-14-2/requirements.txt [sudo] password for zendenp: Requirement already satisfied (use --upgrade to upgrade): docopt>=0.6.2 in /usr/local/lib/python2.7/dist-packages (from -r mzbench_jiffy-14-2/requirements.txt (line 2)) Requirement already satisfied (use --upgrade to upgrade): requests>=2.7.0 in /usr/lib/python2.7/dist-packages (from -r mzbench_jiffy-14-2/requirements.txt (line 3)) Requirement already satisfied (use --upgrade to upgrade): erl-terms>=0.1.1 in /usr/local/lib/python2.7/dist-packages (from -r mzbench_jiffy-14-2/requirements.txt (line 4)) Requirement already satisfied (use --upgrade to upgrade): parsimonious in /usr/local/lib/python2.7/dist-packages (from erl-terms>=0.1.1->-r mzbench_jiffy-14-2/requirements.txt (line 4)) Cleaning up... zendenp@ubuntu:~/work/mzbench$ cd mzbench_jiffy-14-2/ zendenp@ubuntu:~/work/mzbench/mzbench_jiffy-14-2$ ./bin/mzbench start_server Executing make -C /home/zendenp/work/mzbench/mzbench_jiffy-14-2/bin/../server generate Executing /home/zendenp/work/mzbench/mzbench_jiffy-14-2/bin/../server/_build/default/rel/mzbench_api/bin/mzbench_api start zendenp@ubuntu:~/work/mzbench/mzbench_jiffy-14-2$ ./bin/mzbench run examples/ramp.erl { "status": "pending", "id": 1 }

status: complete 03:34 { "status": "complete", "finish_time": "2015-12-09T13:02:05Z", "start_time": "2015-12-09T12:58:32Z" }

Thanx.

timofey-barmin commented 8 years ago

ok, I will merge it then

timofey-barmin commented 8 years ago

done