Re: Documentation on -mno-cygwin Accuracy

2012-02-08 Thread Corinna Vinschen
On Feb  8 00:24, carolus wrote:
 On 2/7/2012 11:58 PM, Christopher Faylor wrote:
 
 Actually, you can easily bundle a program with the Cygwin DLL and have
 it work fine.
 
 I confess to doing that for a while, until I learned about
 -mno-cygwin, but is that not a license violation?  My understanding
 is that in order to conform to the license you must include the
 cygwin source code in the bundle.

http://cygwin.com/ml/cygwin/2012-02/msg00160.html


Corinna

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

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



Re: Documentation on -mno-cygwin Accuracy

2012-02-08 Thread Christopher Faylor
On Wed, Feb 08, 2012 at 12:24:39AM -0600, carolus wrote:
On 2/7/2012 11:58 PM, Christopher Faylor wrote:

 Actually, you can easily bundle a program with the Cygwin DLL and have
 it work fine.

I confess to doing that for a while, until I learned about -mno-cygwin, 
but is that not a license violation?  My understanding is that in order 
to conform to the license you must include the cygwin source code in the 
bundle.

You really should read the GPL.

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



Re: Documentation on -mno-cygwin Accuracy

2012-02-08 Thread Jesse Ziser

On 2/7/2012 11:58 PM, Christopher Faylor wrote:

On Tue, Feb 07, 2012 at 05:14:59PM -0600, Jesse Ziser wrote:

On 2/7/2012 4:14 PM, carolus wrote:

On 2/7/2012 3:12 PM, Corinna Vinschen wrote:


There's the usual misconception about the GPL. If you create an
application which is linked against the Cygwin DLL (or any other GPLed
library), but you only use the application in-house, there's no reason
at all to distribute the source code to your collegues. If one of them
really wants it, he can always ask you, right? Only if you provide the
binaries to customers or to the world in some way, you are supposed to
provide the sources codes as well in a GPL-compatible way.



In a publication I have offered to furnish on request the source code
and windows executable for a program that I personally run under cygwin.
Don't I have to use mingw for the publicly distributed version, or else
bundle the executable with cygwin source code? As I understand, simply
providing a link to the cygwin web site does not satisfy the license.


Well, if you don't want them to have to install Cygwin, then that's a
bigger issue than just licensing.  Think of Cygwin like an OS.  If you
want to create something that can run under Windows, not Cygwin, then
you have to build it for Windows, not Cygwin.  I don't know that it is
even possible to simply bundle Cygwin with your application.  Cygwin
isn't just some little collection of libraries or something.  It's a
whole system that must be correctly installed on someone's computer.


Actually, you can easily bundle a program with the Cygwin DLL and have
it work fine.  You don't need to install the whole system.  That doesn't
mean it's a good idea, however, since your soon-to-be-out-of-date DLL
could cause confusion with an existing Cygwin application.


