SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
when i finish to install multilib package i came across a big problem ! gcc (5.3) dosn't compile anything !! if i try to compile a simple "hello world" program i got:
Code:
[marco ~]$ gcc prova.c
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../x86_64-slackware-linux/bin/ld: /usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/crti.o: unrecognized relocation (0x2a) in section `.init'
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../x86_64-slackware-linux/bin/ld: final link faild: Bad value
collect2: error: ld returned 1 exit status
I assume that you are running Slackware64-current, as gcc 5.3 was recently included in it
@All: It 's always good to give such information.
I suggest that you first try to compile your program on a pure 64-bit Slackware current (not multilib) and see what you come up with. This could help find out if if this is a multilib related issue or not.
Also, did the same programs compile OK with the previous gcc version, pure 64-bit as multilib?
if you pulled from some of the new rsync's you may have problems.
I would go this route.
Code:
##UPGRADE MULTI-LIB
#!/bin/bash
# Init
FILE="/tmp/out.$$"
GREP="/bin/grep"
#....
# Make sure only root can run our script
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root if you install regular user
please use the assume root command " 1>&2
exit 1
fi
# ...
cd /var/cache
lftp -c 'open http://slackware.com/~alien/multilib/ ; mirror -c -e --delete-first current' # replace with slackware version
cd /var/cache/current # replace with slackware version
upgradepkg --reinstall --install-new *.t?z
cd /var/cache/current/slackware64-compat32 # replace with slackware version
upgradepkg --install-new *?/*.t?z
gcc a.c
a.c:1:1: warning: return type defaults to 'int' [-Wimplicit-int]
main() {
^
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../x86_64-slackware-linux/bin/ld: /usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/crti.o: unrecognized relocation (0x2a) in section `.init'
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../x86_64-slackware-linux/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
I dont get what could be wrong. The lib crti.o
is from glibc-2.23-x86_64-1 which is the 'sane' lib.
Today I had to compile something and I had this very problem.
Compiling this small sample program:
Code:
#include <stdio.h>
int main() {
fprintf(stdout, "Hello, world.\n");
return(0);
}
Got me this output:
Code:
[eduardo:~]$ gcc compiletest.c
/usr/gnat/libexec/gcc/x86_64-pc-linux-gnu/4.9.3/ld: /usr/lib/../lib64/crti.o: unrecognized relocation (0x2a) in section `.init'
/usr/gnat/libexec/gcc/x86_64-pc-linux-gnu/4.9.3/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
[eduardo:~]$
I'm using gcc-5.3.0-x86_64-3 and binutils-2.26-x86_64-3. No multilib.
I ensured that both the gcc series and binutils were reinstalled before running this test.
Any help or hints?
Oh well. Please disregard. Was doing some Ada coding with GNAT (from AdaCore) on a custom location and forgot to set the proper env variables. My bad *facepalm*. All is well now.
Leaving it here because it might help someone find the cause of this annoyance.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.