Unable to run the `make` command - linux

I am trying to run the make command over the NVIDIA CUDA Sample files. I navigated to the directory and typed make. Below is the output.
root#ubuserver3:/home/ubuadmin/CUDA/SampleInstalled/NVIDIA_CUDA-5.5_Samples# make
make[1]: Entering directory `/home/ubuadmin/CUDA/SampleInstalled/NVIDIA_CUDA-5.5_Samples/0_Simple/simpleAssert'
"/home/ubuadmin/CUDA"/bin/nvcc -ccbin g++ -I../../common/inc -m32 -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=\"sm_35,compute_35\" -o simpleAssert.o -c simpleAssert.cu
g++: No such file or directory
make[1]: *** [simpleAssert.o] Error 1
make[1]: Leaving directory `/home/ubuadmin/CUDA/SampleInstalled/NVIDIA_CUDA-5.5_Samples/0_Simple/simpleAssert'
make: *** [0_Simple/simpleAssert/Makefile.ph_build] Error 2
root#ubuserver3:/home/ubuadmin/CUDA/SampleInstalled/NVIDIA_CUDA-5.5_Samples#
There is an error which I do not understand why.

If you search you'll find many answers for this question. Basically, you don't have a compiler installed on your system.
Since you're running Ubuntu, run sudo apt-get install build-essential to get all the packages needed to compile software.

Related

compilation fatal error boost/filesystem

when running make
g++ -pedantic -Wall -W -g pkg-config --cflags --libs liblog4cxx
dbus-c++-1 -DDOUANE_VERSION=\"0.9.0\" -o freedesktop/desktop_file.o
-c freedesktop/desktop_file.cpp In file included from freedesktop/desktop_file.cpp:1:0: freedesktop/desktop_file.h:5:37:
fatal error: boost/filesystem/path.hpp: No such file or directory
compilation terminated. Makefile:36: recipe for target
'freedesktop/desktop_file.o' failed make: ***
[freedesktop/desktop_file.o] Error 1
getting this, Im on a distro with XFCE environment, as I searched the freedesktop/desktop_file.cpp has to do with the XFCE. But the main problem is line
boost/filesystem/path.hpp
the solution given by https://stackoverflow.com/a/25770596/1320686
sudo apt-get install libboost-dev

Installing nvm on bash on ubunutu on windows 10 throws error

I'm testing the new bash on ubuntu on windows 10 and the first thing I tried to do is to install node. Of course, since I now have a "Linux system" I went ahead and installed nvm.
I also had to
apt-get make gcc g++
One done i tried
nvm install v4.4.2
but I got:
make -C out BUILDTYPE=Release V=1
make[1]: Entering directory `/root/.nvm/src/node-v4.4.2/out'
g++ -pthread -rdynamic -m64 -fuse-ld=gold -B/root/.nvm/src/node-
v4.4.2/third_party/binutils/Linux_x64/Release/bin -m64 -o /root/.nvm/src/node-v4.4.2/out/Release/mksnapshot -Wl,--start-group /root/.nvm/src/node-v4.4.2/out/Release/obj.target/mksnapshot/deps/v8/src/snapshot/mksnapshot.o /root/.nvm/src/node-v4.4.2/out/Release/obj.target/deps/v8/tools/gyp/libv8_base.a /root/.nvm/src/node-v4.4.2/out/Release/obj.target/deps/v8/tools/gyp/libv8_nosnapshot.a /root/.nvm/src/node-v4.4.2/out/Release/obj.target/deps/v8/tools/gyp/libv8_libplatform.a /root/.nvm/src/node-v4.4.2/out/Release/obj.target/deps/v8/tools/gyp/libv8_libbase.a -Wl,--end-group -ldl -lrt
/usr/bin/ld.gold: fatal error: /root/.nvm/src/node-v4.4.2/out/Release/mksnapshot: Invalid argument
collect2: error: ld returned 1 exit status
make[1]: *** [/root/.nvm/src/node-v4.4.2/out/Release/mksnapshot] Error 1
make[1]: Leaving directory `/root/.nvm/src/node-v4.4.2/out'
make: *** [node] Error 2
nvm: install v4.4.2 failed!
Do you know what's causing this? I think that I may have something missconfigured on the make command maybe?
NOTE: installing node using the "official way" works, that is:
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt-get install -y nodejs
I think it's an issue in the bash subsystem. There are several open issues on github.com relating to installing nvm, rbenv, rvm, as well as creating symlinks.
These two issues appear to be directly related to the problem you're experiencing.
https://github.com/Microsoft/BashOnWindows/issues/6
https://github.com/Microsoft/BashOnWindows/issues/9
Also, FYI, I have attempted to build node 4 and node 5 from source, but fail during the make command with this message:
/usr/bin/ld.gold: fatal error: /root/working/node-v5.10.1/out/Release/mksnapshot: Invalid argument
collect2: error: ld returned 1 exit status

Oculus DK2 installation on Ubuntu 14.04 - cannot find ludev