If you really want Mingw (a free compiler and development environment
for Windows), maybe what you should do is just download and install
Mingw, and use that, instead of doing it through the Cygwin compiler
using a barely-supported option.  (Then you should get help with any
problems you have over at Mingw's website instead of here.)


The MinGW cross-compiles are not barely supported.  They are included
in the distribution precisely so that people can build pure-windows
programs under Cygwin.


Oh?  Then I got the wrong impression from the documentation and the 
mailing list when I was trying to work all that out a few years ago.  I 
can't find it now, but I could swear there was something about it being 
deprecated or partially supported or something.


--
+---+
| Jesse Ziser, Code Warrior |
| Applied Research Labs: UT |
+---+

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



Re: Documentation on -mno-cygwin Accuracy

2012-02-08 Thread Jeremy Bopp
On 02/08/2012 09:49 AM, Jesse Ziser wrote:
 On 2/7/2012 11:58 PM, Christopher Faylor wrote:
 On Tue, Feb 07, 2012 at 05:14:59PM -0600, Jesse Ziser wrote:
 If you really want Mingw (a free compiler and development environment
 for Windows), maybe what you should do is just download and install
 Mingw, and use that, instead of doing it through the Cygwin compiler
 using a barely-supported option.  (Then you should get help with any
 problems you have over at Mingw's website instead of here.)

 The MinGW cross-compiles are not barely supported.  They are included
 in the distribution precisely so that people can build pure-windows
 programs under Cygwin.
 
 Oh?  Then I got the wrong impression from the documentation and the
 mailing list when I was trying to work all that out a few years ago.  I
 can't find it now, but I could swear there was something about it being
 deprecated or partially supported or something.

I think there is a tiny misunderstanding here.  I believe that Jesse was
talking about the -mno-cygwin option when he spoke of using a
barely-supported option.  Chris seems to have misinterpreted that to
mean that MinGW cross-compilers themselves were claimed to be
barely-supported.

The -mno-cygwin option for GCC v3 was certainly deprecated for some time
now and announced in the mailing list as I recall, and support for it
always seemed uncertain at best to me.  As of GCC v4, that option is
dead; however, the MinGW cross compilers included with Cygwin continue
to have full support.

I hope I didn't just add to the confusion here. :-)

-Jeremy

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



Re: Documentation on -mno-cygwin Accuracy

2012-02-08 Thread Corinna Vinschen
On Feb  8 09:49, Jesse Ziser wrote:
 On 2/7/2012 11:58 PM, Christopher Faylor wrote:
 The MinGW cross-compiles are not barely supported.  They are included
 in the distribution precisely so that people can build pure-windows
 programs under Cygwin.
 
 Oh?  Then I got the wrong impression from the documentation and the
 mailing list when I was trying to work all that out a few years ago.
 I can't find it now, but I could swear there was something about it
 being deprecated or partially supported or something.

Deprecated was only the -mno-cygwin option for the cygwin gcc.  The
non-deprecated and much cleaner solution is what we have in the distro
now: A full-fledged cross-compiler for the mingw32 target.


Corinna

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

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



Re: Documentation on -mno-cygwin Accuracy

2012-02-08 Thread Jesse Ziser

On 2/8/2012 10:04 AM, Corinna Vinschen wrote:

On Feb  8 09:49, Jesse Ziser wrote:

On 2/7/2012 11:58 PM, Christopher Faylor wrote:

The MinGW cross-compiles are not barely supported.  They are included
in the distribution precisely so that people can build pure-windows
programs under Cygwin.


Oh?  Then I got the wrong impression from the documentation and the
mailing list when I was trying to work all that out a few years ago.
I can't find it now, but I could swear there was something about it
being deprecated or partially supported or something.


Deprecated was only the -mno-cygwin option for the cygwin gcc.  The
non-deprecated and much cleaner solution is what we have in the distro
now: A full-fledged cross-compiler for the mingw32 target.


The Cygwin gcc option was exactly what I was talking about.  Thanks, 
Corinna and Jeremy.  Sorry for the confusion.


--
+---+
| Jesse Ziser, Code Warrior |
| Applied Research Labs: UT |
+---+

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



Re: Documentation on -mno-cygwin Accuracy

2012-02-07 Thread Yaakov (Cygwin/X)
On Mon, 2012-02-06 at 17:13 -0600, Quinn Wood wrote:
 Thank you for the swift reply, and thanks for the information. This is
 a tangential question, but are the MinGW files available for
 integration with Cygwin suitable for this?

I'm not certain that I understand your question.  There are several
mingw-* packages which provide headers and libraries which are meant to
be used in conjuction with mingw-gcc.  This is how Cygwin's setup.exe (a
pure Win32 app, for obvious reasons) can be built on Cygwin, for
example.


Yaakov



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



Re: Documentation on -mno-cygwin Accuracy

2012-02-07 Thread Earnie Boyd
On Mon, Feb 6, 2012 at 6:05 PM, Yaakov (Cygwin/X)

 The -mno-cygwin flag is still handled by gcc3, but that is deprecated
 and may be removed at any time.  The officially supported way to build
 such apps is to use the appropriate mingw or mingw64 cross-compiler.


AIUI -mno-cygwin doesn't work on MinGW GCC and has already been removed.

$ gcc --version
gcc.exe (GCC) 4.6.1
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ gcc -mno-cygwin -c a.c
cc1.exe: error: unrecognized command line option '-mno-cygwin'

-- 
Earnie
-- https://sites.google.com/site/earnieboyd

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



Re: Documentation on -mno-cygwin Accuracy

2012-02-07 Thread Christopher Faylor
On Tue, Feb 07, 2012 at 04:08:21AM -0600, Yaakov (Cygwin/X) wrote:
On Mon, 2012-02-06 at 17:13 -0600, Quinn Wood wrote:
 Thank you for the swift reply, and thanks for the information. This is
 a tangential question, but are the MinGW files available for
 integration with Cygwin suitable for this?

I'm not certain that I understand your question.  There are several
mingw-* packages which provide headers and libraries which are meant to
be used in conjuction with mingw-gcc.  This is how Cygwin's setup.exe (a
pure Win32 app, for obvious reasons) can be built on Cygwin, for
example.

