Make: command could not be found [duplicate] - c++

This question already has answers here:
Cygwin Make bash command not found
(9 answers)
Closed 7 years ago.
I am using Cygwin to compile some C++ files.
there is an file named Makefile. Now when I use this command in Cygwin,
make -f Makefile
the following error is displaying.
-bash: make: command not found
Could someone tell me what might be the problem?

maybe you have to install the make package. I'm not sure about the package name but try using "sudo apt-get install make" and press tab key to see if have some package. I had this problem one time and in someway the make command wasn't installed in my machine, I installed the package and it worked!
I hope it help!

Related

pg_config executable not found using django-redshift-backend [duplicate]

This question already has answers here:
pg_config executable not found
(54 answers)
Closed 3 years ago.
I am having trouble installing redshift on my django app.
When I am running
pip3 install django-redshift-backend
I get the error pg_config executable not found. My version of pip is 9.0.1 and I don't know why I'm having this error.
Can you help me on this?
I solved this problem by reinstalling libpq-dev.
It may help people facing the same issue.

Homebrew clang can't find C standard library headers [duplicate]

This question already has answers here:
'wchar.h' file not found
(9 answers)
Closed 2 years ago.
Unsurprisingly the new update of OSX Mojave broke my llvm installation in Homebrew, these are the steps I tried:
xcode-select --install # Complained, so I installed commandLineTools from here https://developer.apple.com/download/more/
xcode-select -p /Library/Developer/CommandLineTools
xcode-select --install # Now says installed
sudo xcodebuild -license # Fails, as it says I only have CommandLineTools installed in /Library/Developer/CommandLineTools not xcode
# Try something else (all versions)
brew uninstall --force llvm
brew install llvm # yay v7 how exciting
# Only it still don't work
clang++ -std=c++17 foo.cpp -o f
In file included from foo.cpp:1:
In file included from /usr/local/Cellar/llvm/7.0.0/include/c++/v1/iostream:38:
In file included from /usr/local/Cellar/llvm/7.0.0/include/c++/v1/ios:215:
In file included from /usr/local/Cellar/llvm/7.0.0/include/c++/v1/iosfwd:90:
/usr/local/Cellar/llvm/7.0.0/include/c++/v1/wchar.h:119:15: fatal error: 'wchar.h' file not found
#include_next <wchar.h>
^~~~~~~~~
1 error generated.
Any ideas? The first half of the things I tried I found online but mostly for older updates of MacOS, maybe Mojave broke things in a new and unpredictable way.
Here's how I solved it (very dirty but has worked for a long time):
Disabled SIP on my Mac
Symlinked /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include to /usr/include as is expected in POSIX environments.
Re-enabled SIP.
Now I got to make a note to re-do this everytime a new OSX update comes out. This has not broken anything wrt Xcode, clang (from brew) etc so I'll keep it. Be advised though, this might break your stuff.
This is a well known issue of the latest macos. Try to set this environment variable, it must fix this issue.
export LIBCLANG_SYSTEM_INCLUDE_DIR="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include"
I did something dumb but it did fix the problem... Not sure if it will work for your computer though.
Here is what I did:
I originally installed c++ using Homebrew on my MacBook on Mojave... so I had to manually install the Xcode CommandLineTools using the installer found at /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg . Then I copied the "c++" folder contents from to folder /Library/Developer/CommandLineTools/usr/include/c++/v1 to the folder where I want the missing file to be, at /usr/local/Cellar/gcc/8.2.0/include/c++/8.2.0 , while replacing files with the same names.
The trick worked, since now the missing file "wchar.h" is right where it should be... I could have simlinked, in hindsight. Cheers!

python2.7 sip endless makefile

This will be my first question. I have searched through the other questions but unfortunately none of them solved my problem(s).
I'm running 32-bit Python (2.7) on Win7. I want to install the PyQt4.
I have downloaded PyQt-win-gpl-4.11.4.zip and PyQt4-4.11.4-gpl-Py2.7-Qt4.8.7-x32.exe files in: https://riverbankcomputing.com/software/pyqt/download link. It is written there: "Before you can build PyQt4 you must have already built and installed SIP". Hence, I downloaded "sip-4.16.9".
I followed those steps during the installation: http://pyqt.sourceforge.net/Docs/sip4/installation.html. I successfully executed configure.py script. However, when I tried to build SIP by running the make command, I have an infinite loop like given below:
C:\Python27\sip-4.16.9>make
cd sipgen
make
make[1]: Entering directory '/c/Python27/sip-4.16.9'
cd sipgen
make
make[2]: Entering directory '/c/Python27/sip-4.16.9'
cd sipgen
make
make[3]: Entering directory '/c/Python27/sip-4.16.9'
... and so on endless
How can I solve this problem?
Thanks in advance.
Usually I install PyQt4 via Christoph's excellent site.
I tried:
C:\Users\user\Downloads>pip install instPyQt4-4.11.4-cp27-none-win_amd64.whl
but it told me my system isn't supported. Doing the same for the 32bit one resulted in the same error.
So I tried from source and hit the same problem in this question. After reading the 64bit problem highlighted by ekhumoro I realized that the python downloads page seems to download 32bit by default even though my OS is 64bit. Python2.7 64-bit is available here. What I did is uninstall the 32bit one fist so that the 64bit one can take its place (no need to set up envirnment variables again). After this I tried installing the .whl agani as shown above and this time it worked.
When the same problem occurred, I was able to solve the problem.
python configure.py --platform win32-g++
mingw32-make
mingw32-make install
However, the next step is still unclear.

Error when building C++ project

I tried to build a C++ project using Cygwin. I got the following error:
make all
Cannot run program "make": Launching failed
Error: Program "make" not found in PATH
I have C:\cygwin64\bin in the PATH, which contains the file makeg. Is there meant to be some other make file, and where can I find it?
You need to install make.
If you want to know how to do that see the answers to install python and make in cygwin.

Error: Program "make" not found in PATH

I have the following error in Eclipse CDT (using Windows 7). How to correct it?
Error: Program "make" not found in PATH
PATH=[C:\cygwin\bin;C:/Program Files/Java/jre1.6.0/bin/client;C:/Program Files/Java/jre1.6.0/bin;C:/Program Files/Java/jre1.6.0/lib/i386;C:\Program Files\WinRAR;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\cygwin\bin\;C:\Users\user\AppData\Local\Temp\Rar$EX00.502\eclipse]
Path Environment variable has the following
C:\cygwin\bin\
BASH
You should install make package in cygwin. To do this execute cygwin setup.exe and when the window of packages opened, search make and install it. This is gonna solve your problem i think
You're missing make which is used for processing Makefiles to build programs.
Also to me it seems that this is more related to superuser.com, here is a similar question.