public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* g++ fails in cc1plus due to path
@ 2014-05-20 18:18 Cook, Henry
  2014-05-20 19:18 ` Chris J. Breisch
  0 siblings, 1 reply; 6+ messages in thread
From: Cook, Henry @ 2014-05-20 18:18 UTC (permalink / raw)
  To: cygwin

I'm running 32 bit Cygwin on a 64 bit machine to build 32 bit binaries.  Trying to build a simple program fails due to a pathing issue related to g++/cc1plus.  I've tried several Cygwin re-installs, so that is not the issue.  Calling "g++ foo.cpp" just hangs and never terminates.  The program is a simple: int main(){return 0;}.  

I get the following from strace.  This shows that the initialization path is \??\C:\Windows instead of \??\C:\cygwin.  I don't know where this is coming from.

    0       0 [main] cc1plus (9284) **********************************************
  192     192 [main] cc1plus (9284) Program name: C:\cygwin\lib\gcc\i686-pc-cygwin\4.8.2\cc1plus.exe (windows pid 9284)
   45     237 [main] cc1plus (9284) OS version:   Windows NT-6.1
   53     290 [main] cc1plus (9284) **********************************************
1209    1499 [main] cc1plus (9284) sigprocmask: 0 = sigprocmask (0, 0x6123D468, 0x610FBA10)
  518    2017 [main] cc1plus 9284 open_shared: name shared.5, n 5, shared 0x60FF0000 (wanted 0x60FF0000), h 0x8C, *m 0
   81    2098 [main] cc1plus 9284 shared_info::initialize: Installation root: <\??\C:\Windows> key: <090b3d8675b3a96d>

At the end of the output, I see this, which is a problem because it's a blocking read to a path that doesn't exist.

   56  157867 [main] cc1plus 9284 path_conv::check: this->path(C:\Windows\usr\include), has_acls(1)
   37  157904 [main] cc1plus 9284 __set_errno: int stat_worker(path_conv&, __stat64*):1858 setting errno 2
   37  157941 [main] cc1plus 9284 stat_worker: -1 = (\??\C:\Windows\usr\include,0x1C8AAC0)
1780  159721 [main] cc1plus 9284 time: 1400604366 = time(0)
   38  159759 [main] cc1plus 9284 fstat64: 0 = fstat(0, 0x80056750)
   58  159817 [main] cc1plus 9284 read: read(0, 0x8006C528, 8192) blocking

Thanks so much for your help!
Henry

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

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

* Re: g++ fails in cc1plus due to path
  2014-05-20 18:18 g++ fails in cc1plus due to path Cook, Henry
@ 2014-05-20 19:18 ` Chris J. Breisch
  0 siblings, 0 replies; 6+ messages in thread
From: Chris J. Breisch @ 2014-05-20 19:18 UTC (permalink / raw)
  To: cygwin

Cook, Henry wrote:
> I'm running 32 bit Cygwin on a 64 bit machine to build 32 bit binaries.
 > Trying to build a simple program fails due to a pathing issue related
 > to g++/cc1plus.  I've tried several Cygwin re-installs, so that is not
 > the issue.  Calling "g++ foo.cpp" just hangs and never terminates.
 > The program is a simple: int main(){return 0;}.

1) I'm going to beat everyone else to the punch and suggest you go here:
https://cygwin.com/problems.html

In particular, a cygcheck output looks like it might be useful.

2) Can you please convince your mail program to put in a line break 
occasionally?

3) I think I disagree with you that your install is not the issue, since 
your test program compiles and runs perfectly for me.

I did change the return value to 5 for testing purposes.

$ cat > foo.cpp << EOF
 > int main() { return 5; }
 > EOF
$ g++ foo.cpp
$ ./a.exe
$ echo $?
5


>
> I get the following from strace.  This shows that the initialization path
 > is \??\C:\Windows instead of \??\C:\cygwin.  I don't know where this 
is coming from.
>
>      0       0 [main] cc1plus (9284) **********************************************
>    192     192 [main] cc1plus (9284) Program name: C:\cygwin\lib\gcc\i686-pc-cygwin\4.8.2\cc1plus.exe (windows pid 9284)
>     45     237 [main] cc1plus (9284) OS version:   Windows NT-6.1
>     53     290 [main] cc1plus (9284) **********************************************


I don't see any initialization path stuff in my strace. I suspect you 
have an old cygwin1.dll somewhere, and running cygcheck as described on 
the "Reporting Problems" page linked above will likely point that out.

Are you running cc1plus directly?

-- 
Chris J. Breisch

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

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

