nvm: install fails on BSD while building from source - node.js

System Info: FreeBSD 11.3-RELEASE-p3, amd64
I have tried using nvm to install node v12.16.2, v10.20.1, and v10.15.3, however it fails building from source (no binary available for pull on BSD) with the same error on all three:
/usr/bin/ld:/usr/home/ifiht/.nvm/.cache/src/node-v12.16.2/files/out/Release/obj.target/tools/v8_gypfiles/libv8_libbase.a: file format not recognized; treating as linker script
/usr/bin/ld:/usr/home/ifiht/.nvm/.cache/src/node-v12.16.2/files/out/Release/obj.target/tools/v8_gypfiles/libv8_libbase.a:1: syntax error
Configure completes successfully:
$>./configure --prefix=/home/ifiht/.nvm/versions/node/v12.16.2 <
INFO: configure completed successfully
gmake -C out BUILDTYPE=Release V=0
and the last command before failure is:
/usr/bin/clang++ -o /usr/home/ifiht/.nvm/.cache/src/node-v12.16.2/files/out/Release/bytecode_builtins_list_generator -pthread -rdynamic -m64 -Wl,--export-dynamic -Wl,--start-group /usr/home/ifiht/.nvm/.cache/src/node-v12.16.2/files/out/Release/obj.target/bytecode_builtins_list_generator/deps/v8/src/builtins/generate-bytecodes-builtins-list.o /usr/home/ifiht/.nvm/.cache/src/node-v12.16.2/files/out/Release/obj.target/bytecode_builtins_list_generator/deps/v8/src/interpreter/bytecode-operands.o /usr/home/ifiht/.nvm/.cache/src/node-v12.16.2/files/out/Release/obj.target/bytecode_builtins_list_generator/deps/v8/src/interpreter/bytecodes.o /usr/home/ifiht/.nvm/.cache/src/node-v12.16.2/files/out/Release/obj.target/tools/v8_gypfiles/libv8_libbase.a -L/usr/local/lib -lexecinfo -Wl,--end-group
I'm out of troubleshooting ideas, if anyone knows how to enable nvm install verbosity that would also help, not sure why the linker is trying to read random .a (assembly?) files??

Related

Micronucleus does not update

I'm trying to upgrade my micronuclues to upload my code to digispark,but when I try to upgrade that happens:
Building command line tool: micronucleus...
gcc -Ilibrary -O -g -D LINUX -o micronucleus micronucleus.c micronucleus_lib.o littleWire_util.o -static -L/usr/lib/x86_64-linux-gnu -lusb
/usr/bin/ld: cannot find -lusb
collect2: error: ld returned 1 exit status
make: *** [Makefile:61: micronucleus] Error 1
I'm a little confused as to how you've gotten it compiling but not linking because, at least on Debian based distributions, the header file that would be needed during compiling is provided by the same package that provides the libusb.a that it is failing to link against.
If you are on a Debian based distro, try (re)installing libusb-dev:
sudo apt install libusb-dev
This is what I've built it against locally.
If you have a libusb.a and it's not in /usr/lib/x86_64-linux-gnu, then you'd need a different directory supplied to -L.

azure aztk installation pycryptodome

When I am installing the requirements for [Spark Aztk][1] there is an error while installing the dependencies for pycryptodome.
gcc -pthread -shared -Wl,-z,relro build/temp.linux-x86_64-3.6/src/MD2.o -L/usr/lib64 -lpython3.6m -o build/lib.linux-x86_64-3.6/Crypto/Hash/_MD2.cpython-36m-x86_64-linux-gnu.so
/bin/ld: cannot find -lpython3.6m
collect2: error: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
I think the problem is that it might be an error in the installation script that is missing one space in the "python3.6m" file using "-lpython3.6m" instead. But I'm not sure. I don't know if it is possible to use a different version of the dependency or not. Because I have already installed python 3.6 properly.
The OS is CentOS on Azure.
I just had this problem and saw that I didn't compiled the python interpreter correctly (I used --prefix but moved the interpreter to another place)

Installation of Kaldi, error on compiling gst-kaldi-nnet2-online on ubuntu 16.04

