Re: Segment fault/Bus error with Singular

2006-01-09 Thread Murray Eisenberg
Thank you for those pointers.  By adding the environment variables 
listed at the first URL, below, I can now indeed get singular to work 
from a DOS command prompt window.


I can also get Singular to work in a Cygwin terminal window by starting 
Cygwin and, at the bash prompt, invoking TSingular.  Yet I still get the 
Segment fault/Bus error if I try to use the "Singular (rxvt)" icon.


Still, after I start X, the "Singular (Emacs)" icon does not work: 
nothing whatsoever seems to happen.  And if I use the command ESingular 
within an X window opened in Cygwin, I get a "Segmentation fault" error.



Oliver Wienand wrote:

Dear Mr. Eisenberg,

On the other hand, if I go to the subdirectory lib\Singular of the 
main cygwin directory and double-click Singular.exe, then Singular 
does run, in a DOS command prompt window (although I see message 
"cannot open `standard.lib'".



At first, to enable you to use Singular please read

http://www.singular.uni-kl.de/forum/viewtopic.php?t=1475

With this information you should be able to get a full functional 
Singular within the windows command shell you mentioned.


To the bug itself I can also just refer to

http://cygwin.com/problems.html

Please apologize the delay of the answer, I was moving to the USA during 
the last week.


Sincerely,

Oliver Wienand
Singular Team






--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Segment fault/Bus error with Singular

2006-01-09 Thread Oliver Wienand

Dear Mr. Eisenberg,

On the other hand, if I go to the subdirectory lib\Singular of the main 
cygwin directory and double-click Singular.exe, then Singular does run, 
in a DOS command prompt window (although I see message "cannot open 
`standard.lib'".


At first, to enable you to use Singular please read

http://www.singular.uni-kl.de/forum/viewtopic.php?t=1475

With this information you should be able to get a full functional 
Singular within the windows command shell you mentioned.


To the bug itself I can also just refer to

http://cygwin.com/problems.html

Please apologize the delay of the answer, I was moving to the USA during 
the last week.


Sincerely,

Oliver Wienand
Singular Team


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Segment fault/Bus error with Singular

2006-01-09 Thread Murray Eisenberg

Thanks for your reply that suggests to try a recent snapshot.

Unfortunately, I don't know whether the various, latest "snapshot" files 
will help, since I haven't a clue which one or ones to download or, once 
I've downloaded, what to do with it/them!


I see nothing on the snapshots page (to which the URL you supplied 
points) about how to use these files.


I'm a very experience computer user, but I need guidance here!

Larry Hall (Cygwin) wrote:

Murray Eisenberg wrote:

I'm running latest Cygwin under Windows XP Pro (SP2, with all 
updates).  I installed all the Singular packages via Cygwin Setup.


After I start cygwin with its bash shell, command

  Singular

gives error:

  Singular " signal 11 (v: 3001/2005111410):
  Segment fault/Bus error occurred (r:1136744764)
  Please inform the authors
  trying to restart...

(The number after "r:" changes depending on what else is running in 
windows.)  But Cygwin never recovers, and it freezes.


At first I tried uninstalling Singular, downloading the Singular 
packages again, and re-installing; same error.  I completely 
uninstalled Cygwin, downloaded Cygwin again including the Singular 
packages, and re-installed.  Same error.


On the other hand, if I go to the subdirectory lib\Singular of the 
main cygwin directory and double-click Singular.exe, then Singular 
does run, in a DOS command prompt window (although I see message 
"cannot open `standard.lib'".


So the bug seems to be somewhere in the interface between Singular and 
cygwin.  Any ideas of how to proceed.  (I did report this bug on the 
Singular web site a couple days ago but have had no response.)




Does a recent snapshot make a difference?



If not, please read and follow the problem reporting guidelines at:


Problem reports:   http://cygwin.com/problems.html










--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Segment fault/Bus error with Singular

2006-01-09 Thread Larry Hall (Cygwin)

Murray Eisenberg wrote:
I'm running latest Cygwin under Windows XP Pro (SP2, with all updates). 
 I installed all the Singular packages via Cygwin Setup.


After I start cygwin with its bash shell, command

  Singular

gives error:

  Singular " signal 11 (v: 3001/2005111410):
  Segment fault/Bus error occurred (r:1136744764)
  Please inform the authors
  trying to restart...

(The number after "r:" changes depending on what else is running in 
windows.)  But Cygwin never recovers, and it freezes.


At first I tried uninstalling Singular, downloading the Singular 
packages again, and re-installing; same error.  I completely uninstalled 
Cygwin, downloaded Cygwin again including the Singular packages, and 
re-installed.  Same error.


On the other hand, if I go to the subdirectory lib\Singular of the main 
cygwin directory and double-click Singular.exe, then Singular does run, 
in a DOS command prompt window (although I see message "cannot open 
`standard.lib'".


So the bug seems to be somewhere in the interface between Singular and 
cygwin.  Any ideas of how to proceed.  (I did report this bug on the 
Singular web site a couple days ago but have had no response.)



Does a recent snapshot make a difference?



If not, please read and follow the problem reporting guidelines at:

Problem reports:   http://cygwin.com/problems.html





--
Larry Hall  http://www.rfk.com
RFK Partners, Inc.  (508) 893-9779 - RFK Office
838 Washington Street   (508) 893-9889 - FAX
Holliston, MA 01746


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Are there documents on how cygwin1.dll is designed and implemented ?

2006-01-09 Thread Larry Hall (Cygwin)

Richard Meng wrote:

Hi all,

I'm interested in the Cygwin1.dll's design and implementations, are there
some documents about it ?



Actually, we have something even better.  It's called "the code"! ;-)

Documentation in general can be found at:



The above provide a good basis for understanding Cygwin at the user level
and beyond.  For some in-depth details of certain areas, check out
winsup/cygwin/how* files in... wait for it... the code! :-)  See setup.exe
or  to get the code.


--
Larry Hall  http://www.rfk.com
RFK Partners, Inc.  (508) 893-9779 - RFK Office
838 Washington Street   (508) 893-9889 - FAX
Holliston, MA 01746


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Segment fault/Bus error with Singular

2006-01-09 Thread Murray Eisenberg
I'm running latest Cygwin under Windows XP Pro (SP2, with all updates). 
 I installed all the Singular packages via Cygwin Setup.


After I start cygwin with its bash shell, command

  Singular

gives error:

  Singular " signal 11 (v: 3001/2005111410):
  Segment fault/Bus error occurred (r:1136744764)
  Please inform the authors
  trying to restart...

(The number after "r:" changes depending on what else is running in 
windows.)  But Cygwin never recovers, and it freezes.


At first I tried uninstalling Singular, downloading the Singular 
packages again, and re-installing; same error.  I completely uninstalled 
Cygwin, downloaded Cygwin again including the Singular packages, and 
re-installed.  Same error.


On the other hand, if I go to the subdirectory lib\Singular of the main 
cygwin directory and double-click Singular.exe, then Singular does run, 
in a DOS command prompt window (although I see message "cannot open 
`standard.lib'".


So the bug seems to be somewhere in the interface between Singular and 
cygwin.  Any ideas of how to proceed.  (I did report this bug on the 
Singular web site a couple days ago but have had no response.)




--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Are there documents on how cygwin1.dll is designed and implemented ?

2006-01-09 Thread Richard Meng
Hi all,

I'm interested in the Cygwin1.dll's design and implementations, are there some 
documents about it ?

Regards
--
Richard Meng


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: ZoneAlarm Suite popen hang

2006-01-09 Thread Igor Peshansky
On Mon, 9 Jan 2006, Brett Serkez wrote:

> [snip]
> > Well, if you can find where ssh is invoked, you can also give it the
> > "-n" parameter, which would result in equivalent functionality.
>
> I don't want to confuse anybody, the command in question is being run
> internally by ssh to setup an X authorization cookie to pass over the
> the xterm on the remote system.  I did try -n to no avail.
>
> ssh -vvv -n -X target
> OpenSSH_4.2p1, OpenSSL 0.9.8a 11 Oct 2005
> Pseudo-terminal will not be allocated because stdin is not a terminal.
> debug1: Reading configuration data /etc/ssh_config
> debug2: ssh_connect: needpriv 0
> debug1: Connecting to 192.168.0.100 [192.168.0.100] port 22.
> debug1: Connection established.
>
> ...snip...
>
> debug1: Authentication succeeded (password).
> debug2: fd 4 setting O_NONBLOCK
> debug1: channel 0: new [client-session]
> debug3: ssh_session2_open: channel_new: 0
> debug2: channel 0: send open
> debug1: Entering interactive session.
> debug2: callback start
> debug2: x11_get_proto: /usr/X11R6/bin/xauth -f
> /tmp/ssh-1X7a4Jwi47/xauthfile generate 127.0.0.1:0.0 MIT-MAGIC-COOKIE-1
> untrusted timeout 1200 2>/dev/null
>
> The message I referenced earlier goes into some depth about
> x11_get_proto and how the xauth command above is being run:
>
> http://www.cygwin.com/ml/cygwin/2004-11/msg00626.html
>
> Perhaps popen is using a socket or named pipe

popen() is probably using a regular pipe...

> I do appreciate the suggestions so far.  I just don't yet understand
> how the installation and deinstallation of ZoneAlarm is effecting
> this behavior.

It's a known fact that firewall programs insert their own DLLs into the
network stack, thus subtly changing the assumptions some programs (i.e.,
Cygwin in this case) make about socket behavior.  However, I haven't heard
of firewall programs affecting pipes.

One way to check this is to run the above command under strace (both with
ZoneAlarm installed and without it), and then compare the two outputs
(note that you may want to mask out the PID and time fields, at least, to
get a meaningful diff).  You can use strace's "-o" option to redirect the
output to a file.  This would also show what popen() is doing.
HTH,
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED] | [EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_Igor Peshansky, Ph.D. (name changed!)
 |,4-  ) )-,_. ,\ (  `'-'   old name: Igor Pechtchanski
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: ZoneAlarm Suite popen hang

2006-01-09 Thread Brett Serkez
[snip]
> Well, if you can find where ssh is invoked, you can also give it the
> "-n" parameter, which would result in equivalent functionality.

I don't want to confuse anybody, the command in question is being run
internally by ssh to setup an X authorization cookie to pass over the
the xterm on the remote system.  I did try -n to no avail.

ssh -vvv -n -X target
OpenSSH_4.2p1, OpenSSL 0.9.8a 11 Oct 2005
Pseudo-terminal will not be allocated because stdin is not a terminal.
debug1: Reading configuration data /etc/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to 192.168.0.100 [192.168.0.100] port 22.
debug1: Connection established.

...snip...

debug1: Authentication succeeded (password).
debug2: fd 4 setting O_NONBLOCK
debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug1: Entering interactive session.
debug2: callback start
debug2: x11_get_proto: /usr/X11R6/bin/xauth -f
/tmp/ssh-1X7a4Jwi47/xauthfile generate 127.0.0.1:0.0 MIT-MAGIC-COOKIE-1
untrusted timeout 1200 2>/dev/null

The message I referenced earlier goes into some depth about
x11_get_proto and how the xauth command above is being run:

http://www.cygwin.com/ml/cygwin/2004-11/msg00626.html

Perhaps popen is using a socket or named pipe

I do appreciate the suggestions so far.  I just don't yet understand
how the installation and deinstallation of ZoneAlarm is effecting
this behavior.

Brett

Brett C. Serkez, Techie



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Please rev. libexif to prevent segfault

2006-01-09 Thread David Arnstein
The default version of the libexif package seems to be 0.6.12-1. There
is a fatal error in this version. It has been fixed in 0.6.13

In exif-data.c, there is a single line of code
if (s & 1) *ds++;

The author really wanted
if (s & 1) (*ds)++;

This bug will be exercised whenever a certain EXIF record has an odd
number of bytes. At that point, a program crash is all but certain. 


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: ZoneAlarm Suite popen hang

2006-01-09 Thread Igor Peshansky
On Mon, 9 Jan 2006, Brett Serkez wrote:

> [snip]
> > It could also be that the script is assuming that ssh will close
> > stdin. Try adding a redirection of stdin from /dev/null as well
> > (i.e., use
> >
> > sh -c /usr/X11R6/bin/xauth -f /tmp/ssh-OrQEQQHWXE/xauthfile generate > 
> > 7..0.1:0.0 MIT-MAGIC-COOKIE-1 untrusted timeout 1200 2 > /dev/null < 
> > /dev/null
> >
> > ) and see if it helps.  If it does, the script is actually buggy, and
> > needs to be fixed.
>
> Well, this command is actually being constructed by ssh code and then
> executed via popen.  This would mean building my own ssh from scratch, I
> suppose  in order to figure this out, I might need to do this anyway.

Well, if you can find where ssh is invoked, you can also give it the "-n"
parameter, which would result in equivalent functionality.

> Just wanted to be clear on one point, that is this code executes
> fine with ZoneAlarm Pro or no ZoneAlarm, it only starts failing
> with ZoneAlarm Suite is installed which I'm thinking interfers with
> the pipe created by popen.
>
> I'll have to build ssh to see if this will clear the problem.

I doubt ZoneAlarm would affect pipes.  It might very possibly affect
sockets.
HTH,
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED] | [EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_Igor Peshansky, Ph.D. (name changed!)
 |,4-  ) )-,_. ,\ (  `'-'   old name: Igor Pechtchanski
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Perl/TK Missing Dependency Found

2006-01-09 Thread Brett Serkez
[snip]
> > Please also bear in mind, that I only install what I need, the
> > default plus minimum, in this case, Perl/Tk. If this doesn't work on
> > your system, please try this approach.
>
> I'll admit that I don't have a mimimal system by any means, but AFAICS
> libwmf has nothing to do with perl-Tk.

I would kindly ask that you setup a minimal install and try it, perhaps
someone else on this list can try it and also verify.

Are you saying that you are unwilling to take the steps necessary to
persue this just because it works on your system?  I invested several
hours tracking this down for the community, and would appreciate more
than just 'it works on my system' and a blow-off that 'by the book' it
doesn't have anything to do with perl-TK.  I don't claim to understand
the relationship, but it *is* there and I would appreciate it being
addressed as it will come up for others.

Perhaps it is a particular Service Pack?  I've tried on both Windows Xp
Pro and Home with all the latest MS patches.  Perhaps another
unrelated software package is installing a DLL on your system that is
being utilized.  I see that it is a Microsoft library for reading vector
images.  Perhaps you have Office or other package that has installed
this DLL?

I've verified this on a couple of different systems.  Anyone else?

Brett

Brett C. Serkez, Techie



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Perl/TK Missing Dependency Found

2006-01-09 Thread Yaakov S (Cygwin Ports)

Brett Serkez wrote:

Run it in, you get a nice exit button.


Right.


Uninstall the package libwmf.

Run it, it core dumps.


Not for me.


Please confirm on your system, should be trival, and add the dependency.

Please also bear in mind, that I only install what I need, the default
plus minimum, in this case, Perl/Tk. If this doesn't work on your
system, please try this approach.


I'll admit that I don't have a mimimal system by any means, but AFAICS 
libwmf has nothing to do with perl-Tk.



Yaakov
Cygwin Ports


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: ZoneAlarm Suite popen hang

2006-01-09 Thread Igor Peshansky
On Mon, 9 Jan 2006, Brett Serkez wrote:

> [snip]
> Using -vvv I see the hang is occuring when ssh executes the
> following command:
>
> sh -c /usr/X11R6/bin/xauth -f /tmp/ssh-OrQEQQHWXE/xauthfile generate 
> 7..0.1:0.0 MIT-MAGIC-COOKIE-1 untrusted timeout 1200 2 > /dev/null
>   /usr/X11R6/bin/xauth:  creating new authority file
>   /home/brett/.Xauthority
>
> Running this command by hand, it looks like it is hanging, but actually
> it is waiting for the command 'exit' on stdin.  Typing exit confirms
> this with a return to the parent shell prompt.
>
> This becomes more obvious when the stderr redirection is removed:
>
> sh -c /usr/X11R6/bin/xauth -f /tmp/ssh-OrQEQQHWXE/xauthfile generate 
> 8..0.1:0.0 MIT-MAGIC-COOKIE-1 untrusted timeout 1200
>   /usr/X11R6/bin/xauth:  creating new authority file
>   /home/brett/.Xauthority Using authority file /home/bserkez/.Xauthority
> xauth>
>
> It looks to me on the surface as if ZoneAlarm is interfering with the
> communication between ssh and xauth via the popen().  This isn't
> completely dissimilar to pipe issues that have been discussed in other
> areas, such as with rsync.
>
> I'm not sure what the next step would be, looking for ideas.

It could also be that the script is assuming that ssh will close stdin.
Try adding a redirection of stdin from /dev/null as well (i.e., use

sh -c /usr/X11R6/bin/xauth -f /tmp/ssh-OrQEQQHWXE/xauthfile generate 7..0.1:0.0 
MIT-MAGIC-COOKIE-1 untrusted timeout 1200 2 > /dev/null < /dev/null

) and see if it helps.  If it does, the script is actually buggy, and
needs to be fixed.
HTH,
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED] | [EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_Igor Peshansky, Ph.D. (name changed!)
 |,4-  ) )-,_. ,\ (  `'-'   old name: Igor Pechtchanski
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



ZoneAlarm Suite popen hang

2006-01-09 Thread Brett Serkez
I recently upgraded from ZoneAlarm Pro to ZoneAlarm Suite (both version
6.1.737.000).

Other than the usual issues with bash and sshd, I suddenly found that
trying to use ssh with X forwarding hung.  Before complaining that
this should be posted on the X11 list, I don't believe the issue is
related to X.

After digging I found that the only way this works is to completely
uninstall ZoneAlarm Suite, no amount of fiddling or disabling of
options helps.

Here is where it gets very interesting.

Digging in the mailing list, I found this:

http://www.cygwin.com/ml/cygwin/2004-11/msg00626.html

This message talks in some depth on the subject in general (sans
ZoneAlarm) and zeros in on popen of a specific xauth command via sh.  I
don't see any final resolution in this message and for me, killing sh
helps only in the first case.

Using -vvv I see the hang is occuring when ssh executes the
following command:

sh -c /usr/X11R6/bin/xauth -f /tmp/ssh-OrQEQQHWXE/xauthfile generate
7..0.1:0.0 MIT-MAGIC-COOKIE-1 untrusted timeout 1200 2 > /dev/null
  /usr/X11R6/bin/xauth:  creating new authority file
  /home/brett/.Xauthority

Running this command by hand, it looks like it is hanging, but actually
it is waiting for the command 'exit' on stdin.  Typing exit confirms
this with a return to the parent shell prompt.

This becomes more obvious when the stderr redirection is removed:

sh -c /usr/X11R6/bin/xauth -f /tmp/ssh-OrQEQQHWXE/xauthfile generate
8..0.1:0.0 MIT-MAGIC-COOKIE-1 untrusted timeout 1200
  /usr/X11R6/bin/xauth:  creating new authority file
  /home/brett/.Xauthority Using authority file /home/bserkez/.Xauthority
xauth>

It looks to me on the surface as if ZoneAlarm is interfering with the
communication between ssh and xauth via the popen().  This isn't
completely dissimilar to pipe issues that have been discussed in other
areas, such as with rsync.

I'm not sure what the next step would be, looking for ideas.

Brett

Brett C. Serkez, Techie



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Perl/TK Missing Dependency Found

2006-01-09 Thread Brett Serkez
> > After tedious research, I've figured out that the missing package
> > is: libwmf.
>
> None of the perl-Tk modules link against libwmf, and a grep of the
> sources for "wmf" returns nothing.
>
> In addition, neither Debian nor Gentoo show libwmf as a requirement
> for their packages.
>
> Can you please explain the basis for your findings?

It works.

Create the following perl program:

#!/usr/bin/perl
use Tk;

my $mw = MainWindow->new;

$mw->Button(
-text => "Exit",
-background => "red",
-command => sub { exit; },
)->pack( -side => 'bottom' , -fill => 'both' ); 

MainLoop;

Run it in, you get a nice exit button.

Uninstall the package libwmf.

Run it, it core dumps.

As I said in my original postings, I suspected it wasn't directly linked
in.  I honestly don't know precisely why or how, but I know that without
 this package, the simply script above doesn't work.

Please confirm on your system, should be trival, and add the dependency.

Please also bear in mind, that I only install what I need, the default
plus minimum, in this case, Perl/Tk. If this doesn't work on your
system, 
please try this approach.

Thank you,

Brett

Brett C. Serkez, Techie



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



configuration problems re cygdrive

2006-01-09 Thread Michael E. Burke
Well, I had Cygwin installed as part of the Apache2Triad WAMP installation,
and it was cool enough I went to the Cygwin site and loaded Cygwin from the
setup utility, using the defaults. That was cool, but I figured I was
missing a lot of options so I reloaded it with everything (I kind of like to
experiment) since I wanted to use KDE and a couple of utilities without
having to reboot into UBUNTU. I couldn't find the kdeinit file, and when I
tried to updatedb I received a message like "cygwinc/c/cygdrive already
exists with the same inode and device number in another directory three
levels higher in the hierarchy". (Close to actual message.)

So I uninstalled cygwin. Lo and behold, I still had a cygwin directory which
wouldn't uninstall from the setup utility. So I deleted the files and
directories, but when I use the Windows search utility I still see cygwin
artifacts and directories, some of which were not possible to remove because
"couldn't read from source or file".

So, now I have questions: How specifically, would I locate the second (or
first) instance of cygwin/c/cygdrive and reconcile it to my actual
configuration?

Is anyone running Apache, MySQL, Python/Perl/PHP under Cygwin? If so, could
you direct me to some setup directions? Or should I just use the Cygwin
setup and use those settings? (I'm willing to remove Apache2triad stuff if I
can have the same or better functionality.) I already have Java installed...

Does anyone run KDE under Cywin? What little helpful hints would make it
easier for me to get it up and running?

I've heard a little about colinux...Do I want to do this? Are there any big
advantages or drawbacks?

Lastly, I don't really need all the things that can be installed from the
setup utility (I just felt like overeating, so to speak), so is there a list
of Best Apps that I could use to limit my setup and still get maximum
flexibility? For instance, I doubt I need both Apache 2 and Apache 1.x on my
system, but what about the libraries like glibc? And some of these things
might conflict with each other...is there a list of known conflicts?

(I'm feeling a little trepidation here...Cygwin could get to be as big an
administration job as a regular LINUX distro, right?)

Thanks for your help,

Mike Burke

"There are 10 kinds of people; those who understand binary and those who
don't."



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Perl/TK Missing Dependency Found

2006-01-09 Thread Yaakov S (Cygwin Ports)
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Brett Serkez wrote:
> After tedious research, I've figured out that the missing package
> is: libwmf.

None of the perl-Tk modules link against libwmf, and a grep of the
sources for "wmf" returns nothing.

In addition, neither Debian nor Gentoo show libwmf as a requirement for
their packages.

Can you please explain the basis for your findings?


Yaakov
Cygwin Ports
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Cygwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDwug1piWmPGlmQSMRAlXhAKCfI4OZcFqw29aKas0io/V2HXPJlACg4u1t
RAbIXR6uvGpkugPO0Z+7Ens=
=ddOL
-END PGP SIGNATURE-


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: 1.5.18-1: Crash launching COMMAND.COM (W98)

2006-01-09 Thread Ingo Brueckl
Christopher Faylor writes:

> maybe even running this under gdb to find out precisely where the "crash"
> is happening

Is there a "How track down bugs with gdb HOWTO for dummies"? I'd like to
help, but don't have experience with gdb.

Ingo


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Download interrupted. How to get only lacking files?

2006-01-09 Thread Larry Hall (Cygwin)

Julien Rouiller wrote:

I tried to download cygwin modules with a 56k
connection.
The download was interrupted after a few hours.

If I try to download again, will the cygwin setup
program know which files where successfully downloaded
?
Or does it download the whole and overwrite existing
components?
(Should I install downloaded modules before
re-downloading? How?)

In fact, I want to get the GRASS SIG. It is not
obvious for me to know which cygwin modules are
required. I have the feeling that running the cygwin
setup is like getting an OS (more exactly an virtual
machine) and misc applications the same time...



If you don't select different mirrors, then setup.exe will know
what it has already downloaded successfully (by consulting the
cache it keeps under the download directory you told it) and will
not download these packages again unless they have been updated in
the interim.

Sorry, I don't know what "the GRASS SIG" is so I can't provide
any info relative to that.  Keep in mind, unless the package
you're looking for comes from one of the mirror sites listed at
cygwin.com/mirrors.html, they aren't supported by this list.
You should send any specific questions or issues you have with
unsupported packages to the owners of those packages.  As for
installing packages that are on the mirrors listed, you don't
need to select any packages manually to get the basic set that
will just work.  Will wonders never cease? ;-)


--
Larry Hall  http://www.rfk.com
RFK Partners, Inc.  (508) 893-9779 - RFK Office
838 Washington Street   (508) 893-9889 - FAX
Holliston, MA 01746


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Download interrupted. How to get only lacking files?

2006-01-09 Thread Julien Rouiller
I tried to download cygwin modules with a 56k
connection.
The download was interrupted after a few hours.

If I try to download again, will the cygwin setup
program know which files where successfully downloaded
?
Or does it download the whole and overwrite existing
components?
(Should I install downloaded modules before
re-downloading? How?)

In fact, I want to get the GRASS SIG. It is not
obvious for me to know which cygwin modules are
required. I have the feeling that running the cygwin
setup is like getting an OS (more exactly an virtual
machine) and misc applications the same time...

Any help is welcome. Thanks.






___ 
Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs 
exceptionnels pour appeler la France et l'international.
Téléchargez sur http://fr.messenger.yahoo.com


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: 'su' no longer working?

2006-01-09 Thread Larry Hall (Cygwin)

Corinna Vinschen wrote:

On Jan  9 09:30, Igor Peshansky wrote:

On Mon, 9 Jan 2006, Eric Blake wrote:


According to Igor Peshansky on 1/9/2006 6:04 AM:

Right, that's pretty much what I was asking for above.  Eric, if it
helps, I can look into submitting the patch later this week, though I
haven't looked at the coreutils code in a while, so it might take some
time to understand the specifics.

I've already been playing some with a cygwin-specific patch.  Using the
tips at http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-setuid, I have
already gotten a working implementation that will switch user context on
NT machines with a password.  But I still want to get passwordless
switching working where possible.  The patch should apply to src/su.c
provided in the 5.93-2 source tarball from setup.exe, as a starting
point for your hacking.

Ok, thanks, I'll play around with it...


Speaking of which, I noticed that in my attached patch (work in
progress), I got a failure return for PrivilegeCheck on my NT machine
when run as SYSTEM, even though my understanding is that on NT, SYSTEM
has the privileges of passwordless context switching.  Any ideas what I
might need to fix to make this check more robust, short of just trying a
setuid() to see if it will succeed without first doing the
cygwin_logon_user()/cygwin_set_impersonation_token() check?

Heh, what's wrong with doing that?  If setuid() fails, try it with a
password -- I can't think of any caveats, frankly...  Corinna?


It's fine if su implements password login and trying to call set(e)uid
just to check if passwordless login might work is fine, too, but it's
a bit off my point.

My point is that Administrators don't have the permissions to do any one
of these actions by default.  You can't change user context unless you
have a service running under a privileged (SYSTEM) account, which starts
the process for you (RunAs, sshd).  The important fact here is that
users working under an Admin account expect that su just works for them,
but it doesn't.

So, whatever you do codewise, be prepared to either add descriptive
messages to su so that users read *why* su might fail for them, or
be prepared to get lots of question on this list (since nobody reads
mailing list archives anyway).


This is a good point.  Perhaps this is an argument to change the name of
the "working" su to syssu or something and leave the su script as is.
Certainly if there's some useful functionality in su in certain cases, it's
a shame to mask it completely but it seems reasonable to shield ourselves
from those who would use su with expectations and with an itchy email
finger. ;-)

--
Larry Hall  http://www.rfk.com
RFK Partners, Inc.  (508) 893-9779 - RFK Office
838 Washington Street   (508) 893-9889 - FAX
Holliston, MA 01746


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: debugging cygwin

2006-01-09 Thread Igor Peshansky
On Mon, 9 Jan 2006, Ken Senior wrote:

> As I continue to descend deeper into the rabbit hole To think, all
> this just to try to figure out why rsync is hanging
>
> So, rather than following the quick 'n dirty suggestion of Igor (Thanks
> though Igor),  I followed the FAQ #15 on installing snapshots with the
> same problem---cygwin will no longer run with snapshot.  Because the
> error message I get when I try to launch the cygwin shell flashes by too
> fast to see, I decided to launch a Windows command window and then run
> bash.exe from there. This is the error I got:
>
> Microsoft Windows XP [Version 5.1.2600]
> (C) Copyright 1985-2001 Microsoft Corp.
>
> C:\>cd cygwin
>
> C:\cygwin>cd bin
>
> C:\cygwin\bin>bash.exe
>  7 [main] ? (3732) C:\cygwin\bin\bash.exe: *** fatal error - system shared
> memory version mismatch detected - 0x75BE0084/0x75BE0095.
> This problem is probably due to using incompatible versions of the cygwin DLL.
> Search for cygwin1.dll using the Windows Start->Find/Search facility
> and delete all but the most recent version.  The most recent version *should*
> reside in x:\cygwin\bin, where 'x' is the drive on which you have
> installed the cygwin distribution.  Rebooting is also suggested if you
> are unable to find another cygwin DLL.
>
> C:\cygwin\bin>
>
> This was the 1/8 snapshot.  Thanks again everyone for helping.  At least
> I'm learning as I peel each new layer from the onion, lol :)

Yep, that was caused by unstopped Cygwin processes.  FAQ #15 should work.
Again, sorry for the confusion.
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED] | [EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_Igor Peshansky, Ph.D. (name changed!)
 |,4-  ) )-,_. ,\ (  `'-'   old name: Igor Pechtchanski
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: debugging cygwin

2006-01-09 Thread Igor Peshansky
On Mon, 9 Jan 2006, Ken Senior wrote:

> Ok, so Igor's directions seem to conflict with the FAQ #15 about whether
> or not cygwin services must be halted. Can someone clarify that.

Umm, sorry.  That's what I get for writing a message and then coming back
to change some part of it (with some time in between).  I meant that once
you have the snapshot DLL in place, you don't need to stop any running
processes to use the .dbg file (as you would if you had to substitute the
debugging version of the DLL).  Sorry for any confusion it caused.

> In any case, after renaming the snapshot DLLs (from both 1/7 and 1/8) to
> /bin/cygwin1.dll, I find that no cygwin process will launch, not even
> the bash window. Replacing the old cygwin1.dll back reverts things to
> working again. Can anyone suggest a more "stable" snapshot one might
> use for debugging purposes?

As CGF said, the snapshots are stable.  You have to stop all the running
processes to replace the DLL (this probably stems from the confusion I
mentioned above).
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED] | [EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_Igor Peshansky, Ph.D. (name changed!)
 |,4-  ) )-,_. ,\ (  `'-'   old name: Igor Pechtchanski
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: bash -c error

2006-01-09 Thread Brian Dessent
Krzysztof Duleba wrote:

> $ bash -c time
> Segmentation fault (core dumped)
> 
> $ uname -a
> CYGWIN_NT-5.1 DULI2 1.5.19s(0.141/4/2) 20051020 10:37:08 i686 unknown
> unknown Cygwin

This looks like a bash bug.  It looks like only 3.0 is affected, as it works
fine in 3.1.  Since 'time' is a builtin, it appears to be a bug in trying to run
time with an empty parameter:

(gdb) bt
#0  0x610d50e1 in strlen () at ../../../../src/winsup/cygserver/client.cc:464
#1  0x00414712 in execute_simple_command (simple_command=0x626560, pipe_in=-1,
pipe_out=-1, async=0, fds_to_close=0x626578) at
/usr/src/bash-3.0/execute_cmd.c:2729
#2  0x00411203 in execute_command_internal (command=0x626548, asynchronous=0,
pipe_in=-1, pipe_out=-1, fds_to_close=0x626578) at
/usr/src/bash-3.0/execute_cmd.c:667
#3  0x00411cdc in time_command (command=0x626548, asynchronous=0, pipe_in=-1,
pipe_out=-1, fds_to_close=0x626578) at /usr/src/bash-3.0/execute_cmd.c:1097
#4  0x00410fb3 in execute_command_internal (command=0x626548, asynchronous=0,
pipe_in=-1, pipe_out=-1, fds_to_close=0x626578) at
/usr/src/bash-3.0/execute_cmd.c:589
#5  0x00449baf in parse_and_execute (string=0x6260d0 "time", from_file=0x46812c
"-c", flags=4) at /usr/src/bash-3.0/builtins/evalstring.c:267
#6  0x004026c0 in run_one_command (command=0x6115b514 "time") at
/usr/src/bash-3.0/shell.c:1259
#7  0x00401848 in main (argc=3, argv=0x6115b4b4, env=0x620090) at
/usr/src/bash-3.0/shell.c:643

The problem is this in execute_cmd.c:

2728FREE (the_printed_command_except_trap);
2729the_printed_command_except_trap = savestring 
(the_printed_command);

where 'the_printed_command_except_trap' is NULL and savestring() is

./lib/readline/histlib.h:37:#ifndef savestring
./lib/readline/histlib.h:38:#define savestring(x) strcpy (xmalloc (1 + strlen
(x)), (x))
./lib/readline/histlib.h-39-#endif
 
Hence, strlen(NULL).

Brian


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: debugging cygwin

2006-01-09 Thread Christopher Faylor
On Mon, Jan 09, 2006 at 11:38:08AM -0500, Ken Senior wrote:
>Ok, so Igor's directions seem to conflict with the FAQ #15 about
>whether or not cygwin services must be halted.  Can someone clarify
>that.

The FAQ is correct.  You need to stop all running services when you
replace the DLL.

>In any case, after renaming the snapshot DLLs (from both 1/7 and 1/8)
>to /bin/cygwin1.dll, I find that no cygwin process will launch, not
>even the bash window.  Replacing the old cygwin1.dll back reverts
>things to working again.  Can anyone suggest a a more "stable" snapshot
>one might use for debugging purposes?

Lets take a step back, please.

The snapshots do work and you can debug with them.  You are probably
doing something wrong when you unpack and copy the dll.  You should be
copying both the dll and the dbg file to a temporary area and bunzipping
them.  Then you may need to make sure that the DLL has executable
permissions.

So, the steps should be something like this (this is just an example, I
include it only for reference):

  c:\>mkdir tmp
  c:\>cd tmp
  c:\tmp>c:\cygwin\bin\wget http://cygwin.com/snapshots/cygwin1-20060109.dll.bz2
  c:\tmp>c:\cygwin\bin\wget http://cygwin.com/snapshots/cygwin1-20060109.dbg.bz2
  c:\tmp>c:\cygwin\bin\bunzip2 cygwin1-20060109.*
  c:\tmp>c:\cygwin\bin\chmod a+x cygwin1-20060109.*
  c:\tmp>copy c:\cygwin\bin\cygwin1.dll c:\cygwin\bin\cygwin1.dll.saf
  c:\tmp>ren cygwin1-20060109.dll cygwin1.dll
  c:\tmp>ren cygwin1-20060109.dbg cygwin1.dbg
  c:\tmp>copy cygwin1.d* c:\cygwin\bin

Btw, your next consternation point will probably come when you discover
that the .dbg file just provides the debugging symbols for the cygwin
DLL.  You are going to need the cygwin DLL sources if you want to do any
useful debugging.  And, unless you set up the sources in exactly the
same way as I did when I created the snapshot, you'll probably have to
investigate the gdb "directory" command.

There is a file in the cygwin source directory called "how-to-debug-cygwin.txt"
which might be instructive.

Oh, and, unless you really know what you're doing, you can't have two
versions of cygwin on your system at the same time.  You need to replace
the one in /bin .

cgf


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: bash -c error

2006-01-09 Thread Cliff Stanford
Christopher Faylor wrote:

> Just try running 'time' from the bash prompt.  You get a SEGV from strlen
> AFAICT.
> 
> This doesn't seem to have anything to do with "-c".  It seems to be an
> issue with the time command.

Not my experience:

[EMAIL PROTECTED] ~
$ time

real0m0.000s
user0m0.000s
sys 0m0.000s

[EMAIL PROTECTED] ~
$ bash -c time
Segmentation fault (core dumped)

[EMAIL PROTECTED] ~
$

Regards,
Cliff.

-- 
Cliff Stanford
Might Limited   +44 845 0045 666 (Office)
Suite 67, Dorset House  +44 7973 616 666 (Mobile)
Duke Street, Chelmsford, CM1 1TB



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: bash -c error

2006-01-09 Thread Christopher Faylor
On Mon, Jan 09, 2006 at 05:13:54PM +0100, Krzysztof Duleba wrote:
>$ bash -c time
>Segmentation fault (core dumped)
>
>$ uname -a
>CYGWIN_NT-5.1 DULI2 1.5.19s(0.141/4/2) 20051020 10:37:08 i686 unknown 
>unknown Cygwin
>
>Reproduced on several machines. I wonder what can it be.

Just try running 'time' from the bash prompt.  You get a SEGV from strlen
AFAICT.

This doesn't seem to have anything to do with "-c".  It seems to be an
issue with the time command.

cgf


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: debugging cygwin

2006-01-09 Thread Ken Senior
As I continue to descend deeper into the rabbit hole To think, all 
this just to try to figure out why rsync is hanging


So, rather than following the quick 'n dirty suggestion of Igor (Thanks 
though Igor), I followed the FAQ #15 on installing snapshots with the 
same problem---cygwin will no longer run with snapshot.  Because the 
error message I get when I try to launch the cygwin shell flashes by too 
fast to see, I decided to launch a Windows command window and then run 
bash.exe from there.  This is the error I got:


Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\>cd cygwin

C:\cygwin>cd bin

C:\cygwin\bin>bash.exe
 7 [main] ? (3732) C:\cygwin\bin\bash.exe: *** fatal error - system 
shared

memory version mismatch detected - 0x75BE0084/0x75BE0095.
This problem is probably due to using incompatible versions of the 
cygwin DLL.

Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version.  The most recent version 
*should*

reside in x:\cygwin\bin, where 'x' is the drive on which you have
installed the cygwin distribution.  Rebooting is also suggested if you
are unable to find another cygwin DLL.

C:\cygwin\bin>

This was the 1/8 snapshot.  Thanks again everyone for helping.  At least 
I'm learning as I peel each new layer from the onion, lol :)


-K


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Cygwin cannot find certain files under Windows 2003

2006-01-09 Thread Ian Harris
Hi,

I have been using Cygwin on Windows Server 2003 (both Standard Edition
and Web Server Edition) for a while without any problems to interface
with the IIS scripts in /cygdrive/c/inetpub/adminscripts.

However, I have recently installed Cygwin on Windows Server 2003 64-bit
Standard Edition and it cannot see certain files which definitely exist
within the file system, notably
c:\WINDOWS\system32\inetsrv\MetaBase.xml, which causes havoc with the
AdminScripts.  If I ls the directory in Cygwin, I can see most of the
files but not the MetaBase.xml file (amongst a few others), but I have
no problem seeing the file from a regular Windows command prompt.

If I copy the MetaBase.xml file to c:\ (for example) then I have no
problem seeing or opening the file.

The permissions of the file are identical to those on other files in the
directory and on the other Windows servers.  I am running the latest
release of Cygwin, 1.5.18-1.

Any pointers with this would be gratefully received.

Thanks,
Ian :)


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: debugging cygwin

2006-01-09 Thread Igor Peshansky
On Mon, 9 Jan 2006, Ken Senior wrote:

> Igor Peshansky wrote:
>
> > On Mon, 9 Jan 2006, Ken Senior wrote:
> >
> > > Does anyone know where one might find a version of the latest
> > > cygwin1.dll which was compiled with the '-g' (debugging) option set?
> > > If it's possible, I would recommend that each cygwin distribution be
> > > accompanyed by an optional cygwin1.dll which has been compiled with
> > > said option.  Users can seamlessly swap the '-g' version with the
> > > when debugging is needed.  Or, maybe there's some hidden difficulty
> > > in doing this that I just don't understand.  -Ken
> >
> > All the snapshots[*] come with debugging symbols in the cygwin1.dbg
> > file. Simply download the snapshot DLL and the corresponding
> > cygwin1.dbg (the DLL should go in /bin; the dbg file can go anywhere),
> > then issue the 'add-symbol-file' command in gdb with the full path to
> > the file.  You don't even need to stop the running processes.
> > Enjoy,
> > Igor
> > [*] 
>
> The add-symbol-file command doesn't seem to be present.  This must not
> be part of the default distribution.  -K

'add-symbol-file' is a gdb command.  Just start gdb and run that command
from the prompt.
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED] | [EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_Igor Peshansky, Ph.D. (name changed!)
 |,4-  ) )-,_. ,\ (  `'-'   old name: Igor Pechtchanski
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: debugging cygwin

2006-01-09 Thread Ken Senior
Ok, so Igor's directions seem to conflict with the FAQ #15 about whether 
or not cygwin services must be halted. Can someone clarify that.


In any case, after renaming the snapshot DLLs (from both 1/7 and 1/8) to 
/bin/cygwin1.dll, I find that no cygwin process will launch, not even 
the bash window. Replacing the old cygwin1.dll back reverts things to 
working again. Can anyone suggest a a more "stable" snapshot one might 
use for debugging purposes?


Thanks,

Ken


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



bash -c error

2006-01-09 Thread Krzysztof Duleba

$ bash -c time
Segmentation fault (core dumped)

$ uname -a
CYGWIN_NT-5.1 DULI2 1.5.19s(0.141/4/2) 20051020 10:37:08 i686 unknown 
unknown Cygwin


Reproduced on several machines. I wonder what can it be.

Krzysztof Duleba 





--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Cygwin(1.5.18) gcc (3.4.4) problems when compileing esd test prg

2006-01-09 Thread Brian Dessent
Vijay Kiran Kamuju wrote:

> They are currently a part of the cygwin net release.
> Please check the line no 2301 in the setup.ini

You're right, I overlooked that.

> But i cannot compile the program, even though i have installed them.
> I dont know how other programs that use esound like the Gnome libs,
> etc emmbed in them.
> They all seem to compile fine :( like the enlightenment

As others have said the reason is that you have the link order wrong. 
The way ld works is to scan arguments from left to right, and include
the necessary modules from each library that have been referenced from
previously seen objects.  This means you generally need to specify
libraries after object files, otherwise when the linker examines the
library there will be no unresolved symbols yet encountered, so it will
include nothing from the library.

I think that the reason most people don't notice this on linux is that
it can do lazy linking, where the symbols are resolved at runtime.  But
windows requires all unknown symbols to be resolved at link-time, so you
can't get away with being sloppy with the link order.

Brian


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: debugging cygwin

2006-01-09 Thread Christopher Faylor
On Mon, Jan 09, 2006 at 07:44:22AM -0800, Brian Dessent wrote:
>Ken Senior wrote:
>>Actually, I should have been more specific with my statement, "not part
>>of distribution" in the last email.  The actual error from gdb is,
>>"warning: no loadable section found in added symbol-file
>>/usr/bin/cygwin1-20060108.dbg
>
>I get that from insight from time to time, but never from gdb.
>However, it seems to be a message you can ignore because debugging
>works fine after dismissing the dialog as all the symbols are there and
>the debugger clearly knows how to find everything.

Also, you might want to read the snapshots page where it talks about the
dbg file.  You should rename the snapshot .dbg file the same way that you
rename the .dll file.

And, for loading the dbg file, despite the name, you should be able to
use the "dll-symbols" command to load symbols from this file.

cgf


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: debugging cygwin

2006-01-09 Thread Brian Dessent
Ken Senior wrote:

> Actually, I should have been more specific with my statement, "not part
> of distribution" in the last email.  The actual error from gdb is,
> "warning: no loadable section found in added symbol-file
> /usr/bin/cygwin1-20060108.dbg

I get that from insight from time to time, but never from gdb.  However,
it seems to be a message you can ignore because debugging works fine
after dismissing the dialog as all the symbols are there and the
debugger clearly knows how to find everything.

Brian


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: debugging cygwin

2006-01-09 Thread Ken Senior
Actually, I should have been more specific with my statement, "not part 
of distribution" in the last email.  The actual error from gdb is, 
"warning: no loadable section found in added symbol-file 
/usr/bin/cygwin1-20060108.dbg




--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: debugging cygwin

2006-01-09 Thread Brian Dessent
Ken Senior wrote:
> 
> The add-symbol-file command doesn't seem to be present.  This must not
> be part of the default distribution.  -K

You don't need to do any of that if you name the .dbg file the same as
the .dll and put it in the same directory.

Brian


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: debugging cygwin

2006-01-09 Thread Ken Senior
The add-symbol-file command doesn't seem to be present.  This must not 
be part of the default distribution.  -K


Igor Peshansky wrote:


On Mon, 9 Jan 2006, Ken Senior wrote:

 


Does anyone know where one might find a version of the latest
cygwin1.dll which was compiled with the '-g' (debugging) option set?
If it's possible, I would recommend that each cygwin distribution be
accompanyed by an optional cygwin1.dll which has been compiled with said
option.  Users can seamlessly swap the '-g' version with the when
debugging is needed.  Or, maybe there's some hidden difficulty in doing
this that I just don't understand.  -Ken
   



All the snapshots[*] come with debugging symbols in the cygwin1.dbg file.
Simply download the snapshot DLL and the corresponding cygwin1.dbg (the
DLL should go in /bin; the dbg file can go anywhere), then issue the
'add-symbol-file' command in gdb with the full path to the file.  You
don't even need to stop the running processes.
Enjoy,
Igor
[*] 
 





--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Cygwin(1.5.18) gcc (3.4.4) problems when compileing esd test prg

2006-01-09 Thread Holger Krull

Vijay Kiran Kamuju schrieb:

I am tring to compile this sample program on cygwin 1.5.18 and gcc (gcc 3.4.4)

You're writing a program that tries to call esound libraries.  These



They are currently a part of the cygwin net release.



But i cannot compile the program, even though i have installed them.
I dont know how other programs that use esound like the Gnome libs,
etc emmbed in them.
They all seem to compile fine :( like the enlightenment


gcc -o esdtest esd_test.c -lesd

works for me


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Cygwin(1.5.18) gcc (3.4.4) problems when compileing esd test prg

2006-01-09 Thread Vijay Kiran Kamuju
> > I am tring to compile this sample program on cygwin 1.5.18 and gcc (gcc 
> > 3.4.4)
>
> You're writing a program that tries to call esound libraries.  These
> libraries are not in the Cygwin distribution.  You'll have to build them
> yourself or find them elsewhere (Cygwin Ports has packages I believe.)
They are currently a part of the cygwin net release.
Please check the line no 2301 in the setup.ini
But i cannot compile the program, even though i have installed them.
I dont know how other programs that use esound like the Gnome libs,
etc emmbed in them.
They all seem to compile fine :( like the enlightenment
>
> Brian
Thanks,
Vijay


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: 'su' no longer working?

2006-01-09 Thread Corinna Vinschen
On Jan  9 09:30, Igor Peshansky wrote:
> On Mon, 9 Jan 2006, Eric Blake wrote:
> 
> > According to Igor Peshansky on 1/9/2006 6:04 AM:
> > >
> > > Right, that's pretty much what I was asking for above.  Eric, if it
> > > helps, I can look into submitting the patch later this week, though I
> > > haven't looked at the coreutils code in a while, so it might take some
> > > time to understand the specifics.
> >
> > I've already been playing some with a cygwin-specific patch.  Using the
> > tips at http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-setuid, I have
> > already gotten a working implementation that will switch user context on
> > NT machines with a password.  But I still want to get passwordless
> > switching working where possible.  The patch should apply to src/su.c
> > provided in the 5.93-2 source tarball from setup.exe, as a starting
> > point for your hacking.
> 
> Ok, thanks, I'll play around with it...
> 
> > Speaking of which, I noticed that in my attached patch (work in
> > progress), I got a failure return for PrivilegeCheck on my NT machine
> > when run as SYSTEM, even though my understanding is that on NT, SYSTEM
> > has the privileges of passwordless context switching.  Any ideas what I
> > might need to fix to make this check more robust, short of just trying a
> > setuid() to see if it will succeed without first doing the
> > cygwin_logon_user()/cygwin_set_impersonation_token() check?
> 
> Heh, what's wrong with doing that?  If setuid() fails, try it with a
> password -- I can't think of any caveats, frankly...  Corinna?

It's fine if su implements password login and trying to call set(e)uid
just to check if passwordless login might work is fine, too, but it's
a bit off my point.

My point is that Administrators don't have the permissions to do any one
of these actions by default.  You can't change user context unless you
have a service running under a privileged (SYSTEM) account, which starts
the process for you (RunAs, sshd).  The important fact here is that
users working under an Admin account expect that su just works for them,
but it doesn't.

So, whatever you do codewise, be prepared to either add descriptive
messages to su so that users read *why* su might fail for them, or
be prepared to get lots of question on this list (since nobody reads
mailing list archives anyway).


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: 'su' no longer working?

2006-01-09 Thread Igor Peshansky
On Mon, 9 Jan 2006, Eric Blake wrote:

> According to Igor Peshansky on 1/9/2006 6:04 AM:
> >
> > Right, that's pretty much what I was asking for above.  Eric, if it
> > helps, I can look into submitting the patch later this week, though I
> > haven't looked at the coreutils code in a while, so it might take some
> > time to understand the specifics.
>
> I've already been playing some with a cygwin-specific patch.  Using the
> tips at http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-setuid, I have
> already gotten a working implementation that will switch user context on
> NT machines with a password.  But I still want to get passwordless
> switching working where possible.  The patch should apply to src/su.c
> provided in the 5.93-2 source tarball from setup.exe, as a starting
> point for your hacking.

Ok, thanks, I'll play around with it...

> Speaking of which, I noticed that in my attached patch (work in
> progress), I got a failure return for PrivilegeCheck on my NT machine
> when run as SYSTEM, even though my understanding is that on NT, SYSTEM
> has the privileges of passwordless context switching.  Any ideas what I
> might need to fix to make this check more robust, short of just trying a
> setuid() to see if it will succeed without first doing the
> cygwin_logon_user()/cygwin_set_impersonation_token() check?

Heh, what's wrong with doing that?  If setuid() fails, try it with a
password -- I can't think of any caveats, frankly...  Corinna?
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED] | [EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_Igor Peshansky, Ph.D. (name changed!)
 |,4-  ) )-,_. ,\ (  `'-'   old name: Igor Pechtchanski
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: 'su' no longer working?

2006-01-09 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

According to Igor Peshansky on 1/9/2006 6:04 AM:
> 
> Right, that's pretty much what I was asking for above.  Eric, if it helps,
> I can look into submitting the patch later this week, though I haven't
> looked at the coreutils code in a while, so it might take some time to
> understand the specifics.

I've already been playing some with a cygwin-specific patch.  Using the
tips at http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-setuid, I have
already gotten a working implementation that will switch user context on
NT machines with a password.  But I still want to get passwordless
switching working where possible.  The patch should apply to src/su.c
provided in the 5.93-2 source tarball from setup.exe, as a starting point
for your hacking.

Speaking of which, I noticed that in my attached patch (work in progress),
I got a failure return for PrivilegeCheck on my NT machine when run as
SYSTEM, even though my understanding is that on NT, SYSTEM has the
privileges of passwordless context switching.  Any ideas what I might need
to fix to make this check more robust, short of just trying a setuid() to
see if it will succeed without first doing the
cygwin_logon_user()/cygwin_set_impersonation_token() check?

- --
Life is short - so eat dessert first!

Eric Blake [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDwnJ084KuGfSFAYARAjqvAJ4mqjQwCTfjohU8t0exVnFikS7E7ACdHn0D
YLfFxh7W1dpGd54uET6K3vg=
=SC+D
-END PGP SIGNATURE-
Index: src/su.c
===
RCS file: /sources/coreutils/coreutils/src/su.c,v
retrieving revision 1.89
diff -u -r1.89 su.c
--- src/su.c23 Aug 2005 15:09:13 -  1.89
+++ src/su.c7 Jan 2006 00:27:55 -
@@ -1,5 +1,5 @@
 /* su for GNU.  Run a shell with substitute user and group IDs.
-   Copyright (C) 1992-2005 Free Software Foundation, Inc.
+   Copyright (C) 1992-2006 Free Software Foundation, Inc.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -112,6 +112,13 @@
 
 #include "error.h"
 
+#if __CYGWIN__
+# include 
+# include 
+/* Use the following define to determine the Windows version */
+# define is_winnt(GetVersion() < 0x8000)
+#endif
+
 /* The official name of this program (e.g., no `g' prefix).  */
 #define PROGRAM_NAME "su"
 
@@ -261,6 +268,47 @@
 
   if (getuid () == 0 || !correct || correct[0] == '\0')
 return true;
+#if __CYGWIN__
+  /* On cygwin, any process with enough privilege can do passwordless
+ authentication.  http://cygwin.com/ml/cygwin/2006-01/msg00289.html
+ shows how to grant these privileges to an arbitrary account,
+ although this should only be done to trusted users.  */
+  {
+PRIVILEGE_SET *pset = xmalloc (2 * sizeof (DWORD)
+   + 3 * sizeof (LUID_AND_ATTRIBUTES));
+bool ok = true;
+BOOL privileged;
+HANDLE process;
+HANDLE access;
+
+pset->PrivilegeCount = 3;
+pset->Control = PRIVILEGE_SET_ALL_NECESSARY;
+if (LookupPrivilegeValue (NULL, SE_CREATE_TOKEN_NAME,
+  &pset->Privilege[0].Luid) == 0)
+  ok = false;
+pset->Privilege[0].Attributes = SE_PRIVILEGE_ENABLED;
+if (LookupPrivilegeValue (NULL, SE_ASSIGNPRIMARYTOKEN_NAME,
+  &pset->Privilege[1].Luid) == 0)
+  ok = false;
+pset->Privilege[1].Attributes = SE_PRIVILEGE_ENABLED;
+if (LookupPrivilegeValue (NULL, SE_INCREASE_QUOTA_NAME,
+  &pset->Privilege[2].Luid) == 0)
+  ok = false;
+pset->Privilege[2].Attributes = SE_PRIVILEGE_ENABLED;
+
+process = GetCurrentProcess ();
+if (OpenProcessToken (process, TOKEN_QUERY, &access) == 0)
+  ok = false;
+if (PrivilegeCheck (access, pset, &privileged) == 0)
+  ok = false;
+
+CloseHandle (process);
+CloseHandle (access);
+free (pset);
+if (ok && privileged)
+  return true;
+  }
+#endif /* __CYGWIN__ */
 
   unencrypted = getpass (_("Password:"));
   if (!unencrypted)
@@ -268,6 +316,25 @@
   error (0, 0, _("getpass: cannot open /dev/tty"));
   return false;
 }
+#if __CYGWIN__
+  /* Windows NT class machines don't store password in pw->pw_passwd, but
+ do support setuid if we use the cygwin password test.
+ See http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-setuid.  */
+  if (is_winnt)
+{
+  HANDLE token;
+  /* Try to get the access token from NT. */
+  token = cygwin_logon_user (pw, unencrypted);
+  if (token == INVALID_HANDLE_VALUE)
+ return false;
+  /* Inform Cygwin about the new impersonation token.
+ Cygwin is able now, to switch to that user context by
+ setuid or seteui

Re: Cygwin(1.5.18) gcc (3.4.4) problems when compileing esd test prg

2006-01-09 Thread Yitzchak Scott-Thoennes
On Mon, Jan 09, 2006 at 06:06:41AM -0800, Brian Dessent wrote:
> Vijay Kiran Kamuju wrote:
> 
> > I am tring to compile this sample program on cygwin 1.5.18 and gcc (gcc 
> > 3.4.4)
> 
> You're writing a program that tries to call esound libraries.  These
> libraries are not in the Cygwin distribution.  You'll have to build them
> yourself or find them elsewhere (Cygwin Ports has packages I believe.)

Yes, they are.  Packages libesound0 and libesound-devel.

But the -lesd should come at the end of the gcc command.


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: debugging cygwin

2006-01-09 Thread Brian Dessent
Ken Senior wrote:

> Does anyone know where one might find a version of the latest
> cygwin1.dll which was compiled with the '-g' (debugging) option set?  
Everything you need is at .

You can't actually compile a cygwin.dll with the debugging information
in it, because of the section layout.  So the debug information is
created in a .dbg file, which you just place in the same directory as
the .dll.

Brian


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: debugging cygwin

2006-01-09 Thread Igor Peshansky
On Mon, 9 Jan 2006, Ken Senior wrote:

> Does anyone know where one might find a version of the latest
> cygwin1.dll which was compiled with the '-g' (debugging) option set?
> If it's possible, I would recommend that each cygwin distribution be
> accompanyed by an optional cygwin1.dll which has been compiled with said
> option.  Users can seamlessly swap the '-g' version with the when
> debugging is needed.  Or, maybe there's some hidden difficulty in doing
> this that I just don't understand.  -Ken

All the snapshots[*] come with debugging symbols in the cygwin1.dbg file.
Simply download the snapshot DLL and the corresponding cygwin1.dbg (the
DLL should go in /bin; the dbg file can go anywhere), then issue the
'add-symbol-file' command in gdb with the full path to the file.  You
don't even need to stop the running processes.
Enjoy,
Igor
[*] 
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED] | [EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_Igor Peshansky, Ph.D. (name changed!)
 |,4-  ) )-,_. ,\ (  `'-'   old name: Igor Pechtchanski
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Cygwin(1.5.18) gcc (3.4.4) problems when compileing esd test prg

2006-01-09 Thread Brian Dessent
Vijay Kiran Kamuju wrote:

> I am tring to compile this sample program on cygwin 1.5.18 and gcc (gcc 3.4.4)

You're writing a program that tries to call esound libraries.  These
libraries are not in the Cygwin distribution.  You'll have to build them
yourself or find them elsewhere (Cygwin Ports has packages I believe.)

Brian


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: fetchmail syntax error on mda line

2006-01-09 Thread Jason Tishler
On Fri, Jan 06, 2006 at 08:06:13PM -0600, reader at newsguy dot com wrote:
> In that response it was suggested to use a line like:
>mda "/usr/bin/*procmail* -f %F -d %T"
> 
> To pass mail to procmail.  
> 
> [snip]
> 
> Cutting to the chase:  Using the `mda' line posted above I get a
> syntax error:
> 
>   Harry > fetchmail -v -c
>   fetchmail:/cygdrive/c/users/harry/.fetchmailrc:4: syntax error at MDA
> 
> cat .fetchmailrc (with protected passwd etc)
> 
>   set logfile /cygdrive/c/harry/t/var/log/fetchmail.log
>   ## Set procmail as mail delivery agent
>   # MDA /usr/bin/procmail -d %T 
>   mda "/usr/bin/procmail -f %F -d %T"
> 
> [snip]

Did you try what was suggested in the README?

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



debugging cygwin

2006-01-09 Thread Ken Senior
Does anyone know where one might find a version of the latest 
cygwin1.dll which was compiled with the '-g' (debugging) option set?  If 
it's possible, I would recommend that each cygwin distribution be 
accompanyed by an optional cygwin1.dll which has been compiled with said 
option.  Users can seamlessly swap the '-g' version with the when 
debugging is needed.  Or, maybe there's some hidden difficulty in doing 
this that I just don't understand.  -Ken




--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Cygwin(1.5.18) gcc (3.4.4) problems when compileing esd test prg

2006-01-09 Thread Vijay Kiran Kamuju
Hi,

I am tring to compile this sample program on cygwin 1.5.18 and gcc (gcc 3.4.4)
/*file name esd_test.c*/
#include 
#include 
#include 

main()
{
int fd;
char host[256];
gethostname(host,256);
fd=esd_open_sound(host);
if(fd >= 0)
  printf("Hai\n");
else
  printf("Bye\n");
}

compile instructions
-
gcc -lesd esd_test.c

I am getting undefined symbol _esd_open_sound errors.

The program compiles fine on linux.

Thanks,
Vijay


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Declaration of getopt_long_only missing from getopt.h

2006-01-09 Thread Peter Ekberg
On Mon, Jan 09, 2006 at 01:42:35PM +0100, Corinna Vinschen wrote:
> On Jan  9 09:43, Peter Ekberg wrote:
> > The subject says it all. Intentional or an oversight? You tell me...
> 
> You know the answer:  http://cygwin.com/acronyms/#WJM

:-)

> Thanks, I've applied a patch.

Great, thanks!

Cheers,
Peter


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: sshd must be restarted

2006-01-09 Thread Igor Peshansky
Ugh, top-posting...  Reformatted.

On Mon, 9 Jan 2006, Ken Senior wrote:

> Larry Hall (Cygwin) wrote:
>
> > Ken Senior wrote:
> >
> > 
> >
> > > Some packages (SSH) think the home page should be /home/senior
> > > whereas the default bash shell thinks it's located in
> > > /cygdrive/c/Documents and Settings/senior.DOMAIN.
> >
> > This is not surprising.  You set HOME in your environment to point to
> > '/cygdrive/c/Documents and Settings/senior.DOMAIN'.  That's the path
> > you will see as your home if you log in locally.  ssh finds your path
> > in '/etc/passwd' and I'm sure you'll find it listed there as
> > '/home/senior'. Change this with an editor or see the options to
> > 'mkpasswd'.  Or remove/ rename the environment variable.  It's
> > probably easiest to remove the variable, since everything will then
> > look to '/etc/passwd'
>
> As I mentioned before, I have *two* entries in /etc/passwd, one
> corresponding to my "senior" account on the local system and one
> corresponding to the domain account.

And therein lies the crux of your problem.  When asked for the parameters
of the user 'senior', Cygwin will find the first entry.  Therefore, you
will end up with the parameters (home directory, login shell, etc) for the
local user, even if you're logged in as the domain one.

> I've had some really strange behavior as a result.  I was able to rsync
> from the windows box to itself only to discover that the the files that
> managed to copy were not readable by the login that issued the rsync.
>
> senior:unused_by_nt/2000/xp:1003:513:U-ROMULUS\senior,S-1-5-21-484763869-1563985344-682003330-1003:/home/senior:/bin/bash
> senior:unused_by_nt/2000/xp:2:10545:senior,U-SPACEAPPS\senior,S-1-5-21-893714851-1888236101-3871409848-1112:/cygdrive/c/Documents
>  and Settings/senior.SPACEAPPS.000:/bin/bash

The good news is that the Cygwin username doesn't need to be the same as
the Windows/domain one (neither does the user id matter -- only the SID
field, the one that starts with "S-", matters).  So you can change either
the local or the domain username to whatever you wish, and this should
help cure some of the problems you're seeing.
HTH,
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED] | [EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_Igor Peshansky, Ph.D. (name changed!)
 |,4-  ) )-,_. ,\ (  `'-'   old name: Igor Pechtchanski
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: 'su' no longer working?

2006-01-09 Thread Igor Peshansky
On Mon, 9 Jan 2006, Corinna Vinschen wrote:

> On Jan  6 00:03, Igor Peshansky wrote:
> > On Thu, 5 Jan 2006, Eric Blake wrote:
> > > According to Igor Peshansky on 1/5/2006 3:37 PM:
> > > > 'su' used to be an executable that worked correctly from a
> > > > SYSTEM-owned shell, but now it's a shell script that simply prints
> > > > a "not supported" message.  Is it possible to resurrect the old
> > > > "su" executable (that perhaps prints the same message if run from
> > > > a non-SYSTEM account)?
> > >
> > > Coreutils certainly builds an su executable, but the cygwin distro of su
> > > has been a script since at least 5.2.1 when Corinna was the maintainer; I
> > > only enhanced the script to be a little more useful.
> >
> > Right.  In fact, Googling for "sysbash" unearthed this message:
> >  (though Corinna
> > did miss the one use for "su" that I mention below -- that is,
> > switching user context without a password if unable to start a
> > service).
>
> You know the problem.  We had a good number of reports along the lines
> of "su is broken".  That's the reason I replaced su with that script.
>
> It's Eric's choice, but I wouldn't like to see su return to life without
> some Windows specific changes.  If su fails to switch user context, then
> it should print a WIndows specific message which points to the fact that
> Administrator users don't have permissions to change user context by
> default, plus basically the text printed by the current su script.
> Otherwise the usual questions as above will crop up on this list again.

Right, that's pretty much what I was asking for above.  Eric, if it helps,
I can look into submitting the patch later this week, though I haven't
looked at the coreutils code in a while, so it might take some time to
understand the specifics.
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED] | [EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_Igor Peshansky, Ph.D. (name changed!)
 |,4-  ) )-,_. ,\ (  `'-'   old name: Igor Pechtchanski
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: 'su' no longer working?

2006-01-09 Thread Corinna Vinschen
On Jan  6 00:03, Igor Peshansky wrote:
> On Thu, 5 Jan 2006, Eric Blake wrote:
> > According to Igor Peshansky on 1/5/2006 3:37 PM:
> > > 'su' used to be an executable that worked correctly from a SYSTEM-owned
> > > shell, but now it's a shell script that simply prints a "not supported"
> > > message.  Is it possible to resurrect the old "su" executable (that
> > > perhaps prints the same message if run from a non-SYSTEM account)?
> >
> > Coreutils certainly builds an su executable, but the cygwin distro of su
> > has been a script since at least 5.2.1 when Corinna was the maintainer; I
> > only enhanced the script to be a little more useful.
> 
> Right.  In fact, Googling for "sysbash" unearthed this message:
>  (though Corinna did
> miss the one use for "su" that I mention below -- that is, switching user
> context without a password if unable to start a service).

You know the problem.  We had a good number of reports along the lines
of "su is broken".  That's the reason I replaced su with that script.

It's Eric's choice, but I wouldn't like to see su return to life without
some Windows specific changes.  If su fails to switch user context, then
it should print a WIndows specific message which points to the fact
that Administrator users don't have permissions to change user context
by default, plus basically the text printed by the current su script.
Otherwise the usual questions as above will crop up on this list again.


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: sshd must be restarted

2006-01-09 Thread Corinna Vinschen
On Jan  6 13:07, Chris Taylor wrote:
> I wonder if it would be worth having ssh-host-config set tcpip as a 
> dependancy for sshd on all systems? While this doesn't seem to have 
> cropped up much, specifically, it couldn't hurt..

I've send a patch upstream which adds a `-y tcpip' to ssh-host-config.
This should hopefully show up in the upcoming 4.2p1 release.


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Declaration of getopt_long_only missing from getopt.h

2006-01-09 Thread Corinna Vinschen
On Jan  9 09:43, Peter Ekberg wrote:
> Hello!
> 
> The subject says it all. Intentional or an oversight? You tell me...

You know the answer:  http://cygwin.com/acronyms/#WJM

Thanks, I've applied a patch.


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: sshd must be restarted

2006-01-09 Thread Ken Senior
As I mentioned before, I have *two* entries in /etc/passwd, one corresponding to my "senior" account on the local system and one corresponding to the domain account.   

I've had some really strange behavior as a result.  I was able to rsync from the windows box to itself only to discover that the the files that managed to copy were not readable by the login that issued the rsync.  


senior:unused_by_nt/2000/xp:1003:513:U-ROMULUS\senior,S-1-5-21-484763869-1563985344-682003330-1003:/home/senior:/bin/bash
senior:unused_by_nt/2000/xp:2:10545:senior,U-SPACEAPPS\senior,S-1-5-21-893714851-1888236101-3871409848-1112:/cygdrive/c/Documents 
and Settings/senior.SPACEAPPS.000:/bin/bash


Larry Hall (Cygwin) wrote:


Ken Senior wrote:



Some packages (SSH) think the home page should be /home/senior 
whereas the

default bash shell thinks it's located in /cygdrive/c/Documents and
Settings/senior.DOMAIN. 




This is not surprising.  You set HOME in your environment to point to
'/cygdrive/c/Documents and Settings/senior.DOMAIN'.  That's the path you
will see as your home if you log in locally.  ssh finds your path in
'/etc/passwd' and I'm sure you'll find it listed there as '/home/senior'.
Change this with an editor or see the options to 'mkpasswd'.  Or remove/
rename the environment variable.  It's probably easiest to remove the
variable, since everything will then look to '/etc/passwd'





--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



cpp does not honor the -undef option.

2006-01-09 Thread Peter Ekberg
Hello!

I recently tried to build a package that was using cpp for other
purposes than preprocessing C files. Its configure script was
looking for a way to not have cpp predefine anything, and it
specifically tried the -undef option, but failed. From reading the
docs, I couldn't figure out why. Here's a quote from "info cpp":

'-undef'
 Do not predefine any system-specific or GCC-specific macros.  The
 standard predefined macros remain defined.  *Note Standard
 Predefined Macros::.

So I searched the web a bit and figured that I could probably fix
it in the specs file. I realise that the specs file probably isn't
the canonical place to change this, but I'll leave that to the gcc
maintainer.

Attached is a patch for the specs file that wraps all old define
rules for cpp inside the following:

%{!undef:old define rules}

I don't know if this is the correct thing to do, but it works for
me.

Cheers,
Peter
--- /usr/lib/gcc/i686-pc-cygwin/3.4.4/specs.orig2005-06-08 
00:02:40.00100 +0200
+++ /usr/lib/gcc/i686-pc-cygwin/3.4.4/specs 2006-01-05 11:33:49.087107900 
+0100
@@ -15,7 +15,7 @@
  as %(asm_options) %m.s %A }
 
 *cpp:
