Giter Club home page Giter Club logo

Comments (11)

andrewtj avatar andrewtj commented on August 22, 2024

Erlang R14B or later is needed to build ejson's NIF. You have R13B03 by the looks of that erts version.

Fix would be to replace:
{port_sources, ["c_src/.c", "c_src/yajl/.c"]}.
With:
{port_sources, [{"R14.+-.(darwin|linux|solaris)", "c_src/.c"},
{"R14.+-.(darwin|linux|solaris)", "c_src/yajl/.c"}]}.

In ejson's rebar.config.

from couchbeam.

abhinavsingh avatar abhinavsingh commented on August 22, 2024

Thanks Andrew, I initially solved the problem by hard fixing encode.c and decode.c (i need that then ;))
Anyways i tried your fix and works like a charm without any fix to *.c code files :)

from couchbeam.

abhinavsingh avatar abhinavsingh commented on August 22, 2024

Alas for some reason now my couchbeam make has started given error because of ejson rebar.config changes:

==> ejson (get-deps)
==> oauth (get-deps)
==> ibrowse-2.1.3 (get-deps)
==> couchbeam (get-deps)
==> ejson (compile)
ERROR: compile failed while processing /home/abhinavsingh/Desktop/couchbeam/deps/ejson: {'EXIT',{function_clause,[{filelib,wildcard,
[{"R14.+-.(darwin|linux|solaris)",
"c_src/.c"}]},
{rebar_port_compiler,expand_sources,2},
{rebar_port_compiler,compile,2},
{rebar_core,run_modules,4},
{rebar_core,execute,4},
{rebar_core,process_dir,4},
{rebar_core,process_each,5},
{rebar_core,process_dir,4}]}}make: *** [compile] Error 1

$> cat deps/ejson/rebar.config
{port_sources, [{"R14.+-.(darwin|linux|solaris)", "c_src/.c"}, {"R14.+-.(darwin|linux|solaris)", "c_src/yajl/.c"}]}.
{so_name, "ejson.so"}.

{port_envs, [
%% Make sure to link -lstdc++ on linux or solaris
{"(linux|solaris)", "LDFLAGS", "$LDFLAGS -lstdc++"}

]}.

from couchbeam.

andrewtj avatar andrewtj commented on August 22, 2024

I would suspect that the version of rebar being used predates the addition of that rebar.config option. Unfortunately there is no versioning of rebar so I can't nominate the release this feature was added.

from couchbeam.

benoitc avatar benoitc commented on August 22, 2024

On Tue, May 3, 2011 at 4:13 AM, andrewtj
[email protected]
wrote:

Erlang R14B or later is needed to build ejson's NIF. You have R13B03 by the looks of that erts version.

Fix would be to replace:

{port_sources, ["c_src/*.c", "c_src/yajl/*.c"]}.

With:

{port_sources, [{"R14.+-.*(darwin|linux|solaris)", "c_src/*.c"},
               {"R14.+-.*(darwin|linux|solaris)", "c_src/yajl/*.c"}]}.

In ejson's rebar.config.

Reply to this email directly or view it on GitHub:
#49 (comment)

It looks like ejson hve been updated to support erlang rb013. I will
port latest changes today, but couchbeam should definitely works on
r13b03 :)

  • benoît

from couchbeam.

abhinavsingh avatar abhinavsingh commented on August 22, 2024

Thanks Benoitc, looking forward for the same.

from couchbeam.

benoitc avatar benoitc commented on August 22, 2024

fixed in bee8109 . Thanks to @AndrewJT for the tip. I fixed build on ejson, also clean the sources. You need to clean all deps for retry since the ejson repo has been completly renewed.

from couchbeam.

sharp avatar sharp commented on August 22, 2024

Dear benoitc sir, got the same error in couchbeam-0.7.1 :(

from couchbeam.

sharp avatar sharp commented on August 22, 2024

This is my rebar config

{deps, [
      {pkt, ".*", {git, "git://github.com/msantos/pkt.git", "master"}},
      {ibrowse, "2.1.3", {git, "git://github.com/cmullaparthi/ibrowse.git", {tag, "v2.1.3"}}},
      {couchbeam, "0.7.1", {git, "git://github.com/benoitc/couchbeam.git", {tag, "0.7.1"}}}
    ]}.

from couchbeam.

benoitc avatar benoitc commented on August 22, 2024

are you using last rebar ?

from couchbeam.

sharp avatar sharp commented on August 22, 2024

Thanks! it works with new version rebar

from couchbeam.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.