Re: ssh client disconnect error

2008-07-22 Thread Corinna Vinschen
On Jul 21 14:50, luciop wrote:
> > Looks like a DNS problem.  Do you have a 127.0.0.1 <-> localhost mapping
> > in your $SYSTEMROOT/system32/drivers/etc/hosts file?  Does forward and
> > reverse lookup for localhost and 127.0.0.1 work outside of sshd?
> 
> i have check the hosts and the nslookup. 
> what tools to use for reverse lookup?

nslookup 

> $less /etc/hosts
> 127.0.0.1   localhost
> 
> $ nslookup localhost
> Non-authoritative answer:
> Server:  UnKnown
> Address:  192.168.1.1:53

As I said, a DNS problem which you really should fix or let fix by your
local admin.  localhost should be resolved to 127.0.0.1 (IPv4) and/or
::1 (IPv6).  It's resolved to 192.168.1.1 plus a port number 53 which is
very wrong.  sshd will make a reverse lookup for 192.168.1.1, get a
machine name different from localhost and complains correctly about a
host name/address mismatch.


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: 1.7.0-19: Still unexplained path problems

2008-07-22 Thread Corinna Vinschen
On Jul 21 16:16, Lee Maschmeyer wrote:
> $ ./autogen
> application-specific initialization failed: Can't find a usable init.tcl in 
> the following directories:
>//?/E:/cygwin/share/tcl8.4 //?/E:cygwin/share/tcl8.4 
> //?/E:cygwin/usr/share/tcl8.4 //?/E:share/tcl8.4 //?/E:cygwin/library //?/E
> :library //?/E:../tcl8.4.1/library

As I said in my first reply, this is likely a problem in autogen, TCL or
brltty.  The above path should never have been generated.  The package
in question seems to use native Windows paths (first problem) using a
wrong syntax (second problem).


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: Strange things with cygdrive

2008-07-22 Thread Corinna Vinschen
On Jul 22 00:05, Angelo Graziosi wrote:
> I have discovered that
>
> $ ls -lrt
> totale 28
> dr-xr-xr-x   1   0root0 Jan  1  1970 cygdrive
>  ^^ 
> dr-xr-xr-x   1 Administrator  Administrators  0 Dec  1  2006 proc
> -rwxr-x---+  1 Administrator  Users  57 Sep 27  2007 Cygwin.bat
> [...]
>
> That user (0), group (root) and date (01.01.1970) for cygdrive sound 
> strange... or not?

No, it's ok for the cygdrive prefix in 1.5.x


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: Strange things with cygdrive

2008-07-22 Thread Angelo Graziosi

Corinna Vinschen wrote:


No, it's ok for the cygdrive prefix in 1.5.x


Oh thanks having reassured me. But is there some tricks to change that 
user(0) and (horrible) date (01.01.1970)?


  Angelo

---
O Captain! my Captain! our fearful trip is done,
The ship has weather'd every rack, the prize we sought is won,
The port is near, the bells I hear, the people all exulting,...

--
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: Strange things with cygdrive

2008-07-22 Thread Corinna Vinschen
On Jul 22 12:23, Angelo Graziosi wrote:
> Corinna Vinschen wrote:
>
>> No, it's ok for the cygdrive prefix in 1.5.x
>
> Oh thanks having reassured me. But is there some tricks to change that 
> user(0) and (horrible) date (01.01.1970)?

No.  It will look somewhat different in 1.7, but the date is a fixed
date nevertheless.


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: 1.7.0-19: Still unexplained path problems

2008-07-22 Thread Eric Blake

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

According to Corinna Vinschen on 7/22/2008 3:45 AM:
|> application-specific initialization failed: Can't find a usable
init.tcl in
|> the following directories:
|>//?/E:/cygwin/share/tcl8.4 //?/E:cygwin/share/tcl8.4
|> //?/E:cygwin/usr/share/tcl8.4 //?/E:share/tcl8.4 //?/E:cygwin/library //?/E
|> :library //?/E:../tcl8.4.1/library
|
| As I said in my first reply, this is likely a problem in autogen, TCL or
| brltty.

I can rule out autogen and brltty.  I can't build git on 1.7.0 either, for
the same reason, for several months now.  Something in tcl is not very
happy with 1.7.0.  And since I'm relegated to building git under 1.5.x, I
can't test git's claim to using IPv6.

|  The above path should never have been generated.  The package
| in question seems to use native Windows paths (first problem)

And we already know that tcl uses native Windows paths (perhaps by using
cygwin_path_conv though), since it only dynamically pulls in cygwin1.dll
instead of being a full-blown cygwin app (necessary in part so that
insight, which is based on tcl, can be used to debug cygwin1.dll).
Perhaps the bug was introduced in the path conversion functions.

Not to mention that cygwin's tcl is very old - I had to apply a patch to
git to work around the fact that cygwin's tcl doesn't know how to redirect
stderr, when compared with all the other distros that have a more modern
version.

- --
Don't work too hard, make some time for fun as well!

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

iEYEARECAAYFAkiFzL4ACgkQ84KuGfSFAYCMOgCgxY+60ukDtM2WIgB4ZlndTgbj
EewAni1oPf4zIsHUndORY8hdeKvT8K0I
=4ol/
-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: Strange things with cygdrive

2008-07-22 Thread Eric Blake

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

According to Angelo Graziosi on 7/22/2008 4:23 AM:
| Corinna Vinschen wrote:
|
|> No, it's ok for the cygdrive prefix in 1.5.x
|
| Oh thanks having reassured me. But is there some tricks to change that
| user(0) and (horrible) date (01.01.1970)?

How is the date horrible?  It is 0 seconds since the epoch, for lack of a
better date.  About our only other alternative would be 'now' instead of
'0', but that is more computationally expensive, and equally misleading
since it is always changing.  Remember, "/cygdrive" is a virtual file,
with no persistent storage and therefore no way to assign it a persistent
date other than to compile one in.

- --
Don't work too hard, make some time for fun as well!

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

iEYEARECAAYFAkiFzVcACgkQ84KuGfSFAYB3BACeJNq3pgd/k3rNebAtQL3eE/sd
56kAoNA870Wdm0VK9SRXbLuXw5/2oLYG
=SlhY
-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: Strange things with cygdrive