-%(cpp_cpu) %{posix:-D_POSIX_SOURCE}   %{mno-win32:%{mno-cygwin: %emno-cygwin 
and mno-win32 are not compatible}}   %{mno-cygwin:-D__MSVCRT__ -D__MINGW32__ 
%{!ansi:%{mthreads:-D_MT}}}  %{!mno-cygwin:-D__CYGWIN32__ -D__CYGWIN__ 
%{!ansi:-Dunix} -D__unix__ -D__unix }  %{mwin32|mno-cygwin:-DWIN32 -D_WIN32 
-D__WIN32 -D__WIN32__ %{!ansi:-DWINNT}}  
%{!nostdinc:%{!mno-win32|mno-cygwin:-idirafter ../include/w32api%s -idirafter 
../../include/w32api%s}}
+%(cpp_cpu) %{!undef:%{posix:-D_POSIX_SOURCE}   %{mno-win32:%{mno-cygwin: 
%emno-cygwin and mno-win32 are not compatible}}   %{mno-cygwin:-D__MSVCRT__ 
-D__MINGW32__ %{!ansi:%{mthreads:-D_MT}}}  %{!mno-cygwin:-D__CYGWIN32__ 
-D__CYGWIN__ %{!ansi:-Dunix} -D__unix__ -D__unix }  %{mwin32|mno-cygwin:-DWIN32 
-D_WIN32 -D__WIN32 -D__WIN32__ %{!ansi:-DWINNT}}}  
%{!nostdinc:%{!mno-win32|mno-cygwin:-idirafter ../include/w32api%s -idirafter 
../../include/w32api%s}}
 
 *cpp_options:
 %(cpp_unique_options) %1 %{m*} %{std*&ansi&trigraphs} %{W*&pedantic*} %{w} 
%{f*} %{g*:%{!g0:%{!fno-working-directory:-fworking-directory}}} %{O*} %{undef}

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/

Declaration of getopt_long_only missing from getopt.h

2006-01-09 Thread Peter Ekberg
Hello!

The subject says it all. Intentional or an oversight? You tell me...

Cheers,
Peter


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/