version mismatch error from rebar get-deps - erlang

when I run rebar get-deps I get this error message:
WARN: /home/me/test/deps/epcap/src/epcap.app.src has version "1.0.0"; requested regex was 0.7.9
WARN: /home/me/test/deps/epcap/src/epcap.app.src has version "1.0.0"; requested regex was 0.7.9
ERROR: Dependency dir /home/me/test/deps/epcap failed application validation with reason:
{version_mismatch,{"/home/me/test/deps/epcap/src/epcap.app.src",
{expected,"0.7.9"},
{has,"1.0.0"}}}
I am new to this kind of programming and could not find much answers online. any help much appreciated

Related

Issues with running remix Binary in Bazel sandbox

I've encountered an issue trying to use bazel as a build tool for remix. I've been able to run remix in dev mode but currently unable to get remix build to work.
I've encountered a few errors that led up to this point. I'll list the errors in the order which they occurred with my fixes (just incase any of the fixes introduces a new issue)
First error in the bazel sandbox is related to a transitive dependency of #remix-run/dev (#remix-run/dev->gunzip-maybe->browserify-zlib). Bazel failed to fetch the bazel repository #npm__browserify-zlib__0.1.4. I assumed this was a bazel issue and tried to override browserify-zlib#0.1.4 with browserify-zlib#0.2.0, which worked. Here is bazel error for reference:
ERROR: /Users/emmanuel/projects/bbbazel/WORKSPACE:89:17: fetching _npm_import rule //external:npm__browserify-zlib__0.1.4: Traceback (most recent call last):
File "/private/var/tmp/_bazel_emmanuel/f416ba8913b741927ac435783e3163e0/external/aspect_rules_js/npm/private/npm_import.bzl", line 471, column 27, in _impl
pkg_json = json.decode(rctx.read(pkg_json_path))
Error in decode: at offset 685, object has duplicate key: "main"
ERROR: /private/var/tmp/_bazel_emmanuel/f416ba8913b741927ac435783e3163e0/external/npm/BUILD.bazel:3012:6: #npm//:npm__browserify-zlib__0.1.4_source_directory depends on #npm__browserify-zlib__0.1.4//:source_directory in repository #npm__browserify-zlib__0.1.4 which failed to fetch. no such package '#npm__browserify-zlib__0.1.4//': at offset 685, object has duplicate key: "main"
Next error in the bazel sandbox is related to another transitive dependency of #remix-run/dev (#remix-run/dev->xdm->deasync). The install lifecycle hook for the deasync npm package makes a call to the node-gyp binary which doesn't exist in the sandbox and the bazel build command fails during setup. To fix this, I disabled the install lifecycle hook (I also disabled it with a pnpm install outside the sandbox and the remix build command executed perfectly) which led to the final error. Here's the error message for this error:
/Users/emmanuel/projects/bbbazel/BUILD.bazel:5:22: Running lifecycle hooks on npm package deasync#0.1.28 failed: (Exit 1): lifecycle-hooks.sh failed: error executing command (from target //:.aspect_rules_js/node_modules/deasync#0.1.28/lc) bazel-out/darwin_arm64-opt-exec-2B5CBBC6/bin/external/aspect_rules_js/npm/private/lifecycle/lifecycle-hooks.sh deasync ../../../external/npm__deasync__0.1.28/package ... (remaining 1 argument skipped)
/private/var/tmp/_bazel_emmanuel/f416ba8913b741927ac435783e3163e0/execroot/fleet/bazel-out/darwin_arm64-fastbuild/bin/external/aspect_rules_js/npm/private/lifecycle/min/node-gyp-bin/node-gyp: line 5: 1211: command not found
node-gyp not found! Please upgrade your install of npm! You need at least 1.1.5 (I think) and preferably 1.1.30.
> deasync#0.1.28 install /private/var/tmp/_bazel_emmanuel/f416ba8913b741927ac435783e3163e0/execroot/fleet/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/deasync#0.1.28/node_modules/deasync
> node ./build.js
===============================================================
Failure while running lifecycle hook for package 'deasync#0.1.28':
Script: 'install'
Command: `node ./build.js`
Stack trace:
spawn ENOENT
at ChildProcess.<anonymous> (/private/var/tmp/_bazel_emmanuel/f416ba8913b741927ac435783e3163e0/execroot/fleet/bazel-out/darwin_arm64-fastbuild/bin/external/aspect_rules_js/npm/private/lifecycle/min/index.min.js:1:91930)
at ChildProcess.emit (node:events:513:28)
at maybeClose (node:internal/child_process:1100:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)
The final error suggests a bug with remix, but since it only occurs in the bazel sandbox I think it may be an issue that cuts across bazel and remix. The error returned is shown below:
The following error is a bug in Remix; please open an issue! https://github.com/remix-run/remix/issues/new
Missing output for entry point
Error
at Object.onCompileFailure (/private/var/tmp/_bazel_emmanuel/f416ba8913b741927ac435783e3163e0/sandbox/darwin-sandbox/1566/execroot/fleet/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/#remix-run+dev#1.12.0_#remix-run+serve#1.12.0/node_modules/#remix-run/dev/dist/cli/commands.js:180:13)
at Object.compile (/private/var/tmp/_bazel_emmanuel/f416ba8913b741927ac435783e3163e0/sandbox/darwin-sandbox/1566/execroot/fleet/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/#remix-run+dev#1.12.0_#remix-run+serve#1.12.0/node_modules/#remix-run/dev/dist/compiler/remixCompiler.js:34:134)
at async Object.build (/private/var/tmp/_bazel_emmanuel/f416ba8913b741927ac435783e3163e0/sandbox/darwin-sandbox/1566/execroot/fleet/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/#remix-run+dev#1.12.0_#remix-run+serve#1.12.0/node_modules/#remix-run/dev/dist/compiler/build.js:33:3)
at async Object.build (/private/var/tmp/_bazel_emmanuel/f416ba8913b741927ac435783e3163e0/sandbox/darwin-sandbox/1566/execroot/fleet/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/#remix-run+dev#1.12.0_#remix-run+serve#1.12.0/node_modules/#remix-run/dev/dist/cli/commands.js:175:3)
at async Object.run (/private/var/tmp/_bazel_emmanuel/f416ba8913b741927ac435783e3163e0/sandbox/darwin-sandbox/1566/execroot/fleet/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/#remix-run+dev#1.12.0_#remix-run+serve#1.12.0/node_modules/#remix-run/dev/dist/cli/run.js:449:7)
Building Remix app in production mode...
Target //examples/remix:build failed to build
I've tried to run it outside bazel and with pnpm (I added the override to the package.json for browserify-zlip#0.2.0, then I ran pnpm instal with --ignore-scripts flag) and it builds fine.
I'm not sure if this is a bug with remix or a bazel issue. Has anyone else experienced this? Or does anyone having a working version of remix with bazel as the build tool?
I've created a minified version of the repository in the state of the 3rd error https://github.com/noelenwenede/bbbazel. Start up instructions are in the readme file.

How can I fix the nix-shell error "error: creating directory '/nix/var': Permission denied"?

I'm getting strang errors while trying to run nix-shell suddenly. It used to work fine, but then through no fault of my own I started getting these errors:
jon#jon-laptop ~/D/C/D/0/color-word-analyzer (master)> nix-shell
building '/nix/store/02szzrd1w7wqmnkh9is5qlx64m7r6f1z-cabal2nix-color-word-analyzer.drv'...
installing
error: creating directory '/nix/var': Permission denied
error: creating directory '/nix/var': Permission denied
** need a revision for VCS when the hash is given. skipping.
** need a revision for VCS when the hash is given. skipping.
** need a revision for VCS when the hash is given. skipping.
** need a revision for VCS when the hash is given. skipping.
cabal2nix: user error (Failed to fetch source. Does this source exist? Source {sourceUrl = "/nix/store/fvka3nd7slnqgjvfkjg649v77y10lc89-color-word-analyzer", sourceRevision = "", sourceHash = Guess "", sourceCabalDir = ""})
builder for '/nix/store/02szzrd1w7wqmnkh9is5qlx64m7r6f1z-cabal2nix-color-word-analyzer.drv' failed with exit code 1
error: build of '/nix/store/02szzrd1w7wqmnkh9is5qlx64m7r6f1z-cabal2nix-color-word-analyzer.drv' failed
Color-word analyzer is the name of the Haskell project I'm developing. The default.nix for it is here and is pretty simple, so I don't get why this would be causing these errors.
It looks like cabal2nix is invoking a Nix command inside the sandbox. This is not permitted and probably happened by mistake in the version of Nixpkgs in your NIX_PATH. I was able to build the project with
nix-build -I nixpkgs=channel:nixos-unstable
Off-topic: recursive nix invocation will be supported with some restrictions for purity and hermeticity of results.

How to fix error with CMake while installing LuaDist on Windows 10

I've been trying to install Luadist, but an error with CMake always happens and in the end it doesn't install because of it.
This seems to be a common issue on Windows 10. I've followed the instructions from https://github.com/LuaDist/Repository/wiki/LuaDist%3A-Installation and https://github.com/LuaDist/Repository/wiki/Installation-of-System-Dependencies#microsoft-windows . I've tried uninstalling it and installing it again, but it didn't work. I tried installing Lua on the same drive as LuaDist, but it still doesn't work. I think the error might be because I also have LuaRocks installed, I don't know if they are compatible together.
[ 37%] Performing configure step for 'luafilesystem'
loading initial cache file C:/Users/User/_bootstrap/_bootstrap/tmp/config.cmake
CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.15/Modules/CMakeMinGWFindMake.cmake:12 (message):
sh.exe was found in your PATH, here:
C:/Program Files/Git/usr/bin/sh.exe
For MinGW make to work correctly sh.exe must NOT be in your path.
Run cmake from a shell that does not have sh.exe in your PATH.
If you want to use a UNIX shell, then use MSYS Makefiles.
Call Stack (most recent call first):
CMakeLists.txt:7 (project)
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
CMakeFiles\luafilesystem.dir\build.make:106: recipe for target 'luafilesystem/src/luafilesystem-stamp/luafilesystem-configure' failed
mingw32-make.exe[3]: *** [luafilesystem/src/luafilesystem-stamp/luafilesystem-configure] Error 1
CMakeFiles\Makefile2:114: recipe for target 'CMakeFiles/luafilesystem.dir/all' failed
mingw32-make.exe[2]: *** [CMakeFiles/luafilesystem.dir/all] Error 2
CMakeFiles\Makefile2:175: recipe for target 'CMakeFiles/install.dir/rule' failed
mingw32-make.exe[1]: *** [CMakeFiles/install.dir/rule] Error 2
Makefile:156: recipe for target 'install' failed
mingw32-make.exe: *** [install] Error 2
## Bootstrap done, building LuaDist using LuaDist
'C:\Users\User\_bootstrap\_bootstrap\bin\luadist.exe' is not recognized as an internal or external command,
operable program or batch file.
## LuaDist is now built and can be found in C:\Users\User\_bootstrap\_install
At the end it says that LuaDist is built in C:\Users\User_bootstrap_intall , but that folder doens't exist after the installation.

Unable to clone the repository in git_repository in bazel with ubuntu 15.10

I am trying to compile the following heron branch
https://github.com/twitter/heron/tree/karthik/pexbuild
using bazel 0.3.1 in ubuntu 15.10. In the workspace, I refer to another repo containing the pex bazel rules at
https://github.com/streamlio/bazel_rules_pex
I am getting the following error (interestingly it does not occur in ubuntu14.04, ubuntu16.10, centos7 and mac). Any help will be appreciated?
bazel build --config=ubuntu --verbose_failures heron/...
ERROR: com.google.devtools.build.lib.packages.BuildFileContainsErrorsException: error loading package '': Encountered error while reading extension file 'pex/pex_rules.bzl': no such package '#io_bazel_rules_pex//pex': Error cloning repository: https://github.com/streamlio/bazel_rules_pex.git: cannot open git-upload-pack caused by https://github.com/streamlio/bazel_rules_pex.git: cannot open git-upload-pack caused by java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty caused by Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty caused by the trustAnchors parameter must be non-empty.
There were many fixes and improvements in remote repositories, I'd advice you to upgrade bazel before trying anything else.

Chef - Recipe package fails to find candidate version

I am installing and configuring a very basic Jenkins installation using Chef. When i attempt to run the following recipe:
include_recipe "apt::default"
apt_repository "jenkins" do
uri "http://pkg.jenkins-ci.org/debian"
key "http://pkg.jenkins-ci.org/debian/jenkins-ci.org"
components ["binary/"]
action :add
end
package "jenkins" do
version '2.62'
end
service "jenkins" do
supports [:stop, :start, :restart]
action [:start, :enable]
end
I receive the following errors (displayed in the terminal):
192.168.9.207 [2017-05-25T10:50:58-04:00] ERROR: Running exception handlers
192.168.9.207 Running handlers complete
192.168.9.207 [2017-05-25T10:50:58-04:00] ERROR: Exception handlers complete
192.168.9.207 Chef Client failed. 2 resources updated in 20 seconds
192.168.9.207 [2017-05-25T10:50:58-04:00] INFO: Sending resource update report (run-id: 2b59b80e-b787-4e93-805b-837b4d3264fb)
192.168.9.207 [2017-05-25T10:50:58-04:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
192.168.9.207 [2017-05-25T10:50:58-04:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
192.168.9.207 [2017-05-25T10:50:58-04:00] ERROR: apt_package[jenkins] (jenkins-installation::default line 21) had an error: Chef::Exceptions::Package: No candidate version available for jenkins
192.168.9.207 [2017-05-25T10:50:58-04:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
The error explains that there is no candidate version available for Jenkins. After the run fails, if I run sudo apt-get update on the managed node I receive the following error:
Err http://pkg.jenkins-ci.org trusty/binary/ amd64 Packages
404 Not Found
Err http://pkg.jenkins-ci.org trusty/binary/ i386 Packages
404 Not Found
Ign http://pkg.jenkins-ci.org trusty/binary/ Translation-en_US
Ign http://pkg.jenkins-ci.org trusty/binary/ Translation-en
Fetched 5,976 kB in 3s (1,528 kB/s)
W: Failed to fetch http://pkg.jenkins-ci.org/debian/dists/trusty/binary//binary-amd64/Packages 404 Not Found
W: Failed to fetch http://pkg.jenkins-ci.org/debian/dists/trusty/binary//binary-i386/Packages 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
I am fairly new to Chef. This error appears to be related to retrieving a Jenkins package, however I am not sure how to remedy this error. Please let me know if additional information is required to troubleshoot this issue.
Thank you to everybody in advance for any guidance you are able to provide. I have searched through the Chef documentation but haven't seen much aside from specifying the package version: https://docs.chef.io/resource_package.html.
Specify distribution 'binary/' instead of components 'binary/'. This will fix the 404s that you get because of trusty/binary/.
At least, this is what I see from the "official" Jenkins cookbook, which I btw. suggest to use.
EDIT: So the result would be:
apt_repository "jenkins" do
uri "http://pkg.jenkins-ci.org/debian"
key "http://pkg.jenkins-ci.org/debian/jenkins-ci.org"
distribution "binary/"
end

Resources