Coder Social home page Coder Social logo

kerl's Introduction

kerl GitHub Actions CI GitHub Actions Lint

Easy building and installing of Erlang/OTP instances.

kerl aims to be shell agnostic (it runs in a POSIX shell) and its only dependencies, excluding what's required to actually build Erlang/OTP, are curl and git.

All is done so that, once a specific release has been built, creating a new installation is as fast as possible.

Table of Contents

Installing kerl

If you are on macOS, and using homebrew, you can install kerl, along with shell completion, by running:

$ brew install kerl

Alternatively, you can download the script directly from GitHub:

$ curl -O https://raw.githubusercontent.com/kerl/kerl/master/kerl

Then ensure it is executable

$ chmod a+x kerl

and drop it in your $PATH.

Optionally, download and install kerl's bash_completion file from https://github.com/kerl/kerl/raw/master/bash_completion/kerl

Optionally, download and install kerl's zsh-completion file from https://github.com/kerl/kerl/raw/master/zsh_completion/_kerl

Updating kerl locally

Run:

$ kerl upgrade
Local kerl found (/usr/local/bin/kerl) at version 2.6.0.
Remote kerl found at version 3.0.0.
Versions are different. Upgrading to 3.0.0...
kerl 2.6.0 is now available at /usr/local/bin/kerl.
Updating list of available releases...
... done!

How kerl works

kerl keeps tracks of the releases it downloads, builds and installs, allowing easy installations to new destinations (without complete rebuilding) and easy switches between Erlang/OTP installations.

By default, kerl downloads source tarballs from the official Erlang/OTP repository but you can tell kerl to download from the official Erlang/OTP website by setting KERL_BUILD_BACKEND=tarball. However, this website does not use HTTPS and is down more often than GitHub.

You can also install directly from a raw Git repository by using the kerl build git <git_url> <git_version> <build_name> syntax.

Using kerl

List the available releases:

$ kerl list releases
17.5.6.10
18.3.4.11
19.3.6.13
20.3.8.26
21.3.8.24
22.3.4.26
23.3.4.19
24.3.4.13 *
25.3.2.6 *
26.1 *
Run './kerl update releases' to update this list.
Run './kerl list releases all' to view all available releases.
Note: * means "currently supported".

Pick your choice and build it:

$ kerl build 25.3 25.3
Downloading (from GitHub) Erlang/OTP 25.3 to /home/user/.kerl/archives...
...
Extracting source code for normal build...
Building (normal) Erlang/OTP 25.3 (25.3); please wait...
...
Erlang/OTP 25.3 (25.3) has been successfully built.

Note that named builds allow you to have different builds for the same Erlang/OTP release with different configure options:

$ KERL_BUILD_DOCS=yes kerl build 25.3 25.3-builtdocs
Extracting source code for normal build...
Building Erlang/OTP 25.3 (25.3-builtdocs); please wait...
...
Building docs...
Erlang/OTP 25.3 (25.3-builtdocs) has been successfully built.

You can verify your build has been registered:

$ kerl list builds
25.3,25.3
25.3,25.3-builtdocs

Now install a build to some location:

$ kerl install 25.3 /usr/local/lib/erlang/25.3
Installing Erlang/OTP 25.3 (25.3) in /usr/local/lib/erlang/25.3...
Building Dialyzer PLT...
Done building /usr/local/lib/erlang/25.3/dialyzer/plt.
You can activate this installation running the following command:
. /usr/local/lib/erlang/25.3/activate
Later on, you can leave the installation typing:
kerl_deactivate

Here again you can check the installation's been registered:

$ kerl list installations
25.3 /usr/local/lib/erlang/25.3

And at last activate it:

$ . /usr/local/lib/erlang/25.3/activate

Activation will backup your $PATH, and prepend it with the installation's bin/ directory. Thus it's only valid for the current shell session, and until you either activate another installation or call kerl_deactivate.

Note: alternatively you can use kerl build-install as a shortcut for the two previous actions to be played in sequence.

$ kerl build-install
usage: ./kerl build-install <release> [build_name] [directory]
$ kerl build-install git
usage: ./kerl build-install git <git_url> <git_version> <build_name> [directory]

You're now ready to work with your 25.3 installation:

$ erl -version
Erlang (SMP,ASYNC_THREADS) (BEAM) emulator version 13.2

When you're done just call the shell function:

$ kerl_deactivate

Anytime you can check which installation, if any, is currently active with:

$ kerl active
The current active installation is:
/usr/local/lib/erlang/25.3

You can get an overview of the current kerl state with:

$ kerl status
Available builds:
25.3,25.3
25.3,25.3-builtdocs
----------
Available installations:
25.3 /usr/local/lib/erlang/25.3
----------
The current active installation is:
/usr/local/lib/erlang/25.3
The Dialyzer PLT for the active installation is:
/usr/local/lib/erlang/25.3/dialyzer/plt
The build options for the active installation are:
...

You can delete builds and installations with the following commands:

$ kerl delete build 25.3-builtdocs
Build '25.3-builtdocs' has been deleted.
$ kerl delete installation 25.3
Installation '25.3' has been deleted.

You can easily deploy an installation to another host having ssh and rsync access with the following command:

$ kerl deploy anotherhost /usr/local/lib/erlang/25.3
Cloning Erlang/OTP 25.3 (/usr/local/lib/erlang/25.3) to anotherhost (/usr/local/lib/erlang/25.3)...

On anotherhost, you can activate this installation running the following command:

$ . /usr/local/lib/erlang/25.3/activate

Later on, you can leave the installation typing:

$ kerl_deactivate

Building Erlang/OTP from a GitHub fork

It is possible to build Erlang/OTP from a GitHub fork, by using the KERL_BUILD_BACKEND=git and setting OTP_GITHUB_URL to the URL of the fork. For example, to build <orgname>'s Erlang/OTP fork:

$ export KERL_BUILD_BACKEND=git
$ export OTP_GITHUB_URL='https://github.com/<orgname>/otp'
$ KERL_INCLUDE_RELEASE_CANDIDATES=yes kerl update releases
Getting releases from GitHub...
The available releases are:
24.0-rc1 *
24.0-rc1.1-orgname *
...
24.3.4.13 *
24.3.4.13.1-orgname *
25.0-rc1 *
...
25.3.2.3 *
26.0-rc1 *
26.0-rc1.1-orgname *
...
26.0.2 *

Note: this list, kept in a file managed by kerl, is different depending on the build backend you use.

From here (provided the KERL_BUILD_BACKEND and OTP_GITHUB_URL variables remain in place), it is possible to use kerl as before:

$ kerl build 26.0-rc1.1-orgname 26.0-rc1.1-orgname

Building Erlang/OTP from a Git source

You can build Erlang/OTP directly from a Git repository with a command of the form kerl build git <git_url> <git_version> <build_name> where <git_version> can be either a branch, a tag or a commit id that will be passed to git checkout:

$ kerl build git https://github.com/erlang/otp.git OTP-24.3.4.13 24.3.4.13
Checking out Erlang/OTP git repository from https://github.com/erlang/otp.git...
Building (git) Erlang/OTP OTP-24.3.4.13; please wait...
Erlang/OTP '25.3' (from git) has been successfully built.

Debugging kerl usage

If KERL_DEBUG is set to a value, then kerl will emit copious debug logging, including a best effort attempt at line numbers. The line numbers may or may not be accurate if kerl is run under the dash shell, as is commonly found in Alpine Linux/Docker images.

Configuring kerl

You can tune kerl using the .kerlrc file in your $HOME directory.

kerl options

kerl options can be passed either via .kerlrc or environment variables, as shown below.

Color configuration

KERL_COLORIZE

Default: 1 (Enabled) Enable VT100 colorizing if tput available (provided by ncurses). Set to 0 to disable. Colorization will be disabled anyway if necessary requirements are missing.

Color for log levels can be overriden, by setting ANSI numerical color code to variables KERL_COLOR_* :

  • KERL_COLOR_E : (1=red) Error level color
  • KERL_COLOR_W : (3=yellow) Warning level color
  • KERL_COLOR_N : (4=blue) Notice level color
  • KERL_COLOR_T : (6=cyan) Tip level color
  • KERL_COLOR_S : (2=green) Success level color
  • KERL_COLOR_D : (9) Default Terminal color

Locations on disk

KERL_BASE_DIR

Default: $HOME/.kerl Directory in which kerl will cache artifacts for building and installing.

KERL_CONFIG

Default: $HOME/.kerlrc File from which to source kerl configuration

KERL_DOWNLOAD_DIR

Default: ${KERL_BASE_DIR}/archives Directory in which to place downloaded artifacts

KERL_BUILD_DIR

Default: ${KERL_BASE_DIR}/builds Directory in which kerl will perform builds

KERL_GIT_DIR

Default: ${KERL_BASE_DIR}/gits Directory in which kerl will clone Git repositories for building.

Build configuration

KERL_CHECK_BUILD_PACKAGES

Default: yes (Enabled) kerl will try to probe your Linux distro for build-required packages logging where the probes fail. You can turn off this behaviour by setting the environment variable to something other than "yes".

KERL_AUTOCLEAN

Default: 1 (Enabled) Clean all build artifacts but the log file on failure. This allows safe build retries after failure while still keeping a log file with all attempted builds until success.

Set to 0 to keep build artifacts on failure.

KERL_CONFIGURE_OPTIONS

Space-separated options to pass to configure when building Erlang/OTP.

KERL_CONFIGURE_APPLICATIONS

Space-separated list of Erlang/OTP applications which should exclusively be built.

KERL_CONFIGURE_DISABLE_APPLICATIONS

Space-separated list of Erlang/OTP applications to disable during building.

KERL_BUILD_PLT

Create a PLT file alongside the built release.

KERL_USE_AUTOCONF

Use autoconf during build process.

Note: automatically enabled when using KERL_BUILD_BACKEND=git

KERL_BUILD_BACKEND

Default value: git Acceptable values: tarball, git

  • tarball: fetch Erlang/OTP releases from <erlang.org>
  • git: fetch Erlang/OTP releases from $OTP_GITHUB_URL

