[Bug c/51129] New: 4.7 trunk libgcc cannot compute suffix of object files - cannot find find libcloog, though in path

2011-11-14 Thread ohsumit at molbio dot mgh.harvard.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51129

 Bug #: 51129
   Summary: 4.7 trunk libgcc cannot compute suffix of object files
- cannot find find libcloog, though in path
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: blocker
  Priority: P3
 Component: c
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: ohsu...@molbio.mgh.harvard.edu


I am trying to compile the trunk version of gcc (checked out around 2:30 PM
Eastern Nov. 14, 2011) under SuSE linux using gcc 4.1.2 20070115 (default
installed).  I have cloog-ppl-0.15.11, gmp-5.0.2, mpc-0.9, and mpfr-3.1.0 all
installed in /usr/local/{include,lib} and have m4-1.4.16 in /usr/bin.  All of
the libraries passed their checks before I installed them.  I have

declare -x LDFLAGS="-L/usr/local/lib -L/usr/local/lib64 -L/usr/lib -L/usr/lib64
-L/lib -L/lib64
-R/usr/local/lib:/usr/local/lib64:/usr/lib:/usr/lib64:/lib:/lib64"
declare -x
LD_LIBRARY_PATH="/usr/lib:/usr/lib64:/lib:/lib64:/usr/local/lib:/usr/local/lib64

Now in the below, directories /tools and /store1/tools are identical.  I then
did

sudo /tools/gcc-4.7.0_src/configure --enable-langugages=c,c++,fortran
--prefix=/tools/gcc-4.7.0 --with-gmp-include=/usr/local/include
--with-gmp-lib=/usr/local/lib --with-mpc-include=/usr/local/include
--with-mpc-lib=/usr/local/lib --with-mpfr-include=/usr/local/include
--with-mpfr-lib=/usr/local/lib --with-ppl-include=/usr/local/include
--with-ppl-lib=/usr/local/lib --with-cloog-include=/usr/local/include
--with-cloog-lib=/usr/local/lib

in directory /tools/gcc-4.7.0_build followed by "sudo make -j6".  (I also tried
it without the -j6.  Same problem.)  It compiles xgcc in subdirectory gcc
successfully.  However, then the build crashes on

mkdir -p -- x86_64-unknown-linux-gnu/libgcc
Checking multilib configuration for libgcc...
Configuring stage 1 in x86_64-unknown-linux-gnu/libgcc
configure: creating cache ./config.cache
...  ...
checking whether ln -s works... yes
checking for x86_64-unknown-linux-gnu-gcc...
/store1/tools/gcc-4.7.0_build/./gcc/xgcc -B/store1/tools/gcc-4.7.0_build/./gcc/
-B/tools/gcc-4.7.0/x86_64-unknown-linux-gnu/bin/
-B/tools/gcc-4.7.0/x86_64-unknown-linux-gnu/lib/ -isystem
/tools/gcc-4.7.0/x86_64-unknown-linux-gnu/include -isystem
/tools/gcc-4.7.0/x86_64-unknown-linux-gnu/sys-include   
checking for suffix of object files... configure: error: in
`/store1/tools/gcc-4.7.0_build/x86_64-unknown-linux-gnu/libgcc':
configure: error: cannot compute suffix of object files: cannot compile

where the config.log in libgcc says

configure:3650: /store1/tools/gcc-4.7.0_build/./gcc/xgcc
-B/store1/tools/gcc-4.7.0_build/./gcc/
-B/tools/gcc-4.7.0/x86_64-unknown-linux-gnu/bin/
-B/tools/gcc-4.7.0/x86_64-unknown-linux-gnu/lib/ -isystem
/tools/gcc-4.7.0/x86_64-unknown-linux-gnu/include -isystem
/tools/gcc-4.7.0/x86_64-unknown-linux-gnu/sys-include-c -g -O2  conftest.c
>&5
/store1/tools/gcc-4.7.0_build/./gcc/cc1: error while loading shared libraries:
libcloog.so.0: cannot open shared object file: No such file or directory
configure:3654: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GNU C Runtime Library"
| #define PACKAGE_TARNAME "libgcc"
| #define PACKAGE_VERSION "1.0"
| #define PACKAGE_STRING "GNU C Runtime Library 1.0"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL "http://www.gnu.org/software/libgcc/";
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }

What is puzzling is that 

> ls -l /usr/local/lib/libcloog.so.*
lrwxrwxrwx 1 root root 17 2011-11-14 13:58 /usr/local/lib/libcloog.so.0 ->
libcloog.so.0.0.0
-rwxr-xr-x 1 root root 428100 2011-11-14 13:57 /usr/local/lib/libcloog.so.0.0.0

the library is there and the path is in both LD_LIBRARY_PATH as well as
LDFLAGS.  Furthermore, I specified the path to cloog in the configure options. 
(I even tried doing a soft-link to /usr/lib, but with no success.)  Any
thoughts on why this is occurring?  

I would be grateful for any information regarding how to resolve this.


[Bug c/51129] 4.7 trunk libgcc cannot compute suffix of object files - cannot find find libcloog, though in path

2011-11-14 Thread ohsumit at molbio dot mgh.harvard.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51129

--- Comment #2 from Toshiro K. Ohsumi  
2011-11-14 21:20:13 UTC ---
(In reply to comment #1)
> did you export LD_LIBRARY_PATH?

Oh yes, I tried that too.  :-)  Thank you for the clarifying question.  In
fact, /usr/local/lib is in /etc/ld.so.conf too.


[Bug c/51129] 4.7 trunk libgcc cannot compute suffix of object files - cannot find find libcloog, though in path

2011-11-14 Thread ohsumit at molbio dot mgh.harvard.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51129

Toshiro K. Ohsumi  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution||FIXED

--- Comment #4 from Toshiro K. Ohsumi  
2011-11-14 22:21:29 UTC ---
Hello.  Thanks to Jonathan Wakely's last comment, I tracked down the problem. 
Even though the libraries are indeed 64-bit, for some reason, they were not
added to ld.so.cache when they were installed [as root].  This has been
rectified manually by calling ldconfig -v.  Thanks again!


[Bug middle-end/50823] [4.7 Regression] ICE in inline_small_functions, at ipa-inline.c:1407

2011-11-15 Thread ohsumit at molbio dot mgh.harvard.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50823

--- Comment #11 from Toshiro K. Ohsumi  
2011-11-15 15:13:04 UTC ---
When compiling an empty program, but with a large include with many templates,
I note that there is a failure at line 1421 on ipa-inline.c.  However, it seems
only to occur when -O2 or -O3 is set.  (Are these the only times inline
optimizations are performed?)  Unfortunately, I do not have a small test case. 
The includes come out to be about 2M in size.  

ohsumit@mothra:~> g++ --version
g++ (GCC) 4.7.0 2015 (experimental)
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.

ohsumit@mothra:~> g++ -Wall -DDEBUG -ggdb -O3 t1.cpp -o t1
t1.cpp:7:1: internal compiler error: in inline_small_functions, at
ipa-inline.c:1421
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
ohsumit@mothra:~> g++ -Wall -DDEBUG -ggdb -O2 t1.cpp -o t1
t1.cpp:7:1: internal compiler error: in inline_small_functions, at
ipa-inline.c:1421
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
ohsumit@mothra:~> g++ -Wall -DDEBUG -ggdb -O t1.cpp -o t1