/bin/bash: no: command not found: when trying to use a make:model command with J.DepP - c++

When trying to run a Makefile from J.DepP, I keep getting /bin/bash: no: command not found. Does anyone know how to fix this? Is there a no program to install?
// Command that fails (split into 2 lines for readability)
find /home/jdepp-2015-10-05/KNBC_v1.0_090925/corpus1 -type f -name "KN*" | LC_ALL=C sort | xargs cat |
no /home/jdepp-2015-10-05/tools/knbc2kyoto.py KNP | no /home/jdepp-2015-10-05/tools/replace_pos.py /home/linuxbrew/.linuxbrew/bin/mecab -d /home/linuxbrew/.linuxbrew/lib/mecab/dic/unidic > model/knbc/train.JDP.euc
/bin/bash: no: command not found
/bin/bash: no: command not found
xargs: cat: terminated by signal 13
make: *** [Makefile:948: knbc] Error 127
That is the error I'm getting, where it's trying to run the no command. When I type no in terminal, it doesn't exist. Line 948 of the Makefile is just the command above.
Has anyone successfully installed J.DepP and fixed this error?

This was actually an issue because python wasn't installed and J.DepP's makefile didn't return a fail for a critical dependency.
Install python, run make clean && ./configure and the issue with disappear.

Related

'fatal error: 'wchar.h' file not found' error with the new macos 11.3 update