Note: docs are only fetched when this is set to tarball. To enable creation of docs when set to git, one must also set $KERL_BUILD_DOCS.

Note: this option has no effect when using kerl build git..., which invokes kerl to directly clone a Git repository and build from there.

KERL_RELEASE_TARGET

Allows building, alongside the regular VM, a list of various runtime types for debugging (such as cerl -debug or cerl -asan)

Note: enable this build using KERL_RELEASE_TARGET="debug asan"

Note: available types: opt, gcov, gprof, debug, valgrind, asan or lcnt

For more information: see "How to Build a Debug Enabled Erlang RunTime System" in https://www.erlang.org/doc/installation_guide/install.

OTP_GITHUB_URL

Default value: https://github.com/erlang/otp Acceptable value: any GitHub fork of Erlang/OTP

KERL_BUILD_DOCS

If $KERL_BUILD_DOCS is set, kerl will create docs from the built Erlang/OTP version regardless of origin (tarball backend from <erlang.org> or via kerl build git, or via git backend).

If $KERL_BUILD_DOCS is unset, kerl will only install docs when not installing a build created via kerl build git..., and according to KERL_INSTALL_HTMLDOCS and KERL_INSTALL_MANPAGES.

KERL_DOC_TARGETS

Default: chunks Available targets:

  • man: install manpage docs.
  • html: install HTML docs.
  • pdf: install PDF docs.
  • chunks: install the "chunks" format to get documentation from the erl REPL.

You can set multiple type of targets separated by space, example $KERL_DOC_TARGETS="man html pdf chunks"

KERL_INSTALL_MANPAGES

Install man pages when not building from Git source.

It's noteworthy that when not using KERL_BUILD_DOCS=yes, the docset that may be downloaded can be up to 120 MB.

KERL_INSTALL_HTMLDOCS

Install HTML documentation when not building from Git source.

It's noteworthy that when not using KERL_BUILD_DOCS=yes, the docset that may be downloaded can be up to 120 MB.

KERL_SASL_STARTUP

Build Erlang/OTP to use SASL startup instead of minimal (default, when var is unset).

Activation configuration

The following applies when activating an installation (i.e. . ${KERL_DEFAULT_INSTALL_DIR}/19.2/activate).

KERL_ENABLE_PROMPT

When set, automatically prefix the shell prompt with a section containing the Erlang/OTP version (see $KERL_PROMPT_FORMAT ).

KERL_PROMPT_FORMAT

Default: (%BUILDNAME%) Available variables:

  • %BUILDNAME%: name of the kerl build (e.g. my_test_build_18.0)
  • %RELEASE%: name of the Erlang/OTP release (e.g. 19.2 or R16B02)

The format of the prompt section to add.

Installation configuration

KERL_DEFAULT_INSTALL_DIR

Effective when calling kerl install <build> with no installation location argument.

If unset, $PWD is used.

If set, install the build under $KERL_DEFAULT_INSTALL_DIR/${buildname}.

KERL_APP_INSTALL_DIR

Effective when calling kerl upgrade. This is the folder where the kerl application resides.

If unset, $PWD is used.

If set, kerl is installed at $KERL_APP_INSTALL_DIR/kerl.

KERL_DEPLOY_SSH_OPTIONS + KERL_DEPLOY_RSYNC_OPTIONS

Options passed to ssh and rsync during kerl deploy tasks.

Command reference

You can also get information on the following by executing kerl (no parameters) on your shell.

build

$ kerl build <release> [build_name]
$ # or
$ kerl build git <git_url> <git_version> <build_name>

Creates a named build either from an official Erlang/OTP release or from a git repository.

$ kerl build 25.3 25.3
$ #or
$ kerl build git https://github.com/erlang/otp.git OTP-24.3.4.13 24.3.4.13

Tuning

Configure options

You can specify the configure options to use when building Erlang/OTP with the KERL_CONFIGURE_OPTIONS variable, either in your $HOME/.kerlrc file or prepending it to the command line. A full list of all options can be found the in Erlang/OTP documentation.

Configure applications

If non-empty, you can specify the subset of applications to use when building (and subsequent installing) Erlang/OTP with the KERL_CONFIGURE_APPLICATIONS variable, either in your $HOME/.kerlrc file or prepending it to the command line.

$ KERL_CONFIGURE_APPLICATIONS="kernel stdlib sasl" kerl build 25.0.3 25.0.3-minimal
Configure disable applications

If non-empty, you can specify the subset of applications to disable when building (and subsequent installing) Erlang/OTP with the KERL_CONFIGURE_DISABLE_APPLICATIONS variable, either in your $HOME/.kerlrc file or prepending it to the command line.

$ KERL_CONFIGURE_DISABLE_APPLICATIONS="odbc" kerl build 24.3.4.13 24.3.4.13-no-odbc
Enable autoconf

You can enable the use of autoconf in the build process setting KERL_USE_AUTOCONF=yes in your $HOME/.kerlrc file.

Note: autoconf is always enabled for Git builds.

Using shell export command in .kerlrc

Configure variables which includes spaces such as those in CFLAGS cannot be passed on with KERL_CONFIGURE_OPTIONS. In such a case you can use shell export command to define the environment variables for ./configure. Note well: this method has a side effect to change your shell execution environment after activating a kerl installation of Erlang/OTP. Here is an example of .kerlrc for building Erlang/OTP for FreeBSD with clang compiler:

$ # for clang
$ export CC=clang CXX=clang CFLAGS="-g -O3 -fstack-protector" LDFLAGS="-fstack-protector"
$ # compilation options
$ KERL_CONFIGURE_OPTIONS="--disable-native-libs --enable-vm-probes --with-dynamic-trace=dtrace --with-ssl=/usr/local --with-javac --enable-hipe --enable-kernel-poll --with-wx-config=/usr/local/bin/wxgtk2u-2.8-config --without-odbc --enable-threads --enable-sctp --enable-smp-support"

In case you cannot access the default directory for temporary files (/tmp) or simply want them somewhere else, you can also provide your own directory with the variable TMP_DIR.

$ export TMP_DIR=/your/custom/temporary/dir

Building documentation

Prior to kerl 1.0, kerl always downloaded prepared documentation from erlang.org. Now if KERL_BUILD_DOCS=yes is set, kerl will build the man pages and HTML documentation from the source repository in which it is working.

Note: this variable takes precedent over the other documentation parameters.

install

Installing a build

$ kerl install <build_name> [directory]

Installs a named build to the specified filesystem location.

$ kerl install 25.3 /usr/local/lib/erlang/25.3

If path is omitted the current working directory will be used. However, if KERL_DEFAULT_INSTALL_DIR is defined in $HOME/.kerlrc, KERL_DEFAULT_INSTALL_DIR/<build-name> will be used instead.

Install location restrictions

Warning: kerl assumes the given installation directory is for its sole use. If you later delete it with the kerl delete command, the whole directory will be deleted, along with anything you may have added to it!

So only install kerl in an empty (or non-existant) directory.

If you attempt to install kerl in $HOME or .erlang or $KERL_BASE_DIR, then kerl will give you an error and refuse to proceed. If you try to install kerl in a directory that exists and is not empty, kerl will give you an error.

Tuning
SASL startup

You can have SASL started automatically setting KERL_SASL_STARTUP=yes in your $HOME/.kerlrc file or prepending it to the command line.

Manpages installation

You can have manpages installed automatically setting KERL_INSTALL_MANPAGES=yes in your $HOME/.kerlrc file or prepending it to the command line.

Note: for Git-based builds, you want to set KERL_BUILD_DOCS=yes

HTML docs installation

You can have HTML docs installed automatically setting KERL_INSTALL_HTMLDOCS=yes in your $HOME/.kerlrc file or prepending it to the command line.

Note: for Git-based builds, you want to set KERL_BUILD_DOCS=yes

Documentation installation

Man pages will be installed to [path]/man and HTML docs will be installed in [path]/html. The kerl activate script manipulates the MANPATH of the current shell such that man 3 gen_server or erl -man gen_server should work perfectly.

Do not fret - kerl_deactivate restores your shell's MANPATH to whatever its original value was.

deploy

$ kerl deploy <[user@]host> [directory] [remote_directory]

Deploys the specified installation to the given host and location.

$ kerl deploy anotherhost /path/to/install/dir

If [remote_directory] is omitted the specified [directory] will be used.

If both [directory] and [remote_directory] are omitted the current working directory will be used.

NOTE: kerl assumes the specified host is accessible via ssh and rsync.

Tuning

Additional SSH options

You can have additional options given to ssh by setting them in the KERL_DEPLOY_SSH_OPTIONS variable in your $HOME/.kerlrc file or on the command line, e.g. KERL_DEPLOY_SSH_OPTIONS='-qx -o PasswordAuthentication=no'.

Additional RSYNC options

You can have additional options given to rsync by setting them in the KERL_DEPLOY_RSYNC_OPTIONS variable in your $HOME/.kerlrc file or on the command line, e.g. KERL_DEPLOY_RSYNC_OPTIONS='--delete'.

update

$ kerl update releases

If KERL_BUILD_BACKEND=tarball this command fetches the up-to-date list of Erlang/OTP releases from erlang.org.

If it is set to KERL_BUILD_BACKEND=git this command fetches an up-to-date list of Erlang/OTP tags from the official Erlang/OTP GitHub repository.

Note: the output of this function can be tweaked with KERL_INCLUDE_RELEASE_CANDIDATES=yes to print release candidates.

list

$ kerl list <releases|builds|installations> [all]

Lists the releases, builds or installations available.

When listing releases (without option all), the following applies:

  • no release candidates are shown, unless you set environment variable KERL_INCLUDE_RELEASE_CANDIDATES to yes
  • no "very old" releases are shown (depends on the current kerl version)
  • versions included in the support policy are flagged with *

Note: using all means all available releases are shown without filters.

delete

$ kerl delete build <build_name>
$ # or
$ kerl delete installation <build_name|directory>

Deletes the specified build or installation.