What i try to do is to install silvius-backend on my ubuntu 16.04 virtual machine, but unfortunately it is not working without the proper compile of both of kaldi and gst-kaldi-nnet2-online .
I have compiled kaldi successfully but I am experiencing a error when i try to compile gst-kaldi-nnet2-online.
I follow these instructions.
Here is what i do:
I am using Ubuntu 16.04.
I have compiled kaldi successfully with the following commands:
in kaldi/tools --> sudo make CXX=g++-5
in kaldi/src --> sudo CXX=g++-5 ./configure --shared, sudo make clean CXX=g++-5 ,sudo make depend CXX=g++-5 ,sudo make CXX=g++-5
I tried to do sudo make depend from ~/gst-kaldi-nnet2-online/src and i got an error like this:
Makefile:6: * Cannot find Kaldi's makefile /home/tanel/tools/kaldi- trunk/src/kaldi.mk. Specify Kaldi's root directory using KALDI_ROOT when issuing make, e.g.: KALDI_ROOT=/home/tanel/tools/kaldi-trunk make . Stop.
So In this path i have changed the path to: "KALDI_ROOT=~/kaldi"
And now i am getting an error like this :
g++-5 -M -std=c++11 -I.. -I/home/silvius/kaldi/tools/openfst/include -pthread -I/usr/include/gstreamer-1.0 -I/usr/lib/x86_64-linux-gnu/gstreamer-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Wall -Wno-sign-compare -Wno-unused-local-typedefs -Wno-deprecated-declarations -Winit-self -DKALDI_DOUBLEPRECISION=0 -DHAVE_EXECINFO_H=1 -DHAVE_CXXABI_H -DHAVE_ATLAS -I/home/silvius/kaldi/tools/ATLAS_headers/include -msse -msse2 -pthread -g -fPIC -I~/kaldi/src *.cc > .depend.mk
In file included from gst-audio-source.cc:22:0:
./gst-audio-source.h:23:33: fatal error: matrix/kaldi-vector.h: No such file or directory
compilation terminated.
In file included from ./gstkaldinnet2onlinedecoder.h:26:0,
from gstkaldinnet2onlinedecoder.cc:49:
././simple-options-gst.h:25:33: fatal error: util/simple-options.h: No such file or directory
compilation terminated.
In file included from simple-options-gst.cc:20:0:
./simple-options-gst.h:25:33: fatal error: util/simple-options.h: No such file or directory
compilation terminated.
Makefile:76: recipe for target 'depend' failed
make: [depend] Error 1 (ignored)
You can see the error on a picture aswell on this link
PS: the path to my Folders is that ones:
`~/kaldi` for kaldi's folder , and
`~/gst-kaldi-nnet2-online` for the gst-kaldi-nnet2-online.
(i cloned them from github inside `~/` in separated folders)
I dont know what to do next or what is the problem. I've been looking for a solution since days on the internet but i found nothing. Can someone help me?

Linker error in Codelite with MinGW-w64

