public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* gcc installation problem and solution
@ 2004-12-28  7:40 Rainer Dunker
  2004-12-28 10:40 ` Gerrit P. Haase
  2004-12-28 19:13 ` Igor Pechtchanski
  0 siblings, 2 replies; 9+ messages in thread
From: Rainer Dunker @ 2004-12-28  7:40 UTC (permalink / raw)
  To: cygwin

Having installed gcc (package version 3.3.3-3, cygwin.dll 1.5.10-3, WinNT 4), I had the following problem:

# gcc helloworld.c -o helloworld
/usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/../../../../i686-pc-cygwin/bin/ld: installation problem, cannot exec `/usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/../../../../i686-pc-cygwin/bin/ld': Invalid argument
collect2: ld returned 255 exit status

Moreover, a popup window appeared after the gcc call, saying that NTVDM complains about an invalid instruction.

This turned out to be a problem of the gcc installation. The directory /usr/i686-pc-cygwin/bin contained these entries:

-rwxr-xr-x    1 myname     mkgroup_       26 Dec 27 15:11 ar.exe*
-rwxr-xr-x    1 myname     mkgroup_       26 Dec 27 15:11 as.exe*
-rwxr-xr-x    1 myname     mkgroup_       26 Dec 27 15:11 ld.exe*
-rwxr-xr-x    1 myname     mkgroup_       26 Dec 27 15:11 nm.exe*
-rwxr-xr-x    1 myname     mkgroup_       30 Dec 27 15:11 ranlib.exe*
-rwxr-xr-x    1 myname     mkgroup_       29 Dec 27 15:11 strip.exe*

These are supposed to be symbolic links to the executables in the /usr/bin directory, but - for whatever reason - the setup program did not install them in a way that they were used as symlinks afterwards (for example, ar.exe is a text file with contents "!<symlink>/usr/bin/ar.exe"). So I removed them and created symlinks to the proper executables manually; after that, the problem was gone.

I'm posting this here because I've not yet found any hint directly pointing from the mentioned error messages to this specific problem cause.

Best regards,

Rainer
__________________________________________________________
Mit WEB.DE FreePhone mit hoechster Qualitaet ab 0 Ct./Min.
weltweit telefonieren! http://freephone.web.de/?mc=021201


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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: gcc installation problem and solution
  2004-12-28  7:40 gcc installation problem and solution Rainer Dunker
@ 2004-12-28 10:40 ` Gerrit P. Haase
  2004-12-28 19:13 ` Igor Pechtchanski
  1 sibling, 0 replies; 9+ messages in thread
From: Gerrit P. Haase @ 2004-12-28 10:40 UTC (permalink / raw)
  To: Rainer Dunker; +Cc: cygwin

Rainer Dunker wrote:

> Having installed gcc (package version 3.3.3-3, cygwin.dll 1.5.10-3, WinNT 4), I had the following problem:
> 
> # gcc helloworld.c -o helloworld
> /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/../../../../i686-pc-cygwin/bin/ld: installation problem, cannot exec `/usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/../../../../i686-pc-cygwin/bin/ld': Invalid argument
> collect2: ld returned 255 exit status
> 
> Moreover, a popup window appeared after the gcc call, saying that NTVDM complains about an invalid instruction.
> 
> This turned out to be a problem of the gcc installation. The directory /usr/i686-pc-cygwin/bin contained these entries:
> 
> -rwxr-xr-x    1 myname     mkgroup_       26 Dec 27 15:11 ar.exe*
> -rwxr-xr-x    1 myname     mkgroup_       26 Dec 27 15:11 as.exe*
> -rwxr-xr-x    1 myname     mkgroup_       26 Dec 27 15:11 ld.exe*
> -rwxr-xr-x    1 myname     mkgroup_       26 Dec 27 15:11 nm.exe*
> -rwxr-xr-x    1 myname     mkgroup_       30 Dec 27 15:11 ranlib.exe*
> -rwxr-xr-x    1 myname     mkgroup_       29 Dec 27 15:11 strip.exe*
> 
> These are supposed to be symbolic links to the executables in the /usr/bin directory, but - for whatever reason - the setup program did not install them in a way that they were used as symlinks afterwards (for example, ar.exe is a text file with contents "!<symlink>/usr/bin/ar.exe"). So I removed them and created symlinks to the proper executables manually; after that, the problem was gone.
> 
> I'm posting this here because I've not yet found any hint directly pointing from the mentioned error messages to this specific problem cause.