$ kerl delete build 25.3
The 25.3 build has been deleted
$ kerl delete installation /usr/local/lib/erlang/25.3
The installation in /usr/local/lib/erlang/25.3 has been deleted

active

$ kerl active

Prints the path of the currently active installation, if any.

$ kerl active
The current active installation is:
/usr/local/lib/erlang/25.3

status

$ kerl status

Prints the available builds and installations as well as the currently active installation.

$ kerl status
Available builds:
25.3,25.3
25.3,25.3-builtdocs
----------
Available installations:
25.3 /usr/local/lib/erlang/25.3
----------
The current active installation is:
/usr/local/lib/erlang/25.3
Dialyzer PLT for the active installation is:
/usr/local/lib/erlang/25.3/dialyzer/plt
The build options for the active installation are:
...

path

$ kerl path [installation]

Prints the path of the currently active installation if one is active. When given an installation name, it will return the path to that installation location on disk. This makes it useful for automation without having to run kerl's output through other tools to extract to path information.

$ kerl path
No active kerl-managed erlang installation
$ kerl path 24.3.3
/usr/local/lib/erlang/24.3.3

build-install

$ kerl build-install <release> [build_name] [directory]
kerl build-install git <git_url> <git_version> <build_name> [directory]

Combines kerl build and kerl install into a single command.

plt

Prints Dialyzer PLT path for the active installation.

prompt

Prints a string suitable for insertion in prompt.

cleanup

$ kerl cleanup <build_name|all>

Remove compilation artifacts (use after installation), for a given build or for "all".

emit-activate

$ kerl emit-activate <release> <build_name> <directory> [sh|bash|fish|csh]

Print the activate script, as generated by kerl.

Note: the output defaults to shell sh (also bash), as per file activate. To emit activate.fish, or activate.csh, set the last argument to fish or csh, respectively.

version

Prints current version.

Important notes

Note on .kerlrc

Since .kerlrc is a dot file for /bin/sh, running shell commands inside the .kerlrc will affect the shell and environment variables for the commands being executed later. For example, the shell export commands in .kerlrc will affect your login shell environment when activating curl. Use with care.

Shell support

fish

kerl has basic support for the fish shell.

To activate an installation:

$ source /path/to/install/dir/activate.fish

Deactivation is the same as in other shells:

$ kerl_deactivate

C

kerl has basic support for the C shells (csh, tcsh, etc.).

To activate an installation:

$ source /path/to/install/dir/activate.csh

The activation script sources file .kerlrc.csh instead of .kerlrc.

Deactivation is the same as in other shells:

$ kerl_deactivate

Bash

Bash completion is available from https://github.com/kerl/kerl/raw/master/bash_completion/kerl.

Zsh

Zsh completion is available from https://github.com/kerl/kerl/raw/master/zsh_completion/_kerl.

The kerl glossary

Here are the abstractions kerl is handling:

  • releases: Erlang/OTP releases from erlang.org

  • builds: the result of configuring and compiling releases or Git repositories

  • installations: the result of deploying builds to filesystem locations (also referred to as "sandboxes")

The kerl project

Erlang/OTP support policy

As of September 2021, we are supporting the current Erlang/OTP release version and 2 prior release versions (same as upstream Erlang/OTP). Older Erlang/OTP releases may or may not work. We will advance release support as new releases of Erlang/OTP become available.

Code of conduct

You can read more about our code of conduct at CODE_OF_CONDUCT.md.

Contributing to kerl

Contributions are welcome! Be sure to read and follow the general guidelines made explicit in CONTRIBUTING.md.

License

kerl is MIT-licensed, as per LICENSE.md. You'll also find the same license notice inside the distributable shell script.

Changelog

Check CHANGELOG.md and also GitHub releases.

kerl's People

Contributors

awlexus avatar crownedgrouse avatar erszcz avatar essen avatar evax avatar fenollp avatar francois2metz avatar fuentesjr avatar garazdawi avatar jadeallenx avatar jj1bdx avatar joaofukuda avatar joedevivo avatar khia avatar mazenharake avatar michaelklishin avatar nalundgaard avatar norton avatar nox avatar orien avatar paulo-ferraz-oliveira avatar qzhuyan avatar randysecrist avatar rciorba avatar sanmiguel avatar thomasc avatar tzvetkoff avatar vlm avatar x0id avatar yrashk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kerl's Issues

Setting CFLAGS in KERL_CONFIGURE_OPTIONS

I want to set a CFLAGS (env) parameter in KERL_CONFIGURE_OPTIONS inside .kerlrc with the value as: CFLAGS="-g -C0 -fstack-protector" (Note that CFLAGS value includes whitespaces); could this be possible?

I guess this is rather a shell scripting issue (of source .kerlrc), but I'd be glad if I can obtain a hint. Thanks in advance.

kerl hides the output of configure

The end results of configure tells you if any applications in otp will be skipped due to missing dependencies. It would be nice if kerl could capture and present this information during building.

*********************************************************************
**********************  APPLICATIONS DISABLED  **********************
*********************************************************************

jinterface     : No Java compiler found
odbc           : ODBC library - link check failed

*********************************************************************
*********************************************************************
**********************  APPLICATIONS INFORMATION  *******************
*********************************************************************

wx             : wxWidgets not found, wx will NOT be usable

*********************************************************************
*********************************************************************
**********************  DOCUMENTATION INFORMATION  ******************
*********************************************************************

documentation  : 
                 xsltproc is missing.
                 fop is missing.
                 xmllint is missing.
                 The documentation can not be built.

*********************************************************************

`kerl status` does not work

Even if a kerl installation is activated, the output of kerl status does not reflect it and says no kerl is activated. Note that _KERL_SAVED_MANPATH and _KERL_SAVED_PATH do not exist.

Environment: OS X 10.9.1, zsh 5.0.5.

Cannot build R16B02 on Mac OS X 10.8.5

Hi,

I have problems building R16B02 on Mac OS X 10.8.5.

Looking at the log I see pretty early on

...
can't open x86_64-apple-darwin12.5.0/opt/plain/erl_compile_flags.h for writing at utils/make_compiler_flags line 65.
...

And I have similar errors further down.

BUT, I have no problem installing R14B04 or R15B03, therefore I suspect there is something wrong with how kerl tries to build R16B02. It seems some path is bad, but I'm new to Kerl so I dont know where to look and change.

How come R14B04 works but not R16B02?

/usr/bin/env escript error

Using kerl, scripts that should be executable with escript fail with

/usr/bin/env: escript: No such file or directory

kerl should not install in non empty directories

Currently kerl does a mkdir -p and checks if the target dir is a directory.

It should also check if the directory is empty and refuse to install in nonempty directories.

This avoids messing up and even overwriting directories that e.g. have been accidentially specified.

Since "delete installation" just does a rm -Rf after checking for activate this can get disastrous. E.g. installing by accident in ones home dir, noticing the error and deleting it again => home dir erased

Version of build already exist

I am using kerl with SnapCI and when I run CI I get this error:

  $ ./kerl build 17.4 17.4
  There's already a build named 17.4

Must I do some clean up before install a new build ? If so, how is that done ?

kerl builds the wrong thing if you have ERL_TOP set

I was attempting to use kerl build git ... to build and install Erlang; the build appeared to succeed but kerl install ... failed with Couldn't install Erlang/OTP git (ei-73fc7ca) in /home/roger/erlang/ei-73fc7ca.

It turns out that it's because I had ERL_TOP set (from earlier messing around with building Erlang from source), and that kerl was actually building that copy of Erlang. So when it went to install from ~/.kerl/builds/ei-73fc7ca, it wasn't actually built.

Either kerl should warn if ERL_TOP is already set, or it should be sure to set it correctly in kerl build git....

make: execvp: erlc: Permission denied

CentOS 6.2

I get the below error when trying to run a bamboo build. Verified that activate command runs before running "make rel".

02-Nov-2014 09:26:31 The current active installation is:
02-Nov-2014 09:26:31 /opt/erlang/17.1

02-Nov-2014 09:26:32 erlc -o apps/ejabberd/priv/mibs apps/ejabberd/mibs/EJABBERD-MIB.mib
02-Nov-2014 09:26:32 make: execvp: erlc: Permission denied
02-Nov-2014 09:26:32 make: *** [apps/ejabberd/priv/mibs/EJABBERD-MIB.bin] Error 127

Tried to run the command after logging into the box and the same error when I don't run source /opt/erlang/17.1/activate command. When I run the command and run make rel, I don't see the above error.

This happens only in the context of the build agent which has full access (also owner) to /opt/erlang/17.1 directory. Not sure what I'm missing.

Anyone has a workaround or have seen this issue before?

does not build 14B04

