Coder Social home page Coder Social logo

make: git: Command not found about riak HOT 19 CLOSED

drnic avatar drnic commented on August 11, 2024
make: git: Command not found

from riak.

Comments (19)

jaredmorrow avatar jaredmorrow commented on August 11, 2024

The rebar we have is from October, 27th 2011 which is the correct version for Riak 1.1. Calling make will try rebar get-deps but that's not what you want to do if you download the source tarball because the dependencies are already included. Follow the installation page about building from source and see if your issues go away.

from riak.

drnic avatar drnic commented on August 11, 2024

The instructions say "make rel" which is what I'm doing.

I'll try compiling a new rebar and see if it helps, and report back.

from riak.

drnic avatar drnic commented on August 11, 2024

With rebar 3 I get this error during make rel:

make[3]: Entering directory `/var/vcap/data/compile/riak/riak-1.1.4/deps/erlang_js/c_src/nsprpub'
cd config; make -j1 export
make[4]: Entering directory `/var/vcap/data/compile/riak/riak-1.1.4/deps/erlang_js/c_src/nsprpub/config'
cc -m32 -o now.o -c      -Wall -O2 -fPIC  -UDEBUG  -DNDEBUG=1 -DHAVE_VISIBILITY_HIDDEN_ATTRIBUTE=1 -DHAVE_VISIBILITY_PRAGMA=1 -DXP_UNIX=1 -D_GNU_SOURCE=1 -DHAVE_FCNTL_FILE_LOCKING=1 -DLINUX=1 -Di386=1 -D_REENTRANT=1  -DFORCE_PR_LOG -D_PR_PTHREADS -UHAVE_CVAR_BUILT_ON_SEM   now.c
In file included from /usr/include/features.h:378,
                 from /usr/include/stdio.h:28,
                 from now.c:38:
/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory

from riak.

drnic avatar drnic commented on August 11, 2024

@jaredmorrow I don't understand what you mean "Calling make [is bad and don't do it]. Follow the installation page..." which includes make:

curl -O http://downloads.basho.com/riak/CURRENT/riak-1.1.4.tar.gz
tar zxvf riak-1.1.4.tar.gz
cd riak-1.1.4
make rel

from riak.

drnic avatar drnic commented on August 11, 2024

Going to try just make compile

from riak.

drnic avatar drnic commented on August 11, 2024

Bah.

+ set -e
+ set -u
+ set +x
make: git: Command not found
./rebar compile
erlexec: HOME must be set

from riak.

drnic avatar drnic commented on August 11, 2024

Ok, when I add a missing export HOME=/home/vcap installation of make compile goes smoothly until:

c_src/build_deps.sh: line 40: git: command not found
ERROR: Command [compile] failed!
make: *** [compile] Error 1

Last part of the output is at https://gist.github.com/7dffae4d7185f2ba99f3

from riak.

drnic avatar drnic commented on August 11, 2024

This error comes from deps/eleveldb/c_src/build_deps.sh:

        if [ ! -d leveldb ]; then
            git clone git://github.com/basho/leveldb
            (cd leveldb && git checkout $LEVELDB_VSN)
        fi

from riak.

drnic avatar drnic commented on August 11, 2024

Link into eleveldb source https://github.com/basho/eleveldb/blob/master/c_src/build_deps.sh#L51-54

from riak.

drnic avatar drnic commented on August 11, 2024

Do we need to bundle leveldb into riak's tarball? or into snappy's taball?

from riak.

jaredmorrow avatar jaredmorrow commented on August 11, 2024

Ah yes, that was a bug found in the build system for 1.1, I'll post a work around in a moment.

from riak.

jaredmorrow avatar jaredmorrow commented on August 11, 2024

The tarball for leveldb should be fetched during the build process when I generate the source tarball, but for Riak 1.1 eleveldb wasn't doing that. To work around that, fetch via zip the proper commit as specified in the build_deps.sh file.

test-1% cd deps/eleveldb/c_src/
test-1% wget --no-check-certificate https://github.com/basho/leveldb/zipball/14478f170bbe3d13bc0119d41b70e112b3925453
test-1% mv 14478f170bbe3d13bc0119d41b70e112b3925453 leveldb.zip
test-1% unzip leveldb.zip
test-1% mv basho-leveldb-14478f1 leveldb
test-1$ cd ../../../
test-1$ make rel

from riak.

drnic avatar drnic commented on August 11, 2024

Yay! Thanks @jaredmorrow you are a champ. I'm back to using make rel now. Awesome.

For any BOSH users, the packaging script I am using looks like:

#!/usr/bin/env bash

# This creates 5 copies of riak/riak-admin etc
# - /var/vcap/packages/riak/rel/bin/riak
# - /var/vcap/packages/riak/dev1/bin/riak
# - /var/vcap/packages/riak/dev2/bin/riak
# - /var/vcap/packages/riak/dev3/bin/riak
# - /var/vcap/packages/riak/dev4/bin/riak

set -e # exit immediately if a simple command exits with a non-zero status
set -u # report the usage of uninitialized variables
set +x

RIAK_VERSION=1.1.4
export HOME=/var/vcap
PATH=/var/vcap/packages/erlang/bin:$PATH

tar xzf riak/riak-${RIAK_VERSION}.tar.gz
cd riak-${RIAK_VERSION}

# riak-1.1.4 failed to contain leveldb
# https://github.com/basho/riak/issues/191
cd deps/eleveldb/c_src/
unzip ${BOSH_COMPILE_TARGET}/leveldb/leveldb-14478f17.zip
mv basho-leveldb-14478f1 leveldb

cd ${BOSH_COMPILE_TARGET}/riak-${RIAK_VERSION}
# make rel/riak
make rel

# output is in rel/riak
cp -prv rel/riak ${BOSH_INSTALL_TARGET}/rel

# https://wiki.basho.com/Building-a-Development-Environment.html
# make 4 copies of riak:
# - dev/dev1
# - dev/dev2
# - dev/dev3
# - dev/dev4
make devrel

# output is in dev1/riak, dev2/riak, dev3/riak, dev4/riak
cp -prv dev/* ${BOSH_INSTALL_TARGET}

from riak.

drnic avatar drnic commented on August 11, 2024

ah, sorry, didn't mean to close

from riak.

jaredmorrow avatar jaredmorrow commented on August 11, 2024

Closing now, will add to a recap for people who might not have git available.

from riak.

drnic avatar drnic commented on August 11, 2024

Was this fixed in 1.2.0?

from riak.

drnic avatar drnic commented on August 11, 2024
==> eleveldb (get-deps)
c_src/build_deps.sh: 81: git: not found
ERROR: Command ['get-deps'] failed!
make: *** [deps] Error 1

What leveldb is required for riak 1.2.0? I tried it with one above but got an error during installation.

from riak.

jaredmorrow avatar jaredmorrow commented on August 11, 2024

No it was not fixed in 1.2.0 as our build system depends on clean git checkouts and we didn't come up with a good way to pull in the leveldb C source code in with our erlang build tools in a clean / repeatable way. For 1.2, use the above instructions, but pull down the following zip file.

https://github.com/basho/leveldb/zipball/2aebdd9173a7840f9307e30146ac95f49fbe8e64

from riak.

drnic avatar drnic commented on August 11, 2024

Yep, that's the SHA I used I think. Thanks!

from riak.

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.