* Re: g++ fails in cc1plus due to path
  2014-05-21  1:43 ` Chris J. Breisch
@ 2014-05-21  7:13   ` Larry Hall (Cygwin)
  0 siblings, 0 replies; 6+ messages in thread
From: Larry Hall (Cygwin) @ 2014-05-21  7:13 UTC (permalink / raw)
  To: cygwin

On 05/20/2014 08:33 PM, Chris J. Breisch wrote:
> Hi Henry.
>
> Cook, Henry wrote:
>> Thanks Chris.  It was indeed the cygwin1.dll.  I have an old version of
>  > cygwin installed (2.774) along with this one 2.850 (32 bit).  All of
>  > the mirrors are down from that version, so I installed a new one.
>  > Reading the forum, I thought it was OK to have multiple versions
>  > of cygwin installed, but I suppose the cygwin1.dll file is an
>  > exception to that.
>
> I don't know where you came up with those version numbers. I've never seen
> any versions like those. I am pretty sure that the current version of Cygwin
> is 1.7.29-2.

Those would be setup*.exe version numbers rather than package version
numbers.  Unfortunately, they aren't helpful for understanding anything
other than the version of setup*.exe that was used to install the
various packages.


-- 
Larry

_____________________________________________________________________

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

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

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

* Re: g++ fails in cc1plus due to path
  2014-05-20 23:40 Cook, Henry
  2014-05-21  1:43 ` Chris J. Breisch
@ 2014-05-21  2:26 ` Larry Hall (Cygwin)
  1 sibling, 0 replies; 6+ messages in thread
From: Larry Hall (Cygwin) @ 2014-05-21  2:26 UTC (permalink / raw)
  To: cygwin

On 05/20/2014 05:52 PM, Cook, Henry wrote:
> Thanks Chris.  It was indeed the cygwin1.dll.  I have an old version of
> cygwin installed (2.774) along with this one 2.850 (32 bit).  All of the
> mirrors are down from that version, so I installed a new one.  Reading
> the forum, I thought it was OK to have multiple versions of cygwin
> installed, but I suppose the cygwin1.dll file is an exception to that.

If you have more than 1 version of Cygwin installed, you need to be careful
not to have multiple versions in your path.  With one in the Windows
directory, that's really not possible if you're trying to use the new
DLL.  This is why we recommend against putting the Cygwin DLL in any
of the default Windows directories.  If you do so, your configuration is
definitely an exception.


-- 
Larry

_____________________________________________________________________

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

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

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

* Re: g++ fails in cc1plus due to path
  2014-05-20 23:40 Cook, Henry
@ 2014-05-21  1:43 ` Chris J. Breisch
  2014-05-21  7:13   ` Larry Hall (Cygwin)
  2014-05-21  2:26 ` Larry Hall (Cygwin)
  1 sibling, 1 reply; 6+ messages in thread
From: Chris J. Breisch @ 2014-05-21  1:43 UTC (permalink / raw)
  To: cygwin

Hi Henry.

Cook, Henry wrote:
> Thanks Chris.  It was indeed the cygwin1.dll.  I have an old version of
 > cygwin installed (2.774) along with this one 2.850 (32 bit).  All of
 > the mirrors are down from that version, so I installed a new one.
 > Reading the forum, I thought it was OK to have multiple versions
 > of cygwin installed, but I suppose the cygwin1.dll file is an
 > exception to that.

I don't know where you came up with those version numbers. I've never 
seen any versions like those. I am pretty sure that the current version 
of Cygwin is 1.7.29-2.

But if you got it working, then I'm happy.


-- 
Chris J. Breisch

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

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

* RE: g++ fails in cc1plus due to path
@ 2014-05-20 23:40 Cook, Henry
  2014-05-21  1:43 ` Chris J. Breisch
  2014-05-21  2:26 ` Larry Hall (Cygwin)
  0 siblings, 2 replies; 6+ messages in thread
From: Cook, Henry @ 2014-05-20 23:40 UTC (permalink / raw)
  To: cygwin

Thanks Chris.  It was indeed the cygwin1.dll.  I have an old version of cygwin installed (2.774) along with this one 2.850 (32 bit).  All of the mirrors are down from that version, so I installed a new one.  Reading the forum, I thought it was OK to have multiple versions of cygwin installed, but I suppose the cygwin1.dll file is an exception to that.



	

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

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

end of thread, other threads:[~2014-05-21  2:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-20 18:18 g++ fails in cc1plus due to path Cook, Henry
2014-05-20 19:18 ` Chris J. Breisch
2014-05-20 23:40 Cook, Henry
2014-05-21  1:43 ` Chris J. Breisch
2014-05-21  7:13   ` Larry Hall (Cygwin)
2014-05-21  2:26 ` Larry Hall (Cygwin)

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).