szktty / erlang-lz4 Goto Github PK
View Code? Open in Web Editor NEWLZ4 bindings for Erlang
LZ4 bindings for Erlang
Hi,
Would you please consider publishing a new tag (0.2.5?) from the version of the software in the develop branch that contains simplification of native code compilation?
> DEBUG=1 rebar3 compile
# ...
failed with return code 1 and the following output:
ld: library not found for -lerl_interface
clang: error: linker command failed with exit code 1 (use -v to see invocation)
lerl_interface is deprecated by the looks of things https://www.erlang.org/news/tag/release
The package in Hex.pm includes OSX (Mach-O) objectfiles. These files break the build on any non-OSX platform. On Linux, I see
$ DEBUG=1 mix deps.compile lz4
===> Expanded command sequence to be run: []
===> Expanded command sequence to be run: [{default,app_discovery},
{bare,compile}]
===> Compiling lz4
===> sh info:
cwd: "/vagrant/deps/lz4"
cmd: make -C c_src
===> opts: [use_stdout,
{cd,"/vagrant/deps/lz4"},
{env,[{"REBAR_DEPS_DIR","/vagrant/deps/lz4/_build/default/lib"},
{"REBAR_BUILD_DIR","/vagrant/deps/lz4/_build/default"},
{"REBAR_ROOT_DIR","/vagrant/deps/lz4/."},
{"REBAR_CHECKOUTS_DIR","/vagrant/deps/lz4/_checkouts"},
{"REBAR_PLUGINS_DIR",
"/vagrant/deps/lz4/_build/default/plugins"},
{"REBAR_GLOBAL_CONFIG_DIR",
"/home/vagrant/.config/rebar3"},
{"REBAR_GLOBAL_CACHE_DIR","/home/vagrant/.cache/rebar3"},
{"REBAR_TEMPLATE_DIR",
"/home/vagrant/.config/rebar3/templates"},
{"REBAR_APP_DIRS",
"/vagrant/deps/lz4/_build/default/apps/*:/vagrant/deps/lz4/_build/default/lib/*:/vagrant/deps/lz4/_build/default/."},
{"REBAR_SRC_DIRS",[]},
{"ERLANG_ERTS_VER","9.1"},
{"ERLANG_ROOT_DIR","/usr/lib64/erlang"},
{"ERLANG_LIB_DIR_erl_interface",
"/usr/lib64/erlang/lib/erl_interface-3.10"},
{"ERLANG_LIB_VER_erl_interface","3.10"},
{"ERL","/usr/lib64/erlang/bin/erl"},
{"ERLC","/usr/lib64/erlang/bin/erlc"},
{"ERLANG_ARCH","64"},
{"ERLANG_TARGET","20.1-x86_64-redhat-linux-gnu-64"}]},
{abort_on_error,"Hook for compile failed!\n"}]
===> Port Cmd: make -C c_src
Port Opts: [{cd,"/vagrant/deps/lz4"},
{env,[{"REBAR_DEPS_DIR","/vagrant/deps/lz4/_build/default/lib"},
{"REBAR_BUILD_DIR","/vagrant/deps/lz4/_build/default"},
{"REBAR_ROOT_DIR","/vagrant/deps/lz4/."},
{"REBAR_CHECKOUTS_DIR","/vagrant/deps/lz4/_checkouts"},
{"REBAR_PLUGINS_DIR",
"/vagrant/deps/lz4/_build/default/plugins"},
{"REBAR_GLOBAL_CONFIG_DIR","/home/vagrant/.config/rebar3"},
{"REBAR_GLOBAL_CACHE_DIR","/home/vagrant/.cache/rebar3"},
{"REBAR_TEMPLATE_DIR",
"/home/vagrant/.config/rebar3/templates"},
{"REBAR_APP_DIRS",
"/vagrant/deps/lz4/_build/default/apps/*:/vagrant/deps/lz4/_build/default/lib/*:/vagrant/deps/lz4/_build/default/."},
{"REBAR_SRC_DIRS",[]},
{"ERLANG_ERTS_VER","9.1"},
{"ERLANG_ROOT_DIR","/usr/lib64/erlang"},
{"ERLANG_LIB_DIR_erl_interface",
"/usr/lib64/erlang/lib/erl_interface-3.10"},
{"ERLANG_LIB_VER_erl_interface","3.10"},
{"ERL","/usr/lib64/erlang/bin/erl"},
{"ERLC","/usr/lib64/erlang/bin/erlc"},
{"ERLANG_ARCH","64"},
{"ERLANG_TARGET","20.1-x86_64-redhat-linux-gnu-64"}]},
exit_status,
{line,16384},
use_stdio,stderr_to_stdout,hide,eof]
make: Entering directory `/vagrant/deps/lz4/c_src'
cc /vagrant/deps/lz4/c_src/lz4.o /vagrant/deps/lz4/c_src/lz4_nif.o /vagrant/deps/lz4/c_src/lz4hc.o -shared -L /usr/lib64/erlang/lib/erl_interface-3.10/lib -lerl_interface -lei -o /vagrant/deps/lz4/c_src/../priv/lz4.so
/vagrant/deps/lz4/c_src/lz4.o: file not recognized: File format not recognized
collect2: error: ld returned 1 exit status
make: *** [/vagrant/deps/lz4/c_src/../priv/lz4.so] Error 1
make: Leaving directory `/vagrant/deps/lz4/c_src'
===> Hook for compile failed!
** (Mix) Could not compile dependency :lz4, "/home/vagrant/.mix/rebar3 bare compile --paths "/vagrant/_build/dev/lib/*/ebin"" command failed. You can recompile this dependency with "mix deps.compile lz4", update it with "mix deps.update lz4" or clean it with "mix deps.clean lz4"
$ file /vagrant/deps/lz4/c_src/lz4.o
/vagrant/deps/lz4/c_src/lz4.o: Mach-O 64-bit object
Grabbing lz4 from github works well.
===> Compiling lz4
make: Entering directory '/var/www/diamond_web/deps/lz4/c_src'
cc /var/www/diamond_web/deps/lz4/c_src/lz4hc.o /var/www/diamond_web/deps/lz4/c_src/lz4_nif.o /var/www/diamond_web/deps/lz4/c_src/lz4.o -shared -L /usr/local/lib/erlang/lib/erl_interface-3.11.3/lib -lerl_interface -lei -o /var/www/diamond_web/deps/lz4/c_src/../priv/lz4.so
/var/www/diamond_web/deps/lz4/c_src/lz4hc.o: file not recognized: file format not recognized
collect2: error: ld returned 1 exit status
make: *** [Makefile:58: /var/www/diamond_web/deps/lz4/c_src/../priv/lz4.so] Error 1
make: Leaving directory '/var/www/diamond_web/deps/lz4/c_src'
===> Hook for compile failed!
** (Mix) Could not compile dependency :lz4, "/home/www-data/.mix/rebar3 bare compile --paths "/var/www/diamond_web/_build/dev/lib/*/ebin"" command failed. You can recompile this dependency with "mix deps.compile lz4", update it with "mix deps.update lz4" or clean it with "mix deps.clean lz4"
Hi Tetsuya
There is a new security fix for 32-bits system available at :
https://github.com/Cyan4973/lz4/releases/latest
The issue affects programs accepting very large data blocks in 32-bits mode.
As a security measure, all binders are invited to upgrade their underlying C source code to latest version.
Regards
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.