FWIW, I build setup.exe on linux with a carefully-constructed environment
which just uses your Cygwin cross-compiler but adds the MinGW bits while
removing the Cygwin bits.

cgf

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



Re: Documentation on -mno-cygwin Accuracy

2012-02-07 Thread carolus

On 2/6/2012 5:05 PM, Yaakov (Cygwin/X) wrote:


The -mno-cygwin flag is still handled by gcc3, but that is deprecated
and may be removed at any time.  The officially supported way to
build such apps is to use the appropriate mingw or mingw64
cross-compiler.


Is there an easy procedure that is equivalent
to the old -mno-cygwin (suitable for a dumb engineer who is not a
programmer and knows nothing about cross-compilation)? -mno-cygwin was a
very handy way to distribute a cygwin fortran executable to non-cywin 
users without having to include cygwin1.dll (which I think is not 
exactly legal).




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



Re: Documentation on -mno-cygwin Accuracy

2012-02-07 Thread marco atzeri

On 2/7/2012 5:13 PM, carolus wrote:

On 2/6/2012 5:05 PM, Yaakov (Cygwin/X) wrote:


The -mno-cygwin flag is still handled by gcc3, but that is deprecated
and may be removed at any time. The officially supported way to
build such apps is to use the appropriate mingw or mingw64
cross-compiler.


Is there an easy procedure that is equivalent
to the old -mno-cygwin (suitable for a dumb engineer who is not a
programmer and knows nothing about cross-compilation)? -mno-cygwin was a
very handy way to distribute a cygwin fortran executable to non-cywin
users without having to include cygwin1.dll (which I think is not
exactly legal).



define
  CC=i686-pc-mingw32-gcc.exe
  FC=i686-pc-mingw32-gfortran.exe

if you want to use mingw-gcc compilers.

similar
  CC=i686-w64-mingw32-gcc.exe
  FC=i686-w64-mingw32-gfortran.exe

for the mingw64-i686-gcc compilers

Regards
Marco


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



Re: Documentation on -mno-cygwin Accuracy

2012-02-07 Thread Christopher Faylor
On Tue, Feb 07, 2012 at 10:13:49AM -0600, carolus wrote:
On 2/6/2012 5:05 PM, Yaakov (Cygwin/X) wrote:
The -mno-cygwin flag is still handled by gcc3, but that is deprecated
and may be removed at any time.  The officially supported way to build
such apps is to use the appropriate mingw or mingw64 cross-compiler.

Is there an easy procedure that is equivalent to the old -mno-cygwin
(suitable for a dumb engineer who is not a programmer and knows nothing
about cross-compilation)?  -mno-cygwin was a very handy way to
distribute a cygwin fortran executable to non-cywin users without
having to include cygwin1.dll (which I think is not exactly legal).

A cygwin fortran executable would need cygwin1.dll.

cgf

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



Re: Documentation on -mno-cygwin Accuracy

2012-02-07 Thread Quinn Wood
On Tue, Feb 7, 2012 at 10:42 AM, marco atzeri wrote:
 On 2/7/2012 5:13 PM, carolus wrote:
 Is there an easy procedure that is equivalent
 to the old -mno-cygwin (suitable for a dumb engineer who is not a
 programmer and knows nothing about cross-compilation)? -mno-cygwin was a
 very handy way to distribute a cygwin fortran executable to non-cywin
 users without having to include cygwin1.dll (which I think is not
 exactly legal).

 define
  CC=i686-pc-mingw32-gcc.exe
  FC=i686-pc-mingw32-gfortran.exe

 if you want to use mingw-gcc compilers.

 similar
  CC=i686-w64-mingw32-gcc.exe
  FC=i686-w64-mingw32-gfortran.exe

 for the mingw64-i686-gcc compilers

You may also have to change your code if it uses Unix features (an
application I was recently using utilized mmap, which does not come
with Windows.)

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



Re: Documentation on -mno-cygwin Accuracy

2012-02-07 Thread Christopher Faylor
On Tue, Feb 07, 2012 at 12:35:49PM -0600, Quinn Wood wrote:
...
You may also have to change your code if it uses Unix features (an
application I was recently using utilized mmap, which does not come
with Windows.)