2008-07-22 Thread Mark J. Reed
On Tue, Jul 22, 2008 at 6:23 AM, Angelo Graziosi wrote:
> Oh thanks having reassured me. But is there some tricks to change that
> user(0) and (horrible) date (01.01.1970)?

/cygdrive is not a real directory. That "horrible" metadata you're
complaining about isn't actually stored anywhere, it's generated by
the system when you ask for it.  A modification to the cygwin
filesystem code could change what it reports, but what would you have
it report?  What's the meaning of the "last modified" date on a
nonexistent directory that can't actually be modified?

I think having it return zero is perfectly reasonable, but there are
other reasonable choices.  I suppose it could be set to some otherwise
meaningful value like the build date..

-- 
Mark J. Reed <[EMAIL PROTECTED]>

--
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.7.0-19: Still unexplained path problems

2008-07-22 Thread Corinna Vinschen
On Jul 22 06:04, Eric Blake wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> According to Corinna Vinschen on 7/22/2008 3:45 AM:
> |> application-specific initialization failed: Can't find a usable
> init.tcl in
> |> the following directories:
> |>//?/E:/cygwin/share/tcl8.4 //?/E:cygwin/share/tcl8.4
> |> //?/E:cygwin/usr/share/tcl8.4 //?/E:share/tcl8.4 //?/E:cygwin/library 
> //?/E
> |> :library //?/E:../tcl8.4.1/library
> |
> | As I said in my first reply, this is likely a problem in autogen, TCL or
> | brltty.
>
> I can rule out autogen and brltty.  I can't build git on 1.7.0 either, for
> the same reason, for several months now.  Something in tcl is not very
> happy with 1.7.0.  And since I'm relegated to building git under 1.5.x, I
> can't test git's claim to using IPv6.

Can you create an strace of a testcase (building git or something)
which shows where and how the paths are generated?  Maybe we can
workaround this in Cygwin itself by tweaking paths missing a / or \
after the colon...

> Not to mention that cygwin's tcl is very old - I had to apply a patch to
> git to work around the fact that cygwin's tcl doesn't know how to redirect
> stderr, when compared with all the other distros that have a more modern
> version.

Yeah.  It would be cool if we could get a new tcl version at one point.


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: ssh client disconnect error

2008-07-22 Thread luciop
Corinna Vinschen  cygwin.com> writes:

> nslookup 
> 
> > $less /etc/hosts
> > 127.0.0.1   localhost
> > 
> > $ nslookup localhost
> > Non-authoritative answer:
> > Server:  UnKnown
> > Address:  192.168.1.1:53
> 
> As I said, a DNS problem which you really should fix or let fix by your
> local admin.  localhost should be resolved to 127.0.0.1 (IPv4) and/or
> ::1 (IPv6).  It's resolved to 192.168.1.1 plus a port number 53 which is
> very wrong.  sshd will make a reverse lookup for 192.168.1.1, get a
> machine name different from localhost and complains correctly about a
> host name/address mismatch.


i think u have missed read the nslookup result.

$ nslookup localhost
Non-authoritative answer:
Server:  UnKnown
Address:  192.168.1.1:53

Name:localhost
Address:  127.0.0.1

the 192.168.1.1:53 is my DHCP DNS/gateway.
it has correctly resolved localhost to 127.0.0.1

i managed to get it to work by modifying the hosts.allow by changing the
following line
from
ALL : PARANOID : deny
to
ALL : LOCAL : deny

removed the PARANOID checks for mismatched name to IP.

it doesnt solve why the sshd is getting the wrong ip for localhost.

any ideas most welcome

-lp


--
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: Strange things with cygdrive

2008-07-22 Thread lennox
Mark J. Reed writes:

> /cygdrive is not a real directory. That "horrible" metadata you're
> complaining about isn't actually stored anywhere, it's generated by
> the system when you ask for it.  A modification to the cygwin
> filesystem code could change what it reports, but what would you have
> it report?  What's the meaning of the "last modified" date on a
> nonexistent directory that can't actually be modified?

The most recent time a drive was mounted or unmounted, presumably, since
that's what causes the contents of that directory to change.  Actually
keeping track of this is probably not worth the effort, though (especially
since it's not clear where you'd store it).

-- 
Jonathan Lennox
lennox at cs dot columbia dot edu

--
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: trouble running a script with a while loop from cron

2008-07-22 Thread Mark Horning
The windows sort command was definitely the problem. I had not set a
PATH for cron so it was using the default PATH. When I set a PATH in the
crontab it resolved the issue. One thing I'm not quite sure of is why
didn't it work properly from cron when I specified the full path to sort
in the script.

Thanks!

-  


Mark Horning


--
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: ssh client disconnect error

2008-07-22 Thread Corinna Vinschen
On Jul 22 14:43, luciop wrote:
> Corinna Vinschen  cygwin.com> writes:
> i think u have missed read the nslookup result.
>
> $ nslookup localhost
> Non-authoritative answer:
> Server:  UnKnown
> Address:  192.168.1.1:53
> 
> Name:localhost
> Address:  127.0.0.1
> 
> the 192.168.1.1:53 is my DHCP DNS/gateway.
> it has correctly resolved localhost to 127.0.0.1

Yes, I misread it.  But you didn't try the reverse lookup.  What
does it print for 127.0.0.1?  It's still very likely a problem with
the name resolution.


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: Strange things with cygdrive

2008-07-22 Thread Angelo Graziosi

Eric Blake wrote:


How is the date horrible?  It is 0 seconds since the epoch, for lack of a
better date.



Mark J. Reed wrote:


/cygdrive is not a real directory. That "horrible" metadata you're
complaining about isn't actually stored anywhere, it's generated by
the system when you ask for it.


If I have well understood '/proc' is a virtual directory like 
'/cygdrive', but for it


$ ls -lrt /
dr-xr-xr-x   1 Administrator  Administrators  0 Dec  1  2006 proc
      ^^

So, why not similar things for cygdrive? This was only my curiosity.

Regarding the 'horrible', that date (01.01.1970) remembered me some 
negative experiences on old DOS.



Cheers,
   Angelo.


--
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.7.0-19: Still unexplained path problems

