public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/54504] New: Link failed when I move the GCC to another directory
@ 2012-09-06 14:09 progmei at 163 dot com
2012-09-06 14:13 ` [Bug c++/54504] " pinskia at gcc dot gnu.org
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: progmei at 163 dot com @ 2012-09-06 14:09 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54504
Bug #: 54504
Summary: Link failed when I move the GCC to another directory
Classification: Unclassified
Product: gcc
Version: 4.7.1
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: progmei@163.com
When I move the Cross GCC to another directory, the link failed. This is a
requirement, our compilers are managed by Revision control, and the directory
is always changed。
And I can not choose the library use -L option also. The lib file is exist on
the origional directory.
/repo/yuhuamei/mips-linux-eglibc/bin/mips-linux-g++ test.cc
/repo/yuhuamei/mips-linux-eglibc/bin/../lib/gcc/mips-linux/4.7.1/../../../../mips-linux/bin/ld:
cannot find /repo/yuhuamei/mips-linux-eglibc-gnu/mips-linux/lib/libc.so.6
/repo/yuhuamei/mips-linux-eglibc/bin/../lib/gcc/mips-linux/4.7.1/../../../../mips-linux/bin/ld:
cannot find
/repo/yuhuamei/mips-linux-eglibc-gnu/mips-linux/lib/libc_nonshared.a
/repo/yuhuamei/mips-linux-eglibc/bin/../lib/gcc/mips-linux/4.7.1/../../../../mips-linux/bin/ld:
cannot find /repo/yuhuamei/mips-linux-eglibc-gnu/mips-linux/lib/ld.so.1
collect2: error: ld returned 1 exit status
/repo/yuhuamei/mips-linux-eglibc/bin/mips-linux-g++
-L/repo/yuhuamei/mips-linux-eglibc-gnu/mips-linux/lib test.cc
/repo/yuhuamei/mips-linux-eglibc/bin/../lib/gcc/mips-linux/4.7.1/../../../../mips-linux/bin/ld:
cannot find /repo/yuhuamei/mips-linux-eglibc-gnu/mips-linux/lib/libc.so.6
/repo/yuhuamei/mips-linux-eglibc/bin/../lib/gcc/mips-linux/4.7.1/../../../../mips-linux/bin/ld:
cannot find
/repo/yuhuamei/mips-linux-eglibc-gnu/mips-linux/lib/libc_nonshared.a
/repo/yuhuamei/mips-linux-eglibc/bin/../lib/gcc/mips-linux/4.7.1/../../../../mips-linux/bin/ld:
cannot find /repo/yuhuamei/mips-linux-eglibc-gnu/mips-linux/lib/ld.so.1
collect2: error: ld returned 1 exit status
ls /repo/yuhuamei/mips-linux-eglibc/mips-linux/lib/libc.so.6
/repo/yuhuamei/mips-linux-eglibc/mips-linux/lib/libc_nonshared.a
/repo/yuhuamei/mips-linux-eglibc/mips-linux/lib/ld.so.1
/repo/yuhuamei/mips-linux-eglibc/mips-linux/lib/ld.so.1
/repo/yuhuamei/mips-linux-eglibc/mips-linux/lib/libc.so.6
/repo/yuhuamei/mips-linux-eglibc/mips-linux/lib/libc_nonshared.a
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/54504] Link failed when I move the GCC to another directory
2012-09-06 14:09 [Bug c++/54504] New: Link failed when I move the GCC to another directory progmei at 163 dot com
@ 2012-09-06 14:13 ` pinskia at gcc dot gnu.org
2012-09-07 1:10 ` progmei at 163 dot com
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-09-06 14:13 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54504
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2012-09-06
Ever Confirmed|0 |1
Severity|major |normal
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-09-06 14:13:26 UTC ---
It works for me.
How did you configure GCC?
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/54504] Link failed when I move the GCC to another directory
2012-09-06 14:09 [Bug c++/54504] New: Link failed when I move the GCC to another directory progmei at 163 dot com
2012-09-06 14:13 ` [Bug c++/54504] " pinskia at gcc dot gnu.org
@ 2012-09-07 1:10 ` progmei at 163 dot com
2012-09-07 1:16 ` pinskia at gcc dot gnu.org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: progmei at 163 dot com @ 2012-09-07 1:10 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54504
--- Comment #2 from progmei <progmei at 163 dot com> 2012-09-07 01:10:41 UTC ---
My configuration as follow
/repo/yuhuamei/mips-linux-eglibc/bin/mips-linux-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/yuhuamei/mips-linux-eglibc/bin/mips-linux-gcc
COLLECT_LTO_WRAPPER=/repo/yuhuamei/mips-linux-eglibc/bin/../libexec/gcc/mips-linux/4.7.1/lto-wrapper
Target: mips-linux
Configured with: ../gcc-4.7.1/configure
--prefix=/repo/yuhuamei/mips-linux-eglibc-gnu --with-ppl=/repo/yuhuamei/ppl
--with-cloog=/repo/yuhuamei/cloog-ppl --enable-languages=c,c++
--target=mips-linux : (reconfigured) ../gcc-4.7.1/configure
--prefix=/repo/yuhuamei/mips-linux-eglibc-gnu --target=mips-linux
--with-ppl=/repo/yuhuamei/ppl --with-cloog=/repo/yuhuamei/cloog-ppl
--enable-__cxa_atexit --enable-languages=c,c++
Thread model: posix
gcc version 4.7.1 (GCC)
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/54504] Link failed when I move the GCC to another directory
2012-09-06 14:09 [Bug c++/54504] New: Link failed when I move the GCC to another directory progmei at 163 dot com
2012-09-06 14:13 ` [Bug c++/54504] " pinskia at gcc dot gnu.org
2012-09-07 1:10 ` progmei at 163 dot com
@ 2012-09-07 1:16 ` pinskia at gcc dot gnu.org
2012-09-07 4:49 ` progmei at 163 dot com
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-09-07 1:16 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54504
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-09-07 01:15:46 UTC ---
So you are not using a sysroot?
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/54504] Link failed when I move the GCC to another directory
2012-09-06 14:09 [Bug c++/54504] New: Link failed when I move the GCC to another directory progmei at 163 dot com
` (2 preceding siblings ...)
2012-09-07 1:16 ` pinskia at gcc dot gnu.org
@ 2012-09-07 4:49 ` progmei at 163 dot com
2012-09-07 4:53 ` [Bug driver/54504] " pinskia at gcc dot gnu.org
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: progmei at 163 dot com @ 2012-09-07 4:49 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54504
--- Comment #4 from progmei <progmei at 163 dot com> 2012-09-07 04:49:04 UTC ---
no,i'm not using a sysroot
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug driver/54504] Link failed when I move the GCC to another directory
2012-09-06 14:09 [Bug c++/54504] New: Link failed when I move the GCC to another directory progmei at 163 dot com
` (3 preceding siblings ...)
2012-09-07 4:49 ` progmei at 163 dot com
@ 2012-09-07 4:53 ` pinskia at gcc dot gnu.org
2012-09-07 6:35 ` progmei at 163 dot com
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-09-07 4:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54504
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|c++ |driver
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-09-07 04:53:08 UTC ---
This is a cross you really should be using a sysroot.
I use 4.7.x as a cross compiler with a sysroot and am able to move around GCC
all the time.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug driver/54504] Link failed when I move the GCC to another directory
2012-09-06 14:09 [Bug c++/54504] New: Link failed when I move the GCC to another directory progmei at 163 dot com
` (4 preceding siblings ...)
2012-09-07 4:53 ` [Bug driver/54504] " pinskia at gcc dot gnu.org
@ 2012-09-07 6:35 ` progmei at 163 dot com
2012-09-07 6:39 ` pinskia at gcc dot gnu.org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: progmei at 163 dot com @ 2012-09-07 6:35 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54504
--- Comment #6 from progmei <progmei at 163 dot com> 2012-09-07 06:35:41 UTC ---
I've tried to use sysroot option, but I compile the GCC failed.
../gcc-4.7.1/configure --prefix=/repo/yuhuamei/mips-linux-eglibc-gnu
--target=mips-linux --with-ppl=/repo/yuhuamei/ppl
--with-cloog=/repo/yuhuamei/cloog-ppl --enable-__cxa_atexit
--enable-languages=c,c++ --with-sysroot=/repo/yuhuamei/mips-linux-eglibc-gnu
/repo/yuhuamei/mips-linux-eglibc-gnu/mips-linux/bin/ld: cannot find
/repo/yuhuamei/mips-linux-eglibc-gnu/mips-linux/lib/libc.so.6 inside
/repo/yuhuamei/gccobjdir/gcc/../../mips-linux-eglibc-gnu
/repo/yuhuamei/mips-linux-eglibc-gnu/mips-linux/bin/ld: cannot find
/repo/yuhuamei/mips-linux-eglibc-gnu/mips-linux/lib/libc_nonshared.a inside
/repo/yuhuamei/gccobjdir/gcc/../../mips-linux-eglibc-gnu
/repo/yuhuamei/mips-linux-eglibc-gnu/mips-linux/bin/ld: cannot find
/repo/yuhuamei/mips-linux-eglibc-gnu/mips-linux/lib/ld.so.1 inside
/repo/yuhuamei/gccobjdir/gcc/../../mips-linux-eglibc-gnu
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug driver/54504] Link failed when I move the GCC to another directory
2012-09-06 14:09 [Bug c++/54504] New: Link failed when I move the GCC to another directory progmei at 163 dot com
` (5 preceding siblings ...)
2012-09-07 6:35 ` progmei at 163 dot com
@ 2012-09-07 6:39 ` pinskia at gcc dot gnu.org
2012-09-07 7:41 ` progmei at 163 dot com
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-09-07 6:39 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54504
--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-09-07 06:38:59 UTC ---
>I've tried to use sysroot option, but I compile the GCC failed.
Because that is not the correct usage of sysroot.
You want a full sysroot under the prefix directory:
/repo/yuhuamei/mips-linux-eglibc-gnu/sysroot
And install the libc inside that directory.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug driver/54504] Link failed when I move the GCC to another directory
2012-09-06 14:09 [Bug c++/54504] New: Link failed when I move the GCC to another directory progmei at 163 dot com
` (6 preceding siblings ...)
2012-09-07 6:39 ` pinskia at gcc dot gnu.org
@ 2012-09-07 7:41 ` progmei at 163 dot com
2012-09-07 8:49 ` pinskia at gcc dot gnu.org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: progmei at 163 dot com @ 2012-09-07 7:41 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54504
--- Comment #8 from progmei <progmei at 163 dot com> 2012-09-07 07:41:20 UTC ---
I tried it again with your suggestion, but it also failed.
../gcc-4.7.1/configure --prefix=/repo/yuhuamei/mips-linux-eglibc-gnu
--target=mips-linux --with-ppl=/repo/yuhuamei/ppl
--with-cloog=/repo/yuhuamei/cloog-ppl --enable-__cxa_atexit
--enable-languages=c,c++
--with-sysroot=/repo/yuhuamei/mips-linux-eglibc-gnu/sysroot
/repo/yuhuamei/mips-linux-eglibc-gnu/mips-linux/bin/ld: cannot find
/repo/yuhuamei/mips-linux-eglibc-gnu/sysroot/lib/libc.so.6 inside
/repo/yuhuamei/mips-linux-eglibc-gnu/sysroot
/repo/yuhuamei/mips-linux-eglibc-gnu/mips-linux/bin/ld: cannot find
/repo/yuhuamei/mips-linux-eglibc-gnu/sysroot/lib/libc_nonshared.a inside
/repo/yuhuamei/mips-linux-eglibc-gnu/sysroot
/repo/yuhuamei/mips-linux-eglibc-gnu/mips-linux/bin/ld: cannot find
/repo/yuhuamei/mips-linux-eglibc-gnu/sysroot/lib/ld.so.1 inside
/repo/yuhuamei/mips-linux-eglibc-gnu/sysroot
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug driver/54504] Link failed when I move the GCC to another directory
2012-09-06 14:09 [Bug c++/54504] New: Link failed when I move the GCC to another directory progmei at 163 dot com
` (7 preceding siblings ...)
2012-09-07 7:41 ` progmei at 163 dot com
@ 2012-09-07 8:49 ` pinskia at gcc dot gnu.org
2012-09-07 13:30 ` progmei at 163 dot com
2012-09-07 14:16 ` progmei at 163 dot com
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-09-07 8:49 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54504
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution| |WORKSFORME
--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-09-07 08:49:14 UTC ---
>/repo/yuhuamei/mips-linux-eglibc-gnu/mips-linux/bin/ld: cannot find
> /repo/yuhuamei/mips-linux-eglibc-gnu/sysroot/lib/libc.so.6 inside
> /repo/yuhuamei/mips-linux-eglibc-gnu/sysroot
How are you configuring glibc? I think that is the problem here.
You should only configure glibc with --prefix=/usr . And then install like:
make install install_root=${MY_PREFIX}/sysroot .
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug driver/54504] Link failed when I move the GCC to another directory
2012-09-06 14:09 [Bug c++/54504] New: Link failed when I move the GCC to another directory progmei at 163 dot com
` (8 preceding siblings ...)
2012-09-07 8:49 ` pinskia at gcc dot gnu.org
@ 2012-09-07 13:30 ` progmei at 163 dot com
2012-09-07 14:16 ` progmei at 163 dot com
10 siblings, 0 replies; 12+ messages in thread
From: progmei at 163 dot com @ 2012-09-07 13:30 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54504
--- Comment #10 from progmei <progmei at 163 dot com> 2012-09-07 13:30:13 UTC ---
It's OK now. And I just have some qusetions.
If I can build the cross compiler support both soft/hard float big/little
endian? And how to compile this.
where can I get the related document on how to compile the cross gcc?
Thank you!
At 2012-09-07 16:49:14,"pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
wrote:
>http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54504
>
>Andrew Pinski <pinskia at gcc dot gnu.org> changed:
>
> What |Removed |Added
>----------------------------------------------------------------------------
> Status|WAITING |RESOLVED
> Resolution| |WORKSFORME
>
>--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-09-07 08:49:14 UTC ---
>>/repo/yuhuamei/mips-linux-eglibc-gnu/mips-linux/bin/ld: cannot find
>> /repo/yuhuamei/mips-linux-eglibc-gnu/sysroot/lib/libc.so.6 inside
>> /repo/yuhuamei/mips-linux-eglibc-gnu/sysroot
>
>How are you configuring glibc? I think that is the problem here.
>You should only configure glibc with --prefix=/usr . And then install like:
>make install install_root=${MY_PREFIX}/sysroot .
>
>--
>Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email
>------- You are receiving this mail because: -------
>You reported the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug driver/54504] Link failed when I move the GCC to another directory
2012-09-06 14:09 [Bug c++/54504] New: Link failed when I move the GCC to another directory progmei at 163 dot com
` (9 preceding siblings ...)
2012-09-07 13:30 ` progmei at 163 dot com
@ 2012-09-07 14:16 ` progmei at 163 dot com
10 siblings, 0 replies; 12+ messages in thread
From: progmei at 163 dot com @ 2012-09-07 14:16 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54504
--- Comment #11 from progmei <progmei at 163 dot com> 2012-09-07 14:16:15 UTC ---
It's OK now. And I just have some qusetions.
If I can build the cross compiler support both soft/hard float big/little
endian, and how to compile it.
where can I get the related document on how to compile the cross gcc?
Thank you!
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2012-09-07 14:16 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-06 14:09 [Bug c++/54504] New: Link failed when I move the GCC to another directory progmei at 163 dot com
2012-09-06 14:13 ` [Bug c++/54504] " pinskia at gcc dot gnu.org
2012-09-07 1:10 ` progmei at 163 dot com
2012-09-07 1:16 ` pinskia at gcc dot gnu.org
2012-09-07 4:49 ` progmei at 163 dot com
2012-09-07 4:53 ` [Bug driver/54504] " pinskia at gcc dot gnu.org
2012-09-07 6:35 ` progmei at 163 dot com
2012-09-07 6:39 ` pinskia at gcc dot gnu.org
2012-09-07 7:41 ` progmei at 163 dot com
2012-09-07 8:49 ` pinskia at gcc dot gnu.org
2012-09-07 13:30 ` progmei at 163 dot com
2012-09-07 14:16 ` progmei at 163 dot com
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).