the log says it cannot find libncurses5-dev under Ubuntu.
see detailed log below:
creating /home/tfoundry/.kerl/builds/r14b04/otp_src_R14B04/i686-pc-linux-gnu
/home/tfoundry/.kerl/builds/r14b04/otp_src_R14B04/configure --disable-hipe --cache-file=/dev/null
Ignoring the --cache-file argument since it can cause the system to be erroneously configured
Disabling caching
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for ld... ld
checking for GNU make... yes (make)
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking for ranlib... ranlib
checking ERTS version... 5.8.5
checking OTP release... R14B04
configure: creating ./config.status
config.status: creating Makefile
config.status: creating make/emd2exml
configure: configuring in lib
configure: running /bin/bash '/home/tfoundry/.kerl/builds/r14b04/otp_src_R14B04/lib/configure' --prefix=/usr/local '--disable-hipe' '--cache-file=/dev/null' 'ERL_TOP=/home/tfoundry/.kerl/builds/r14b04/otp_src_R14B04' --cache-file=/dev/null --srcdir=/home/tfoundry/.kerl/builds/r14b04/otp_src_R14B04/lib
configure: creating ./config.status
configure: configuring in snmp/.
configure: running /bin/bash '/home/tfoundry/.kerl/builds/r14b04/otp_src_R14B04/lib/snmp/./configure' --prefix=/usr/local '--prefix=/usr/local' '--disable-hipe' 'ERL_TOP=/home/tfoundry/.kerl/builds/r14b04/otp_src_R14B04' '--cache-file=/dev/null' '--srcdir=/home/tfoundry/.kerl/builds/r14b04/otp_src_R14B04/lib' --cache-file=/dev/null --srcdir=/home/tfoundry/.kerl/builds/r14b04/otp_src_R14B04/lib/snmp/.
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for perl... perl
configure: creating ./config.status
config.status: creating mibs/Makefile
configure: configuring in common_test/.
configure: running /bin/bash '/home/tfoundry/.kerl/builds/r14b04/otp_src_R14B04/lib/common_test/./configure' --prefix=/usr/local '--prefix=/usr/local' '--disable-hipe' 'ERL_TOP=/home/tfoundry/.kerl/builds/r14b04/otp_src_R14B04' '--cache-file=/dev/null' '--srcdir=/home/tfoundry/.kerl/builds/r14b04/otp_src_R14B04/lib' --cache-file=/dev/null --srcdir=/home/tfoundry/.kerl/builds/r14b04/otp_src_R14B04/lib/common_test/.
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
configure: creating ./config.status
config.status: creating priv/i686-pc-linux-gnu/Makefile
configure: configuring in diameter/.
configure: running /bin/bash '/home/tfoundry/.kerl/builds/r14b04/otp_src_R14B04/lib/diameter/./configure' --prefix=/usr/local '--prefix=/usr/local' '--disable-hipe' 'ERL_TOP=/home/tfoundry/.kerl/builds/r14b04/otp_src_R14B04' '--cache-file=/dev/null' '--srcdir=/home/tfoundry/.kerl/builds/r14b04/otp_src_R14B04/lib' --cache-file=/dev/null --srcdir=/home/tfoundry/.kerl/builds/r14b04/otp_src_R14B04/lib/diameter/.
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking how to create a directory including parents... /usr/bin/install -c -d
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/app/diameter.mk
config.status: creating make/i686-pc-linux-gnu/rules.mk
configure: configuring in erl_interface/.
configure: running /bin/bash '/home/tfoundry/.kerl/builds/r14b04/otp_src_R14B04/lib/erl_interface/./configure' --prefix=/usr/local '--prefix=/usr/local' '--disable-hipe' 'ERL_TOP=/home/tfoundry/.kerl/builds/r14b04/otp_src_R14B04' '--cache-file=/dev/null' '--srcdir=/home/tfoundry/.kerl/builds/r14b04/otp_src_R14B04/lib' --cache-file=/dev/null --srcdir=/home/tfoundry/.kerl/builds/r14b04/otp_src_R14B04/lib/erl_interface/.
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking how to run the C preprocessor... gcc -E
checking for ranlib... ranlib
checking for ld.sh... no
checking for ld... ld
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for short... yes
checking size of short... 2
checking for int... yes
checking size of int... 4
checking for long... yes
checking size of long... 4
checking for void *... yes
checking size of void *... 4
checking for long long... yes
checking size of long long... 8
checking for ar... ar
checking for a BSD-compatible install... /usr/bin/install -c
checking how to create a directory including parents... /usr/bin/install -c -d
checking for gethostbyname in -lnsl... yes
checking for getpeername in -lsocket... no
checking for ANSI C header files... (cached) yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking for sys/types.h... (cached) yes
checking for uid_t in sys/types.h... yes
checking for pid_t... yes
checking for size_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking for socklen_t usability... yes
checking for working alloca.h... yes
checking for alloca... yes
checking whether gcc needs -traditional... no
checking for working memcmp... yes
checking for dup2... yes
checking for gethostbyaddr... yes
checking for gethostbyname... yes
checking for gethostbyaddr_r... yes
checking for gethostbyname_r... yes
checking for gethostname... yes
checking for writev... yes
checking for gethrtime... no
checking for gettimeofday... yes
checking for inet_ntoa... yes
checking for memchr... yes
checking for memmove... yes
checking for memset... yes
checking for select... yes
checking for socket... yes
checking for strchr... yes
checking for strerror... yes
checking for strrchr... yes
checking for strstr... yes
checking for uname... yes
checking for res_gethostbyname... no
checking for res_gethostbyname in -lresolv... yes
checking for clock_gettime... no
checking for clock_gettime in -lrt... yes
checking for mixed cygwin and native VC++ environment... no
checking for mixed cygwin and native MinGW environment... no
checking if we mix cygwin with any native compiler... no
checking for native win32 threads... no
checking for pthread_create in -lpthread... yes
checking for getconf... getconf
checking for Native POSIX Thread Library... yes
checking nptl/pthread.h usability... no
checking nptl/pthread.h presence... no
checking for nptl/pthread.h... no
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking pthread/mit/pthread.h usability... no
checking pthread/mit/pthread.h presence... no
checking for pthread/mit/pthread.h... no
configure: creating ./config.status
config.status: creating src/i686-pc-linux-gnu/Makefile
config.status: creating src/i686-pc-linux-gnu/eidefs.mk
config.status: creating src/i686-pc-linux-gnu/config.h
configure: configuring in gs/.
configure: running /bin/bash '/home/tfoundry/.kerl/builds/r14b04/otp_src_R14B04/lib/gs/./configure' --prefix=/usr/local '--prefix=/usr/local' '--disable-hipe' 'ERL_TOP=/home/tfoundry/.kerl/builds/r14b04/otp_src_R14B04' '--cache-file=/dev/null' '--srcdir=/home/tfoundry/.kerl/builds/r14b04/otp_src_R14B04/lib' --cache-file=/dev/null --srcdir=/home/tfoundry/.kerl/builds/r14b04/otp_src_R14B04/lib/gs/.
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for prebuilt tcl/tk in tcl/binaries/i686_linux-gnu.tar.gz... not found
configure: creating ./config.status
config.status: creating tcl/i686-pc-linux-gnu/Makefile
config.status: creating tcl/win32/Makefile
configure: configuring in megaco/.
configure: running /bin/bash '/home/tfoundry/.kerl/builds/r14b04/otp_src_R14B04/lib/megaco/./configure' --prefix=/usr/local '--prefix=/usr/local' '--disable-hipe' 'ERL_TOP=/home/tfoundry/.kerl/builds/r14b04/otp_src_R14B04' '--cache-file=/dev/null' '--srcdir=/home/tfoundry/.kerl/builds/r14b04/otp_src_R14B04/lib' --cache-file=/dev/null --srcdir=/home/tfoundry/.kerl/builds/r14b04/otp_src_R14B04/lib/megaco/.
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for flex... no
checking for lex... no
checking for yywrap in -lfl... no
checking for yywrap in -ll... no
checking for usable Dynamic Erlang Driver configuration... yes
checking for perl... perl
configure: creating ./config.status
config.status: creating src/flex/i686-pc-linux-gnu/Makefile
configure: configuring in odbc/.
configure: running /bin/bash '/home/tfoundry/.kerl/builds/r14b04/otp_src_R14B04/lib/odbc/./configure' --prefix=/usr/local '--prefix=/usr/local' '--disable-hipe' 'ERL_TOP=/home/tfoundry/.kerl/builds/r14b04/otp_src_R14B04' '--cache-file=/dev/null' '--srcdir=/home/tfoundry/.kerl/builds/r14b04/otp_src_R14B04/lib' --cache-file=/dev/null --srcdir=/home/tfoundry/.kerl/builds/r14b04/otp_src_R14B04/lib/odbc/.
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for mixed cygwin and native VC++ environment... no
checking whether make sets $(MAKE)... yes
checking for ld.sh... no
checking for ld... ld
checking for connect... yes
checking for gethostbyname... yes
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking winsock2.h usability... no
checking winsock2.h presence... no
checking for winsock2.h... no
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking for struct sockaddr_in6.sin6_addr... yes
checking for memset... yes
checking for socket... yes
checking for native win32 threads... no
checking for pthread_create in -lpthread... yes
checking for getconf... getconf
checking for Native POSIX Thread Library... yes
checking nptl/pthread.h usability... no
checking nptl/pthread.h presence... no
checking for nptl/pthread.h... no
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking pthread/mit/pthread.h usability... no
checking pthread/mit/pthread.h presence... no
checking for pthread/mit/pthread.h... no
checking for void *... yes
checking size of void *... 4
checking for odbc in standard locations... no
configure: WARNING: No odbc library found skipping odbc
configure: WARNING: "ODBC library - link check failed"
configure: creating ./config.status
config.status: creating c_src/i686-pc-linux-gnu/Makefile
configure: configuring in wx/.
configure: running /bin/bash '/home/tfoundry/.kerl/builds/r14b04/otp_src_R14B04/lib/wx/./configure' --prefix=/usr/local '--prefix=/usr/local' '--disable-hipe' 'ERL_TOP=/home/tfoundry/.kerl/builds/r14b04/otp_src_R14B04' '--cache-file=/dev/null' '--srcdir=/home/tfoundry/.kerl/builds/r14b04/otp_src_R14B04/lib' --cache-file=/dev/null --srcdir=/home/tfoundry/.kerl/builds/r14b04/otp_src_R14B04/lib/wx/.
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for ranlib... ranlib
checking how to run the C preprocessor... gcc -E
configure: Building for linux-gnu
checking for mixed cygwin and native VC++ environment... no
checking for mixed cygwin and native MinGW environment... no
checking if we mix cygwin with any native compiler... no
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for void *... yes
checking size of void *... 4
checking GL/gl.h usability... no
checking GL/gl.h presence... no
checking for GL/gl.h... no
checking OpenGL/gl.h usability... no
checking OpenGL/gl.h presence... no
checking for OpenGL/gl.h... no
configure: Checking for OpenGL headers in /usr/X11R6
checking GL/gl.h usability... no
checking GL/gl.h presence... no
checking for GL/gl.h... no
configure: Checking for OpenGL headers in /usr/local
checking GL/gl.h usability... no
checking GL/gl.h presence... no
checking for GL/gl.h... no
configure: WARNING: No OpenGL headers found, wx will NOT be usable
checking for debug build of wxWidgets... checking for wx-config... no
checking for standard build of wxWidgets... checking for wx-config... (cached) no
configure: WARNING:
wxWidgets must be installed on your system.

    Please check that wx-config is in path, the directory
    where wxWidgets libraries are installed (returned by
    'wx-config --libs' or 'wx-config --static --libs' command)
    is in LD_LIBRARY_PATH or equivalent variable and
    wxWidgets version is 2.8.4 or above.