Please lets not have this discussion degrade into people discussing best
practices for not using Cygwin.  That's not what this mailing list is
here for.

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



Re: Documentation on -mno-cygwin Accuracy

2012-02-07 Thread Charles D. Russell

On 2/7/2012 10:42 AM, marco atzeri wrote:

On 2/7/2012 5:13 PM, carolus wrote:

On 2/6/2012 5:05 PM, Yaakov (Cygwin/X) wrote:


The -mno-cygwin flag is still handled by gcc3, but that is deprecated
and may be removed at any time. The officially supported way to
build such apps is to use the appropriate mingw or mingw64
cross-compiler.


Is there an easy procedure that is equivalent
to the old -mno-cygwin (suitable for a dumb engineer who is not a
programmer and knows nothing about cross-compilation)? -mno-cygwin was a
very handy way to distribute a cygwin fortran executable to non-cywin
users without having to include cygwin1.dll (which I think is not
exactly legal).



define
CC=i686-pc-mingw32-gcc.exe
FC=i686-pc-mingw32-gfortran.exe

if you want to use mingw-gcc compilers.

similar
CC=i686-w64-mingw32-gcc.exe
FC=i686-w64-mingw32-gfortran.exe

for the mingw64-i686-gcc compilers

Regards
Marco



I assume that FC and CC are for use by make, so I put them in a
makefile and tried a test program with the following result:

cdr@dell03 ~/mingtest
$ make hello
i686-w64-mingw32-gfortran.exehello.f   -o hello

cdr@dell03 ~/mingtest
$ ./hello
/home/cdr/mingtest/hello.exe: error while loading shared libraries: 
libgfortran-

3.dll: cannot open shared object file: No such file or directory


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



Re: Documentation on -mno-cygwin Accuracy

2012-02-07 Thread Chris Sutcliffe
On 6 February 2012 14:29, Charles D. Russell wrote:
 cdr@dell03 ~/mingtest
 $ make hello
 i686-w64-mingw32-gfortran.exe    hello.f   -o hello

 cdr@dell03 ~/mingtest
 $ ./hello
 /home/cdr/mingtest/hello.exe: error while loading shared libraries:
 libgfortran-
 3.dll: cannot open shared object file: No such file or directory

Likely because /usr/i686-w64-mingw32/sys-root/mingw/bin is not in your
$PATH.  You can either compile it statically (so the shared library is
not required), add the path I mentioned to your $PATH, or copy
libgfortran-3.dll to the same path as hello.exe.

Chris

-- 
Chris Sutcliffe
http://emergedesktop.org
http://www.google.com/profiles/ir0nh34d

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



Re: Documentation on -mno-cygwin Accuracy

2012-02-07 Thread Tim Prince

On 2/6/2012 2:29 PM, Charles D. Russell wrote:


i686-w64-mingw32-gfortran.exe hello.f -o hello

cdr@dell03 ~/mingtest
$ ./hello
/home/cdr/mingtest/hello.exe: error while loading shared libraries:
libgfortran-
3.dll: cannot open shared object file: No such file or directory



The cygwin distribution of mingw puts the support dlls in their own 
directories.  You must act yourself to get them on PATH.  This is a 
consequence of their not being cygwin compilers and giving you a mongrel 
combination of cygwin and Windows setup.  However, cygwin provides 
useful tools like find and export:

export PATH=/usr/x86_64-w64-mingw32/sys-root/mingw/bin/:$PATH


--
Tim Prince

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



Re: Documentation on -mno-cygwin Accuracy

2012-02-07 Thread Yaakov (Cygwin/X)
On Tue, 2012-02-07 at 10:26 -0500, Christopher Faylor wrote:
 FWIW, I build setup.exe on linux with a carefully-constructed environment
 which just uses your Cygwin cross-compiler but adds the MinGW bits while
 removing the Cygwin bits.

That's why I ship mingw32-*-static packages in fedora-cygwin. :-)


Yaakov



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



Re: Documentation on -mno-cygwin Accuracy

2012-02-07 Thread carolus

On 2/7/2012 1:51 PM, Tim Prince wrote:

On 2/6/2012 2:29 PM, Charles D. Russell wrote:


i686-w64-mingw32-gfortran.exe hello.f -o hello

cdr@dell03 ~/mingtest
$ ./hello
/home/cdr/mingtest/hello.exe: error while loading shared libraries:
libgfortran-
3.dll: cannot open shared object file: No such file or directory



The cygwin distribution of mingw puts the support dlls in their own
directories. You must act yourself to get them on PATH. This is a
consequence of their not being cygwin compilers and giving you a mongrel
combination of cygwin and Windows setup. However, cygwin provides useful
tools like find and export:
export PATH=/usr/x86_64-w64-mingw32/sys-root/mingw/bin/:$PATH


The old -mno-cygwin yielded a standalone executable that I could give to 
a colleague and it would just work  on a Windows machine without 
cygwin.  It appears that now one must bundle at least one dll.  From a 
licensing standpoint, are these dll's any different from cygwin1.dll? 
Can they be distributed freely without bundling the source code?  If 
not, I might as well forget about mingw and just supply cygwin1.dll.



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



Re: Documentation on -mno-cygwin Accuracy

2012-02-07 Thread Tim Prince

On 2/7/2012 3:10 PM, carolus wrote:

On 2/7/2012 1:51 PM, Tim Prince wrote:

On 2/6/2012 2:29 PM, Charles D. Russell wrote:


i686-w64-mingw32-gfortran.exe hello.f -o hello

cdr@dell03 ~/mingtest
$ ./hello
/home/cdr/mingtest/hello.exe: error while loading shared libraries:
libgfortran-
3.dll: cannot open shared object file: No such file or directory



The cygwin distribution of mingw puts the support dlls in their own
directories. You must act yourself to get them on PATH. This is a
consequence of their not being cygwin compilers and giving you a mongrel
combination of cygwin and Windows setup. However, cygwin provides useful
tools like find and export:
export PATH=/usr/x86_64-w64-mingw32/sys-root/mingw/bin/:$PATH



The old -mno-cygwin yielded a standalone executable that I could give to
a colleague and it would just work on a Windows machine without
cygwin. It appears that now one must bundle at least one dll. From a
licensing standpoint, are these dll's any different from cygwin1.dll?
Can they be distributed freely without bundling the source code? If not,
I might as well forget about mingw and just supply cygwin1.dll.



Seems off-topic here.  Does http://www.mingw.org/license begin to answer 
your question?  How about the recent suggestion of -static?



--
Tim Prince

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



Re: Documentation on -mno-cygwin Accuracy

2012-02-07 Thread carolus

On 2/7/2012 2:26 PM, Tim Prince wrote:
 How about the recent suggestion of -static?



That solves my problem.  It took a while for the suggestion to sink in.

Thanks



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



Re: Documentation on -mno-cygwin Accuracy

2012-02-07 Thread carolus

On 2/7/2012 1:44 PM, Chris Sutcliffe wrote:

On 6 February 2012 14:29, Charles D. Russell wrote:

cdr@dell03 ~/mingtest
$ make hello
i686-w64-mingw32-gfortran.exehello.f   -o hello

cdr@dell03 ~/mingtest
$ ./hello
/home/cdr/mingtest/hello.exe: error while loading shared libraries:
libgfortran-
3.dll: cannot open shared object file: No such file or directory


Likely because /usr/i686-w64-mingw32/sys-root/mingw/bin is not in your
$PATH.  You can either compile it statically (so the shared library is
not required), add the path I mentioned to your $PATH, or copy
libgfortran-3.dll to the same path as hello.exe.

Chris


Yes, -static serves my purpose.  Thanks


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



Re: Documentation on -mno-cygwin Accuracy

2012-02-07 Thread carolus

On 2/7/2012 10:42 AM, marco atzeri wrote:

On 2/7/2012 5:13 PM, carolus wrote:

On 2/6/2012 5:05 PM, Yaakov (Cygwin/X) wrote:


The -mno-cygwin flag is still handled by gcc3, but that is deprecated
and may be removed at any time. The officially supported way to
build such apps is to use the appropriate mingw or mingw64
cross-compiler.


Is there an easy procedure that is equivalent
to the old -mno-cygwin (suitable for a dumb engineer who is not a
programmer and knows nothing about cross-compilation)? -mno-cygwin was a
very handy way to distribute a cygwin fortran executable to non-cywin
users without having to include cygwin1.dll (which I think is not
exactly legal).



define
CC=i686-pc-mingw32-gcc.exe
FC=i686-pc-mingw32-gfortran.exe

if you want to use mingw-gcc compilers.

similar
CC=i686-w64-mingw32-gcc.exe
FC=i686-w64-mingw32-gfortran.exe

for the mingw64-i686-gcc compilers

Regards
Marco



