"make" seems to be broken on Win95.

Mo DeJong mdejong@cygnus.com
Tue Apr 11 22:59:00 GMT 2000

The following responces were to my earlier post titled
"make" seems to be broken on Win95.

> Why?  Unix is case sensitive, and we're emulating Unix as best we can.
> If you want case insensitivity, use Microsoft's NMAKE, or feel free to
> contribute a patch to make that lets the user select case
> insensitivity *if* they need it.
> DJ

>- Make already has a (compile-time) provision for using case insensitive
>  filenames, but it breaks implicit rules in a horrible way. Is MER.C a
>  C++ file or is it a C file? Does the FOO.F file need to pre-processed
>  or is it really just `foo.f'? Please remember that most of the tools
>  are just repackaged Unix tools, and lots of Unix'ism is buried quite
>  deep (eg., gcc's use of the filename extensions).
>- Issues like this belong in the general list since this is more of an
>  "user tool" issue rather than the underlying API issue.

>From the comments, it sounds like I was not being very clear about the
problem I was runing into (which made it sound really off topic).
Sorry about that.

I finally figured out what was causing the original problem that
made me think the make utility was broken. I was trying to
build the cinstall program from source checked out of the
cygwin CVS. I was able to run ./configure in the src/winsup
directory, but when I typed "make" I got an error like the following.

make: *** No rule to make target `error.o', ...

The "real" problem seems to have been how I checked the source
out. I had my Win 95 drive mounted under Linux (as vfat) and
I did a "cvs checkout winsup". When the linux filesystem created
the files, it seems to have written them with all uppercase letters.
The strange thing is that if I do my CVS checkout on a ext2 partition
, create a .tar file and then boot into windows to extract the tar
file, I get a lowercase file name. The output of the following
find command shows the problem (the cygwinsrc_mnt directory
is one I had mounted under Linux when I did the cvs checkout).

D:\Cygwin>find . -name ERROR.C

D:\Cygwin>find . -name error.c

So the make program was not really "wrong" to puke out
on ERROR.C for the %.c rule, but it is really confusing.

After just extracting the .tar file under cygwin, I was able
to get a little farther with the winsup build. Perhaps the
"make: *** No rule to make target `error.o'" problem I was
running into deserves a FAQ entry?

The rest of this email is a blow by blow account of what I
had to do to build the installer. I am posting this in the
hopes that someone else will find it useful. If you already
built the installer, you will not care about this.

cd src/winsup
gcc -c -g -O2 -o ./times.o times.cc
gcc -c -g -O2 -o ./tty.o tty.cc
gcc -c -g -O2 -o ./uinfo.o uinfo.cc
gcc -c -g -O2 -o ./uname.o uname.cc
gcc -c -g -O2 -o ./wait.o wait.cc
gcc -c -g -O2 -o ./window.o window.cc
gcc -c -g -O2 -o ./longjmp.o ./config/i386/longjmp.c
gcc -c -g -O2 -o ./setjmp.o ./config/i386/setjmp.c
gcc -c -g -O2 -o /cygdrive/d/Cygwin/cygwinsrc/src/libiberty/random.o
gcc -c -g -O2 -o /cygdrive/d/Cygwin/cygwinsrc/src/libiberty/strsignal.o
/cygdrive/d/Cygwin/cygwinsrc/src/libiberty/strsignal.c:5: ansidecl.h: No
such file or directory
/cygdrive/d/Cygwin/cygwinsrc/src/libiberty/strsignal.c:6: libiberty.h: No
such file or directory
make[1]: *** [/cygdrive/d/Cygwin/cygwinsrc/src/libiberty/strsignal.o]
Error 1
make[1]: Leaving directory
make: *** [cygwin] Error 2

BASH.EXE-2.03$ pwd
BASH.EXE-2.03$ find .. -name ansidecl.h

The problem here seems to stem from the fact that I tried to
configure and compile in the src/winsup directory without first
configuring and compiling in the src/libiberty
directory (because src/winsup/cygwin/Makefile depends on
.o files from src/libiberty).

I am guessing that I am in fact required to configure in the src/
directory before going ahead and compiling in sub directories.
At the very least, the configure scripts in subdirectories
should error out with a message like "you need to build libiberty"
if they are getting run in a subdirectory (like src/winsup)
without first being run in the src/ directory.

At any rate, I was able to work around this error by running
./configure in the src/ dir and them doing a
"cd libiberty ; make error.o strsignal.o". After
doing that, the errors building in src/winsup/cygwin went away.


The saga continues, I am now getting this error.

gcc -c -g -O2 -o ./thread.o thread.cc
dlltool --as=as -k --output-lib libkernel32.a --def kernel32.def
dlltool --as=as -k --output-lib libadvapi32.a --def advapi32.def
make[1]: *** No rule to make target
c/libc.a', needed by `new-cygwin1.dll'.  Stop.
make[1]: Leaving directory
make: *** [cygwin] Error 2

It looks like newlib needs to be built. I cd to src/newlib, run
./configure ; make in there. After doing all that I was able
to finish building src/winsup/cygwin and I then built and
installed in src/winsup/cinstaller (whew!).

I am now able to start testing the installer.

Mo DeJong
Red Hat Inc.

More information about the Cygwin-developers mailing list