请教unexpected PLT .relocc type如何解决

linux - Building GCC with glibc in a non-standard location without root - Stack Overflow
to customize your list.
Stack Overflow is a community of 4.7 million programmers, just like you, helping each other.
J it only takes a minute:
Join the Stack Overflow community to:
Ask programming questions
Answer and help your peers
Get recognized for your expertise
I have a system that I do not have root access to, but I need to install the current version of GCC (4.7.2) on.
The system is running an x86_64 build of Linux 2.6.18 and already has GCC 4.1 (without C++ support even though --version says it was built with it).
EDIT 5: At this point, the steps below are just one set of things that I've tried. I've started clean a few times since then. I'm looking for someone to detail the exact order I need to make everything in with all of the switches required.
This is the process I've gone through so far (where ROOT is a folder in my home directory)
make-3.82&./configure --prefix=$ROOT && make && make install && hash -r
binutils-2.23&./configure --prefix=$ROOT && make && make install
autoconf-2.69&./configure --prefix=$ROOT && make && make install
automake-1.9&./configure --prefix=$ROOT && make && make install
flex-2.5.37&./configure --prefix=$ROOT && make && make install
libunwind-1.1&./configure --prefix=$ROOT && make && make install
gcc-4.7.2-scratch&../gcc-4.7.2/configure --prefix=$ROOT \
--disable-multilib --disable-nls --enable-languages=c,c++ \
&& make && make install && hash -r
ncurses-5.9&./configure --prefix=$ROOT && make && make install
texinfo-4.13&./configure --prefix=$ROOT && make && make install
glibc-2.14-scratch&touch $ROOT/etc/ld.so.conf
Patched glibc with patch from
(correcting line numbers for 2.14)
glibc-2.14-scratch&../glibc-2.14/configure --prefix=$ROOT \
--with-headers=$3_3_4_HEADERS && make && make install
The flags I added were to get rid of undefined reference to '__isoc99_sscanf'. I don't know what combination of flags was actually necessary to fix that, but it fixed the problem with these flags.
gcc-4.7.2-scratch2&../gcc-4.7.2/configure --prefix=$ROOT \
--disable-multilib --disable-nls --enable-languages=c,c++ \
CPPFLAGS="-I$ROOT/include" CFLAGS="-g -O2 -lc" \
CXXFLAGS="-g -O2 -lc" LDFLAGS="-L$ROOT/lib \
-L$ROOT/lib64" && make && make install
Now I get this error during the GCC build:
build/genmddeps ../../gcc-4.7.2/gcc/config/i386/i386.md & tmp-mddeps
build/genmddeps: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by build/genmddeps)
The error makes sense because the libc in /lib64 is version 2.5, but I don't know how to get GCC to use the one that I built that installed to $ROOT/lib.
EDIT 1: Adding -rpath didn't help, but I added my lib directories to LD_RUN_PATH and LD_LIBRARY_PATH. With these set I couldn't run anything because I was getting the error [program_name]: error while loading shared libraries: /home/mrambiguous/root/lib/libc.so.6: ELF file OS ABI invalid
Another strange thing to note is that when I tried the -rpath suggestion, I started getting errors from GCC about unrecognized command line options (such as -V). I had to set it to use the system's GCC 4.1. Now I'm not sure if my first build of GCC became corrupted somehow or if it was ever being used in the first place.
EDIT 2: I just opened libc.so.6 in vim to see if I could find anything about the ABI in plain text and it is in there with the copyright info. libc ABIs: UNIQUE IFUNC
It also confirms that GCC 4.7.2 was working in that same block of text. Compiled by GNU CC version 4.7.2
EDIT 3: Removed $ROOT, reinstalled everything, same issue of not recognizing -V and -qversion as valid options.
EDIT 4: I tried editing the ELF header by using brandelf -t SVR4 libc.so.6, but that just gives me a new error unexpected PLT reloc type 0x25
I am in a hurry so I can't analyze your error messages in detail.
Newer glibc and old glibc are not only ABI incompatible, but also headers, see .
Therefore any mixing will result in errors like you encountered, you need to be extremely careful.
Hand tuning is hopelessly tedious.
If your goal is to use gcc-4.7.2, I recommend you to . I have many instances of Gentoo Prefix running on RHEL 5 (which have 2.6.18 kernel, gcc-4.1 and glibc-2.5 as you do). This compiles gcc-4.7.2 on top of glibc-2.5.
If your want some fun of using newer glibc, take a look at . It is a work-in-progress though. Expect many breakage. But it won't be a big draw back as you are trying to compile out a modern toolchain by hand, will it?
Your Answer
Sign up or
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Post as a guest
By posting your answer, you agree to the
Not the answer you're looking for?
Browse other questions tagged
Stack Overflow works best with JavaScript enabled【高分】c程序 交叉编译完成之后运行出现can't handle reloc type 0x13怎么解决?_百度知道
【高分】c程序 交叉编译完成之后运行出现can't handle reloc type 0x13怎么解决?
c语言程序 交叉编译完成之后
运行出现can't handle reloc type 0x13,请问怎么解决呢?
点击看大图://a://a.baidu.baidu。
不能处理的类型,贴代码吧,估计你写的类或者函数出问题了
代码贴出来看看 代码复制粘贴可以不?
其他类似问题
为您推荐:
交叉编译的相关知识
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁General discussion of Qt, the C++ toolkit
General discussion of Qt, the C++ toolkit
25 May 03:30 2011
Issue with running qmake on armDevendra Patel &devpatel82 &at& &
01:30:52 GMT
I am trying to run qmake on arm device with debian on it.
sudo apt-get install qt4-qmake
to install qt.
Now when I run qmake, I see following error
qmake: error while loading shared libraries: /usr/lib/libstdc++.so.6: unexpected PLT reloc type 0x0d
I am not sure if its qt issue. But want to see of anyone else is facing the same issue.
Any help would be great.
_______________________________________________
Qt-interest mailing list
Qt-interest &at&
25 May 03:50 2011
Re: Issue with running qmake on armDiogoLR &diogolr &at& &
01:50:52 GMT
Try to install Qt with the shell installer as root. You can find it in:
x32 version:&
x64 version:&
Remember to install g++ before it:
# apt-get install g++
Regards,Diogo. Devendra Patel &&
I am trying to run qmake on arm device with debian on it.
sudo apt-get install qt4-qmake
to install qt.
Now when I run qmake, I see following error
qmake: error while loading shared libraries: /usr/lib/libstdc++.so.6: unexpected PLT reloc type 0x0d
I am not sure if its qt issue. But want to see of anyone else is facing the same issue.
Any help would be great.
_______________________________________________
Qt-interest mailing list
_______________________________________________
Qt-interest mailing list
Qt-interest &at&
25 May 10:31 2011
Re: Issue with running qmake on armKonstantin Tokarev &annulen &at& yandex.ru&
08:31:44 GMT
25.05., "DiogoLR" &diogolr &at& &:
& Try to install Qt with the shell installer as root. You can find it in:
& x32 version:
& x64 version:
Devendra was talking about ARM, not x86 or x86_64...
Konstantin
_______________________________________________
Qt-interest mailing list
Qt-interest &at&
25 May 04:29 2011
Issue with running qmake on armDevendra Patel &devpatel82 &at& &
02:29:48 GMT
Forgot to send it to mailing list.
From: Devendra Patel [mailto:devpatel82 &at& ] Sent: Wednesday, May 25,
AMTo: 'DiogoLR'Subject: RE: [Qt-interest] Issue with running qmake on arm
Thanks Diogo.
Is there other option which is smaller in size. The device I am trying to run has total of 512 MB disk space. I should have stated this in my first email.
Here is spec of the plug computer I am trying to install qt on.
Release date
1.2&GHz&&Marvell Kirkwood 6281
Storage capacity
External hard drive/flash disk/internal NAND
512MB&, 512MB&
Connectivity
, Gigabit Ethernet, JTAG, Bluetooth 2.1, Wi-Fi 802.11 b/g
Dimensions
95 x 65 x 48.5 (mm)
I do have an option to attach a usb to the device and install from there. But I will have to install it on USB. How can I set the destination path for Qt to install
Also about the link you sent, I just run it from shell as root?
From: qt-interest-bounces+ &at&
[mailto:qt-interest-bounces+ &at& ] On Behalf Of DiogoLRSent: Wednesday, May 25,
AMCc: qt-interest &at& Subject: Re: [Qt-interest] Issue with running qmake on arm
Try to install Qt with the shell installer as root. You can find it in:
x32 version:&
x64 version:&
Remember to install g++ before it:
# apt-get install g++
Regards,Diogo.
Devendra Patel &&
I am trying to run qmake on arm device with debian on it.
sudo apt-get install qt4-qmake
to install qt.
Now when I run qmake, I see following error
qmake: error while loading shared libraries: /usr/lib/libstdc++.so.6: unexpected PLT reloc type 0x0d
I am not sure if its qt issue. But want to see of anyone else is facing the same issue.
Any help would be great.
_______________________________________________Qt-interest mailing list
_______________________________________________
Qt-interest mailing list
Qt-interest &at&
25 May 04:40 2011
Re: Issue with running qmake on armDiogoLR &diogolr &at& &
02:40:30 GMT
"I do have an option to attach a usb to the device and install from there. But I will have to install it on USB. How can I set the destination path for Qt to install"
I haven't installed this newest version of the Qt SDK, so, I can't confirm how can you change the path. But, at the last stable version of Qt 4.7 (without SDK compatibilities), you could change the path at the wizard instalattion, just like any other "MS Windows" installation. For example, I have installed the Qt 4.7 at /opt/qt-2010.05 (if I'm not wrong).
"Also about the link you sent, I just run it from shell as root?"
Yes, just like that :).
Diogo. Devendra Patel &&
Forgot to send it to mailing list.
From: Devendra Patel [mailto:] Sent: Wednesday, May 25,
AMTo: 'DiogoLR'Subject: RE: [Qt-interest] Issue with running qmake on arm
Thanks Diogo.
Is there other option which is smaller in size. The device I am trying to run has total of 512 MB disk space. I should have stated this in my first email.
Here is spec of the plug computer I am trying to install qt on.
Release date
1.2&GHz&&Marvell Kirkwood 6281
Storage capacity
External hard drive/flash disk/internal NAND
512MB&, 512MB&
Connectivity
, Gigabit Ethernet, JTAG, Bluetooth 2.1, Wi-Fi 802.11 b/g
Dimensions
95 x 65 x 48.5 (mm)
I do have an option to attach a usb to the device and install from there. But I will have to install it on USB. How can I set the destination path for Qt to install
Also about the link you sent, I just run it from shell as root?
From: qt-interest-bounces+devpatel82= &at&
[mailto:= &at& ] On Behalf Of DiogoLRSent: Wednesday, May 25,
AMCc: Subject: Re: [Qt-interest] Issue with running qmake on arm
Try to install Qt with the shell installer as root. You can find it in:
x32 version:&
x64 version:&
Remember to install g++ before it:
# apt-get install g++
Regards,Diogo.
Devendra Patel &&
I am trying to run qmake on arm device with debian on it.
sudo apt-get install qt4-qmake
to install qt.
Now when I run qmake, I see following error
qmake: error while loading shared libraries: /usr/lib/libstdc++.so.6: unexpected PLT reloc type 0x0d
I am not sure if its qt issue. But want to see of anyone else is facing the same issue.
Any help would be great.
_______________________________________________Qt-interest mailing list
_______________________________________________
Qt-interest mailing list
_______________________________________________
Qt-interest mailing list
Qt-interest &at&
25 May 08:25 2011
Re: Issue with running qmake on armKonrad Rosenbaum &konrad &at& silmor.de&
06:25:40 GMT
On Wednesday 25 May 2011, Devendra Patel wrote:
& I am trying to run qmake on arm device with debian on it.
& sudo apt-get install qt4-qmake
& to install qt.
If you want to develop you also need libqt4-dev.
& Now when I run qmake, I see following error
& qmake: error while loading shared libraries: /usr/lib/libstdc++.so.6:
& unexpected PLT reloc type 0x0d
I presume this is Debian unstable? Report it as a bug to Debian.
_______________________________________________
Qt-interest mailing list
Qt-interest &at&
27 May 03:38 2011
Re: Issue with running qmake on armDevendra Patel &devpatel82 &at& &
01:38:20 GMT
Hi Konrad,
I did exactly that (apt-get install libqt4-dev) and now
I can compile qt
application.
-----Original Message-----
From: qt-interest-bounces+ &at&
[mailto:qt-interest-bounces+ &at& ] On Behalf Of
Konrad Rosenbaum
Sent: Wednesday, May 25,
To: qt-interest &at&
Subject: Re: [Qt-interest] Issue with running qmake on arm
On Wednesday 25 May 2011, Devendra Patel wrote:
& I am trying to run qmake on arm device with debian on it.
& sudo apt-get install qt4-qmake
& to install qt.
If you want to develop you also need libqt4-dev.
& Now when I run qmake, I see following error
& qmake: error while loading shared libraries: /usr/lib/libstdc++.so.6:
& unexpected PLT reloc type 0x0d
I presume this is Debian unstable? Report it as a bug to Debian.请教unexpected PLT reloc type如何解决 - QTCN开发网 - Powered by phpwind
查看完整版本: [--
请教unexpected PLT reloc type如何解决
交叉编译好qt5后,拷到开发板上,运行程序时如下提示:error while loading shared libraries: libqQt5core.so.5.4.0&&&&unexpected PLT reloc type 0x0d
查看完整版本: [--
Powered by
Gzip disabled

我要回帖

更多关于 type int unexpected 的文章

 

随机推荐