2008-07-22 Thread Christopher Faylor
On Tue, Jul 22, 2008 at 03:56:43PM +0200, Corinna Vinschen wrote:
>Yeah.  It would be cool if we could get a new tcl version at one point.

Ur, I think you know why that isn't possible.  The tcl that is released
comes from sourceware.org and it is linked to insight.

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/



[ANNOUNCEMENT] Updated: OpenSSH-5.1p1-1

2008-07-22 Thread Corinna Vinschen
I've just updated the version of OpenSSH to 5.1p1-1.

This is a new major upstream release.  It fixes a security related issue
and introdues a lot of new features.  The Cygwin release is created
from the vanilla sources with just a minor installation tweak.

The official release message of 5.1p1:


OpenSSH 5.1 has just been released. It will be available from the
mirrors listed at http://www.openssh.com/ shortly.

OpenSSH is a 100% complete SSH protocol version 1.3, 1.5 and 2.0
implementation and includes sftp client and server support.

We have also recently completed another Internet SSH usage scan, the
results of which may be found at http://www.openssh.com/usage.html

Once again, we would like to thank the OpenSSH community for their
continued support of the project, especially those who contributed
code or patches, reported bugs, tested snapshots or donated to the
project. More information on donations may be found at:
http://www.openssh.com/donations.html

Changes since OpenSSH 5.0
=

Security:

 * sshd(8): Avoid X11 man-in-the-middle attack on HP/UX (and possibly
   other platforms) when X11UseLocalhost=no

   When attempting to bind(2) to a port that has previously been bound
   with SO_REUSEADDR set, most operating systems check that either the
   effective user-id matches the previous bind (common on BSD-derived
   systems) or that the bind addresses do not overlap (Linux and
   Solaris).

   Some operating systems, such as HP/UX, do not perform these checks
   and are vulnerable to an X11 man-in-the-middle attack when the
   sshd_config(5) option X11UseLocalhost has been set to "no" - an
   attacker may establish a more-specific bind, which will be used in
   preference to sshd's wildcard listener.

   Modern BSD operating systems, Linux, OS X and Solaris implement the
   above checks and are not vulnerable to this attack, nor are systems
   where the X11UseLocalhost has been left at the default value of
   "yes".

   Portable OpenSSH 5.1 avoids this problem for all operating systems
   by not setting SO_REUSEADDR when X11UseLocalhost is set to no.

   This vulnerability was reported by sway2004009 AT hotmail.com.

