Closed benoitc closed 8 years ago
@benoitc CI have failed due to https://travis-ci.org/leo-project/erocksdb/builds/105296933#L825.
We need to build the rocksdb beforehand to retrieve the PLATFORM_LDFLAGS
from c_src/rocksdb/${BUILD_CONFIG}
and pass it to rebar compile
as an environment variable somehow.
PLATFORM_LDFLAGS="`cat c_src/rocksdb/${BUILD_CONFIG} |grep PLATFORM_LDFLAGS| awk -F= '{print $$2}'|sed -e 's/-lsnappy//'`" ./rebar compile
I saw that, not sure right now how to fix it. Maybe handling it in a rebar.config.script?
@benoitc
I saw that, not sure right now how to fix it. Maybe handling it in a rebar.config.script?
Maybe.
Since port_envs
can be used instead of environment variables which are handled in https://github.com/rebar/rebar/blob/master/src/rebar_port_compiler.erl#L178,
In rebar.config.script
, executing build_deps.sh
then tweaking port_envs
to add PLATFORM_LDFLAGS
seems to work.
I've solved this issue in https://github.com/project-fifo/erocksdb/blob/r3/rebar.config.script It works around the checkout issue by putting the resolve phase into the compile time not the variable generation time.
Since https://github.com/leo-project/erocksdb/pull/21 have solved this problem, I close this one.
this fix the build with tools like erlang.mk.