configure: creating i686-pc-linux-gnu/config.status
config.status: creating config.mk
config.status: creating c_src/Makefile
configure: configuring in erts
configure: running /bin/bash '/home/tfoundry/.kerl/builds/r14b04/otp_src_R14B04/erts/configure' --prefix=/usr/local '--disable-hipe' '--cache-file=/dev/null' 'ERL_TOP=/home/tfoundry/.kerl/builds/r14b04/otp_src_R14B04' --cache-file=/dev/null --srcdir=/home/tfoundry/.kerl/builds/r14b04/otp_src_R14B04/erts
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for library containing strerror... none required
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ANSI C... (cached) none needed
checking for mixed cygwin and native VC++ environment... no
checking for mixed cygwin and native MinGW environment... no
checking if we mix cygwin with any native compiler... no
checking for getconf... getconf
checking for large file support CFLAGS... -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
checking for large file support LDFLAGS... none
checking for large file support LIBS... none
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for void *... yes
checking size of void *... 4
checking whether compilation mode forces ARCH adjustment... no
checking if VM has to be linked with Carbon framework... no
checking if we are building a halfword emulator (32bit heap on 64bit machine)... no
checking how to run the C preprocessor... gcc -E
checking for ranlib... ranlib
checking for bison... no
checking for byacc... no
checking for perl5... no
checking for perl... /usr/bin/perl
checking whether ln -s works... yes
checking for ar... ar
checking for rm... /bin/rm
checking for mkdir... /bin/mkdir
checking for xsltproc... xsltproc
checking for fop... no
configure: WARNING: No 'fop' command found: going to generate placeholder PDF files
checking for a BSD-compatible install... /usr/bin/install -c
checking how to create a directory including parents... /usr/bin/install -c -d
checking for extra flags needed to export symbols... -Wl,-export-dynamic
checking for sin in -lm... yes
checking for dlopen in -ldl... yes
checking for main in -linet... no
checking for openpty in -lutil... yes
checking for native win32 threads... no
checking for pthread_create in -lpthread... yes
checking for getconf... (cached) getconf
checking for Native POSIX Thread Library... yes
checking nptl/pthread.h usability... no
checking nptl/pthread.h presence... no
checking for nptl/pthread.h... no
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking pthread/mit/pthread.h usability... no
checking pthread/mit/pthread.h presence... no
checking for pthread/mit/pthread.h... no
checking for kstat_open in -lkstat... no
checking if SIGUSR1 and SIGUSR2 can be used... yes
checking if sigaltstack can be used... yes
checking for pthread.h... (cached) yes
checking for pthread/mit/pthread.h... (cached) no
checking sched.h usability... yes
checking sched.h presence... yes
checking for sched.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for pthread_spin_lock... yes
checking for sched_yield... yes
checking whether sched_yield() returns an int... yes
checking for pthread_yield... yes
checking whether pthread_yield() returns an int... yes
checking for pthread_rwlock_init... yes
checking for pthread_rwlockattr_setkind_np... yes
checking for PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP... yes
checking for pthread_attr_setguardsize... yes
checking for Linux futexes... yes
checking for GCC atomic operations... yes
checking for a usable libatomic_ops implementation... no
checking whether default stack size should be modified... no
checking for void *... (cached) yes
checking size of void *... (cached) 4
checking for int... yes
checking size of int... 4
checking for long... yes
checking size of long... 4
checking for long long... yes
checking size of long long... 8
checking for __int64... no
checking size of __int64... 0
checking whether byte ordering is bigendian... no
checking whether pre pentium 4 compatibility should forced... no
checking whether an emulator with smp support should be built... yes
checking for posix_fadvise... yes
checking whether the emulator should use threads... yes; thread support required and therefore forced
checking whether lock checking should be enabled... no
checking whether lock counters should be enabled... no
checking whether dlopen() needs to be called before first call to dlerror()... no
checking whether the child waiter thread should be enabled... yes on SMP build, but not on non-SMP build
checking for kstat_open in -lkstat... (cached) no
checking for tgetent in -lncurses... no
checking for tgetent in -lcurses... no
checking for tgetent in -ltermcap... no
checking for tgetent in -ltermlib... no
configure: error: No curses library functions found
configure: error: /bin/bash '/home/tfoundry/.kerl/builds/r14b04/otp_src_R14B04/erts/configure' failed for erts

also pull in rebar?

I find it a little annoying that I have to pull in rebar separately.

If I build an erlang would it not be useful to mix in rebar?

shellcheck issues

In /usr/local/bin/kerl line 49:
if [ -n "KERL_INSTALL_MANPAGES" ]; then
         ^-- SC2157: Argument to -n is always true due to literal strings.


In /usr/local/bin/kerl line 62:
if [ -f "$KERL_CONFIG" ]; then . "$KERL_CONFIG"; fi
                               ^-- SC1090: Can't follow non-constant source. Use a directive to specify location.


In /usr/local/bin/kerl line 92:
KERL_SYSTEM=`uname -s`
            ^-- SC2006: Use $(..) instead of legacy `..`.


In /usr/local/bin/kerl line 110:
    echo "\n  <command>       Command to be executed\n"
          ^-- SC2028: echo won't expand escape sequences. Consider printf.


In /usr/local/bin/kerl line 172:
    for rel in `cat $KERL_BASE_DIR/otp_releases`; do
               ^-- SC2013: To read lines rather than words, pipe/redirect to a 'while read' loop.
               ^-- SC2006: Use $(..) instead of legacy `..`.
                    ^-- SC2086: Double quote to prevent globbing and word splitting.


In /usr/local/bin/kerl line 182:
    if ! is_valid_release $1; then
                          ^-- SC2086: Double quote to prevent globbing and word splitting.


In /usr/local/bin/kerl line 192:
        for l in `cat "$KERL_BASE_DIR/otp_builds"`; do
                 ^-- SC2013: To read lines rather than words, pipe/redirect to a 'while read' loop.
                 ^-- SC2006: Use $(..) instead of legacy `..`.


In /usr/local/bin/kerl line 193:
            rel=`echo $l | cut -d "," -f 1`
                ^-- SC2006: Use $(..) instead of legacy `..`.
                      ^-- SC2086: Double quote to prevent globbing and word splitting.


In /usr/local/bin/kerl line 194:
            name=`echo $l | cut -d "," -f 2`
                 ^-- SC2006: Use $(..) instead of legacy `..`.
                       ^-- SC2086: Double quote to prevent globbing and word splitting.


In /usr/local/bin/kerl line 207:
    for rel in `cat $KERL_BASE_DIR/otp_releases | tail -1`; do
               ^-- SC2006: Use $(..) instead of legacy `..`.
                    ^-- SC2086: Double quote to prevent globbing and word splitting.
                    ^-- SC2002: Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.


In /usr/local/bin/kerl line 226:
    if ! is_valid_installation $1; then
                               ^-- SC2086: Double quote to prevent globbing and word splitting.


In /usr/local/bin/kerl line 236:
        for l in `cat "$KERL_BASE_DIR/otp_builds"`; do
                 ^-- SC2013: To read lines rather than words, pipe/redirect to a 'while read' loop.
                 ^-- SC2006: Use $(..) instead of legacy `..`.


In /usr/local/bin/kerl line 237:
            name=`echo $l | cut -d "," -f 2`
                 ^-- SC2006: Use $(..) instead of legacy `..`.
                       ^-- SC2086: Double quote to prevent globbing and word splitting.


In /usr/local/bin/kerl line 248:
    assert_build_name_unused $3
                             ^-- SC2086: Double quote to prevent globbing and word splitting.


In /usr/local/bin/kerl line 250:
    GIT=`echo -n "$1" | $MD5SUM | cut -d " " -f $MD5SUM_FIELD`
        ^-- SC2006: Use $(..) instead of legacy `..`.


In /usr/local/bin/kerl line 252:
    cd "$KERL_GIT_DIR"
    ^-- SC2164: Use cd ... || exit in case cd fails.


In /usr/local/bin/kerl line 261:
    cd "$GIT"
    ^-- SC2164: Use cd ... || exit in case cd fails.


In /usr/local/bin/kerl line 268:
    rm -Rf "$KERL_BUILD_DIR/$3"
           ^-- SC2115: Use "${var:?}" to ensure this never expands to / .


In /usr/local/bin/kerl line 270:
    cd "$KERL_BUILD_DIR/$3"
    ^-- SC2164: Use cd ... || exit in case cd fails.


In /usr/local/bin/kerl line 276:
    cd otp_src_git
    ^-- SC2164: Use cd ... || exit in case cd fails.


In /usr/local/bin/kerl line 277:
    git checkout $2 > /dev/null 2>&1
                 ^-- SC2086: Double quote to prevent globbing and word splitting.


In /usr/local/bin/kerl line 279:
        git checkout -b $2 $2 > /dev/null 2>&1
                        ^-- SC2086: Double quote to prevent globbing and word splitting.
                           ^-- SC2086: Double quote to prevent globbing and word splitting.


In /usr/local/bin/kerl line 283:
        rm -Rf "$KERL_BUILD_DIR/$3"
               ^-- SC2115: Use "${var:?}" to ensure this never expands to / .


In /usr/local/bin/kerl line 288:
        rm -Rf "$KERL_BUILD_DIR/$3"
               ^-- SC2115: Use "${var:?}" to ensure this never expands to / .


In /usr/local/bin/kerl line 293:
    ./otp_build autoconf $KERL_CONFIGURE_OPTIONS > "$LOGFILE" 2>&1 && \
                         ^-- SC2086: Double quote to prevent globbing and word splitting.


