Systools aborted when generating upgrade with rebar - erlang

I wanted to use rebar to release and upgrade my app in windows 7 and my erlang version is R15B. Following the wiki of rebar, I had already released a version. However, I came across a problem in doing upgrade. When I after typing this command:
rebar generate-upgrade previous_release=exemplar_1
it showed me this error:
ERROR: Systools [systools:make_tar/2] aborted with: [{error_add_appl,
{hipe,
{tar_error,
{add,
"f:/exemplar/rel/exemplar_1/lib/hipe-3.9/ebin/hipe.beam",
{"f:/exemplar/rel/exemplar_1/lib/hipe-3.9/ebin/hipe.beam",
enoent}}}}}]
ERROR: 'generate-upgrade' failed while processing f:/exemplar/rel: rebar_abort
Before typing this command, I replaced {start_phases, undefined} entry with {start_phases,[]} in all .app files.
I can't find anything helpful in google, so I ask for help here.

Related

brew install specific version of a package fails

For my project, I need to install a specific version of the icu4c package. I used to follow the instructions written in this answer and it was working. However, recently, when I needed to do the same, it failed with the following error
Error: icu4c: undefined method `cellar' for #<BottleSpecification:0x00007fa0d75096a8>
After some investigations, I concluded that brew has new style of .rb files and old versions may not be compatible. To fix it, I run brew style --fix icu4c.rb which seemed to fix the style issues. However, now, I got the following error:
Error: Failed to load cask: ./icu4c.rb
Cask 'icu4c' is unreadable: wrong constant name #<Class:0x00007fa68d2d9278>
Warning: Treating ./icu4c.rb as a formula.
==> Downloading https://ghcr.io/v2/homebrew/core/icu4c/manifests/67.1
#=#=#
curl: (22) The requested URL returned error: 404
Error: Failed to download resource "icu4c_bottle_manifest"
Download failed: https://ghcr.io/v2/homebrew/core/icu4c/manifests/67.1
I saw a number of places that this might be due to curl or xcode command line tools. I updated both of them but could not proceed further. Any help would be greatly appreciated.

Why cannot I run rebar3 commands in an application generated with rebar3?

I have been trying to generate a rebar3 application, however I have encountered a problem, I have generated new app using rebar3, and when I try to compile it I get error as such:
> ===> Verifying dependencies...
> ===> Uncaught error in rebar_core.
The same error is given when I try to use rebar3 shell. However I can use command rebar3 shell in every other directory including sub directories of the generated application.
rebar3 version returns:
rebar 3.14.0-rc1+build.4613.reffb58aa1f on Erlang/OTP 22 Erts 10.6
I ahve no idea what might cause the error and will be thankfull for any suggestions.
Try do rebar clean and remove _build folder in your application, then try run rebar compile
Couple of ideas.
Try setting DEBUG and run your rebar3 command, i.e. export DEBUG=1.
You are running a release candidate for a new rebar3 version, maybe try the latest 3.13.X version.

How do I fix cargo's "failed to parse manifest at ..." "editions are unstable" error?

I tried to augment my rust project with a dependency on jni="0.12.3" and my next cargo build failed with the following error:
error: unable to get packages from source
Caused by:
failed to parse manifest at `/home/thoth/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.32/Cargo.toml`
Caused by:
editions are unstable
Caused by:
feature `edition` is required
consider adding `cargo-features = ["edition"]` to the manifest
I'm running cargo built from gentoo's dev-util/cargo-0.30.0 ebuild.
Since rust is a quickly-evolving language, the latest crates seem to use new features that my older version of cargo did not support. And since rust/cargo did not have something like portage's EAPI marker, the old cargo did not have a way to figure that out, so the error message was a bit indirect.
I have a theory that the Cargo.lock could be tweaked to use an older version of the backtrace crate, but I was not able to figure out a procedure to do this.
Upgrading to the rust-1.34.2 ebuild, and (don't forget this step:) then using eselect rust set 1 activated the new version of cargo, and it was able to build the package without malfunctioning.

rebar generate fails after compile successes

I am new to rebar and try to create a demo app to understand the flow.
I have downloaded rebar & ran bootstrap.
I created a project according to this manual:
justenough-otp1
when I run the compile it compiles all the files and when it runs it.
when i try to generate the app it gives me the following error:
WARN: 'generate' command does not apply to directory /users/olive/poznov/Downloads/rebar-master/learn/apps
Command 'generate' not understood or not applicable
i tried to run
./rebar generate
from both the parent folder and apps folder (of course changing the path in the rebar.config file)
any ideas what might cause the problem?
The generate command is used to build a release. It is much more than a simple application: it contains the VM, your application and all the libraries and dependencies needed. So it needs some more information to be generated. You can look at Erlang rebar tutorial: generating releases and upgrades or LYSE release with reltool for more information (learning from the Eralang documentation is much more difficult)

Can't compile Erlang R14B03 when trying install RabbitMQ using Homebrew on Mac OS X

I am developing a django app and it will utilize the Celery notification system. To use Celery I need the install the RabbitMQ server. I am trying to install it using homebrew. So I just:
sudo brew install rabbitmq
But erlang is a prerquisit for the install. So Homebrew tries to compile erlang-otp (R14B03), but during this process it always gets stuck for hours. I even let it sit over night and nothing happend. So I aborted the compilation and did:
sudo brew install -v erlang
to see the progress of the compile. It gets stuck a the and states the following error:
=== Entering application hipe
(cd ../main && make hipe.hrl)
sed -e "s;%VSN%;3.8;" ../../hipe/main/hipe.hrl.src > ../../hipe/main/hipe.hrl
erlc -W +debug_info +inline -o../ebin hipe_rtl.erl
(no error logger present) error: "Error in process <0.1.0> with exit value: {{badfun,[<<5 bytes>>,<<69 bytes>>,<<9 bytes>>,<<3 bytes>>,<<2 bytes>>,<<5 bytes>>,<<11 bytes>>,<<2 bytes>>,<<8 bytes>>,<<8 bytes>>,<<5 bytes>>,<<7 bytes>>,<<5 bytes>>,<<11 bytes>>,<<2 bytes>>,<<11 bytes>>,<<15 bytes>>,<<4 bytes>>,<<72 bytes>>,<<5 bytes>>,<<1 byte>>,<<7 bytes>>,<<10 bytes>>,<<7 bytes>>,<<6 bytes>>,<<7 bytes>>,<<7 bytes>>,<<6 bytes>>,<<12 bytes>>]},[{erlang,apply,2}]}\n"
I've tried it multiple times, but I get he same result. Could be because I have the wrong version of autoconf? Have any of you guys had a similar experience? What are some recommendations to get a successful compile?
I appreciate the help. Many thanks in advance.
Erlang has problems building with Xcode 4's compilers.
You should be able to get it to compile if you turn off optimization with CFLAGS=-O0.
You can get a pre-compiled package for Mac OSX from Erlang Solutions.
I had the same issue on a new Lion install with Xcode 4.1. The following command installed erlang successfully.
brew install erlang --use-gcc

Resources