When I run the command, make from the 0.4.4 oculus linux package, I keep getting this error:
g++ -o ./Release/OculusWorldDemo_x86_64_Debug ./Obj/Linux/Debug/x86_64/OculusWorldDemo.o ./Obj/Linux/Debug/x86_64/OculusWorldDemo_Scene.o ./Obj/Linux/Debug/x86_64/Player.o ./Obj/Linux/Debug/x86_64/../CommonSrc/Util/RenderProfiler.o ./Obj/Linux/Debug/x86_64/../CommonSrc/Util/OptionMenu.o ./Obj/Linux/Debug/x86_64/../CommonSrc/Platform/Linux_Gamepad.o ./Obj/Linux/Debug/x86_64/../CommonSrc/Platform/Linux_Platform.o ./Obj/Linux/Debug/x86_64/../CommonSrc/Platform/Platform.o ./Obj/Linux/Debug/x86_64/../CommonSrc/Render/Render_Device.o ./Obj/Linux/Debug/x86_64/../CommonSrc/Render/Render_GL_Device.o ./Obj/Linux/Debug/x86_64/../CommonSrc/Render/Render_LoadTextureDDS.o ./Obj/Linux/Debug/x86_64/../CommonSrc/Render/Render_LoadTextureTGA.o ./Obj/Linux/Debug/x86_64/../CommonSrc/Render/Render_XmlSceneLoader.o ./Obj/Linux/Debug/x86_64/../../3rdParty/TinyXml/tinyxml2.o -L../../LibOVR/Lib/Linux/Debug/x86_64 -lovr -ludev -lpthread -lGL -lX11 -lXrandr -lrt
/usr/bin/ld: cannot find -ludev
collect2: error: ld returned 1 exit status
make[1]: *** [Release/OculusWorldDemo_x86_64_Debug] Error 1
make[1]: Leaving directory `/mo/software/oculus/ovr_sdk_linux_0.4.4/Samples/OculusWorldDemo'
make: *** [Samples/OculusWorldDemo/Release/OculusWorldDemo_x86_64_Debug] Error 2
What do I need to do to make Oculus work? I've had this for over 2 months now and haven't used yet because installation hasnt been possible to resolve.
You need to install the libudevand libudev-dev packages.
sudo apt-get install libudev-dev libudev0
get ludev from http://packages.ubuntu.com/precise/i386/libudev0/download
download it, then install package with
sudo dpkg -i libudev0_175-0ubuntu9_i386.deb
you may have to do a
sudo apt-get install libudev-dev libudev0
for good measure
now you can do the make , make run

GCC installation Error

I am trying to install GCC 4.9.0, I got following errors for './configure' and 'make'.
I got following error for ./configure
checking for default BUILD_CONFIG... bootstrap-debug
checking for --enable-vtable-verify... no
/usr/bin/ld: crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status
configure: error: I suspect your system does not have 32-bit developement libraries (libc and headers). If you have them, rerun configure with --enable-multilib. If you do not have them, and want to build a 64-bit-only compiler, rerun configure with --disable-multilib.
Then I used ./configure --disable-multilib then configure completed with out any error.
After 'make'; i end with following error and i am not able to identify what is this error
checking for suffix of object files... configure: error: in `/root/dsk/gcc-4.9.0/x86_64-unknown-linux-gnu/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
make[2]: *** [configure-stage1-target-libgcc] Error 1
make[2]: Leaving directory `/root/dsk/gcc-4.9.0'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/root/dsk/gcc-4.9.0'
make: *** [all] Error 2
please help
It seems you are missing gcc-multilib.
Try installing it with sudo apt-get install gcc-multilib and then run ./configure again.
For Centos you need to install following libraries:
sudo yum install glibc-devel.i686
sudo yum install libgcc.i686

show "flock: Command not found" when install node.js on QNAP NAS

I want to install node.js on QNAP NAS, it's a linux OS I can use ipkg install package.
but ipkg not have node.js...
I reference web forum as http://forum.qnap.com/viewtopic.php?p=248556, installed V8 JavaScript Engine.
Then install node.js
When I'm typing make on /opt/node, that shows an error message as follows:
make -C out BUILDTYPE=Release V=1 make[1]: Entering directory
/share/HDA_DATA/.qpkg/Optware/node/out' flock
/share/HDA_DATA/.qpkg/Optware/node/out/Release/linker.lock g++
-pthread -rdynamic -o /share/HDA_DATA/.qpkg/Optware/node/out/Release/mksnapshot
-Wl,--start-group /share/HDA_DATA/.qpkg/Optware/node/out/Release/obj.target/mksnapshot/deps/v8/src/mksnapshot.o
/share/HDA_DATA/.qpkg/Optware/node/out/Release/obj.target/deps/v8/tools/gyp/libv8_base.a
/share/HDA_DATA/.qpkg/Optware/node/out/Release/obj.target/deps/v8/tools/gyp/libv8_nosnapshot.a
-Wl,--end-group make[1]: flock: Command not found make[1]: *** [/share/HDA_DATA/.qpkg/Optware/node/out/Release/mksnapshot] Error 127
make[1]: Leaving directory/share/HDA_DATA/.qpkg/Optware/node/out'
make: * [node] Error 2
The QNAP NAS(TS-119P2) does not have flock command line,
What can I do? Could somebody help me?
ipkg install util-linux
It contains flock command.
Goto node source dir.
./configure --prefix=/opt
...
LINK=g++ make
...
LINK=g++ make install
Worked for me.
I had to export CC as my compiler, and then run the commands babalooi suggested:
export CC=/opt/bin/gcc
./configure --prefix=/opt
...
LINK=g++ make
...
LINK=g++ make install

Resources