In /usr/local/bin/kerl line 294:
        ./otp_build configure $KERL_CONFIGURE_OPTIONS > "$LOGFILE" 2>&1
                              ^-- SC2086: Double quote to prevent globbing and word splitting.


In /usr/local/bin/kerl line 302:
            rm ./lib/$i/SKIP
                     ^-- SC2086: Double quote to prevent globbing and word splitting.


In /usr/local/bin/kerl line 311:
            touch -f ./lib/$i/SKIP
                           ^-- SC2086: Double quote to prevent globbing and word splitting.


In /usr/local/bin/kerl line 318:
    ./otp_build boot -a $KERL_CONFIGURE_OPTIONS > "$LOGFILE" 2>&1
                        ^-- SC2086: Double quote to prevent globbing and word splitting.


In /usr/local/bin/kerl line 325:
    cd "$KERL_BUILD_DIR/$3/release_git"
    ^-- SC2164: Use cd ... || exit in case cd fails.


In /usr/local/bin/kerl line 335:
            if [ `gcc --version | grep llvm | wc -l` = "1" ]; then
                 ^-- SC2046: Quote this to prevent word splitting.
                 ^-- SC2006: Use $(..) instead of legacy `..`.
                                  ^-- SC2126: Consider using grep -c instead of grep|wc.


In /usr/local/bin/kerl line 336:
                if lion_support $1; then
                                ^-- SC2086: Double quote to prevent globbing and word splitting.


In /usr/local/bin/kerl line 339:
                    if [ -x "`which gcc-4.2`" ]; then
                             ^-- SC2006: Use $(..) instead of legacy `..`.


In /usr/local/bin/kerl line 351:
    assert_valid_release $1
                         ^-- SC2086: Double quote to prevent globbing and word splitting.


In /usr/local/bin/kerl line 352:
    assert_build_name_unused $2
                             ^-- SC2086: Double quote to prevent globbing and word splitting.