New features:

 * Introduce experimental SSH Fingerprint ASCII Visualisation to ssh(1)
   and ssh-keygen(1). Visual fingerprinnt display is controlled by a new
   ssh_config(5) option "VisualHostKey". The intent is to render
   SSH host keys in a visual form that is amenable to easy recall and
   rejection of changed host keys. This technique inspired by the
   graphical hash visualisation schemes known as "random art[*]", and
   by Dan Kaminsky's musings at 23C3 in Berlin.

   Fingerprint visualisation in is currently disabled by default, as the
   algorithm used to generate the random art is still subject to change.

   [*] "Hash Visualization: a New Technique to improve Real-World
   Security", Perrig A. and Song D., 1999, International Workshop on
   Cryptographic Techniques and E-Commerce (CrypTEC '99)
   http://sparrow.ece.cmu.edu/~adrian/projects/validation/validation.pdf

 * sshd_config(5) now supports CIDR address/masklen matching in "Match
   address" blocks, with a fallback to classic wildcard matching. For
   example:
 Match address 192.0.2.0/24,3ffe:::/32,!10.*
 PasswordAuthentication yes

 * sshd(8) now supports CIDR matching in ~/.ssh/authorized_keys
   from="..." restrictions, also with a fallback to classic wildcard
   matching.

 * Added an extended test mode (-T) to sshd(8) to request that it write
   its effective configuration to stdout and exit. Extended test mode
   also supports the specification of connection parameters (username,
   source address and hostname) to test the application of
   sshd_config(5) Match rules.

 * ssh(1) now prints the number of bytes transferred and the overall
   connection throughput for SSH protocol 2 sessions when in verbose
   mode (previously these statistics were displayed for protocol 1
   connections only).

 * sftp-server(8) now supports extension methods [EMAIL PROTECTED] and
   [EMAIL PROTECTED] that implement statvfs(2)-like operations.
   (bz#1399)

 * sftp(1) now has a "df" command to the sftp client that uses the
   [EMAIL PROTECTED] to produce a df(1)-like display of filesystem
   space and inode utilisation (requires [EMAIL PROTECTED] support on
   the server)

 * Added a MaxSessions option to sshd_config(5) to allow control of the
   number of multiplexed sessions supported over a single TCP connection.
   This allows increasing the number of allowed sessions above the
   previous default of 10, disabling connection multiplexing
   (MaxSessions=1) or disallowing login/shell/subsystem sessions
   entirely (MaxSessions=0).

 * Added a [EMAIL PROTECTED] global request extension that is
   sent from ssh(1) to sshd(8) when the client knows that it will never
   request another session (i.e. when session mu

tcpdump package

2008-07-22 Thread mwade

Hello,

I am pretty new to cygwin.  I am looking for a tcpdump package and from the
cygwin package page (http://www.cygwin.com/packages/) there does not appear
to be one.  Is this just the page maintained by Cygwin?  Can you use other
sources apps like with Linux and if so is that documented somewhere?  I
looked at the FAQ and found how to install new packages by going throught
the install process again.

Thanks,
-- 
View this message in context: 
http://www.nabble.com/tcpdump-package-tp18592842p18592842.html
Sent from the Cygwin list mailing list archive at Nabble.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: 1.7.0-19: Still unexplained path problems

2008-07-22 Thread Corinna Vinschen
On Jul 22 11:54, Christopher Faylor wrote:
> On Tue, Jul 22, 2008 at 03:56:43PM +0200, Corinna Vinschen wrote:
> >Yeah.  It would be cool if we could get a new tcl version at one point.
> 
> Ur, I think you know why that isn't possible.  The tcl that is released
> comes from sourceware.org and it is linked to insight.

It would be cool to get a new tcl version on sourceware at one point
which still works fine with Cygwin.


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: tcpdump package

2008-07-22 Thread Markus Schönhaber
mwade wrote:

> I am pretty new to cygwin.  I am looking for a tcpdump package and from the
> cygwin package page (http://www.cygwin.com/packages/) there does not appear
> to be one.

I don't know of a cygwin port of tcpdump. But you could take a look at this:
http://www.winpcap.org/windump/

Regards
  mks

--
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: tcpdump package

2008-07-22 Thread Larry Hall (Cygwin)

mwade wrote:

Hello,

I am pretty new to cygwin.  I am looking for a tcpdump package and from the
cygwin package page (http://www.cygwin.com/packages/) there does not appear
to be one.  Is this just the page maintained by Cygwin?  Can you use other
sources apps like with Linux and if so is that documented somewhere?  I
looked at the FAQ and found how to install new packages by going throught
the install process again.


For tcpdump, Google is your friend:



As for your question about Cygwin packages more generally,
 is the search interface to all existing
packages that are part of the distribution.  There are others that have
been known to provide packages for Cygwin, sometimes even in 'setup.exe'
package form.  The latter can be installed via 'setup.exe' by simply adding
the path to the external repository at the page where you select Cygwin
mirrors (you can select up to 4 mirrors).  You'll have to Google around
to find if any particular package you're interested in is available
externally.  If that fails you, you always have the option of downloading
the source for the package in question and building it.  Obviously, this
assumes you've installed the necessary packages for building it (likely,
gcc, binutils, etc) and any dependent libs.


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

_

A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?

--
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.7.0-19: Still unexplained path problems

2008-07-22 Thread Brian Dessent
Corinna Vinschen wrote:

> Can you create an strace of a testcase (building git or something)
> which shows where and how the paths are generated?  Maybe we can
> workaround this in Cygwin itself by tweaking paths missing a / or \
> after the colon...

Here's a testcase:

$ cat >tc.c <
#include 

int main()
{
  char buf[512];
  
  GetModuleFileName (NULL, buf, sizeof (buf));
  puts (buf);
  return 0;
}
EOF

$ gcc -mno-cygwin tc.c

$ ./a
\\?\C:\cygwin\home\brian\testcases\native-argv0\a.exe

You can also reproduce this just by running "tclsh".  The problem is
that tcl is a native app and uses the w32api directly, and so these
native paths leak into it and it's un-equipped to use them properly.

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: Strange things with cygdrive

2008-07-22 Thread Mark J. Reed
On Tue, Jul 22, 2008 at 11:52 AM, Angelo Graziosi  wrote:
> If I have well understood '/proc' is a virtual directory like '/cygdrive',
> but for it
>
> dr-xr-xr-x   1 Administrator  Administrators  0 Dec  1  2006 proc

Well, now, that's a very good point.The mod time on /proc seems to
be set to Dec 1st, 2006 at midnight UTC (same on my system) - where
did that number come from?  It seems like some consistency among
virtual directories isn't too much to ask.

Although for /proc it would also make sense for the mod time to be the
boot time, or, fully embracing the the directory metaphor, the time
the last process was created or destroyed.


-- 
Mark J. Reed <[EMAIL PROTECTED]>

--
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: Strange things with cygdrive

2008-07-22 Thread Brian Dessent
"Mark J. Reed" wrote:

> Well, now, that's a very good point.The mod time on /proc seems to
> be set to Dec 1st, 2006 at midnight UTC (same on my system) - where
> did that number come from?  It seems like some consistency among
> virtual directories isn't too much to ask.

http://cygwin.com/ml/cygwin-cvs/2007-q1/msg00111.html

The difference is simply that /proc and /cygdrive are plumbed
differently, e.g. /cygdrive is kind of a virtual mount entry and its
name can be changed, whereas /proc is fixed and compiled in.

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: 1.7.0-19: Still unexplained path problems

2008-07-22 Thread Corinna Vinschen
On Jul 22 09:25, Brian Dessent wrote:
> Corinna Vinschen wrote:
> 
> > Can you create an strace of a testcase (building git or something)
> > which shows where and how the paths are generated?  Maybe we can
> > workaround this in Cygwin itself by tweaking paths missing a / or \
> > after the colon...
> 
> Here's a testcase:
> 
> $ cat >tc.c < #include 
> #include 
> 
> int main()
> {
>   char buf[512];
>   
>   GetModuleFileName (NULL, buf, sizeof (buf));
>   puts (buf);
>   return 0;
> }
> EOF
> 
> $ gcc -mno-cygwin tc.c
> 
> $ ./a
> \\?\C:\cygwin\home\brian\testcases\native-argv0\a.exe

Thanks for the testcase.  I was looking into the path conversion code
but it works as expected.  It didn't occur to me that the problem might
be related to using the long path name syntax when creating processes
with CreateProcessW.  Since GetModuleFileName just returns the path
litarally as it has been specified in CreateProcess, native applications
relying on the content (and not being wide path capable) have a good
chance to fail.  I applied a patch to Cygwin which avoid this.  tclsh
and insight both work fine for me now.


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: 1.7.0-19: Still unexplained path problems

2008-07-22 Thread Eric Blake

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

According to Corinna Vinschen on 7/22/2008 11:02 AM:
| Thanks for the testcase.  I was looking into the path conversion code
| but it works as expected.  It didn't occur to me that the problem might
| be related to using the long path name syntax when creating processes
| with CreateProcessW.  Since GetModuleFileName just returns the path
| litarally as it has been specified in CreateProcess, native applications
| relying on the content (and not being wide path capable) have a good
| chance to fail.  I applied a patch to Cygwin which avoid this.  tclsh
| and insight both work fine for me now.

I've verified that a self-built .dll gets further with building gitk and
git-gui under 1.7.0.  Thanks for the fix.

- --
Don't work too hard, make some time for fun as well!

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

iEYEARECAAYFAkiGL/cACgkQ84KuGfSFAYAPPgCfRGHLYK30UCojPNMflH+Hs8Eu
AtQAn3u110JSlfk7mE6h5DUdK0g4i5pS
=Aa8O
-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: ssh client disconnect error

2008-07-22 Thread luciop
Corinna Vinschen  cygwin.com> writes:

> Yes, I misread it.  But you didn't try the reverse lookup.  What
> does it print for 127.0.0.1?  It's still very likely a problem with
> the name resolution.


$ nslookup 127.0.0.1
Server:  UnKnown
Address:  192.168.1.1:53

Name:localhost
Address:  127.0.0.1 

the reverse lookup seems fine also.

how can i get more log from the system? the sshd -D option is only possible in
standalone mode.

any help appreciated

-lucio





--
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: [ANNOUNCEMENT] Updated: OpenSSH-5.1p1-1

2008-07-22 Thread Fergus

Dear All,

I just updated and (on my system anyway) both of

bin/slogin.lnk
usr/share/man/man1/slogin.1.lnk

lack the +R attribute. I added it using attrib +R in a DOS box.

Fergus






--
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/



.s file causing problems when linking

2008-07-22 Thread Nathan Thern
I am attempting to compile MIT/GNU Scheme on cygwin. The build
proceeds fine through the main executable, but fails when linking a
dynamically openable module.

The main executable is created with this command:
> gcc -o scheme.exe cmpauxmd.o  

cmpauxmd.o is created by:
> ./makegen/m4.sh  cmpauxmd.m4 > cmpauxmd.s
> as -o cmpauxmd.o cmpauxmd.s

The  are all compiled from .c files.

The first module fails to link as follows:
> gcc -shared -o prbfish.dll prbfish.o 
--> Lots of "prbfish.o:prbfish.c: undefined reference to X" where the
X's are symbols defined in both cmpauxmd.o and 

So I tried to create a helper lib just to provide symbols for prbfish.dll:
> gcc -shared -o libscheme.dll cmpauxmd.o  
--> Cannot export asm_sc_apply_generic: symbol not found
--> several more "Cannot export"s
All the "Cannot export" symbols are defined in cmpauxmd.o

In fact, I get the same error when I try
> gcc -shared -o prbfish.dll prbfish.o cmpauxmd.o   
> 
--> Cannot export asm_sc_apply_generic: symbol not found
...

Is my approach of building a helper lib the correct one? If so, how do
I resolve the "Cannot export" errors?

OR ... Is there another (better) way to inform ld of the symbols in
scheme.exe in order to succesfully link the module .dll's?

regards,
NT

--
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: [ANNOUNCEMENT] Updated: OpenSSH-5.1p1-1

2008-07-22 Thread Corinna Vinschen
On Jul 22 21:24, Fergus wrote:
> Dear All,
>
> I just updated and (on my system anyway) both of
>
>   bin/slogin.lnk
>   usr/share/man/man1/slogin.1.lnk
>
> lack the +R attribute. I added it using attrib +R in a DOS box.

Same here.  Sorry.  I'll prepare a new release tomorrow.


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: .s file causing problems when linking

2008-07-22 Thread Brian Dessent
Nathan Thern wrote:

You seem to have two separate issues here.

> The main executable is created with this command:
> > gcc -o scheme.exe cmpauxmd.o  

Wait, are you saying that you need to export symbols from the executable
that will be imported by another module?  If so then the above is not
sufficient.

> cmpauxmd.o is created by:
> > ./makegen/m4.sh  cmpauxmd.m4 > cmpauxmd.s
> > as -o cmpauxmd.o cmpauxmd.s

Has this assembler file been specifically ported to PE or are you just
using the version some other platform?  The assembler directives (e.g.
the sequence for declaring and exporting a symbol) are different and
PE-specific so you can't expect this to work without porting.

> The first module fails to link as follows:
> > gcc -shared -o prbfish.dll prbfish.o 
> --> Lots of "prbfish.o:prbfish.c: undefined reference to X" where the
> X's are symbols defined in both cmpauxmd.o and 

How does being defined in cmpauxmd.o mean anything here?  Is cmpauxmd.o
included in ?  I thought cmpauxmd.o was linked into the
main .exe.  Or are you just saying that the symbol should be satisfied
by some other module in ?  I appreciate that you're trying
to make the commands as simple as possible but this abbreviation only
hides and confuses, it's best to post the exact commands and the exact
resulting error messages.

> So I tried to create a helper lib just to provide symbols for prbfish.dll:
> > gcc -shared -o libscheme.dll cmpauxmd.o  
> --> Cannot export asm_sc_apply_generic: symbol not found
> --> several more "Cannot export"s
> All the "Cannot export" symbols are defined in cmpauxmd.o

That probably means the assembler file needs porting.  Look at the
output of a gcc generated assembler file for a simple function
declaration and make sure your hand coded file uses the same sequence of
assember directives and pseudo-ops.  For example:

$ echo "void func() {}" | gcc -S -x c - -o - -fomit-frame-pointer
.file   ""
.text
.globl _func
.def_func;  .scl2;  .type   32; .endef
_func:
ret

Notice that the assembler sequence for declaring an external in PE
assembler dialect requires this ".def/.scl/.type/.endef" sequence, which
is not present in say i386 ELF where the sequence would be something
like:

$ echo "void func() {}" | gcc -S -x c - -o - -fomit-frame-pointer
.file   ""
.text
.globl func
.type   func, @function
func:
ret
.size   func, .-func
.ident  "GCC: (GNU) 4.4.0 20080718 (experimental)"
.section.note.GNU-stack,"",@progbits

(You can also tell here another difference, that i386 PE is a leading
underscore target.) 

Also, this assumes that you are going to use the GNU linker's
auto-export feature, or that you will manually specify a list of
functions to export with a .def file.  If that is not the case then you
will need to emulate the action of __declspec(dllexport), which results
in stuff added to the .drectve section:

$ echo "void __declspec(dllexport) func() {}" | \
  gcc -S -x c - -o - -fomit-frame-pointer
.file   ""
.text
.globl _func
.def_func;  .scl2;  .type   32; .endef
_func:
ret
.section .drectve

.ascii " -export:func"


> Is my approach of building a helper lib the correct one? If so, how do
> I resolve the "Cannot export" errors?
> 
> OR ... Is there another (better) way to inform ld of the symbols in
> scheme.exe in order to succesfully link the module .dll's?

It is possible to export symbols from the .exe and then import them from
a .dll, but it takes more than what you're doing here, namely creating
an import library for the .exe and linking the dll against that.  Again:
the linker must be told everything at the time of linking, there is no
lazy binding.  But you may not want to actually do this because then the
resulting .dll has the filename of the .exe hardcoded into it.  I
recently wrote this reply on another list and in the interest of not
typing things twice I'll just provide a link:
.

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: Strange things with cygdrive

2008-07-22 Thread Stepp, Charles
January 1, 1970 is a very holy date.

Charles Stepp
Meskimen's Law:
There's never time to do it rite, but there's always time to do it over.
-Original Message-
From: Angelo Graziosi [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 21, 2008 6:06 PM
To: cygwin@cygwin.com
Subject: Strange things with cygdrive

I have discovered that

$ ls -lrt
totale 28
dr-xr-xr-x   1   0root0 Jan  1  1970 cygdrive
  ^^ 
dr-xr-xr-x   1 Administrator  Administrators  0 Dec  1  2006 proc
-rwxr-x---+  1 Administrator  Users  57 Sep 27  2007 Cygwin.bat
[...]

That user (0), group (root) and date (01.01.1970) for cygdrive sound 
strange... or not?


Cheers,
   Angelo.

--
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: .s file causing problems when linking

2008-07-22 Thread Brian Dessent
Brian Dessent wrote:

> typing things twice I'll just provide a link:
> .

Sorry, I meant to link to the last reply in that thread, i.e.


--
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: Re: lpr works? FAQ in error?

2008-07-22 Thread Buchbinder, Barry (NIH/NIAID) [E]
Wilfried wrote on Monday, July 21, 2008 10:11 AM:

> Ehh, I just saw that Rodrigo Medina addressed all these problems.
> 
> So the script would probably look like this:
> 
> --snip-
> #!/bin/sh
> $1 $2 $3 $4 $5 | unix2dos > tmp_file
> cygstart notepad.exe /p tmp_file
> rm tmp_file
> --snip-

It looks to me that the command
$1 $2 $3 $4 $5
has two or three problems:
  (1) Arguments are not quoted.
  (2) One might have more than a command and 4 arguments.
  (3) It is also possible that one may have surprises if /bin/sh is set up so 
when non-interactive it handles aliases and shell functions differently than 
expected.
So I would just pipe into the shell script.

The second place is that there is theoretically a race between cygstart and rm. 
 What happens if rm deleted tmp_file before notepad reads it?  I can think of 
two ways to handle it.  Adding
sleep 1
to delay rm by a second will probably usually be enough of a delay.  
Substituting
"$(cygpath -u "$COMSPEC")" /c start /wait notepad.exe /p tmp_file
for
cygstart notepad.exe /p tmp_file
to use Windows' start command will wait until notepad is closed.  (This may be 
longer than you want to wait.)

But I haven't tried this, so it may not work.

--snip--
#!/bin/sh
unix2dos > tmp_file
cygstart notepad.exe /p tmp_file
sleep 1
rm tmp_file
--snip--

- Barry

--
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_NT-5.1 1.7.0(0.185/5/3) wstring undeclared

2008-07-22 Thread bernd
Hi,

I thought wstring is now supported.
Following code:

#include 

using namespace std;

int main() {
wstring s = L"test";
wcout << s << endl;
return EXIT_SUCCESS;

}

fails compilation with:

$ g++ tst1.cpp 
tst1.cpp: In function `int main()':
tst1.cpp:6: error: `wstring' undeclared (first use this function)
tst1.cpp:6: error: (Each undeclared identifier is reported only once for
each function it appears in.)
tst1.cpp:6: error: expected `;' before "s"
tst1.cpp:7: error: `wcout' undeclared (first use this function)
tst1.cpp:7: error: `s' undeclared (first use this function)

Is that a path issue or is wstring still unsupported?

Thanks,
-- Bernd


--
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/



Build problems

2008-07-22 Thread Stefano Facchetti

I try to build my custom dll that use Festival TTS libs
(http://www.cstr.ed.ac.uk/projects/festival/).
The custom dll export some functions that I will use with C#.

When I compile my cc files under cygwin with this command line:
g++ -c festivalDll.cc -o festivalDll.o -L. -lfestival -lestools -lestbase
-leststring -ltermcap -lwinmm -I../src/include/
-I../../speech_tools/include/ -I ./ -mno-cygwin -I./mingw/include
-L./mingw/lib/

I have many errors like:
undefine reference to '_getservbyname'
undefine reference to '_shutdown'
and more..

Any idea..? Can festival tts incompatible with MinGw libs..?

Thanks,
Fad.
-- 
View this message in context: 
http://www.nabble.com/Build-problems-tp18599595p18599595.html
Sent from the Cygwin list mailing list archive at Nabble.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: Strange things with cygdrive

2008-07-22 Thread Angelo Graziosi

Stepp, Charles ha scritto:

January 1, 1970 is a very holy date.

Charles Stepp



-Original Message-
From: Angelo Graziosi [mailto:[EMAIL PROTECTED]

^

Sorry, but you should not cite explicity the address.

Doing so, you expose us to spammers. Or you don't know these rules?


Cheers,
  Angelo.

--
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 NT-5.1 1.7.0(0.185/5/ 3) wstring undeclared

2008-07-22 Thread Brian Dessent
[EMAIL PROTECTED] wrote:

> Is that a path issue or is wstring still unsupported?

Getting a functional wstring would require, at least:

* implementing missing wide character I/O functions in newlib (like
wprintf)
* rebuilding libstdc++ so that it detects these functions and enables
wstring (which means rebuilding gcc)

So no, just upgrading the cygwin DLL won't change anything.

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: Build problems

2008-07-22 Thread Brian Dessent
Stefano Facchetti wrote:

> When I compile my cc files under cygwin with this command line:
> g++ -c festivalDll.cc -o festivalDll.o -L. -lfestival -lestools -lestbase
> -leststring -ltermcap -lwinmm -I../src/include/
> -I../../speech_tools/include/ -I ./ -mno-cygwin -I./mingw/include
> -L./mingw/lib/

This command makes no sense.  You're running "g++ -c" which means
compile but do not link.  -L and -l are options that are only relevant
when linking, so they serve no purpose when used with -c.  Undefined
reference errors only occur when linking, so they can't be the output of
this command.  Please don't edit things, copy and paste the *exact*
command and *exact* output.

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: packages

2008-07-22 Thread Lee D. Rothstein

Gary Johnson wrote:

> On 2008-07-18, r wrote:

>> I'm new about cygwin, but I use from a lot SuSE and OpenSuSE
>> can I install packages rpm from linux distributions on cygwin ?


> No. First off, Cygwin doesn't use Red Hat's package manager, it
> uses its own package manager, setup.exe.  Secondly, binaries built
> for Linux will not run under Cygwin--the binary interfaces to the
> operating system are totally different.

Er, what's the purpose, then, of 'rpm.exe' that can be installed
with 'setup.exe'?

If "you" had a Cygwin-related/-dependent package, that
"you" wished to distribute to a group of users (say, >> 25),

What utility would you use to install this package?

The package would consist mostly of scripts -- bash, gawk, perl;
quite a few soft links, and some man pages, some documentation in
HTML format.

Would you use?:

* Make?
* Custom perl script?
* Custom bash script?
* Custom setup.ini & setup.exe?
* Or what?

Thanks,

Lee

Lee Rothstein



--
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: packages

2008-07-22 Thread Larry Hall (Cygwin)

Lee D. Rothstein wrote:

Gary Johnson wrote:

 > On 2008-07-18, r wrote:

 >> I'm new about cygwin, but I use from a lot SuSE and OpenSuSE
 >> can I install packages rpm from linux distributions on cygwin ?


 > No. First off, Cygwin doesn't use Red Hat's package manager, it
 > uses its own package manager, setup.exe.  Secondly, binaries built
 > for Linux will not run under Cygwin--the binary interfaces to the
 > operating system are totally different.

Er, what's the purpose, then, of 'rpm.exe' that can be installed
with 'setup.exe'?


Installing RPM source.  Installing RPMs targeted for Windows or
Cygwin, if someone has made some.


If "you" had a Cygwin-related/-dependent package, that
"you" wished to distribute to a group of users (say, >> 25),

What utility would you use to install this package?


Since you would require Cygwin, I would recommend packaging it to
install with 'setup.exe'.  That would make it easier for the users,
since they are going to need Cygwin anyway.  It would be a 1-stop
install process.


The package would consist mostly of scripts -- bash, gawk, perl;
quite a few soft links, and some man pages, some documentation in
HTML format.

Would you use?:

* Make?
* Custom perl script?
* Custom bash script?
* Custom setup.ini & setup.exe?
* Or what?


'setup.exe'


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

_

A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?

--
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: packages

2008-07-22 Thread Gary Johnson
On 2008-07-22, Lee D. Rothstein wrote:
> Gary Johnson wrote:
>
> > On 2008-07-18, r wrote:
>
> >> I'm new about cygwin, but I use from a lot SuSE and OpenSuSE
> >> can I install packages rpm from linux distributions on cygwin ?
>
>
> > No. First off, Cygwin doesn't use Red Hat's package manager, it
> > uses its own package manager, setup.exe.  Secondly, binaries built
> > for Linux will not run under Cygwin--the binary interfaces to the
> > operating system are totally different.
>
> Er, what's the purpose, then, of 'rpm.exe' that can be installed
> with 'setup.exe'?

I don't know.  It isn't to install Linux binaries on Cygwin, though.  

> If "you" had a Cygwin-related/-dependent package, that
> "you" wished to distribute to a group of users (say, >> 25),
>
> What utility would you use to install this package?
>
> The package would consist mostly of scripts -- bash, gawk, perl;
> quite a few soft links, and some man pages, some documentation in
> HTML format.
>
> Would you use?:
>
> * Make?
> * Custom perl script?
> * Custom bash script?
> * Custom setup.ini & setup.exe?
> * Or what?

I would probably use make and put everything in a tar file, because 
that's what I know how to use.  If I wanted the installer to handle 
package dependencies, too, then I'd take the time to learn how to 
build a Cygwin package.  It would depend a lot on the users and how 
"turn key" the package had to be.

Regards,
Gary


--
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: .s file causing problems when linking

2008-07-22 Thread Nathan Thern
On Tue, Jul 22, 2008 at 4:01 PM, Brian Dessent <[EMAIL PROTECTED]> wrote:
> You seem to have two separate issues here.
>> The main executable is created with this command:
>> > gcc -o scheme.exe cmpauxmd.o  
>
> Wait, are you saying that you need to export symbols from the executable
> that will be imported by another module?
Yes. I tried to "export symbols" by creating a dll from the same
object files from which the executable was created.

>> cmpauxmd.o is created by:
>> > ./makegen/m4.sh  cmpauxmd.m4 > cmpauxmd.s
>> > as -o cmpauxmd.o cmpauxmd.s
>
> Has this assembler file been specifically ported to PE or are you just
> using the version some other platform?
I'm following the build instructions for generic x86 *nix, going under
the assumption that cygwin fits in that category. I believe the
assembler file is OK; the executable runs successfully (it dies
because it cannot find an image file to self-boot, but it does not
core dump).

>> The first module fails to link as follows:
>> > gcc -shared -o prbfish.dll prbfish.o 
>> --> Lots of "prbfish.o:prbfish.c: undefined reference to X" where the
>> X's are symbols defined in both cmpauxmd.o and 
>
> How does being defined in cmpauxmd.o mean anything here?
The link command "gcc -shared -o prbfish.dll prbfish.o "
fails. When it fails, it generates tons of "undefined reference to
..." messages. To me that means the linker needs either a library or
an object file that defines each symbol that got an "undefined
reference" message. Using nm I can find those symbols defined in
cmpauxmd.o and .

> Is cmpauxmd.o
> included in ?
No.
> I thought cmpauxmd.o was linked into the
> main .exe.
It was, but it still exists :-). I just mined it and the other .o's
using nm and found all of the symbols I needed.

> Or are you just saying that the symbol should be satisfied
> by some other module in ?
No, I'm not. I'm saying the symbol was _not defined_. This is not a
problem on an OS like linux, but on cygwin the symbol must be defined
for the link to succeed.


> I appreciate that you're trying
> to make the commands as simple as possible but this abbreviation only
> hides and confuses, it's best to post the exact commands and the exact
> resulting error messages.
Well, the commands and error messages are long and unwieldy. I'd like
to keep things more abstract and learn the principles rather than a
one-shot solution.

>> So I tried to create a helper lib just to provide symbols for prbfish.dll:
>> > gcc -shared -o libscheme.dll cmpauxmd.o  
>> --> Cannot export asm_sc_apply_generic: symbol not found
>> --> several more "Cannot export"s
>> All the "Cannot export" symbols are defined in cmpauxmd.o
>
> That probably means the assembler file needs porting.
That may be. If so, I'm in over my head. However, like I said, the
procedure I'm following is for x86 *nix and is supposedly OS agnostic.
(It may, however, assume ELF.)

> Look at the
> output of a gcc generated assembler file for a simple function
> declaration and make sure your hand coded file uses the same sequence of
> assember directives and pseudo-ops.  For example:
>
> $ echo "void func() {}" | gcc -S -x c - -o - -fomit-frame-pointer
>.file   ""
>.text
> .globl _func
>.def_func;  .scl2;  .type   32; .endef
> _func:
>ret
>
> Notice that the assembler sequence for declaring an external in PE
> assembler dialect requires this ".def/.scl/.type/.endef" sequence, which
> is not present in say i386 ELF where the sequence would be something
> like:
>
> $ echo "void func() {}" | gcc -S -x c - -o - -fomit-frame-pointer
>.file   ""
>.text
> .globl func
>.type   func, @function
> func:
>ret
>.size   func, .-func
>.ident  "GCC: (GNU) 4.4.0 20080718 (experimental)"
>.section.note.GNU-stack,"",@progbits
>
> (You can also tell here another difference, that i386 PE is a leading
> underscore target.)
OK, This is extremely informative. Indeed, the generated .s file does
not have the ".def/.scl/.type/.endef" sequence after .globl
declarations.

> Also, this assumes that you are going to use the GNU linker's
> auto-export feature, or that you will manually specify a list of
> functions to export with a .def file.  If that is not the case then you
> will need to emulate the action of __declspec(dllexport), which results
> in stuff added to the .drectve section:
>
> $ echo "void __declspec(dllexport) func() {}" | \
>  gcc -S -x c - -o - -fomit-frame-pointer
>.file   ""
>.text
> .globl _func
>.def_func;  .scl2;  .type   32; .endef
> _func:
>ret
>.section .drectve
>
>.ascii " -export:func"
>
>
>> Is my approach of building a helper lib the correct one? If so, how do
>> I resolve the "Cannot export" errors?
>>
>> OR ... Is there another (better) way to inform ld of the symbols in
>> scheme.exe in order to succesfully link the module .dll's?
>
> It is possible to export

Re: .s file causing problems when linking

2008-07-22 Thread Brian Dessent
Nathan Thern wrote:

> I'm following the build instructions for generic x86 *nix, going under
> the assumption that cygwin fits in that category. I believe the

Cygwin can't change the fact that fundamentally these are different
operating systems, so for example linking works differently as does the
way symbols are declared at the assembler level.  Assembly is pretty
much the antithesis of portability so you can't expect this to work
without some porting.

> > It is possible to export symbols from the .exe and then import them from
> > a .dll, but it takes more than what you're doing here, namely creating
> > an import library for the .exe and linking the dll against that.

> That is precisely what I tried to do: create a dll from the same .o's
> that created the .exe.

But that's not really going to work.  You can't fake it like that.  What
you're doing is creating another library.

> I am still not sure my way forward is the best one. Let me re-state it:
> I have an executable, scheme.exe, created from object files. A module
> library, prbfish.dll fails to link because it needs symbols that are
> in scheme.exe. I create a fake library, libfoo.dll, from the
> scheme.exe object files like so:
> > gcc -shared -o libfoo.dll *.o -Wl,--out-implib,libfoo.dll.a

That might get the library to link, but at runtime it does *not* mean
that prbfish.dll will call the routines in scheme.exe.  Rather,
prbfish.dll will be created with a hardcoded reference to libfoo.dll and
will fail to run if libfoo.dll is not present -- this fake library is
not fake, it is a real library, and it duplicates code in scheme.exe so
it's probably useless and broken.

Please read that link which has examples of how to actually export
symbols from an .exe and link the dll that imports them.  If you have
the luxury of linking the .exe first then you can skip all the .def file
junk because you can simply create an import library for the .exe as a
side effect of linking it (-Wl,--out-implib) and then use that when
linking prbfish.dll.  The only reason you'd ever need a .def file in
this case is if you have a circular dependency where you can't link one
without the other.

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: packages

2008-07-22 Thread Christopher Faylor
On Tue, Jul 22, 2008 at 06:09:55PM -0400, Lee D. Rothstein wrote:
> Gary Johnson wrote:
>
> > On 2008-07-18, r wrote:
>
> >> I'm new about cygwin, but I use from a lot SuSE and OpenSuSE
> >> can I install packages rpm from linux distributions on cygwin ?
>
>
> > No. First off, Cygwin doesn't use Red Hat's package manager, it
> > uses its own package manager, setup.exe.  Secondly, binaries built
> > for Linux will not run under Cygwin--the binary interfaces to the
> > operating system are totally different.
>
> Er, what's the purpose, then, of 'rpm.exe' that can be installed
> with 'setup.exe'?

It has the same purpose as it does on a Debian installation - to handle
rpm files on a system for which it is not the native package manager.

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: Build problems

2008-07-22 Thread Stefano Facchetti

I build my custom dll in this two step:

g++ -c festivalDll.cc -L. -lfestival -lestools -lestbase -leststring
-ltermca
p -lwinmm -I ../src/include/ -I ../../speech_tools/include/ -I ./ -o
festivalDl
l.o -mno-cygwin -I./mingw/include -L./mingw/lib/ 

g++ -shared -o festival.dll festivaldll.o -L. -lfestival -lestools -lestbase
-leststring -ltermcap -lwinmm -I ../src/include/ -I
../../speech_tools/include/
 -I ./ -mno-cygwin -I./mingw/include -L./mingw/lib/ 

Without the command: "-mno-cygwin -I./mingw/include -L./mingw/lib/" all work
well,
but when I use my custom dll from c# .NET through PInvoke tha application
freeze.

Reading on internet, I have find a suggestion: build the dll with MinGw
libs.. but I have some errors. 

Output of first command:
undefine reference to '_getservbyname'
undefine reference to '_shutdown'
and more.. 

Thanks.

-- 
View this message in context: 
http://www.nabble.com/Build-problems-tp18599595p18604835.html
Sent from the Cygwin list mailing list archive at Nabble.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/