public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug testsuite/49375] New: Target libstdc++.so used by host cc1plus
@ 2011-06-11 17:39 hjl.tools at gmail dot com
  2011-06-12 11:41 ` [Bug testsuite/49375] " rguenth at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: hjl.tools at gmail dot com @ 2011-06-11 17:39 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49375

           Summary: Target libstdc++.so used by host cc1plus
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: testsuite
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: hjl.tools@gmail.com


When ppl is used, cc1plus may be linked against libppl.so,
which depends on host libstdc++.so.  When LD_LIBRARY_PATH
is set to target libstdc++.so to run C++ tests, target
libstdc++.so, which was just built and may be incompatible
with host libstdc++.so.  In my case, host libstdc++.so is
from GCC 4.6 and target libstdc++.so is from GCC 4.5. As
the result, all C++ tests failed.


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

* [Bug testsuite/49375] Target libstdc++.so used by host cc1plus
  2011-06-11 17:39 [Bug testsuite/49375] New: Target libstdc++.so used by host cc1plus hjl.tools at gmail dot com
@ 2011-06-12 11:41 ` rguenth at gcc dot gnu.org
  2011-06-12 14:30 ` hjl.tools at gmail dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-06-12 11:41 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49375

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-06-12 11:40:57 UTC ---
LD_LIBRARY_PATH should be only set for executing testcases, not for
compiling them.


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

* [Bug testsuite/49375] Target libstdc++.so used by host cc1plus
  2011-06-11 17:39 [Bug testsuite/49375] New: Target libstdc++.so used by host cc1plus hjl.tools at gmail dot com
  2011-06-12 11:41 ` [Bug testsuite/49375] " rguenth at gcc dot gnu.org
@ 2011-06-12 14:30 ` hjl.tools at gmail dot com
  2011-06-12 14:43 ` hjl.tools at gmail dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: hjl.tools at gmail dot com @ 2011-06-12 14:30 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49375

--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> 2011-06-12 14:30:31 UTC ---
*** Bug 49374 has been marked as a duplicate of this bug. ***


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

* [Bug testsuite/49375] Target libstdc++.so used by host cc1plus
  2011-06-11 17:39 [Bug testsuite/49375] New: Target libstdc++.so used by host cc1plus hjl.tools at gmail dot com
  2011-06-12 11:41 ` [Bug testsuite/49375] " rguenth at gcc dot gnu.org
  2011-06-12 14:30 ` hjl.tools at gmail dot com
@ 2011-06-12 14:43 ` hjl.tools at gmail dot com
  2011-06-14 15:42 ` ro at CeBiTec dot Uni-Bielefeld.DE
  2024-04-14 22:48 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: hjl.tools at gmail dot com @ 2011-06-12 14:43 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49375

--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> 2011-06-12 14:43:41 UTC ---
(In reply to comment #1)
> LD_LIBRARY_PATH should be only set for executing testcases, not for
> compiling them.

That is not what we are doing:

lib/c-torture.exp:    set_ld_library_path_env_vars
lib/gcc-dg.exp:    set_ld_library_path_env_vars
lib/g++.exp:    set_ld_library_path_env_vars
lib/gfortran.exp:    set_ld_library_path_env_vars
lib/go.exp:    set_ld_library_path_env_vars
lib/obj-c++.exp:    set_ld_library_path_env_vars
lib/objc.exp:    set_ld_library_path_env_vars
lib/plugin-support.exp:    restore_ld_library_path_env_vars
lib/plugin-support.exp:    set_ld_library_path_env_vars
lib/target-libpath.exp:# proc set_ld_library_path_env_vars { }
lib/target-libpath.exp:proc set_ld_library_path_env_vars { } {
lib/target-libpath.exp:  verbose -log "set_ld_library_path_env_vars:
ld_library_path=$ld_library_path"
lib/target-libpath.exp:# proc restore_ld_library_path_env_vars { }
lib/target-libpath.exp:proc restore_ld_library_path_env_vars { } {
lib/wrapper.exp:    set_ld_library_path_env_vars

set_ld_library_path_env_vars is called when test start and
restore_ld_library_path_env_vars is rarely used. Only
lib/plugin-support.exp handles it correctly.


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

* [Bug testsuite/49375] Target libstdc++.so used by host cc1plus
  2011-06-11 17:39 [Bug testsuite/49375] New: Target libstdc++.so used by host cc1plus hjl.tools at gmail dot com
                   ` (2 preceding siblings ...)
  2011-06-12 14:43 ` hjl.tools at gmail dot com
@ 2011-06-14 15:42 ` ro at CeBiTec dot Uni-Bielefeld.DE
  2024-04-14 22:48 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2011-06-14 15:42 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49375

--- Comment #4 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> 2011-06-14 15:41:50 UTC ---
IMO this is a clear example why LD_LIBRARY_PATH is evil: the execution
tests in the testsuite should be linked with -R/-rpath/whatever is
required so the correct target libraries are found.  This has the
additional advantage that you can manually reexecute a failing tests
without first having to set LD_LIBRARY_PATH to all the directories
necessary to locate the runtime libraries.  I think some testsuites get
this right, with the exception of libgcc_s.so.1.

As a workaround, you could link cc1plus with libppl and libstdc++
statically.  At least this avoids all RPATH/LD_LIBRARY_PATH issues.
Certainly not pretty, but that's what I've been doing all the time and
what happens for go1 out of the box.  I always found the contortions
necessary to correctly link with libppl a nightmare, and it has only
improved a little bit recently.

    Rainer


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

* [Bug testsuite/49375] Target libstdc++.so used by host cc1plus
  2011-06-11 17:39 [Bug testsuite/49375] New: Target libstdc++.so used by host cc1plus hjl.tools at gmail dot com
                   ` (3 preceding siblings ...)
  2011-06-14 15:42 ` ro at CeBiTec dot Uni-Bielefeld.DE
@ 2024-04-14 22:48 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-04-14 22:48 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49375

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
ppl support was removed with r0-117618-g33ad93b9f4cb21 for GCC 4.8.0.
I Have not looked if ISL requires libstdc++ or is only statically linked yet.

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

end of thread, other threads:[~2024-04-14 22:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-11 17:39 [Bug testsuite/49375] New: Target libstdc++.so used by host cc1plus hjl.tools at gmail dot com
2011-06-12 11:41 ` [Bug testsuite/49375] " rguenth at gcc dot gnu.org
2011-06-12 14:30 ` hjl.tools at gmail dot com
2011-06-12 14:43 ` hjl.tools at gmail dot com
2011-06-14 15:42 ` ro at CeBiTec dot Uni-Bielefeld.DE
2024-04-14 22:48 ` pinskia at gcc dot gnu.org

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