In /usr/local/bin/kerl line 362:
        (cd "$UNTARDIRNAME" && tar xfz "$KERL_DOWNLOAD_DIR/$FILENAME" && mv * "$KERL_BUILD_DIR/$2/otp_src_$1")
                                                                            ^-- SC2035: Use ./*glob* or -- *glob* so names with dashes won't become options.


In /usr/local/bin/kerl line 367:
    cd "$ERL_TOP"
    ^-- SC2164: Use cd ... || exit in case cd fails.


In /usr/local/bin/kerl line 370:
        ./otp_build autoconf $KERL_CONFIGURE_OPTIONS > "$LOGFILE" 2>&1 && \
                             ^-- SC2086: Double quote to prevent globbing and word splitting.


In /usr/local/bin/kerl line 371:
            ./otp_build configure $KERL_CONFIGURE_OPTIONS > "$LOGFILE" 2>&1
                                  ^-- SC2086: Double quote to prevent globbing and word splitting.


In /usr/local/bin/kerl line 373:
        ./otp_build configure $KERL_CONFIGURE_OPTIONS > "$LOGFILE" 2>&1
                              ^-- SC2086: Double quote to prevent globbing and word splitting.


In /usr/local/bin/kerl line 384:
            rm ./lib/$i/SKIP
                     ^-- SC2086: Double quote to prevent globbing and word splitting.


In /usr/local/bin/kerl line 394:
            touch -f ./lib/$i/SKIP
                           ^-- SC2086: Double quote to prevent globbing and word splitting.


In /usr/local/bin/kerl line 401:
    ./otp_build boot -a $KERL_CONFIGURE_OPTIONS > "$LOGFILE" 2>&1
                        ^-- SC2086: Double quote to prevent globbing and word splitting.


In /usr/local/bin/kerl line 409:
    cd "$KERL_BUILD_DIR/$2/release_$1"
    ^-- SC2164: Use cd ... || exit in case cd fails.


In /usr/local/bin/kerl line 417:
    rel=`get_release_from_name $1`
        ^-- SC2006: Use $(..) instead of legacy `..`.
                               ^-- SC2086: Double quote to prevent globbing and word splitting.


In /usr/local/bin/kerl line 427:
    absdir=`cd "$2" && pwd`
           ^-- SC2006: Use $(..) instead of legacy `..`.


In /usr/local/bin/kerl line 430:
    cd "$ERL_TOP"
    ^-- SC2164: Use cd ... || exit in case cd fails.


In /usr/local/bin/kerl line 515:
        rel=`get_newest_valid_release`
            ^-- SC2006: Use $(..) instead of legacy `..`.


In /usr/local/bin/kerl line 554:
    rel=`get_name_from_install_path "$2"`
        ^-- SC2006: Use $(..) instead of legacy `..`.


In /usr/local/bin/kerl line 562:
    ssh $KERL_DEPLOY_SSH_OPTIONS $host true > /dev/null 2>&1
        ^-- SC2086: Double quote to prevent globbing and word splitting.
                                 ^-- SC2086: Double quote to prevent globbing and word splitting.


In /usr/local/bin/kerl line 570:
    rsync -aqz -e "ssh $KERL_DEPLOY_SSH_OPTIONS" $KERL_DEPLOY_RSYNC_OPTIONS "$path/" "$host:$remotepath/"
                                                 ^-- SC2086: Double quote to prevent globbing and word splitting.


In /usr/local/bin/kerl line 576:
    ssh $KERL_DEPLOY_SSH_OPTIONS $host "cd \"$remotepath\" && env ERL_TOP=\`pwd\` ./Install $INSTALL_OPT \`pwd\` > /dev/null 2>&1"
        ^-- SC2086: Double quote to prevent globbing and word splitting.
                                 ^-- SC2086: Double quote to prevent globbing and word splitting.
                                             ^-- SC2029: Note that, unescaped, this expands on the client side.


In /usr/local/bin/kerl line 582:
    ssh $KERL_DEPLOY_SSH_OPTIONS $host "cd \"$remotepath\" && sed -i -e \"s#$path#\`pwd\`#g\" activate"
        ^-- SC2086: Double quote to prevent globbing and word splitting.
                                 ^-- SC2086: Double quote to prevent globbing and word splitting.
                                             ^-- SC2029: Note that, unescaped, this expands on the client side.


In /usr/local/bin/kerl line 596:
    if [ -f $KERL_BASE_DIR/otp_$1 ]; then
            ^-- SC2086: Double quote to prevent globbing and word splitting.
                               ^-- SC2086: Double quote to prevent globbing and word splitting.


In /usr/local/bin/kerl line 597:
        if [ "`cat "$KERL_BASE_DIR/otp_$1" | wc -l`" != "0" ]; then
              ^-- SC2006: Use $(..) instead of legacy `..`.
                   ^-- SC2002: Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.


In /usr/local/bin/kerl line 601:
                echo `cat "$KERL_BASE_DIR/otp_$1"`
                     ^-- SC2046: Quote this to prevent word splitting.
                     ^-- SC2005: Useless echo? Instead of 'echo $(cmd)', just use 'cmd'.
                     ^-- SC2006: Use $(..) instead of legacy `..`.


In /usr/local/bin/kerl line 612:
        for l in `cat "$KERL_BASE_DIR/otp_$1"`; do
                 ^-- SC2013: To read lines rather than words, pipe/redirect to a 'while read' loop.
                 ^-- SC2006: Use $(..) instead of legacy `..`.


In /usr/local/bin/kerl line 633:
        grep $2 "$KERL_BASE_DIR/otp_$1" > /dev/null 2>&1 && return 0
             ^-- SC2086: Double quote to prevent globbing and word splitting.


In /usr/local/bin/kerl line 661:
        echo $_KERL_ACTIVE_DIR
             ^-- SC2086: Double quote to prevent globbing and word splitting.


In /usr/local/bin/kerl line 676:
    ACTIVE_PATH=`get_active_path`
                ^-- SC2006: Use $(..) instead of legacy `..`.


In /usr/local/bin/kerl line 679:
        echo $ACTIVE_PATH
             ^-- SC2086: Double quote to prevent globbing and word splitting.


In /usr/local/bin/kerl line 697:
    SUM=`$MD5SUM "$KERL_DOWNLOAD_DIR/$1" | cut -d " " -f $MD5SUM_FIELD`
        ^-- SC2006: Use $(..) instead of legacy `..`.


In /usr/local/bin/kerl line 698:
    ORIG_SUM=`grep -F "$1" "$KERL_DOWNLOAD_DIR/MD5" | cut -d " " -f 2`
             ^-- SC2006: Use $(..) instead of legacy `..`.


In /usr/local/bin/kerl line 713:
            do_git_build $3 $4 $5
                         ^-- SC2086: Double quote to prevent globbing and word splitting.
                            ^-- SC2086: Double quote to prevent globbing and word splitting.
                               ^-- SC2086: Double quote to prevent globbing and word splitting.


In /usr/local/bin/kerl line 719:
            do_build $2 $3
                     ^-- SC2086: Double quote to prevent globbing and word splitting.
                        ^-- SC2086: Double quote to prevent globbing and word splitting.


In /usr/local/bin/kerl line 728:
            do_install $2 "$3"
                       ^-- SC2086: Double quote to prevent globbing and word splitting.


In /usr/local/bin/kerl line 731:
              do_install $2 .
                         ^-- SC2086: Double quote to prevent globbing and word splitting.


In /usr/local/bin/kerl line 733:
              do_install $2 "$KERL_DEFAULT_INSTALL_DIR/$2"
                         ^-- SC2086: Double quote to prevent globbing and word splitting.


In /usr/local/bin/kerl line 743:
            do_deploy $2 "$3" "$4"
                      ^-- SC2086: Double quote to prevent globbing and word splitting.


In /usr/local/bin/kerl line 746:
                do_deploy $2 "$3"
                          ^-- SC2086: Double quote to prevent globbing and word splitting.


In /usr/local/bin/kerl line 748:
                do_deploy $2 .
                          ^-- SC2086: Double quote to prevent globbing and word splitting.


In /usr/local/bin/kerl line 778:
                list_print $2 space
                           ^-- SC2086: Double quote to prevent globbing and word splitting.


In /usr/local/bin/kerl line 782:
                list_print $2
                           ^-- SC2086: Double quote to prevent globbing and word splitting.


In /usr/local/bin/kerl line 785:
                list_print $2
                           ^-- SC2086: Double quote to prevent globbing and word splitting.


In /usr/local/bin/kerl line 801:
                rel=`get_release_from_name $3`
                    ^-- SC2006: Use $(..) instead of legacy `..`.
                                           ^-- SC2086: Double quote to prevent globbing and word splitting.


In /usr/local/bin/kerl line 803:
                    rm -Rf "$KERL_BUILD_DIR/$3"
                           ^-- SC2115: Use "${var:?}" to ensure this never expands to / .


In /usr/local/bin/kerl line 804:
                    list_remove $2s "$rel,$3"
                                ^-- SC2086: Double quote to prevent globbing and word splitting.


In /usr/local/bin/kerl line 814:
                escaped=`echo "$3" | sed $SED_OPT -e 's#/$##' -e 's#\/#\\\/#g'`
                        ^-- SC2006: Use $(..) instead of legacy `..`.


In /usr/local/bin/kerl line 815:
                list_remove $2s "$escaped"
                            ^-- SC2086: Double quote to prevent globbing and word splitting.


In /usr/local/bin/kerl line 845:
        ACTIVE_PATH=`get_active_path`
                    ^-- SC2006: Use $(..) instead of legacy `..`.


In /usr/local/bin/kerl line 847:
            ACTIVE_NAME=`get_name_from_install_path "$ACTIVE_PATH"`
                        ^-- SC2006: Use $(..) instead of legacy `..`.


In /usr/local/bin/kerl line 849:
                VALUE="`basename "$ACTIVE_PATH"`*"
                       ^-- SC2006: Use $(..) instead of legacy `..`.


In /usr/local/bin/kerl line 853:
            printf "$FMT" "$VALUE"
                   ^-- SC2059: Don't use variables in the printf format string. Use printf "..%s.." "$foo".


In /usr/local/bin/kerl line 865:
                rm -rf $KERL_BUILD_DIR/*
                       ^-- SC2115: Use "${var:?}" to ensure this never expands to /* .
                       ^-- SC2086: Double quote to prevent globbing and word splitting.


In /usr/local/bin/kerl line 866:
                rm -rf $KERL_DOWNLOAD_DIR/*
                       ^-- SC2115: Use "${var:?}" to ensure this never expands to /* .
                       ^-- SC2086: Double quote to prevent globbing and word splitting.


In /usr/local/bin/kerl line 867:
                rm -rf $KERL_GIT_DIR/*
                       ^-- SC2115: Use "${var:?}" to ensure this never expands to /* .
                       ^-- SC2086: Double quote to prevent globbing and word splitting.


In /usr/local/bin/kerl line 872:
                rm -rf $KERL_BUILD_DIR/$3
                       ^-- SC2115: Use "${var:?}" to ensure this never expands to / .
                       ^-- SC2086: Double quote to prevent globbing and word splitting.
                                       ^-- SC2086: Double quote to prevent globbing and word splitting.

That's 119 warnings / errors.

status, prompt, active - these commands don't work with old installations

After updating my clone of kerl I noticed that kerl status, prompt and active commands no longer work but only with old installations.

This is the cause: 9cf83c9#diff-75743bad0452412b658dabebd6b439f4R653
so now what one should do to make it work with old installations (those installations that are made before the commit I mentioned above) is appending the following to the activate file of each installation

_KERL_ACTIVE_DIR="/path/to/otp-installation"
export _KERL_ACTIVE_DIR

Simplify installation process

Hi,

I had a thought: the most common use case for kerl is to install various versions of Erlang, why not make that really simple to do by removing some of the 'extra' steps? For example:

kerl build-install git https://github.com/erlang/otp.git OTP-17.1.2 17.1.2

Builds and installs in .kerl/installations/17.1.2/

Agner missing installing r14b04

After a successful build when I install it can not find agner:

$ ./kerl build R14B04 r14b04
Verifying archive checksum...
Checksum verified (4b469729f103f52702bfb1fb24529dc0)
Building Erlang/OTP R14B04 (r14b04), please wait...
Erlang/OTP R14B04 (r14b04) has been successfully built
Fetching and building agner...
Agner has been successfully built

$ kerl install r14b04
Installing Erlang/OTP R14B04 (r14b04) in /home/tristan/.kerl/installs/r14b04...
Installing agner in /home/tristan/.kerl/installs/r14b04...
cp: cannot stat `/home/tristan/.kerl/builds/r14b04/agner_R14B04/agner': No such file or directory

I checked to see if agner existed anywhere under .kerl and it does not:

$ find /home/tristan/.kerl/builds/ -name agner

Trying out kerl on drone.io fails

Trying out kerl on drone.io fails with this no so helpful error

$ curl -O https://raw.githubusercontent.com/spawngrid/kerl/master/kerl
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 25589  100 25589    0     0   357k      0 --:--:-- --:--:-- --:--:-- 1249k
$ chmod a+x kerl
$ ./kerl build 17.4 17.4
17.4 is not a valid Erlang/OTP release

Any idea what is wrong ? Trying it on my local box works.

kerl prompt displays two versions

I've got 17.3 and 17.3.4 installed using kerl. I'm using 17.3, and kerl prompt returns

 (17.3
17.3.4)

I was expecting it to return only (17.3)

Relative Path Activate

It appears activate requires the full path which is semi annoying. Would be nice if activate allowed the use of relative paths.

Example

./erlang/r15b/activate doesn't work but...

. /home/tburdick/erlang/r15b/activate does

Would like the first method to work.

R1404 fails to build on Mac OS X 10.8.4

OS: Mac OS X 10.8.4

$ uname -a
Darwin cahwsx01.local 12.4.0 Darwin Kernel Version 12.4.0:\
 Wed May  1 17:57:12 PDT 2013; \
 root:xnu-2050.24.15~1/RELEASE_X86_64 x86_64

I tried both of the following, each of which ended in build failure:

$ kerl build R14B04 erlang-r14b04 --disable-hipe
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr \
  --with-gxx-include-dir=/usr/include/c++/4.2.1
Verifying archive checksum...
Checksum verified (4b469729f103f52702bfb1fb24529dc0)
Building Erlang/OTP R14B04 (erlang-r14b04), please wait...
Build failed, see \
  /Users/oubiwann/.kerl/builds/erlang-r14b04/otp_build_R14B04.log

and

$ KERL_CONFIGURE_OPTIONS="--disable-hipe" kerl build R14B04 erlang-r14b04
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr \
  --with-gxx-include-dir=/usr/include/c++/4.2.1
Verifying archive checksum...
Checksum verified (4b469729f103f52702bfb1fb24529dc0)
Building Erlang/OTP R14B04 (erlang-r14b04), please wait...
Build failed, see \
  /Users/oubiwann/.kerl/builds/erlang-r14b04/otp_build_R14B04.log

The final error in the log file is this one:

Undefined symbols for architecture i386:
  "_bp_sched2ix", referenced from:
      _load_nif_2 in erl_nif.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

(everything prior to that seems to be warnings).

Note that kerl did actually successfully build R13b04...

Install or document how to install manpages

Automatic installation of manpages could be supported for tarball installations, using the other downloads provided by erlang.org. At least, a reference to them should be made in the README file.

Install manpages for R14B03:
curl http://www.erlang.org/download/otp_doc_man_R14B03.tar.gz | tar xzf - -C path/to_R14B03

Compiling with --enable-native-libs

Hello,

If you do the following with current kerl it fails to compile everything natively:

KERL_CONFIGURE_OPTIONS=--enable-native-libs kerl build 17.0 17.0_native
kerl install 17.0_native ~/erlang/17.0_native
. /home/essen/erlang/17.0_native/activate
% erl                                          
Erlang/OTP 17 [erts-6.0] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]

Eshell V6.0  (abort with ^G)
1> code:is_module_native(lists).
false
2> 

The reason for this is best explained in this email: http://erlang.org/pipermail/erlang-questions/2014-April/078460.html

Modifying kerl this way made it work as expected:

    if [ -n "$KERL_USE_AUTOCONF" ]; then
        ./otp_build autoconf $KERL_CONFIGURE_OPTIONS > "$LOGFILE" 2>&1 && \
            ./otp_build configure $KERL_CONFIGURE_OPTIONS > "$LOGFILE" 2>&1
        make clean
        ./otp_build configure $KERL_CONFIGURE_OPTIONS > "$LOGFILE" 2>&1
    else
        ./otp_build configure $KERL_CONFIGURE_OPTIONS > "$LOGFILE" 2>&1
        make clean
        ./otp_build configure $KERL_CONFIGURE_OPTIONS > "$LOGFILE" 2>&1
    fi

However this may or may not be something you guys want. AFAIK it's only needed for native libs so perhaps this can only be done then?

What is the role of kerl in Erlang version management?

Is kerl intended to manage Erlang versions? It makes it easy to install different versions of Erlang easy but management of versions is hard. For example suppose I have Erlang 16 and Erlang 17 installed. To use Erlang 17 I must run . ~/.kerl/builds/17.1/release_17.1/activate. Then I can use Erlang 17 in the current session. If I start another session and what to use the same version of Erlang I must run the same command again.

Is kerl meant to be used to manage Erlang versions? Or is there another piece of software used for switching between Erlang versions that I should be using?

If kerl is meant to be used for management of Erlang versions I see many ways in which it can be improved (for example, it could be updated so kerl activate 17.1 could be run instead of . ~/.kerl/builds/17.1/release_17.1/activate). I would happy to create a PR that adds this functionality to kerl.

when you have no network and try and install things it's still saves them

I was on a train with no network. I re-installed a previous build to see if I could install the documentation:

kerl install r16b02

it failed (obviously) with curl failures.

But when that happened it didn't clean up the output, I had 2 files in my .kerl/archives that were artifacts of the attempt.

You could use curl -f and detect failures and clean up files.

Errors when installing in a folder with "."

Hello everyone,

After installing erlang with kerl using "kerl install 18.2 ~/.erlang", the installation worked fine but everytime that I interact with erlang I get an error, because of the folder name. The error is:

file:path_eval([".","/home/dguedes"],".erlang"): illegal operation on a directory

After installing in a folder without dot (".") in its name, everything worked fine.

cheers.

Can't build R18.1 with SSL - OS-X El Capitan

I've previously built the following OTP with SSL support (required by rebar )

r15b01
r15b02
r15b03
r16b03
r17.0

But for some reason when I try to build R18.1 - AFAIK using the same ~/.kerlrc and build method - it now fails to build with SSL support.

[/basho/meck%]. /erls/r18.1/activate
[/basho/meck%]erl -eval "crypto:start(), halt()." -noshel
Erlang/OTP 18 [erts-7.1] [source] [64-bit] [smp:8:8] [async-threads:10] [kernel-poll:false]

Eshell V7.1  (abort with ^G)
1> {"init terminating in do_boot",{undef,[{crypto,start,[],[]},{erl_eval,do_apply,6,[{file,"erl_eval.erl"},
{line,669}]},{erl_eval,exprs,5,[{file,"erl_eval.erl"},{line,122}]},{init,start_it,1,[]},{init,start_em,1,[]
}]}}

Crash dump is being written to: erl_crash.dump...done
init terminating in do_boot ()

I've got the following ~/.kerlrc and I even tried source ~/.kerlrc before running the usual build and install commands:

kerl build 18.1 R18.1  
kerl install R18.1 /erls/r18.1
export KERL_CONFIGURE_OPTIONS="--disable-hipe --enable-smp-support --enable-threads --enable-kernel-poll --
enable-darwin-64bit"
export CFLAGS="-DOPENSSL_NO_EC=1"

I've deleted the ~/.kerl directory and repeated the steps but it just doesn't seem to be including 'crypto'.

Can anyone suggest something else I could try, desperate to get R18 built and activated.

A note about Fedora 16

Having recently installed Erlang via kerl on a Fedora machine I've noticed the following, which might be of help for someone.

By default, the sudoers configuration for Fedora doesn't keep the value of the $HOME variable, which is used by kerl script.

This means that if you run the kerl build command from normal user, sudoing just to run the kerl install command, this will fail, kerl not being able to find any build:

$ ./kerl build R15B01 r15b01
Getting the available releases from erlang.org...
[...]
Agner has been successfully built
$ sudo ./kerl install r15b01 /opt/erlang/r15b01
No build named r15b01
$ ./kerl build R15B01 r15b01
There's already a build named r15b01
./kerl list builds
R15B01,r15b01

I understand this is not a bug in kerl, but it would be useful to provide a more verbose output to the user, for example showing where kerl is looking for builds.

License

Hi,

Please can you include some kind of license for this project?

Aaron

Build failure for R13B03 on OS X 10.7

Installed kerl from trunk as of a few minutes ago.

Ran a basic build of R13B03 and got a weird error/success response. Went to install this build and ended up getting a flat out error.

$ kerl build R13B03 R13B03-default
Adjust compiler settings for OS X: using gcc-4.2
Downloading otp_src_R13B03.tar.gz to /Users/davisp/.kerl/archives
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 54.8M  100 54.8M    0     0   183k      0  0:05:05  0:05:05 --:--:--  138k
Getting the checksum file from erlang.org...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 15390  100 15390    0     0  20544      0 --:--:-- --:--:-- --:--:-- 25778
Verifying archive checksum...
Checksum verified (411fcb29f0819973f71e28f6b56d9948)
Extracting source code
Building Erlang/OTP R13B03 (R13B03-default), please wait...
/usr/local/bin/kerl: line 326: cd: /Users/davisp/.kerl/builds/R13B03-default/release_R13B03: No such file or directory
Erlang/OTP R13B03 (R13B03-default) has been successfully built

$ kerl install R13B03-default ~/otp/R13B03-default
Adjust compiler settings for OS X: using gcc-4.2
Installing Erlang/OTP R13B03 (R13B03-default) in /Users/davisp/otp/R13B03-default...
Couldn't install Erlang/OTP R13B03 (R13B03-default) in /Users/davisp/otp/R13B03-default

Install via binary packages

Right now, kerl compiles each Erlang runtime from source when kerl build and kerl install are called. This is a rather time-consuming process, and this makes harder and harder to support multiple versions of Erlang on Travis CI.

Tremendous amount of time will be saved if kerl can install from binary packages offered by Erlang Solutions. (Ubuntu packages are of most interest to Travis CI.) Some binary packages are not conducive to side-by-side installations, but some hacks may be possible.

Add git usage information

It took me some time to find that one has to enter kerl build git .. to start a build from git. Maybe the usage information for git should also be output when entering kerl build. Example:

usage:
    kerl build <release> <build_name>
    kerl git <git_url> <git_version> <build_name>

Add 'kerl deploy' command support

I added an experimental new 'clone' command to your handy kerl tool. This command copies a kerl managed installation directory to a specified remote host and directory. This command relies on ssh, rsync, and having password-less ssh access to the specified remote host.

The purpose of this command is to allow one to easily copy a kerl installation to a cluster of nodes.

I'd appreciate your review and comments. I understand this 'clone' command might not be appropriate for inclusion to the official kerl tool.

Please see the commit below.

https://github.com/norton/kerl/commit/fc24a6d1fbc40678d9f8f2cfc67017520b3b9fa3

get_newest_valid_release() needs changes for Erlang/OTP 17.0

The function get_newest_valid_release() does not work properly with the new versioning scheme. The newest version is not at the end of the file and the introduction of release candidates complicates the sort order.

The following (not soo pretty) implementation works as expected. Any other suggestions? ideas?

get_newest_valid_release()
{
    check_releases
    reltail=`cat $KERL_BASE_DIR/otp_releases | sed -e "s/^R\(.*\)/\1/" | sort | tail -1`
    relbase=`echo $reltail | sed -e "s/^\(.*\)-rc.*/\1/"`
    for rel in `cat $KERL_BASE_DIR/otp_releases | grep -x $relbase | tail -1`; do
        if [ ! -z "$rel" ]; then
            echo "$rel"
            return 0
        fi
    done
    for rel in $reltail; do
        if [ ! -z "$rel" ]; then
            echo "$rel"
            return 0
        fi
    done
    return 1
}

