LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-06-2005, 09:59 PM   #1
Blash
Member
 
Registered: Apr 2005
Distribution: OpenBSD 4.6
Posts: 54

Rep: Reputation: 15
Compiling from source... (64)


I could compile programs from source easily by make when I was using FC3, the 32 bit one. But on FC3 x86_64 I always get the same error when I try to compile with make:

ld: Relocatable linking with relocations from format elf32-i386 (/home/blash/blah) to format elf64-x86-64 (/home/blash/blah) is not supported.

But I have seen compiled forms of such programs... so it is possible to compile from source... but how?
 
Old 06-07-2005, 03:44 AM   #2
infinity42
Member
 
Registered: Apr 2005
Location: England
Distribution: Gentoo
Posts: 142

Rep: Reputation: 16
To compile to 64bit binaries the libraries you are linking against must also be 64bit. Make sure you have a 64bit version of the library(s) installed that you are trying link against.

Hope that helps..
 
Old 06-07-2005, 08:38 AM   #3
Blash
Member
 
Registered: Apr 2005
Distribution: OpenBSD 4.6
Posts: 54

Original Poster
Rep: Reputation: 15
Ok... but how do I actually do it? How do I install 64-bit libraries?
 
Old 06-07-2005, 02:46 PM   #4
minrich
Member
 
Registered: Aug 2003
Location: Isles of Man & Wight
Distribution: See signature
Posts: 548

Rep: Reputation: 40
I don't know exactly FC3_64 because I am using Suse9.3_64 which has YAST - anyhow, Check that you have gcc, glibc and Kernel source all 64-bit editions installed from your DVD? The only slightly problematical hiccup you might encounter is that sometimes the lib64 directory is not found by some packages that install from binaries and/or src .tar.gz downloads.

Let me know what error messages you get with ./configure, make and/or make install.

HTH
 
Old 06-07-2005, 11:41 PM   #5
Blash
Member
 
Registered: Apr 2005
Distribution: OpenBSD 4.6
Posts: 54

Original Poster
Rep: Reputation: 15
Well this is what is on my system at the moment:
Code:
Installed Packages
gcc.x86_64                               3.4.3-22.fc3           installed
gcc-c++.x86_64                           3.4.3-22.fc3           installed
gcc-g77.x86_64                           3.4.3-22.fc3           installed
gcc-java.x86_64                          3.4.3-22.fc3           installed
gcc-objc.x86_64                          3.4.3-22.fc3           installed
gcc4.x86_64                              4.0.0-0.41.fc3         installed
gcc4-c++.x86_64                          4.0.0-0.41.fc3         installed
gcc4-gfortran.x86_64                     4.0.0-0.41.fc3         installed
glibc.x86_64                             2.3.5-0.fc3.1          installed
glibc.i686                               2.3.5-0.fc3.1          installed
glibc-common.x86_64                      2.3.5-0.fc3.1          installed
glibc-devel.i386                         2.3.5-0.fc3.1          installed
glibc-devel.x86_64                       2.3.5-0.fc3.1          installed
glibc-headers.x86_64                     2.3.5-0.fc3.1          installed
glibc-kernheaders.x86_64                 2.4-9.1.87             installed
glibc-profile.x86_64                     2.3.5-0.fc3.1          installed
glibc-utils.x86_64                       2.3.5-0.fc3.1          installed
kernel.x86_64                            2.6.11-1.27_FC3        installed
kernel.x86_64                            2.6.9-1.667            installed
kernel-doc.noarch                        2.6.11-1.27_FC3        installed
kernel-module-nvidia-2.6.11-1.27_FC3.x86 1.0.7174-0.lvn.1.3     installed
kernel-utils.x86_64                      1:2.4-13.1.49_FC3      installed


Available Packages
gcc-debuginfo.x86_64                     3.4.3-22.fc3           updates-releasedgcc-gnat.x86_64                          3.4.3-22.fc3           updates-releasedgcc4-debuginfo.x86_64                    4.0.0-0.41.fc3         updates-releasedglibc.i386                               2.3.5-0.fc3.1          updates-releasedglibc-debuginfo.x86_64                   2.3.5-0.fc3.1          updates-releasedkernel-debuginfo.x86_64                  2.6.11-1.27_FC3        updates-released
They seem x84_64 to me...
 
Old 06-08-2005, 11:32 AM   #6
minrich
Member
 