This is the correct content of valid Cygwin Symlinks and for me
NT Explorer shows them as type "S" for symlink too.  The symlinks
should work fine from within any Cygwin based shell (bash, zsh, ...).

What is a known issue is that these symlinks don't work form a
Windows only CMD shell on W2K.


Gerrit
-- 
=^..^=

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: gcc installation problem and solution
  2004-12-28  7:40 gcc installation problem and solution Rainer Dunker
  2004-12-28 10:40 ` Gerrit P. Haase
@ 2004-12-28 19:13 ` Igor Pechtchanski
  1 sibling, 0 replies; 9+ messages in thread
From: Igor Pechtchanski @ 2004-12-28 19:13 UTC (permalink / raw)
  To: Rainer Dunker; +Cc: cygwin

On Tue, 28 Dec 2004, Rainer Dunker wrote:

> Having installed gcc (package version 3.3.3-3, cygwin.dll 1.5.10-3,
> WinNT 4), I had the following problem:
>
> # gcc helloworld.c -o helloworld
> /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/../../../../i686-pc-cygwin/bin/ld: installation problem, cannot exec `/usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/../../../../i686-pc-cygwin/bin/ld': Invalid argument
> collect2: ld returned 255 exit status
>
> Moreover, a popup window appeared after the gcc call, saying that NTVDM
> complains about an invalid instruction.
>
> This turned out to be a problem of the gcc installation. The directory
> /usr/i686-pc-cygwin/bin contained these entries:
>
> -rwxr-xr-x    1 myname     mkgroup_       26 Dec 27 15:11 ar.exe*
> -rwxr-xr-x    1 myname     mkgroup_       26 Dec 27 15:11 as.exe*
> -rwxr-xr-x    1 myname     mkgroup_       26 Dec 27 15:11 ld.exe*
> -rwxr-xr-x    1 myname     mkgroup_       26 Dec 27 15:11 nm.exe*
> -rwxr-xr-x    1 myname     mkgroup_       30 Dec 27 15:11 ranlib.exe*
> -rwxr-xr-x    1 myname     mkgroup_       29 Dec 27 15:11 strip.exe*
>
> These are supposed to be symbolic links to the executables in the
> /usr/bin directory, but - for whatever reason - the setup program did
> not install them in a way that they were used as symlinks afterwards
> (for example, ar.exe is a text file with contents
> "!<symlink>/usr/bin/ar.exe"). So I removed them and created symlinks to
> the proper executables manually; after that, the problem was gone.
>
> I'm posting this here because I've not yet found any hint directly
> pointing from the mentioned error messages to this specific problem
> cause.
>
> Best regards,
> Rainer

Please review and follow the Cygwin problem reporting guidelines at
<http://cygwin.com/problems.html>, particularly the bit about attaching
(as an uncompressed text *attachment*) the output of "cygcheck -svr" on
your system.  In the absense of these details, here's a guess:

Did you install Cygwin on a remote share?  If so, see
<http://cygwin.com/faq/faq_3.html#SEC66>.  BTW, it's the only entry about
"symlinks" in the FAQ.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse..." -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: gcc installation problem and solution
  2004-12-28 19:08     ` Gerrit P. Haase
