I have been trying to install/compile C libraries in Windows 7 using Cygwin and MinGW. However, I am getting errors like these during make
:
sys/resource.h: No such file or directory
sys/times.h: No such file or directory
I previously thought it might be a problem with the specific libraries and asked here: Various issues installing igraph in Visual Studio 2010 and Cygwin/MinGW ("sys/time.h not found"), but after encountering the same error with different libraries, I think the problem lies on my end.
Attempt
cygwin/usr/include/sys/times.h
and cygwin/usr/include/sys/resource.h
exists. After getting advice regarding symbolic links, I used ln -s /usr/include/sys sys
to make sure that sys/times.h
worked.
I went to look at the make
output for a specific library (igraph). It says it entered a "src" folder. So, I went to the src folder and did the same thing: ln -s /usr/include/sys sys
and made sure that sys/times.h
worked within the src folder too.
However, I am still getting:
fatal error: sys/times.h: No such file or directory
Question
How do I set the "path" for make
to find 'sys/times.h' or other files in the /usr/include/sys folder? What am I missing here?
P.S.
Please bear with me as I am usually a Windows user and not familiar with Linux terminology.
After much investigation, the problem turned out to be that:
This was discovered while trying to resolve another problem here:
Cannot compile C code with #include <sys/times.h> in Cygwin
So it turns out that my problem had nothing to do with the include path or making symbolic links, but rather, the gcc version/type was wrong. This fact eluded me because I was running a clean installation of Cygwin and didn't know that it would automatically use the MinGW's gcc in my Python folder.
Build libigraph with minGW without having "sys/times.h"
That may be interesting for all building "igraph" and don't want to create it with "cygwin" but with "mingw".
In my "msys / mingw" environment, I have my "source code" in. "C:\msys\1.0\src" directory.
igraph dir. == C:\msys\1.0\src\igraph-0.6
Administrator@drserver-p /usr/src/igraph-0.6
$ ./configure
it takes a while.
Change of files.
Open igraph-0.6\src\f2c\s_paus.c
Goto Line 84 or search for pause();
comment this line /* pause(); */
Type make Now the msys shell look something like
Administrator@drserver-p /usr/src/igraph-0.6
$ make
If it works it takes about 1 hour !
see http://mail.kde.org/pipermail/kde-windows/2006-May/000194.html as they say even if the times.h is put there its functions may not be implemented by mingw
when running ./configure i'm getting this(its hard to notice)
so first try copying the times.h and then use ./configure and see if this error isn't there
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With