Thanks.  I also added:
FFLAGS=-static
to duplicate the behavior I used to get with -mno-cygwin.



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



Re: Documentation on -mno-cygwin Accuracy

2012-02-07 Thread Corinna Vinschen
On Feb  7 14:10, carolus wrote:
 On 2/7/2012 1:51 PM, Tim Prince wrote:
 On 2/6/2012 2:29 PM, Charles D. Russell wrote:
 
 i686-w64-mingw32-gfortran.exe hello.f -o hello
 
 cdr@dell03 ~/mingtest
 $ ./hello
 /home/cdr/mingtest/hello.exe: error while loading shared libraries:
 libgfortran-
 3.dll: cannot open shared object file: No such file or directory
 
 
 The cygwin distribution of mingw puts the support dlls in their own
 directories. You must act yourself to get them on PATH. This is a
 consequence of their not being cygwin compilers and giving you a mongrel
 combination of cygwin and Windows setup. However, cygwin provides useful
 tools like find and export:
 export PATH=/usr/x86_64-w64-mingw32/sys-root/mingw/bin/:$PATH
 
 
 The old -mno-cygwin yielded a standalone executable that I could
 give to a colleague and it would just work  on a Windows machine
 without cygwin.  It appears that now one must bundle at least one
 dll.  From a licensing standpoint, are these dll's any different
 from cygwin1.dll? Can they be distributed freely without bundling
 the source code?

There's the usual misconception about the GPL.  If you create an
application which is linked against the Cygwin DLL (or any other GPLed
library), but you only use the application in-house, there's no reason
at all to distribute the source code to your collegues.  If one of them
really wants it, he can always ask you, right?  Only if you provide the
binaries to customers or to the world in some way, you are supposed to
provide the sources codes as well in a GPL-compatible way.


Corinna

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

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



Documentation on -mno-cygwin Accuracy

2012-02-07 Thread Kai Tietz
2012/2/7 Corinna Vinschen wrote:
 On Feb  7 14:10, carolus wrote:
 On 2/7/2012 1:51 PM, Tim Prince wrote:
 On 2/6/2012 2:29 PM, Charles D. Russell wrote:
 
 i686-w64-mingw32-gfortran.exe hello.f -o hello
 
 cdr@dell03 ~/mingtest
 $ ./hello
 /home/cdr/mingtest/hello.exe: error while loading shared libraries:
 libgfortran-
 3.dll: cannot open shared object file: No such file or directory
 
 
 The cygwin distribution of mingw puts the support dlls in their own
 directories. You must act yourself to get them on PATH. This is a
 consequence of their not being cygwin compilers and giving you a mongrel
 combination of cygwin and Windows setup. However, cygwin provides useful
 tools like find and export:
 export PATH=/usr/x86_64-w64-mingw32/sys-root/mingw/bin/:$PATH
 
 
 The old -mno-cygwin yielded a standalone executable that I could
 give to a colleague and it would just work  on a Windows machine
 without cygwin.  It appears that now one must bundle at least one
 dll.  From a licensing standpoint, are these dll's any different
 from cygwin1.dll? Can they be distributed freely without bundling
 the source code?

Yes, those DLLs (or static-libraries) provided by gcc can be
redistrubted without having GPL issues.  Gcc itself has here an
license-expception for those runtime-libraries/objects/headers.

Btw for a mingw cross-compiler the libraries are to be found in
sysroot/target/lib.  Only in native variant the DLL-files getting
installed into the sysroot/bin folder.  This was necessary to allow
also multilib-version for windows targets (not that I would encourage
here people actual to use it).

I added to my .bash_profile in the home directory the following lines:

PATH=/usr/local/x86_64-w64-mingw32/lib:/usr/local/i686-w64-mingw32/lib:${PATH}
export GCOV_PREFIX_STRIP=1000

(I am using as sysroot /usr/local - don't do that if you aren't
absolute aware about its side-effects).

 There's the usual misconception about the GPL.  If you create an
 application which is linked against the Cygwin DLL (or any other GPLed
 library), but you only use the application in-house, there's no reason
 at all to distribute the source code to your collegues.  If one of them
 really wants it, he can always ask you, right?  Only if you provide the
 binaries to customers or to the world in some way, you are supposed to
 provide the sources codes as well in a GPL-compatible way.

Right, this is a mistake in assumption, which is often done.

Regards,
Kai