@ 2004-12-28 19:11       ` Christopher Faylor
  0 siblings, 0 replies; 9+ messages in thread
From: Christopher Faylor @ 2004-12-28 19:11 UTC (permalink / raw)
  To: cygwin

On Tue, Dec 28, 2004 at 08:08:45PM +0100, Gerrit P. Haase wrote:
>Christopher Faylor wrote:
>>On Tue, Dec 28, 2004 at 06:56:32PM +0100, Gerrit P.  Haase wrote:
>>>There are two kinds of symlinks, Windows style (with .lnk ending) and
>>>pure Cygwin symlinks, binutils obviously contains Cygwin stlye
>>>symlinks.
>>
>>setup.exe only creates pure cygwin symlinks.  I suspect that the
>
>So symlinks included in the tarball are not simply restored in the same
>style they were generated / tarred?  Interesting.

tar is a unix utility.  Symlinks in tar files are stored as...
symlinks.  The creation of symlinks is handled by whatever is
interpreting the tar file.

cgf

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: gcc installation problem and solution
  2004-12-28 18:09   ` Christopher Faylor
@ 2004-12-28 19:08     ` Gerrit P. Haase
  2004-12-28 19:11       ` Christopher Faylor
  0 siblings, 1 reply; 9+ messages in thread
From: Gerrit P. Haase @ 2004-12-28 19:08 UTC (permalink / raw)
  To: cygwin

Christopher Faylor wrote:

> On Tue, Dec 28, 2004 at 06:56:32PM +0100, Gerrit P. Haase wrote:
> 
>>There are two kinds of symlinks, Windows style (with .lnk ending)
>>and pure Cygwin symlinks, binutils obviously contains Cygwin stlye
>>symlinks.
> 
> 
> setup.exe only creates pure cygwin symlinks.  I suspect that the

So symlinks included in the tarball are not simply restored in the
same style they were generated / tarred?  Interesting.


Gerrit
-- 
=^..^=

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: gcc installation problem and solution
  2004-12-28 17:56 ` Gerrit P. Haase
@ 2004-12-28 18:09   ` Christopher Faylor
  2004-12-28 19:08     ` Gerrit P. Haase
  0 siblings, 1 reply; 9+ messages in thread
From: Christopher Faylor @ 2004-12-28 18:09 UTC (permalink / raw)
  To: cygwin

On Tue, Dec 28, 2004 at 06:56:32PM +0100, Gerrit P. Haase wrote:
>There are two kinds of symlinks, Windows style (with .lnk ending)
>and pure Cygwin symlinks, binutils obviously contains Cygwin stlye
>symlinks.

setup.exe only creates pure cygwin symlinks.  I suspect that the
original report of "These are supposed to be symbolic links to the
executables in the /usr/bin directory, but - for whatever reason - the
setup program +did not install them in a way that they were used as
symlinks afterwards" translates to:

http://www.cygwin.com/faq/faq_3.html#SEC66

Which would have been made clear if the guidelines specified in
http://cygwin.com/problems.html had been followed.

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/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: gcc installation problem and solution
  2004-12-28 11:23 Rainer Dunker
  2004-12-28 13:07 ` Christopher Faylor
@ 2004-12-28 17:56 ` Gerrit P. Haase
  2004-12-28 18:09   ` Christopher Faylor
  1 sibling, 1 reply; 9+ messages in thread
From: Gerrit P. Haase @ 2004-12-28 17:56 UTC (permalink / raw)
  To: Rainer Dunker; +Cc: cygwin

Rainer Dunker wrote:

> "Gerrit P. Haase" <gp@familiehaase.de> schrieb am 28.12.04 11:40:39:
> 
>>>These are supposed to be symbolic links to the executables in the 
 >>>/usr/bin directory, but - for whatever reason - the setup program
 >>>did not install them in a way that they were used as symlinks
 >>>afterwards (for example, ar.exe is a text file with contents
>>>"!<symlink>/usr/bin/ar.exe"). So I removed them and created 
 >>>symlinks to the proper executables manually; after that, the
 >>>problem was gone.

