I am trying to run hadoop in my machine (Windows x64), but I get this error when building the sources:
[ERROR] Failed to execute goal org.apache.hadoop:hadoop-maven-plugins:2.3.0:protoc (compile-protoc) on project hadoop-common: org.apache.maven.plugin.MojoExecutionExcepti
on: 'protoc --version' did not return a version -> [Help 1]
As suggested in the documentation and explained in the BUILDING.txt, I have in my PATH vble the protoc path and from my Windows SDK I can call 'protoc --version' with no problem:
C:\Users\hernanbl\Downloads\hadoop-2.3.0-src\hadoop-common-project>protoc --version
libprotoc 2.5.0
Besides, the version is the same as used in hadoop 2.3.0 (the version I am trying to build). As defined in the documentation, I made further changes, such as declaring a Platform vble and so on.
I already googled the question and I found that I might not be the only one having this issue, but the answers don´t give me the clue to fix this...
Some ideas?? Thanks!!
I solved it by setting the environment variable pointing to the executable:
set HADOOP_PROTOC_PATH=C:\Path\To\protoc\protoc.exe
I got it.... still a solution I don´t like at all! If someone found a better one, please let me know:
Modify the class ProtocMojo, hardcoding the absolute path to the protoc.exe:
protocCommand= "C:\\development\\tools\\protoc\\protobuf-2.5.0\\src\\protoc.exe";
Related
I attempted to check the version of my go executable with go version on an Ubuntu machine, however I got the following error:
No version set for command go
Consider adding one of the following versions in your config file at
golang 1.16.8
golang 1.17.1
How do I resolve this? I have no prior experience with config file, I searched on google but I found nothing which could solve this issue.
That seems to be an error message from asdf-vm/asdf, a tool which manages multiple runtime versions with a single CLI tool, extendable via plugins.
You can see that error message in asdf-vm/asdf issue 838.
The config file should be in $HOME/.tool-versions
To resolve this, as in this example:
asdf plugin add go
asdf install go latest
Trying to build go application using bazel. It fails due to multiple packages and source files present within the application.
OS: Mac OS (High Sierra)
Bazel version : 0.11.1 (homebrew)
Go rules: 0.11.0
Defined local_repository in WORKSPACE to get external dependencies
Running following command
bazel build //go-app
leads to error
Action failed to execute: java.io.IOException: Cannot run program
"/usr/bin/sandbox-exec" (in directory
"/TEMP_DIR/PATH"):
error=7, Argument list too long
Target //go-app:go-app failed to build
I came across https://docs.bazel.build/versions/master/skylark/lib/Args.html#use_param_file and thought it would fix my issue. Could anyone point me in the direction of how and where to implement this in my BUILD file and make it work? Thanks.
I think it's not in your BUILD file but rather in rules_go.
I'd recommend opening them an issue since AFAIK this is something the rule implementation needs to support.
For example in rules_scala we write the arguments to a file and then pass that file to the worker exactly like how you mention above.
https://github.com/bazelbuild/rules_scala/blob/master/scala/private/rule_impls.bzl#L274
When running the bjam command I always come up with the following error.
I know I'm missing something like setting the env variables but not sure what should be the accurate value for those env variables. Your help would be highly appreciated.
Unable to load Boost.Build: could not find "boost-build.jam"
---------------------------------------------------------------
Attempted search from /tmp/libtorrent/libtorrent-rasterbar-1.1.4 up to the root
at /usr/share/boost-build
and in these directories from BOOST_BUILD_PATH and BOOST_ROOT: /tmp/libtorrent/libtorrent-rasterbar-1.1.4/build-aux/.
Please consult the documentation at 'http://www.boost.org'.
You need to build bjam, thats usually found under: boost/boost_x_xx_x/tools/jam/src but is built when you run the boost/boost_X_XX_X/bootstrap.sh.
Although this is built automatically you can force it to build by specifying on boost/boost_X_XX_X/bootstrap.sh --with-bjam the bootstrap.
In case of Arch Linux you can install the AUR boost-build package.
One way to allow b2 to find boost-build.jam is to define the environement variable BOOST_BUILD_PATH to point to the directory that contains it (where you did install or build b2).
There are other ways. More information in the documentation.
After update from 0.13.6 to 0.13.7 I cannot debug with SBT.
It is installed using Homebrew. I tried to reinstall it, brew doctor shows nothing.
I did not change/reinstall Java between SBT update.
lgr$ sbt -v -jvm-debug 5005 "project webapp" run
[process_args] java_version = '1.8.0_25'
# Executing command line:
java
-Xms1024m
-Xmx1024m
-XX:ReservedCodeCacheSize=128m
-XX:MaxMetaspaceSize=256m
-agentlib:jdwp:transport=dt_socket,server=y,suspend=n,address=5005
-jar
/usr/local/Cellar/sbt/0.13.7/libexec/sbt-launch.jar
"project webapp"
run
Error occurred during initialization of VM
Could not find agent library jdwp:transport on the library path, with error: dlopen(libjdwp:transport.dylib, 1): image not found
I am unsure whether SBT is missing some library, or brew formula didn't install properly.
I will be helpful for any idea how to fix it.
Reinstalled Java, didn't help.
Workaround I downloaded SBT 0.13.6 and it works without problem, so I start to consider this as a sbt bug. Can anyone help to clarify if it is?
To piggyback on Eugene's answer above, since the fix is in a bash script, it is pretty easy to apply the fix from https://github.com/sbt/sbt-launcher-package/pull/85/files manually. Just edit bin/sbt-launch-lib.bash to have this:
addJava "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=$1"
Instead of this:
addJava "-agentlib:jdwp:transport=dt_socket,server=y,suspend=n,address=$1"
(Mind the : not = between jdwp and transport).
It is installed using Homebrew.
Homebrew install is sanctioned by sbt project as a recommended way to install on Mac, but we (I'm one of the sbt devs) currently don't control it. We do however have the official package sbt/sbt-launcher-package, and last I checked Homebrew is also using it.
Looking at git blame of the relevant part of the script, it seems like the debug option was "fixed" in sbt/sbt-launcher-package#83:
In sbt-launch-lib.bash, -Xdebug option is used for debugging. We should use -agentlib option for Java 5+.
Maybe your issue should be tracked as a bug in sbt/sbt-launcher-package.
The problem was fixed in the 0.13.8 version.
At my case the bash fix didn't help but running from bash as:
export SBT_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005"
sbt
helped. It is from here.
I have installed Go on my server using the golang repo for CentOS 6.4. The paths are set correctly and I can run go version. When I try to download the package below I receive this error. Any help is appreciated
go get github.com/fiorix/freegeoip
# github.com/fiorix/freegeoip
cannot create <nil>/go.o: No such file or directory
googling that error I came across a thread that suggests that this is a bug with detecting a missing TMPDIR environment variable, for compiling the source during go get.
run export TMPDIR=/tmp and it should work.
See here:
https://groups.google.com/forum/#!topic/golang-dev/LnxmgwB0r3Q