libXm.a + xmkmf

Tom Weichmann
Fri Jun 2 10:35:00 GMT 2000


> > Hello,
> > 
> > I am running cygwin 1.1.1 on Win98.  I an using the binary release
> > of the x clients and libs from the cygwin/xfree86 page.  I am trying
> > to compile a x file manager called mfm, and I an getting the
> > following errors when I xmkmf -a :
> > 
> > makedepend: warning:  pty.c, line 3: cannot find include file
> > "fcntl.h"
> >         not in /usr/X11R6.4/include/fcntl.h
> >         not in /include/fcntl.h
> >         not in /usr/local/lib/gcc-include/fcntl.h
> >         not in E:/usr/H-i386-cygwin32/i386-cygwin32/include/fcntl.h
> >         not in
> >         E:/usr/H-i386-cygwin32/lib/gcc-lib/i586-cygwin32/egcs-
> > 2.91.57/inc
> > lude/fcntl.h
> > 
> > This error is repeated over and over for every file in the tar ball.
> >  Where does xmkmf get its info from?  None of the include
> > directories which make is looking in exist on my system. 

Suhaib Siddiqi wrote:

> "None of the include directories..." <---THIS IS YOUR PROBLEM.  
> You cannot compile a code if you do not
> have proper headers for it, a full compilation suite (compilers). A
> proper installation of Cygwin.
> xmkmf is getting it from your pty.c subroutines, which needs fcntl.h
> header file.
> Suhaib

I think that I might need to explain my self better.  All of these 
header files *do* exist on my system, but xmkmf/makedepend are 
looking in directories which only existed in the previous version of 
cygwin.  Looking at the error, makedepend looked in the following 
directories for these headers:

* I have this dir, but it only contains headers for X

* This does not exist in cygwin 1.1.1

* This does not exist in cygwin 1.1.1

* This does not exist in 1.1.1, and I do not have an E: drive

* This does not exist in 1.1.1, I do not have an E: drive, and I do not 
   have egcs installed on my system.  I compile with gcc 2.95.2

When I asked where does xmkmf get its info from, what I should 
have said is:  Why is xmkmf searching these directories for 
headers.  On Cygwin 1.1.1 all of the headers exist in the following 


This is the way Cygwin 1.1.1 installed itself on my system.  I have 
not modified it at all.  I have successfully built many other binaries 
which do not use xmkmf, which leads me to believe that xmkmf is 
reading an old file somewhere which is telling it to look in these old 
B20 style directories for the header files.

As a quick and dirty fix for this I mounted 
/usr/i686-pc-cygwin/include as /include because for what ever 
reason xmkmf was looking in /include for the headers contained in
/usr/i686-pc-cygwin/include.  When I did this xmkmf -a  
successfully completed.  Then when I tried to make the binary, 
make died with undefined reference to `_ctype_' errors which 
referred to libXm.a.  This shows that even with the proper headers 
there is still a problem with libXm.a.  So to sum up

1. How do I get xmkmf/makedepend to look in the proper 
directories for the needed headers?

2. Does libXm.a need to be rebuilt for cygwin 1.1.1?

Thanks Again,

Tom Weichmann

> $ make
> rm -f mfm.exe
> gcc -o mfm.exe -O2 -s -mpentium      -L/usr/X11R6.4/lib 
>      dd.o d
> vices.o         fileMgr.o         fileSelectionBox.o    ftp.o   
> globalLList.o
>       info.o         menubar.o         mfm.o         pty.o        
>  typesFile.o
>        util.o -lXm -lXt -lSM -lICE -lXpm -lXext -lX11
>  undefined re
> erence to `_ctype_'
>  undefined re
> erence to `_ctype_'
>  undefined re
> erence to `_ctype_'
>  undefined re
> erence to `_ctype_'
>  undefined re
> erence to `_ctype_'
>  more undefin
> d references to `_ctype_' follow
> collect2: ld returned 1 exit status
> make: *** [mfm.exe] Error 1
> This looks to me like libXm.a needs to be re-compiled with 
> latest cygwin.  So this leads me to my next question.  Do I 
need to
> download XC40-1 - XC40-4 from the ftp site just to build 
the libs and
> clients, or is that for the xserver as well?  Is there another, 
> source I can use if I just want to build the libs and clients?
> Thank you for your time,
> Tom Weichmann

More information about the Cygwin-xfree mailing list