dot in install directory causes error

I installed my Erlang installation in ~/.erlang/r16b01 which causes an error when using this installation

e:path_eval([".","/Users/phil"],".erlang"): illegal operation on a directory

after moving the installtions to ~/erlang/r16b01 everything works fine. Seems like there is problem setting up the path if it contains a dot.

can't work on mac os x

i chmod u+x /Users/yy/erlang/r15b02/activate

and excute /Users/yy/erlang/r15b02/activate

just get:

zsh: command not found: erl

please help..

Can't delete builds

I'm using kerl installed from homebrew on OSX, brew takes it from master.

%kerl list builds
R16B03-1,r16b03-1
%kerl delete build r16b03-1
No build named r16b03-1
%kerl delete build  R16B03-1
No build named  R16B03-1

On my other machine, I've resorted to deleting the ~/.kerl directory, but that's kinda clunky.
Same old story, I built Erlang for 32 bit OS, need to delete.

kerl silently produces a build without crypto if libssl headers are missing

Porting issue from evax/kerl#13

If libssl headers are missing in the system, the resulting Erlang build will not include crypto module. Such Erlang build is pretty much useless. For instance, rebar won't be working without crypto.

It would be great if kerl were asking a user whether he wants to continue a build without crypto. A simpler but a still better way of handling this situation would be exiting with an error.

-- originally reported by @alavrik

erl_interface not for the architecture being linked

Howdy!
I am trying to use kerl to manage my erlang releases.

I did a clean install of R15B03, and R16B02.
When trying to compile c ports (for example syslog) I get the following error:

rebar compile
==> syslog (compile)
Compiling c_src/syslog_drv.c
ld: warning: ld: warning: ignoring file /Users/seb/bin/erlang/r15b03/lib/erl_interface-3.7.9/lib/libei.a, file was built for archive which is not the architecture being linked (i386): /Users/seb/bin/erlang/r15b03/lib/erl_interface-3.7.9/lib/libei.aignoring file /Users/seb/bin/erlang/r15b03/lib/erl_interface-3.7.9/lib/liberl_interface.a, file was built for archive which is not the architecture being linked (i386): /Users/seb/bin/erlang/r15b03/lib/erl_interface-3.7.9/lib/liberl_interface.a

For good measure I made sure rebar was compiled with the kerl managed versions of erlang (just to be safe).

Is kerl doing something clever with respect to erl_interface?

I am on new Macbook Air, running MacOSX 10.8.5.

Everything works fine when on an ubuntu laptop...

Any tips and suggestions what I could try? I looked through the kerl command, and I cannot really discover what it is that might be going wrong. Maybe someone with more intimate knowledge of the kerl internals knows something I have been missing that could help me on the way?

Thanks!

activete kerl paramete on FreeBSD 10.1

I try to use ( . -> dot command) on ubuntu 12.04 ,it's work fine ,but on target platform on my project is
FreeBSD 10.1 Dot commad(.) didn't work, Pls help me for provide solution on active parameter on kerl on activate it:
$ . /path/to/install/dir/activate - ubuntu

No curses library functions found

From a fresh install of Ubuntu 11.10 kerl failed to build R14B04. The build log shows:
configure: error: No curses library functions found
configure: error: /bin/bash '/home/bryanhunter/.kerl/builds/r14b04/otp_src_R14B04/erts/configure' failed for erts

I did a "sudo apt-get update" and tried to build with kerl again and it failed in the same way.

I then did a "sudo apt-get -y install libncurses5-dev". I tried again after that, and everything builds successfully.

Let me know if you need more info (I have a VM snapshot where I can reproduce the problem). Next week I can poke around in kerl. If I'm not too out of my depth and I manage to fix it, I'll send you a pull request.

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.