This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

TR: Newbie : Perl/Tk + Cygwin issues...


Hello
First thing, I am new to both mailing lists usage and to Perl, so I hope
this both the right place and the right way to ask my questions.
I am not really a novice programmer and I have used Cygwin since about year,
mainly gcc and awk. I recently tried XFree as well (on NT).

Now, I want to try Perl/Tk GUI capabilities (on Windows, not XFree) I
quickly realized that Cygwin ships only Perl, not Perl/Tk and that I thus
needed to install the Tk module from CPAN, which in turned caused the
recompilation one or more DLL and did a lot of other stuff quite obscure to
me.

Note: All the following was done on a Win95 machine.

I also figured out that in general, I don't need to invoke
$ perl -MCPAN -e shell
cpan>install Tk

It is sufficient to do it once and after the first execution of the install
procedure, I can work off-line by issuing simply
$ perl makefile.PL
$ make
First question : Are the two steps above sufficient ? Or do I miss
extra-steps ?

Digging into this archive further yielded informations on what to do, and
specifically patches to apply before building :
http://sources.redhat.com/ml/cygwin/2000-08/msg01201.html 
http://sources.redhat.com/ml/cygwin/2001-01/msg00254.html

I also ran into similar problem exposed in 
http://sources.redhat.com/ml/cygwin/2001-01/msg00188.html
which was solved by installing XFree developpement stuff.

Finally, I installed Cygwin 1.1.8 (cygwin-1.1.8-2.tar.gz) just in case.

I applied the patches
$ patch -p1 < Tk.cygwin.path
$ patch -p1 < Tk.patch2
then started the build with 
$ perl makefile.PL
$ make

At this point, I had compilation errors after about 20 mn... Since I wanted
to go ahead and weed out as many problems as possible, I simply created
empty .o files with "touch" so that at least I could produce objects files
for all compilable source files. 
I have now reached this point. That is, I have 6 files that refuse to
compile, with the diagnostics listed at the end of this post. 
  tixUnixDraw.c
  pTk/tkUnixColor.c
  pTk/tkUnixDraw.c
  pTk/tkUnixEvent.c
  pTk/tkUnixWm.c
  pTk/tkUnixXId.c

Second question : What shall I do next ? Am I missing other patches ? or
what ?

Thank in advance for your input.

François

-----------------------------------------------------------

The diagnostics (removed duplicated ones) I've got: 
$ perl makefile.PL
[...]

$ make
[...]

gcc -c -I.. -I../pTk/mTk/xlib -I. -Ibitmaps -I../pTk/mTk/xlib
-DPERL_USE_SAFE_PUTENV -DHAS_SBRK_PROTO -fno-strict-aliasing
-DUSEIMPORTLIB -O2   -DVERSION=\"800.022\" -DXS_VERSION=\"800.022\"
-I/usr/lib/perl5/5.6.1/cygwin/CORE -D__WIN32__ -DWIN32 -Wall
-Wno-implicit-int -Wno-comment -Wno-unused
-D__USE_FIXED_PROTOTYPES__ tixUnixDraw.c
tixUnixDraw.c: In function `TixpStartSubRegionDraw':
tixUnixDraw.c:152: structure has no member named `rectUsed'
tixUnixDraw.c:153: structure has no member named `rect'
[...]
tixUnixDraw.c: In function `TixpEndSubRegionDraw':
tixUnixDraw.c:178: structure has no member named `rectUsed'
tixUnixDraw.c:179: structure has no member named `rect'
[...]
tixUnixDraw.c: In function `TixpSubRegDrawImage':
tixUnixDraw.c:268: structure has no member named `rectUsed'
tixUnixDraw.c:269: structure has no member named `rect'
[...]
make[1]: *** [tixUnixDraw.o] Error 1
make[1]: Leaving directory `/.cpan/build/Tk800.022/pTk'
make: *** [pTk/libpTk.a] Error 2

$ touch pTk/tixUnixDraw.o
$ make
[...]

gcc -c -I.. -I../pTk/mTk/xlib -I. -Ibitmaps -I../pTk/mTk/xlib 
-DPERL_USE_SAFE_PUTENV -DHAS_SBRK_PROTO -fno-strict-aliasing
-DUSEIMPORTLIB -O2   -DVERSION=\"800.022\" -DXS_VERSION=\"800.022\"
-I/usr/lib/perl5/5.6.1/cygwin/CORE -D__WIN32__ -DWIN32 -Wall
-Wno-implicit-int -Wno-comment -Wno-unused 
-D__USE_FIXED_PROTOTYPES__ tkUnixColor.c
tkUnixColor.c:410: parse error before `0'
tkUnixColor.c:414: parse error before `{'
tkUnixColor.c:418: invalid type argument of `->'
tkUnixColor.c:418: parse error before `)'
make: *** [tkUnixColor.o] Error 1

$ touch pTk/tkUnixColor.o 
$ make
[...]

gcc -c -I.. -I../pTk/mTk/xlib -I. -Ibitmaps -I../pTk/mTk/xlib
-DPERL_USE_SAFE_PUTENV -DHAS_SBRK_PROTO -fno-strict-aliasing
-DUSEIMPORTLIB -O2   -DVERSION=\"800.022\" -DXS_VERSION=\"800.022\"
-I/usr/lib/perl5/5.6.1/cygwin/CORE -D__WIN32__ -DWIN32 -Wall
-Wno-implicit-int -Wno-comment -Wno-unused 
-D__USE_FIXED_PROTOTYPES__ tkUnixDraw.c
tkUnixDraw.c: In function `TkScrollWindow':
tkUnixDraw.c:93: void value not ignored as it ought to be
tkUnixDraw.c:94: warning: control reaches end of non-void function
make[1]: *** [tkUnixDraw.o] Error 1
make[1]: Leaving directory `/.cpan/build/Tk800.022/pTk'
make: *** [pTk/libpTk.a] Error 2

$ touch pTk/tkUnixDraw.o
$ make
[...]

gcc -c -I.. -I../pTk/mTk/xlib -I. -Ibitmaps -I../pTk/mTk/xlib 
-DPERL_USE_SAFE_PUTENV -DHAS_SBRK_PROTO -fno-strict-aliasing
-DUSEIMPORTLIB -O2   -DVERSION=\"800.022\" -DXS_VERSION=\"800.022\"
-I/usr/lib/perl5/5.6.1/cygwin/CORE -D__WIN32__ -DWIN32 -Wall
-Wno-implicit-int -Wno-comment -Wno-unused 
-D__USE_FIXED_PROTOTYPES__ tkUnixEvent.c
tkUnixEvent.c: In function `TkpCloseDisplay':
tkUnixEvent.c:149: invalid initializer
tkUnixEvent.c:149: (near initialization for `(anonymous)')
tkUnixEvent.c:149: parse error before `;'
tkUnixEvent.c: At top level:
tkUnixEvent.c:481: parse error before `*'
tkUnixEvent.c:481: warning: data definition has no type or storage class
tkUnixEvent.c:482: parse error before `{'
tkUnixEvent.c:486: parse error before `{'
tkUnixEvent.c:492: warning: passing arg 1 of `XQLength' from incompatible
pointer type
tkUnixEvent.c:492: initializer element is not constant
tkUnixEvent.c:492: warning: data definition has no type or storage class
tkUnixEvent.c:493: parse error before `while'
tkUnixEvent.c:495: parse error before `&'
tkUnixEvent.c:495: conflicting types for `Tk_QueueWindowEvent'
tk.h:1730: previous declaration of `Tk_QueueWindowEvent'
tkUnixEvent.c:495: warning: data definition has no type or storage class
tkUnixEvent.c:496: parse error before `--'
make[1]: *** [tkUnixEvent.o] Error 1
make[1]: Leaving directory `/.cpan/build/Tk800.022/pTk'
make: *** [pTk/libpTk.a] Error 2

$ touch pTk/tkUnixEvent.o
$ make
[...]

gcc -c -I.. -I../pTk/mTk/xlib -I. -Ibitmaps -I../pTk/mTk/xlib
-DPERL_USE_SAFE_PUTENV -DHAS_SBRK_PROTO -fno-strict-aliasing
-DUSEIMPORTLIB -O2   -DVERSION=\"800.022\" -DXS_VERSION=\"800.022\"
-I/usr/lib/perl5/5.6.1/cygwin/CORE -D__WIN32__ -DWIN32 -Wall
-Wno-implicit-int -Wno-comment -Wno-unused
-D__USE_FIXED_PROTOTYPES__ tkUnixWm.c
tkUnixWm.c: In function `ComputeReparentGeometry':
tkUnixWm.c:2681: `Status' undeclared (first use in this function)
tkUnixWm.c:2681: (Each undeclared identifier is reported only once
tkUnixWm.c:2681: for each function it appears in.)
tkUnixWm.c:2681: parse error before `status'
tkUnixWm.c:2688: `status' undeclared (first use in this function)
tkUnixWm.c: In function `UpdateVRootGeometry':
tkUnixWm.c:3960: `Status' undeclared (first use in this function)
tkUnixWm.c:3960: parse error before `status'
tkUnixWm.c:3983: `status' undeclared (first use in this function)
make[1]: *** [tkUnixWm.o] Error 1
make[1]: Leaving directory `/.cpan/build/Tk800.022/pTk'
make: *** [pTk/libpTk.a] Error 2

$ touch pTk/tkUnixWm.o
$ make
[...]

gcc -c -I.. -I../pTk/mTk/xlib -I. -Ibitmaps -I../pTk/mTk/xlib
-DPERL_USE_SAFE_PUTENV -DHAS_SBRK_PROTO -fno-strict-aliasing
-DUSEIMPORTLIB -O2   -DVERSION=\"800.022\" -DXS_VERSION=\"800.022\"
-I/usr/lib/perl5/5.6.1/cygwin/CORE -D__WIN32__ -DWIN32 -Wall
-Wno-implicit-int -Wno-comment -Wno-unused
-D__USE_FIXED_PROTOTYPES__ tkUnixXId.c
tkUnixXId.c:80: parse error before `*'
tkUnixXId.c:80: warning: data definition has no type or storage class
tkUnixXId.c:82: parse error before `{'
tkUnixXId.c:264: parse error before `*'
tkUnixXId.c:264: warning: data definition has no type or storage class
tkUnixXId.c:266: parse error before `{'
tkUnixXId.c:275: request for member `windowStackPtr' in something not a
structur
e or union
tkUnixXId.c:275: warning: data definition has no type or storage class
tkUnixXId.c:276: parse error before `if'
tkUnixXId.c:298: parse error before `->'
make[1]: *** [tkUnixXId.o] Error 1
make[1]: Leaving directory `/.cpan/build/Tk800.022/pTk'
make: *** [pTk/libpTk.a] Error 2

$ touch pTk/tkUnixXId.o
$make
[...]
$


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]