Registered: Aug 2003
Location: Isles of Man & Wight
Distribution: See signature
Posts: 548

Rep: Reputation: 40
My, it was a long way over to click on post a reply!

On first glance, you appear to be missing a package, that my distro names 'kernel-source', I would suggest that you do a search for it.

Also I don't think that you need the packages starting gcc4* (you should uninstall).

If you can find the kernel-source and get rid of the gcc4 packages, I would like to see the errors when you try to compile Elf64.

HTH
 
Old 06-08-2005, 12:34 PM   #7
Blash
Member
 
Registered: Apr 2005
Distribution: OpenBSD 4.6
Posts: 54

Original Poster
Rep: Reputation: 15
Here's an example of compiling from source and not suceed, but not the only example:

Code:
Checking if all requirements are met... ok.
mkdir -p ./symbols
for i in ./ath_hal ath_rate/onoe ./net80211 ./ath; do \
        (cd $i; make) || exit 1; \
done
make[1]: Entering directory `/root/madwifi/ath_hal'
make -C /lib/modules/2.6.11-1.27_FC3/build SUBDIRS=/root/madwifi/ath_hal MODVERDIR=/root/madwifi/ath_hal/../symbols modules
make[2]: Entering directory `/lib/modules/2.6.11-1.27_FC3/build'
  LD [M]  /root/madwifi/ath_hal/ath_hal.o
ld: Relocatable linking with relocations from format elf32-i386 (/root/madwifi/ath_hal/hal.o) to format elf64-x86-64 (/root/madwifi/ath_hal/ath_hal.o) is not supported
make[3]: *** [/root/madwifi/ath_hal/ath_hal.o] Error 1
make[2]: *** [_module_/root/madwifi/ath_hal] Error 2
make[2]: Leaving directory `/lib/modules/2.6.11-1.27_FC3/build'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/root/madwifi/ath_hal'
make: *** [all] Error 1
Seems like `/lib/modules/2.6.11-1.27_FC3/build' is the kernel source directory... I am not too sure though, this is the content of that directory:
Code:
total 372
drwxr-xr-x  25 root root   4096 May 31 18:05 arch
drwxr-xr-x   4 root root   4096 May 31 18:05 crypto
drwxr-xr-x  47 root root   4096 May 31 18:05 drivers
drwxr-xr-x  54 root root   4096 May 31 18:05 fs
drwxr-xr-x  15 root root   4096 May 31 18:05 include
drwxr-xr-x   2 root root   4096 May 31 18:05 init
drwxr-xr-x   2 root root   4096 May 31 18:05 ipc
drwxr-xr-x   4 root root   4096 May 31 18:05 kernel
drwxr-xr-x   5 root root   4096 May 31 18:05 lib
-rw-r--r--   1 root root  43483 May 18 10:34 Makefile
drwxr-xr-x   2 root root   4096 May 31 18:05 mm
-rw-r--r--   1 root root 200455 May 18 10:34 Module.symvers
drwxr-xr-x  33 root root   4096 May 31 18:05 net
drwxr-xr-x  10 root root   4096 May 31 18:05 scripts
drwxr-xr-x   4 root root   4096 May 31 18:05 security
drwxr-xr-x  16 root root   4096 May 31 18:05 sound
drwxr-xr-x   2 root root   4096 May 31 18:05 usr
gcc4 shouldn't be a problem, since the command gcc invokes gcc3 compiler while gcc4 command would invoke gcc4 compiler... and this is configured properly in this case, for madwifi.
 
Old 06-08-2005, 02:14 PM   #8
minrich
Member
 
Registered: Aug 2003
Location: Isles of Man & Wight
Distribution: See signature
Posts: 548

Rep: Reputation: 40
If you hover a cursor over the 'build' directory using a File Manager - Super User Mode with View hidden files (this is what I use) you should see
properties that show a link to something like: /usr/src/linus-2.6.11.4-20a-obj/x86_64/default (that is what I get).

