This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: g++ fails in cc1plus due to path


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]