>>This is the correct content of valid Cygwin Symlinks and for me
>>NT Explorer shows them as type "S" for symlink too.  The symlinks
>>should work fine from within any Cygwin based shell (bash, zsh, ...).
> 
> 
> I remember having seen that on W2K and maybe XP, but on my 
 > current NT4 box it's apparently different.
> This is how a properly working symlink, created with ln -s, 
 > looks like:

IIRC, calling from cmd works with all kinds of symlinks on NT4,
I only got problems one time when building a windows version of
openssl on a W2K workstation.

> As seen by 'ls -l':
> lrwxrwxrwx    1 myname     mkgroup_       15 Dec 27 16:00 ar.exe -> /usr/bin/ar.exe

ls should show the same regardless which kind of symlink is used.


> As seen by 'cmd /c dir':
> 27.12.04  16:00                    116 ar.exe.lnk
> 
> This is the hexlified contents of ar.exe.lnk:
> 00000000: 4c00 0000 0114 0200 0000 0000 c000 0000  L...............
> 00000010: 0000 0046 0c00 0000 0000 0000 0000 0000  ...F............
> 00000020: 0000 0000 0000 0000 0000 0000 0000 0000  ................
> 00000030: 0000 0000 0000 0000 0000 0000 0100 0000  ................
> 00000040: 0000 0000 0000 0000 0000 0000 0f00 2f75  ............../u
> 00000050: 7372 2f62 696e 2f61 722e 6578 6515 0048  sr/bin/ar.exe..H
> 00000060: 3a5c 7075 625c 6379 675c 6269 6e5c 6172  :\pub\cyg\bin\ar
> 00000070: 2e65 7865                                .exe
> 
> The Windows Explorer properly handles this as 'ar.exe',
> a shortcut to H:\pub\cyg\bin\ar.exe.
> 
> I can't help it, but that's what I see. I have no idea whether this difference
> in storing symlinks is a property of different Windows or Cygwin versions -
> or whatever.

There are two kinds of symlinks, Windows style (with .lnk ending)
and pure Cygwin symlinks, binutils obviously contains Cygwin stlye
symlinks.


Gerrit
-- 
=^..^=

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: gcc installation problem and solution
  2004-12-28 11:23 Rainer Dunker
@ 2004-12-28 13:07 ` Christopher Faylor
  2004-12-28 17:56 ` Gerrit P. Haase
  1 sibling, 0 replies; 9+ messages in thread
From: Christopher Faylor @ 2004-12-28 13:07 UTC (permalink / raw)
  To: cygwin

On Tue, Dec 28, 2004 at 12:22:42PM +0100, Rainer Dunker wrote:
>"Gerrit P. Haase" <gp@familiehaase.de> schrieb am 28.12.04 11:40:39:
>> > These are supposed to be symbolic links to the executables in the /usr/bin directory, but - for whatever reason - the setup program did not install them in a way that they were used as symlinks afterwards (for example, ar.exe is a text file with contents "!<symlink>/usr/bin/ar.exe"). So I removed them and created symlinks to the proper executables manually; after that, the problem was gone.
>> 
>> This is the correct content of valid Cygwin Symlinks and for me
>> NT Explorer shows them as type "S" for symlink too.  The symlinks
>> should work fine from within any Cygwin based shell (bash, zsh, ...).
>
>I remember having seen that on W2K and maybe XP, but on my current NT4 box it's apparently different.
>This is how a properly working symlink, created with ln -s, looks like:
>
>As seen by 'ls -l':
>lrwxrwxrwx    1 myname     mkgroup_       15 Dec 27 16:00 ar.exe -> /usr/bin/ar.exe
>
>As seen by 'cmd /c dir':
>27.12.04  16:00                    116 ar.exe.lnk
>
>This is the hexlified contents of ar.exe.lnk:
>00000000: 4c00 0000 0114 0200 0000 0000 c000 0000  L...............
>00000010: 0000 0046 0c00 0000 0000 0000 0000 0000  ...F............
>00000020: 0000 0000 0000 0000 0000 0000 0000 0000  ................
>00000030: 0000 0000 0000 0000 0000 0000 0100 0000  ................
>00000040: 0000 0000 0000 0000 0000 0000 0f00 2f75  ............../u
>00000050: 7372 2f62 696e 2f61 722e 6578 6515 0048  sr/bin/ar.exe..H
>00000060: 3a5c 7075 625c 6379 675c 6269 6e5c 6172  :\pub\cyg\bin\ar
>00000070: 2e65 7865                                .exe
>
>The Windows Explorer properly handles this as 'ar.exe',
>a shortcut to H:\pub\cyg\bin\ar.exe.
>
>I can't help it, but that's what I see. I have no idea whether this difference
>in storing symlinks is a property of different Windows or Cygwin versions -
>or whatever.

http://cygwin.com/problems.html

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: gcc installation problem and solution
@ 2004-12-28 11:23 Rainer Dunker
  2004-12-28 13:07 ` Christopher Faylor
  2004-12-28 17:56 ` Gerrit P. Haase
  0 siblings, 2 replies; 9+ messages in thread
From: Rainer Dunker @ 2004-12-28 11:23 UTC (permalink / raw)
  To: Gerrit P. Haase; +Cc: cygwin

"Gerrit P. Haase" <gp@familiehaase.de> schrieb am 28.12.04 11:40:39:
> > These are supposed to be symbolic links to the executables in the /usr/bin directory, but - for whatever reason - the setup program did not install them in a way that they were used as symlinks afterwards (for example, ar.exe is a text file with contents "!<symlink>/usr/bin/ar.exe"). So I removed them and created symlinks to the proper executables manually; after that, the problem was gone.
> 
> This is the correct content of valid Cygwin Symlinks and for me
> NT Explorer shows them as type "S" for symlink too.  The symlinks
> should work fine from within any Cygwin based shell (bash, zsh, ...).

I remember having seen that on W2K and maybe XP, but on my current NT4 box it's apparently different.
This is how a properly working symlink, created with ln -s, looks like:

As seen by 'ls -l':
lrwxrwxrwx    1 myname     mkgroup_       15 Dec 27 16:00 ar.exe -> /usr/bin/ar.exe

As seen by 'cmd /c dir':
27.12.04  16:00                    116 ar.exe.lnk

This is the hexlified contents of ar.exe.lnk:
00000000: 4c00 0000 0114 0200 0000 0000 c000 0000  L...............
00000010: 0000 0046 0c00 0000 0000 0000 0000 0000  ...F............
00000020: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000030: 0000 0000 0000 0000 0000 0000 0100 0000  ................
00000040: 0000 0000 0000 0000 0000 0000 0f00 2f75  ............../u
00000050: 7372 2f62 696e 2f61 722e 6578 6515 0048  sr/bin/ar.exe..H
00000060: 3a5c 7075 625c 6379 675c 6269 6e5c 6172  :\pub\cyg\bin\ar
00000070: 2e65 7865                                .exe

The Windows Explorer properly handles this as 'ar.exe',
a shortcut to H:\pub\cyg\bin\ar.exe.

I can't help it, but that's what I see. I have no idea whether this difference
in storing symlinks is a property of different Windows or Cygwin versions -
or whatever.


Best regards,

Rainer

________________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt neu bei WEB.DE FreeMail: http://freemail.web.de/?mc=021193


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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2004-12-28 19:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-28  7:40 gcc installation problem and solution Rainer Dunker
2004-12-28 10:40 ` Gerrit P. Haase
2004-12-28 19:13 ` Igor Pechtchanski
2004-12-28 11:23 Rainer Dunker
2004-12-28 13:07 ` Christopher Faylor
2004-12-28 17:56 ` Gerrit P. Haase
2004-12-28 18:09   ` Christopher Faylor
2004-12-28 19:08     ` Gerrit P. Haase
2004-12-28 19:11       ` Christopher Faylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).