I'm totally new to c++ (just started learning from scratch yersterday).
Today I had this macos update to 11.3 and now when I run my c++ code in clion I get this error,
====================[ Build | untitled | Debug ]================================
/Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake --build /Users/nibin/CLionProjects/untitled/cmake-build-debug --target untitled -- -j 6
[ 50%] Building CXX object CMakeFiles/untitled.dir/main.cpp.o
clang: warning: no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk' [-Wmissing-sysroot]
In file included from /Users/nibin/CLionProjects/untitled/main.cpp:1:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iostream:37:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ios:214:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iosfwd:95:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/wchar.h:119:15: fatal error: 'wchar.h' file not found
#include_next <wchar.h>
^~~~~~~~~
1 error generated.
make[3]: *** [CMakeFiles/untitled.dir/main.cpp.o] Error 1
make[2]: *** [CMakeFiles/untitled.dir/all] Error 2
make[1]: *** [CMakeFiles/untitled.dir/rule] Error 2
make: *** [untitled] Error 2
I scoured the internet but didn't understand a word. I did try some of it and got this in my terminal,
➜ ~ xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
➜ ~ xcrun --show-sdk-path
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
➜ ~ sudo xcode-select --switch /Library/Developer/CommandLineTools/
Password:
➜ ~ xcrun --show-sdk-path
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
I already have xcode tools and its up to date. I tried one of the solutions which was to change the path but still didn't work. So I just brought back the files to its original location,
➜ ~ sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer/
➜ ~ xcrun --show-sdk-path
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
There was another solution which I tried and got an error,
➜ ~ open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
The file /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg does not exist.
I opened the /Library/Developer/CommandLineTools/ and I got this,
➜ ~ cd /Library/Developer/CommandLineTools
➜ CommandLineTools ls
Library SDKs usr
Some solutions involving clearing the cache "Delete any old CMakeCache.txt in current project and dependencies and rebuild solves the problem." Sorry if this sounds dumb but I'm don't quite understand it. Does it mean we have to delete the entire file CMakeCache.txt or is it just the contents.
"We suppose that Tools | CMake | Reset Cache and Reload project should help in this case."
(https://intellij-support.jetbrains.com/hc/en-us/community/posts/360000919219-Clion-can-t-compile-because-of-wchar-h-not-found-after-updated-Mojave-in-mac-)
That worked for me

ocamlc - compiling ocaml-wasm - Error: /usr/lib/ocaml/bigarray.cma is not a bytecode object file

I'm trying to make install ocaml-wasm 1.
Unfortunately the build is failing with the error-message:
Error: /usr/lib/ocaml/bigarray.cma is not a bytecode object file
Here's a Dockerfile so you may reproduce the error:
FROM base/archlinux
RUN pacman -Sy --noconfirm ocaml ocamlbuild wget unzip make
RUN wget https://github.com/WebAssembly/spec/archive/v1.0.zip
RUN unzip v1.0.zip
CMD cd spec-1.0; make -C interpreter install; bash
You may run it:
docker build -t ocaml-wasm . && docker run --rm -it ocaml-wasm
It should find it to produce the same error as above.
Here's the entire output of the make command:
make: Entering directory '/spec-1.0/interpreter'
ls util/*.ml* syntax/*.ml* binary/*.ml* text/*.ml* valid/*.ml* runtime/*.ml* exec/*.ml* script/*.ml* host/*.ml* main/*.ml* \
| sed 's:\(.*/\)\{0,1\}\(.*\)\.[^\.]*:\2:' \
| grep -v main \
| sort | uniq \
>wasm.mlpack
echo >_tags "true: bin_annot"
echo >>_tags "<{util,syntax,binary,text,valid,runtime,exec,script,host,main}/*.cmx>: for-pack(Wasm)"
ocamlbuild -cflags '-w +a-4-27-42-44-45 -warn-error +a' -I util -I syntax -I binary -I text -I valid -I runtime -I exec -I script -I host -I main -libs bigarray -quiet wasm.cmx
+ /usr/bin/ocamlc.opt -pack bigarray.cma -bin-annot util/lib.cmo binary/utf8.cmo exec/float.cmo exec/f32.cmo exec/f64.cmo exec/numeric_error.cmo exec/int.cmo exec/i32.cmo exec/i64.cmo syntax/types.cmo syntax/values.cmo runtime/memory.cmo util/source.cmo syntax/ast.cmo util/error.cmo binary/encode.cmo exec/i64_convert.cmo syntax/operators.cmo binary/decode.cmo script/script.cmo text/parser.cmo text/lexer.cmo text/parse.cmo util/sexpr.cmo text/arrange.cmo exec/i32_convert.cmo exec/f32_convert.cmo exec/f64_convert.cmo exec/eval_numeric.cmo runtime/func.cmo runtime/global.cmo runtime/table.cmo runtime/instance.cmo exec/eval.cmo host/env.cmo main/flags.cmo script/import.cmo script/js.cmo text/print.cmo valid/valid.cmo script/run.cmo host/spectest.cmo -o wasm.cmo
File "_none_", line 1:
Error: /usr/lib/ocaml/bigarray.cma is not a bytecode object file
Command exited with code 2.
make: *** [Makefile:83: _build/wasm.cmx] Error 10
rm wasm.mlpack _tags
make: Leaving directory '/spec-1.0/interpreter'
How do I get ocaml-wasm to compile?
I've seen 2, but the answer doesn't help me. I've not installed any non-standard binaries. Could the ocaml distribution on arch linux be broken?
I suspect that your ocamlbuild version is 0.13 (see ocamlbuild --version), which is known to have this issue. You should use 0.12 to avoid the problem.
ocamlbuild 0.13 is not package on opam because of this problem (so it's not visible to most users), but I hadn't considered that distribution packagers may decide to package it nonetheless.

while installing zamfoo on server it failed and I entered this command now unable to install or uninstall or reinstall

the three command i entered are
cd /usr/bin
mv perl perl-backup
ln -s /usr/bin/perl /usr/local/bin/perl
this is causing me error bad interpreter: too many levels of symbolic links
Please tell me how to undo this command
Since you only had problems with creating a symlink at the end, you should only need to undo your move, with:
mv perl-backup perl
You should look at the output of:
ls -l /usr/bin/perl /usr/local/bin/perl
to see if either of them are symlinks already.

Building Mono from Source (not git) Fails with mcs: Command not found

Building mono from downloaded source on an Android device. Ran make get-monolite-latest and still get the following errors
make[2]: Entering directory `/bld/mono/mono-4.0.0/runtime'
if test -w /bld/mono/mono-4.0.0/mcs; then :; else chmod -R +w /bld/mono/mono-4.0.0/mcs; fi
cd /bld/mono/mono-4.0.0/mcs && make --no-print-directory -s NO_DIR_CHECK=1 PROFILES='binary_reference_assemblies net_4_5 xbuild_12 xbuild_14 monodroid ' CC='gcc --sysroot=/usr/gcc-4.9.2/sysroot' all-profiles
make[6]: mcs: Command not found
make[6]: *** [build/deps/basic-profile-check.exe] Error 127
*** The compiler 'mcs' doesn't appear to be usable.
*** Trying the 'monolite' directory.
Illegal instruction
make[8]: *** [build/deps/basic-profile-check.exe] Error 132
*** The contents of your 'monolite' directory may be out-of-date
*** You may want to try 'make get-monolite-latest'
I've found what I think is the mcs executable in runtime/_tmpdir/bin, but copying it to where the build seems to be looking for it doesn't help.
How do I resolve this?
As the error message suggests: You may want to try the command 'make get-monolite-latest'
You need a certain mono version for building mono 4, I think it was >= 3.8 or so. The monolite should help out in this case.

Building a Debian package tries to install to real /opt

This is again one these nice Debian packaging problems.
I have an app that installs to /opt (the install location is actually irrelevant, the same problem occurs with /usr):
OPT=1 ./configure && make && make install
I took a working Debian packaging from my other app, that used CMake, but the configuring, build and installation were similar. I modified the rules file a bit to build my new app:
build: build-stamp
build-stamp:
dh_testdir
# Add here commands to compile the package.
OPT=1 ./configure && $(MAKE) -j$(shell cat /proc/cpuinfo | grep processor | wc -l)
touch build-stamp
I left the installation part untouched:
install: build
dh_testdir
dh_testroot
dh_prep
dh_installdirs
# Add here commands to install the package into debian/<packagename>
DESTDIR=`pwd`/debian/`dh_listpackages` $(MAKE) install
Now, the problem is that when I try to build the package, it tries to install
to the real /opt and crashes:
mkdir: cannot create directory ‘/opt/snm’: Permission denied
make[1]: *** [install_target] Error 1
make: *** [install] Error 2
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2
debuild: fatal error at line 1361:
dpkg-buildpackage -rfakeroot -D -us -uc -i -b failed
I just can't figure out why my packaging doesn't work with my new app. Or alternatively, why it DID work with the other app :)
It seems that my install step was just ignoring the DESTDIR given by the Debian rules file.