-- 
|  (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| ()_() him gain world domination

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



Re: Documentation on -mno-cygwin Accuracy

2012-02-07 Thread carolus

On 2/7/2012 3:12 PM, Corinna Vinschen wrote:


There's the usual misconception about the GPL.  If you create an
application which is linked against the Cygwin DLL (or any other GPLed
library), but you only use the application in-house, there's no reason
at all to distribute the source code to your collegues.  If one of them
really wants it, he can always ask you, right?  Only if you provide the
binaries to customers or to the world in some way, you are supposed to
provide the sources codes as well in a GPL-compatible way.



In a publication I have offered to furnish on request the source code 
and windows executable for a program that I personally run under cygwin. 
 Don't I have to use mingw for the publicly distributed version, or 
else bundle the executable with cygwin source code?   As I understand, 
simply providing a link to the cygwin web site does not satisfy the license.



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



Re: Documentation on -mno-cygwin Accuracy

2012-02-07 Thread Jesse Ziser

On 2/7/2012 4:14 PM, carolus wrote:

On 2/7/2012 3:12 PM, Corinna Vinschen wrote:


There's the usual misconception about the GPL. If you create an
application which is linked against the Cygwin DLL (or any other GPLed
library), but you only use the application in-house, there's no reason
at all to distribute the source code to your collegues. If one of them
really wants it, he can always ask you, right? Only if you provide the
binaries to customers or to the world in some way, you are supposed to
provide the sources codes as well in a GPL-compatible way.



In a publication I have offered to furnish on request the source code
and windows executable for a program that I personally run under cygwin.
Don't I have to use mingw for the publicly distributed version, or else
bundle the executable with cygwin source code? As I understand, simply
providing a link to the cygwin web site does not satisfy the license.


Well, if you don't want them to have to install Cygwin, then that's a 
bigger issue than just licensing.  Think of Cygwin like an OS.  If you 
want to create something that can run under Windows, not Cygwin, then 
you have to build it for Windows, not Cygwin.  I don't know that it is 
even possible to simply bundle Cygwin with your application.  Cygwin 
isn't just some little collection of libraries or something.  It's a 
whole system that must be correctly installed on someone's computer.


If you really want Mingw (a free compiler and development environment 
for Windows), maybe what you should do is just download and install 
Mingw, and use that, instead of doing it through the Cygwin compiler 
using a barely-supported option.  (Then you should get help with any 
problems you have over at Mingw's website instead of here.)


I hope I'm not out of line to suggest that on this list, but it sounds 
like it's what you're really looking for.


--
+---+
| Jesse Ziser, Code Warrior |
| Applied Research Labs: UT |
+---+

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



Re: Documentation on -mno-cygwin Accuracy

2012-02-07 Thread carolus

On 2/7/2012 5:14 PM, Jesse Ziser wrote:



Well, if you don't want them to have to install Cygwin, then that's a
bigger issue than just licensing. Think of Cygwin like an OS. If you
want to create something that can run under Windows, not Cygwin, then
you have to build it for Windows, not Cygwin. I don't know that it is
even possible to simply bundle Cygwin with your application. Cygwin
isn't just some little collection of libraries or something. It's a
whole system that must be correctly installed on someone's computer.

If you really want Mingw (a free compiler and development environment
for Windows), maybe what you should do is just download and install
Mingw, and use that, instead of doing it through the Cygwin compiler
using a barely-supported option. (Then you should get help with any
problems you have over at Mingw's website instead of here.)



Building with mingw used to be as simple as adding the -mno-cygwin 
compiler flag.  I know mingw is a separate application, but cygwin's 
setup.exe took care of the installation, and -mno-cygwin took care of 
the invocation.  From the standpoint of the dumb engineer, it was just a 
matter of a compiler option in a standard cygwin installation.


It appears that all of that is still possible, not quite as easy but 
still easy enough, as Marco Atzeri explained.






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



Re: Documentation on -mno-cygwin Accuracy

2012-02-07 Thread Christopher Faylor
On Tue, Feb 07, 2012 at 05:14:59PM -0600, Jesse Ziser wrote:
On 2/7/2012 4:14 PM, carolus wrote:
 On 2/7/2012 3:12 PM, Corinna Vinschen wrote:

 There's the usual misconception about the GPL. If you create an
 application which is linked against the Cygwin DLL (or any other GPLed
 library), but you only use the application in-house, there's no reason
 at all to distribute the source code to your collegues. If one of them
 really wants it, he can always ask you, right? Only if you provide the
 binaries to customers or to the world in some way, you are supposed to
 provide the sources codes as well in a GPL-compatible way.


 In a publication I have offered to furnish on request the source code
 and windows executable for a program that I personally run under cygwin.
 Don't I have to use mingw for the publicly distributed version, or else
 bundle the executable with cygwin source code? As I understand, simply
 providing a link to the cygwin web site does not satisfy the license.

Well, if you don't want them to have to install Cygwin, then that's a 
bigger issue than just licensing.  Think of Cygwin like an OS.  If you 
want to create something that can run under Windows, not Cygwin, then 
you have to build it for Windows, not Cygwin.  I don't know that it is 
even possible to simply bundle Cygwin with your application.  Cygwin 
isn't just some little collection of libraries or something.  It's a 
whole system that must be correctly installed on someone's computer.

Actually, you can easily bundle a program with the Cygwin DLL and have
it work fine.  You don't need to install the whole system.  That doesn't
mean it's a good idea, however, since your soon-to-be-out-of-date DLL
could cause confusion with an existing Cygwin application.

If you really want Mingw (a free compiler and development environment 
for Windows), maybe what you should do is just download and install 
Mingw, and use that, instead of doing it through the Cygwin compiler 
using a barely-supported option.  (Then you should get help with any 
problems you have over at Mingw's website instead of here.)

The MinGW cross-compiles are not barely supported.  They are included
in the distribution precisely so that people can build pure-windows
programs under Cygwin.

cgf

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



Re: Documentation on -mno-cygwin Accuracy

2012-02-07 Thread carolus

On 2/7/2012 11:58 PM, Christopher Faylor wrote:


Actually, you can easily bundle a program with the Cygwin DLL and have
it work fine.


I confess to doing that for a while, until I learned about -mno-cygwin, 
but is that not a license violation?  My understanding is that in order 
to conform to the license you must include the cygwin source code in the 
bundle.



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



Documentation on -mno-cygwin Accuracy

2012-02-06 Thread Quinn Wood
On the FAQ section 6.10 How do I compile a Win32 executable that
doesn't use Cygwin? reads:

(Please note: This section has not yet been updated for the latest
net release.)

The -mno-cygwin flag to gcc makes gcc link against standard Microsoft
DLLs instead of Cygwin. This is desirable for native Windows programs
that don't need a UNIX emulation layer.

This is not to be confused with 'MinGW' (Minimalist GNU for Windows),
which is a completely separate effort. That project's home page is
http://www.mingw.org/index.shtml. 

Is this indeed outdated information? The flag seems to work for some
very basic C applications, but I am having trouble with a few more
complex pieces of software.

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



Re: Documentation on -mno-cygwin Accuracy

2012-02-06 Thread Yaakov (Cygwin/X)
On Mon, 2012-02-06 at 16:27 -0600, Quinn Wood wrote:
 On the FAQ section 6.10 How do I compile a Win32 executable that
 doesn't use Cygwin? reads:
 
 (Please note: This section has not yet been updated for the latest
 net release.)
 
 The -mno-cygwin flag to gcc makes gcc link against standard Microsoft
 DLLs instead of Cygwin. This is desirable for native Windows programs
 that don't need a UNIX emulation layer.
 
 This is not to be confused with 'MinGW' (Minimalist GNU for Windows),
 which is a completely separate effort. That project's home page is
 http://www.mingw.org/index.shtml. 
 
 Is this indeed outdated information? The flag seems to work for some
 very basic C applications, but I am having trouble with a few more
 complex pieces of software.

The -mno-cygwin flag is still handled by gcc3, but that is deprecated
and may be removed at any time.  The officially supported way to build
such apps is to use the appropriate mingw or mingw64 cross-compiler.


Yaakov



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



Re: Documentation on -mno-cygwin Accuracy

2012-02-06 Thread Quinn Wood
On Mon, Feb 6, 2012 at 5:05 PM, Yaakov (Cygwin/X)
yselkow...@users.sourceforge.net wrote:
 The -mno-cygwin flag is still handled by gcc3, but that is deprecated
 and may be removed at any time.  The officially supported way to build
 such apps is to use the appropriate mingw or mingw64 cross-compiler.


 Yaakov
Thank you for the swift reply, and thanks for the information. This is
a tangential question, but are the MinGW files available for
integration with Cygwin suitable for this?

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



Re: Documentation on -mno-cygwin Accuracy

2012-02-06 Thread Quinn Wood
I apologize for the accidental use of your email address in the body
of that message.

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