I agree wrt gcc4 (it shouldn't be an issue, but uninstalling it does no harm and eliminates any possible package compilation problems being triggered by its presence).

I am surprised by the size of your makefile (as listed under your 'build' directrory) since mine is only 330 bytes - all it appears to do (in my case) is set

KERNELSRC := ../../../linux-2.6.11.4-20a
KERNELOUTPUT := ../linux-2.6.11.4-20a-obj/x86_64/default

When you quoted an example of compiling from source, that didn't succeed, where exactly in the process did this occur?

Am I correct in assuming that you are starting with a tar.gz (or the like thereof) rather than an .rpm? All I can find in my copy of Red Hat Linux Bible (for Fedora and
Enterprise Edition) is that you should run:

# ./configure -prefix=/usr
# make all after reading the INSTALL or README file and finding a make.in file in the untarred directory

If there is an Imake file, try running:

# xmkmf -a
# make all

If there is a Make file, try running:

# make all

Hope this helps
 
Old 06-11-2005, 12:31 AM   #9
Blash
Member
 
Registered: Apr 2005
Distribution: OpenBSD 4.6
Posts: 54

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by minrich
If you hover a cursor over the 'build' directory using a File Manager - Super User Mode with View hidden files (this is what I use) you should see
properties that show a link to something like: /usr/src/linus-2.6.11.4-20a-obj/x86_64/default (that is what I get).
Is that the same as ll -a?

Code:
[root@localhost ~]# ll -a /lib/modules/2.6.11-1.27_FC3/build/
total 440
drwxr-xr-x  17 root root   4096 May 31 18:05 .
drwxr-xr-x   5 root root   4096 May 31 20:50 ..
drwxr-xr-x  25 root root   4096 May 31 18:05 arch
-rw-r--r--   1 root root  49001 May 18 10:34 .config
drwxr-xr-x   4 root root   4096 May 31 18:05 crypto
drwxr-xr-x  47 root root   4096 May 31 18:05 drivers
drwxr-xr-x  54 root root   4096 May 31 18:05 fs
drwxr-xr-x  15 root root   4096 May 31 18:05 include
drwxr-xr-x   2 root root   4096 May 31 18:05 init
drwxr-xr-x   2 root root   4096 May 31 18:05 ipc
drwxr-xr-x   4 root root   4096 May 31 18:05 kernel
drwxr-xr-x   5 root root   4096 May 31 18:05 lib
-rw-r--r--   1 root root  43483 May 18 10:34 Makefile
drwxr-xr-x   2 root root   4096 May 31 18:05 mm
-rw-r--r--   1 root root 200455 May 18 10:34 Module.symvers
drwxr-xr-x  33 root root   4096 May 31 18:05 net
drwxr-xr-x  10 root root   4096 May 31 18:05 scripts
drwxr-xr-x   4 root root   4096 May 31 18:05 security
drwxr-xr-x  16 root root   4096 May 31 18:05 sound
drwxr-xr-x   2 root root   4096 May 31 18:05 usr
I don't see any links...

Quote:
I am surprised by the size of your makefile (as listed under your 'build' directrory) since mine is only 330 bytes - all it appears to do (in my case) is set

KERNELSRC := ../../../linux-2.6.11.4-20a
KERNELOUTPUT := ../linux-2.6.11.4-20a-obj/x86_64/default
So... what do I do?

Quote:
When you quoted an example of compiling from source, that didn't succeed, where exactly in the process did this occur?
Nothing much really, I just used to "make" command... when I was in 32-bit in the past, all I had to do is make; make install;
Quote:
Am I correct in assuming that you are starting with a tar.gz (or the like thereof) rather than an .rpm? All I can find in my copy of Red Hat Linux Bible (for Fedora and
Enterprise Edition) is that you should run:

# ./configure -prefix=/usr
# make all after reading the INSTALL or README file and finding a make.in file in the untarred directory

If there is an Imake file, try running:

# xmkmf -a
# make all

If there is a Make file, try running:

# make all

Hope this helps
Well yes I did have a .tar.gz; but yea... do you have any other ideas? I don't have much experience in Linux so yea...

I don't even know what the problem is... is it the distro? Kernel? Kernel source? Compiler? The way the source was written?

Last edited by Blash; 06-11-2005 at 12:32 AM.
 
  


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
compiling apt from source - where's the source? stynhx9000 Ubuntu 2 12-01-2005 07:32 AM
Help with Compiling from Source Hubmasterflex Linux - Software 2 06-11-2005 06:30 PM
compiling software from source...how do i delete the folder w/ source? webazoid Linux - Software 2 07-01-2004 09:09 PM
Compiling Qt-3.2.1 from source Kroenecker Linux - Software 1 02-08-2004 07:45 AM
Compiling from Source dguy Linux - Newbie 6 05-27-2002 11:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:54 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