Bug 43619 - Bootstrap failure: "/lib/cpp" fails sanity check
Summary: Bootstrap failure: "/lib/cpp" fails sanity check
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 4.5.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-01 15:08 UTC by James McKelvey
Modified: 2010-04-05 14:36 UTC (History)
1 user (show)

See Also:
Host: i686-pc-cygwin
Target: i686-pc-cygwin
Build: i686-pc-cygwin
Known to work:
Known to fail:
Last reconfirmed:


Attachments
Output from ./configure (1.12 KB, text/plain)
2010-04-01 15:09 UTC, James McKelvey
Details
Log from ./configure (7.01 KB, text/plain)
2010-04-01 15:10 UTC, James McKelvey
Details
Log from bootstrap (7.19 KB, text/plain)
2010-04-01 15:10 UTC, James McKelvey
Details
libgcc config.log (2.87 KB, text/plain)
2010-04-01 21:22 UTC, James McKelvey
Details

Note You need to log in before you can comment on or make changes to this bug.
Description James McKelvey 2010-04-01 15:08:35 UTC
There is no /lib/cpp. There doesn't seem to be any need to run any C++ in stage 1 anyway.

checking whether -lc should be explicitly linked in... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... /lib/cpp
configure: error: in `/cygdrive/c/jimdata/home/cvsroot/gcc-obj/gcc':
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
make[1]: *** [configure-gcc] Error 1
make[1]: Leaving directory `/cygdrive/c/jimdata/home/cvsroot/gcc-obj'
make: *** [all] Error 2


uname -a
CYGWIN_NT-5.1 mckelvey-xp 1.7.1(0.218/5/3) 2009-12-07 11:48 i686 Cygwin

BUILDING:
alias CONFIGURECVS='/cygdrive/c/jimdata/home/cvsroot/gcc/configure     --verbose --enable-threads --disable-nls --enable-checking=release     --disable-win32-registry --disable-sjlj-exceptions --disable-bootstrap     --enable-languages=c,c++ 2>&1 | tee clog'

alias BUILD='nice make CFLAGS='\'''\'' BOOT_CFLAGS='\'''\'' LIBCFLAGS='\''-g -O'\''     CXXFLAGS='\''-O'\'' LIBCXXFLAGS='\''-g -O'\'' 2>&1 | tee log'


I'll attach the full log and the log from configure.
Comment 1 James McKelvey 2010-04-01 15:09:44 UTC
Created attachment 20275 [details]
Output from ./configure
Comment 2 James McKelvey 2010-04-01 15:10:15 UTC
Created attachment 20276 [details]
Log from ./configure
Comment 3 James McKelvey 2010-04-01 15:10:48 UTC
Created attachment 20277 [details]
Log from bootstrap
Comment 4 Andrew Pinski 2010-04-01 15:25:52 UTC
>--disable-bootstrap    

What happens if you remove that part? Disabling bootstrap for native builds are not really supported.
Comment 5 Andreas Schwab 2010-04-01 15:59:35 UTC
You have a bad c++ in your path:

configure:4892: checking whether we are using the GNU C++ compiler
configure:4911: c++ -c   conftest.cpp >&5
/usr/local/libexec/gcc/i686-pc-cygwin/4.5.0/cc1plus.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory
configure:4911: $? = 1
Comment 6 Andreas Schwab 2010-04-01 16:05:53 UTC
AC_PROG_CXX was added with the --enable-build-with-cxx support.
Comment 7 James McKelvey 2010-04-01 19:02:26 UTC
(In reply to comment #4)
> >--disable-bootstrap    
> 
> What happens if you remove that part? Disabling bootstrap for native builds are
> not really supported.
> 

No difference.
Comment 8 James McKelvey 2010-04-01 21:20:39 UTC
(In reply to comment #5)
> You have a bad c++ in your path:
> 
> configure:4892: checking whether we are using the GNU C++ compiler
> configure:4911: c++ -c   conftest.cpp >&5
> /usr/local/libexec/gcc/i686-pc-cygwin/4.5.0/cc1plus.exe: error while loading
> shared libraries: ?: cannot open shared object file: No such file or directory
> configure:4911: $? = 1
> 

I defined CXX to point to /usr/bin/c++. The build has now gone past the previous error point.

I don't remember c++ being needed to bootstrap in the past. Anyway, it now fails in libgcc with a different shared library problem. I will attach log.

cygcheck shows a reference to a sjlj dll, although --disable-sjlj-exceptions is specified:

$ cygcheck ./gcc/cc1.exe
C:\jimdata\home\cvsroot\gcc-obj\gcc\cc1.exe
  C:\cygwin\bin\cygcloog-0.dll
    C:\cygwin\bin\cyggcc_s-1.dll
      C:\cygwin\bin\cygwin1.dll
        C:\WINDOWS\system32\ADVAPI32.DLL
          C:\WINDOWS\system32\KERNEL32.dll
            C:\WINDOWS\system32\ntdll.dll
          C:\WINDOWS\system32\RPCRT4.dll
            C:\WINDOWS\system32\Secur32.dll
    C:\cygwin\bin\cyggmp-3.dll
    C:\cygwin\bin\cygppl_c-2.dll
      C:\cygwin\bin\cygppl-7.dll
        C:\cygwin\usr\local\bin\cygstdc++-6.dll
        C:\cygwin\bin\cyggmpxx-4.dll
  C:\cygwin\bin\cygiconv-2.dll
  C:\cygwin\bin\cygmpc-1.dll
    C:\cygwin\bin\cygmpfr-1.dll
cygcheck: track_down: could not find cyggcc_s-sjlj-1.dll

Comment 9 James McKelvey 2010-04-01 21:22:16 UTC
Created attachment 20280 [details]
libgcc config.log
Comment 10 Dave Korn 2010-04-02 01:03:52 UTC
(In reply to comment #8)

> cygcheck shows a reference to a sjlj dll, 

  Woah, deja vu!  

> although --disable-sjlj-exceptions is specified:

  So, you must still have the related .dll.a file in /usr/local/lib, so it linked against that DLL even though it isn't present.  Get rid of your entire old /usr/local prefix, or make sure it's not visible when you build.

Comment 11 James McKelvey 2010-04-02 22:31:06 UTC
(In reply to comment #10)
> (In reply to comment #8)
> 
> > cygcheck shows a reference to a sjlj dll, 
> 
>   Woah, deja vu!  
> 
> > although --disable-sjlj-exceptions is specified:
> 
>   So, you must still have the related .dll.a file in /usr/local/lib, so it
> linked against that DLL even though it isn't present.  Get rid of your entire
> old /usr/local prefix, or make sure it's not visible when you build.
> 

I did that and it's now at stage3, so I believe it's going to be OK. I can't
wait around for it to finish. I'll see if it works Monday morning.
Thanks for all of your help.
Comment 12 James McKelvey 2010-04-05 14:36:28 UTC
(In reply to comment #11)
> (In reply to comment #10)
> > (In reply to comment #8)
> > 
> > > cygcheck shows a reference to a sjlj dll, 
> > 
> >   Woah, deja vu!  
> > 
> > > although --disable-sjlj-exceptions is specified:
> > 
> >   So, you must still have the related .dll.a file in /usr/local/lib, so it
> > linked against that DLL even though it isn't present.  Get rid of your entire
> > old /usr/local prefix, or make sure it's not visible when you build.
> > 
> 
> I did that and it's now at stage3, so I believe it's going to be OK. I can't
> wait around for it to finish. I'll see if it works Monday morning.
> Thanks for all of your help.
> 

Looks OK this morning. I think we can close this one.