I'm trying to use MinGW-W64 instead of MinGW in Codelite. When I compile simple "hello, world" project it's all right. But when I try to link some libraries, I get a strange linker error. Project with exactly same settings compiles by MinGW with any problems. There are build output for both variants:
MinGW GCC 4.8.1
`C:\Windows\system32\cmd.exe /C D:/apps/mingw/bin/mingw32-make.exe -j8 SHELL=cmd.exe -e -f Makefile
"----------Building project:[ code - Debug ]----------"
mingw32-make.exe[1]: Entering directory 'D:/Projects/codelite/code'
codelite-cc D:/apps/mingw/bin/g++.exe -c "D:/Projects/codelite/code/src/main.cpp" -Wfatal-errors -g -O0 -pedantic -W -std=c++11 -Wall -o ./Debug/src_main.cpp.o -I./inc/
D:/apps/mingw/bin/g++.exe -o bin/code #"code.txt" -L./lib/ -lopengl32
mingw32-make.exe[1]: Leaving directory 'D:/Projects/codelite/code'
====0 errors, 0 warnings====`
MinGW-W64 GCC 5.2.0
`C:\Windows\system32\cmd.exe /C D:/apps/mingw-w64/mingw32/bin/mingw32-make.exe -j8 SHELL=cmd.exe -e -f Makefile
"----------Building project:[ code - Debug ]----------"
mingw32-make.exe[1]: Entering directory 'D:/Projects/codelite/code'
codelite-cc D:/apps/mingw-w64/mingw32/bin/g++.exe -c "D:/Projects/codelite/code/src/main.cpp" -Wfatal-errors -g -O0 -pedantic -W -std=c++11 -Wall -o ./Debug/src_main.cpp.o -I./inc/
D:/apps/mingw-w64/mingw32/bin/g++.exe -o bin/code #"code.txt" -L./lib/ -lopengl32
g++.exe: error: #code.txt -L./lib/: No such file or directory
mingw32-make.exe[1]: *** [bin/code] Error 1
code.mk:78: recipe for target 'bin/code' failed
mingw32-make.exe[1]: Leaving directory 'D:/Projects/codelite/code'
mingw32-make.exe: *** [All] Error 2
Makefile:4: recipe for target 'All' failed
====1 errors, 0 warnings====`
This looks like a bug in your toolchain and not in CodeLite.
There is a space between the "#code.text" and -L./lib and for some reason g++ does not see it...
I put my money on the mingw32-make tool. You can tell CodeLite to use the mingw32-make.exe from the 4.8.1 version (which worked): settings->build settings->compilers->[YOUR COMPILER NAME]->Make
Another option is to disable the option that tells CodeLite to generate Makefile that passes the object list via file to the compiler:
Settings->Build Settings->compilers->[YOUR COMPILER NAME]->Advanced tab and uncheck the option: pass object list to the linker via file
Lately i too have found the similar problem. Later i was able to figure out the issue. We just to need to go to the project settings under change makefile generator default to codelite makefile generator i think that will work.

Pyhunspell installation in virtualnev

I have a problem with installation of pyhunspell bindings for hunspell library in python 3.2 virtualenv. I downloaded hunspell from here. I issued ./configure and make and it run all right. I avoided however to do make install because my purpose is to install it on virtualenv on a web server, where I have no root permissions.
Thus I downloaded pyhunspell bindings and unzipped it to the directory, where hunspell is made. I modified include_dir path in setup.py by adding correct destination and applied the patch which allows to build pyhunspell with Python 3. Then I ran python setup.py install (having activated the target virtualenv before), but I got this:
$ python setupy.py install
running install
running build
running build_ext
building 'hunspell' extension
gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIC -D_LINUX -I./src/hunspell -I/usr/include/hunspell -I/usr/include/python3.2mu -c hunspell.c -o build/temp.linux-x86_64-3.2/hunspell.o -Wall
creating build/lib.linux-x86_64-3.2
gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro build/temp.linux-x86_64-3.2/hunspell.o -lhunspell-1.2 -o build/lib.linux-x86_64-3.2/hunspell.cpython-32mu.so
/usr/bin/ld: cannot find -lhunspell-1.2
collect2: error: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
It seems that linker cannot link something because it looks for it in system path, while I didn't install the library in the system. Can someone wiser than me in the arcana of C devise any workaround to this issue?
I'll add that I have no access to the real server yet, but I know it will have the system pretty much similar to my local one (Debian 7.0 Wheezy), so I decided to give it a try before I actually log in to the server. Is it possible that the library compiled on my computer would work also on the server, assuming it would also be some (stable probably) version of Debian?
There's no need to build Hunspell. Install the Wheezy packages libhunspell-1.3-0 and libhunspell-dev. It should work with HunSpell 1.3. Just modify setup.py to use libraries = ['hunspell'].
FYI, the posted patch has a problem. It adds the methods of HunSpell as module functions. These receive the module as the first argument instead of the expected HunSpell instance. For example, if you call hunspell.spell, the process will probably segfault when it tries to use self->handle. You should fix the PyModuleDef to get rid of these mal-functions. Change line 273 of hunspell.c to use NULL instead of HunSpell_methods.

Resources