LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-14-2007, 07:35 AM   #1
johnpaulodonnell
Member
 
Registered: Jun 2006
Location: Galway
Distribution: Suse 10.1
Posts: 114

Rep: Reputation: 15
warning: unknown architecture of input file *** incompatible with i386 output


Hi.

Trying to compile a seismic format conversion program ms2sac on a 32-bit machine running Mandrake 9.2. The compiler is the cc compiler. Getting the following error messages:

[jp@seismic ms2sac]$ make
(cd ../qlib2; make)
make[1]: Entering directory `/home/jp/ms2sac/qlib2'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/jp/ms2sac/qlib2'
cc -g -I../qlib2 -DDEFAULT_COORD_FILE=\"/usr/contrib/data/bdsn/bdsn.coord\" -o ms2sac ms2sac.o read_mseed_data.o get_stn_evt_info.o init_sac_header.o write_sac.o ../qlib2/libqlib2.a -lm
/usr/bin/ld: warning: unknown architecture of input file `../qlib2/libqlib2.a(qlib2_version.o)' is incompatible with i386 output
/usr/bin/ld: warning: unknown architecture of input file `../qlib2/libqlib2.a(ms_utils.o)' is incompatible with i386 output
/usr/bin/ld: warning: unknown architecture of input file `../qlib2/libqlib2.a(ms_unpack.o)' is incompatible with i386 output
/usr/bin/ld: warning: unknown architecture of input file `../qlib2/libqlib2.a(qtime.o)' is incompatible with i386 output
/usr/bin/ld: warning: unknown architecture of input file `../qlib2/libqlib2.a(sdr_utils.o)' is incompatible with i386 output
/usr/bin/ld: warning: unknown architecture of input file `../qlib2/libqlib2.a(unpack.o)' is incompatible with i386 output
/usr/bin/ld: warning: unknown architecture of input file `../qlib2/libqlib2.a(qutils.o)' is incompatible with i386 output
/usr/bin/ld: warning: unknown architecture of input file `../qlib2/libqlib2.a(drm_utils.o)' is incompatible with i386 output
/usr/bin/ld: warning: unknown architecture of input file `../qlib2/libqlib2.a(qda_utils.o)' is incompatible with i386 output
/usr/bin/ld: BFD 2.14.90.0.5 20030722 internal error, aborting at elf32-i386.c line 2242 in elf_i386_relocate_section

/usr/bin/ld: Please report this bug.

collect2: ld returned 1 exit status
make: *** [ms2sac] Error 1


So this is some kind of 64-bit / 32-bit clash? The relevant part of the Makefile is:

########################################################################
TARGET = ms2sac

SRCS = $(TARGET).c read_mseed_data.c get_stn_evt_info.c \
init_sac_header.c write_sac.c

OBJS = $(SRCS:%.c=%.o)

COORD_FILE = \"/usr/contrib/data/bdsn/stat.db.coord\"
IQLIB2 = -I../qlib2
QLIB2 = ../qlib2/libqlib2.a
LIBS = $(QLIB2) -lm

.PRECIOUS: $(QLIB2)

BINDIR = /usr/local/bin
MANDIR = /usr/local/man
MANEXT = 1

CC = cc
COPT = -g
CFLAGS = $(COPT) $(IQLIB2) -DDEFAULT_COORD_FILE=$(COORD_FILE)

########################################################################


The ms2sac program needs qlib2 stuff...which does compile ok - see above. Any help with sorting this out would be much appreciated...I don't really know much at all about different architecture issues.

Thanks.
 
Old 02-14-2007, 08:23 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
It seems libqlib2.a has been compiled previously for another OS (like SUN or any other). Indeed, the following lines tell that qlib2 has not been compiled from your system, because the binaries were already there!
Code:
make[1]: Entering directory `/home/jp/ms2sac/qlib2'
make[1]: Nothing to be done for `all'.
You can try to go into directory qlib2 and issue a
Code:
make clean
command. This will hopefully remove any previously compiled qlib2 object file. Then try to do
Code:
make
inside qlib2. After this you can return to the ms2sac dir and proceed with compiling.
 
Old 02-14-2007, 08:37 AM   #3
johnpaulodonnell
Member
 
Registered: Jun 2006
Location: Galway
Distribution: Suse 10.1
Posts: 114

Original Poster
Rep: Reputation: 15
It seems libqlib2.a has been compiled previously for another OS (like SUN or any other). Indeed, the following lines tell that qlib2 has not been compiled from your system, because the binaries were already there!
Code:

make[1]: Entering directory `/home/jp/ms2sac/qlib2' make[1]: Nothing to be done for `all'.

Unfortunatley that isn't the problem! When I first downloaded the qlib2 package there were binaries included but they would not execute...most likely for the reason you say. So I deleted them and ran make in the qlib2 directory - then went on to the ms2sac directory. That's why the Nothing to be done for 'all' is there at the top.

There was a ms2sac binary as well but of course this didn't execute either...

Thanks anyway!
 
Old 02-14-2007, 09:58 AM   #4
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Quote:
Originally Posted by johnpaulodonnell
So I deleted them and ran make in the qlib2 directory - then went on to the ms2sac directory.
Do you mean you have manually deleted them? I'd suggest to download the qlib2 source again and do a safe "make clean", instead. Don't give up... I am pretty sure there is a workaround for this compilation issue!
 
Old 02-14-2007, 10:41 AM   #5
johnpaulodonnell
Member
 
Registered: Jun 2006
Location: Galway
Distribution: Suse 10.1
Posts: 114

Original Poster
Rep: Reputation: 15
Tried that but getting same errors! One other thing...at the end of the makefile there's a list of the object files and their dependencies:

Code:
                              .......................................................
                              .......................................................
########################################################################
# DO NOT DELETE THIS LINE -- make depend depends on it.

init_sac_header.o: /usr/include/stdio.h /usr/include/sys/feature_tests.h
init_sac_header.o: /usr/include/sys/va_list.h ../qlib2/qlib2.h
init_sac_header.o: /usr/include/sys/param.h /usr/include/sys/types.h
init_sac_header.o: /usr/include/sys/isa_defs.h /usr/include/sys/machtypes.h
init_sac_header.o: /usr/include/sys/int_types.h /usr/include/sys/select.h
init_sac_header.o: /usr/include/sys/time.h /usr/include/sys/time.h
init_sac_header.o: /usr/include/sys/unistd.h ../qlib2/drm_seismo.h procs.h
init_sac_header.o: sachead.h
ms2sac.o: /usr/include/stdio.h /usr/include/sys/feature_tests.h
ms2sac.o: /usr/include/sys/va_list.h version.h ../qlib2/qlib2.h
ms2sac.o: /usr/include/sys/param.h /usr/include/sys/types.h
ms2sac.o: /usr/include/sys/isa_defs.h /usr/include/sys/machtypes.h
ms2sac.o: /usr/include/sys/int_types.h /usr/include/sys/select.h
ms2sac.o: /usr/include/sys/time.h /usr/include/sys/time.h
ms2sac.o: /usr/include/sys/unistd.h ../qlib2/drm_seismo.h procs.h sachead.h
                          ...........       ETC ETC     ...........
Sorry for the big ream! A lot of these .h files do not exist on my system (Suse10.1) and I've checked Mandrake 9.2 as well and they're not there....eg /usr/include/sys/feature_tests.h

Code:
make: *** No rule to make target `/usr/include/sys/feature_tests.h', needed by `ms2sac.o'.  Stop.
I googled this and it seems that these redundant(?) entries can just be deleted from the makefile. Once I do this I run make to get the original errors...I do not think that the removal of these entries has any bearing on it - although I could well be wrong!

So all in all I'm still stuck!
 
Old 02-14-2007, 04:44 PM   #6
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Indeed, some of the header files are not from Linux... they are usually installed on SUN Solaris! If this incompatibility is for header files only, you can get them from a SUN machine (if available) and hopefully they will be recognized from the compiler. It is likely at this point that the software has been developed for a SUN OS. However I see no apparent reason for the qlib2 you have (successfully?) compiled on your system to be addicted as "incompatible for i386".

Edit: just another hint: check if in the Makefile of qlib2 there is a flag regarding the endianity, since SUN OS are generally installed on BIG ENDIAN architectures, while Linux is generally on LITTLE ENDIAN machines.

Last edited by colucix; 02-14-2007 at 05:19 PM.
 
  


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
Ndiswrapper error: Incompatible architecture bmccorm2 Linux - Wireless Networking 1 08-28-2006 01:53 PM
audio file input, shout/ice/other-cast output zefram Linux - Networking 0 05-01-2006 04:30 AM
Can't rm file with Input/Output error drlaz Linux - General 0 02-23-2005 06:06 PM
how to use the output of a file for input of a command sneak Linux - General 2 05-12-2004 09:21 AM
logging all keyboard input/output to a file div Linux - General 0 02-20-2001 05:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:30 PM.

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