LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-25-2016, 06:39 PM   #1
drudox
Member
 
Registered: Feb 2016
Posts: 141

Rep: Reputation: Disabled
gcc 5.3.0 dosn't compile!!


Hi guys, I recently switch to current/multilib follow this guide: http://docs.slackware.com/slackware:...tilib_packages

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
could somebody help me pls ??
 
Old 02-26-2016, 11:52 AM   #2
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
What gcc programs do you have installed?

Code:
ls -la /var/log/packages/gcc*
 
Old 02-26-2016, 12:32 PM   #3
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
Hi drudox and welcome to this forum.

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?
 
Old 02-26-2016, 02:22 PM   #4
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
What versions of the glibc package do you have installed?
Code:
ls -la /var/log/packages/glibc*
 
1 members found this post helpful.
Old 02-26-2016, 04:37 PM   #5
Drakeo
Senior Member
 
Registered: Jan 2008
Location: Urbana IL
Distribution: Slackware, Slacko,
Posts: 3,716
Blog Entries: 3

Rep: Reputation: 483Reputation: 483Reputation: 483Reputation: 483Reputation: 483
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

Last edited by Drakeo; 02-26-2016 at 04:40 PM.
 
Old 03-03-2016, 05:53 PM   #6
lemonade
Member
 
Registered: Oct 2015
Posts: 40

Rep: Reputation: Disabled
same problem here

upgraded to multilib packages:
Code:
gcc-5.3.0_multilib-x86_64-2alien
gcc-g++-5.3.0_multilib-x86_64-2alien
gcc-gfortran-5.3.0_multilib-x86_64-2alien
gcc-gnat-5.3.0_multilib-x86_64-2alien
gcc-go-5.3.0_multilib-x86_64-2alien
gcc-java-5.3.0_multilib-x86_64-2alien
gcc-objc-5.3.0_multilib-x86_64-2alien
glibc-2.23_multilib-x86_64-1alien
glibc-i18n-2.23_multilib-x86_64-1alien
glibc-profile-2.23_multilib-x86_64-1alien
glibc-solibs-2.23_multilib-x86_64-1alien
install-multilib-1.1.0-x86_64-1dj
I switched back to original packages
Code:
glibc-2.23-x86_64-1       glibc-profile-2.23-x86_64-1
glibc-i18n-2.23-x86_64-1  glibc-solibs-2.23-x86_64-1
1) gcc-5.3.0-x86_64-2
2) gcc-g++-5.3.0-x86_64-2
and the problem persists
Code:
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.

Anyone else with the same problem?
 
Old 03-03-2016, 06:01 PM   #7
lemonade
Member
 
Registered: Oct 2015
Posts: 40

Rep: Reputation: Disabled
Found it.

binutils was binutils-2.25.1-x86_64-1.
I guess it was 2.23 before. Anyways I upgraded to
binutils-2.26-x86_64-1 and GCC is compiling now.
 
Old 04-19-2016, 06:29 PM   #8
sombragris
Member
 
Registered: Jul 2004
Location: Asuncion, Paraguay, South America
Distribution: Slackware
Posts: 855

Rep: Reputation: 383Reputation: 383Reputation: 383Reputation: 383
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?
 
Old 04-19-2016, 06:53 PM   #9
sombragris
Member
 
Registered: Jul 2004
Location: Asuncion, Paraguay, South America
Distribution: Slackware
Posts: 855

Rep: Reputation: 383Reputation: 383Reputation: 383Reputation: 383
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a way to compile gcc with an older version or build gcc manually? anon002 Linux - Software 10 05-11-2015 01:05 AM
Compile error, 'H5G_obj_t' does not name a type, is gcc 4.3 incompatible with gcc 3 ? samrat_rao Linux - Software 5 03-03-2009 02:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration