Re: [greenstone-users] Problem: wrong ELF machine type: EM_386

From John R. McPherson
DateFri, 20 Feb 2004 09:26:40 +1300
Subject Re: [greenstone-users] Problem: wrong ELF machine type: EM_386
In-Reply-To (BAY10-F68GXuRzgn7Ya0006d747-hotmail-com)
On Thu, Feb 19, 2004 at 05:35:21PM +0000, rain Hanks wrote:
> Hello,
>
> I encountered a problem when I try to do " make all" to complile the
> gsdl-2.41 files. When the "make all" reaches the directory src/recpt, the
> following problems occur:
>
> making all in src/recpt
>
> make[1]: Entering directory
> `/export/home/yzhu/greenstone/gsdl-2.41-src/gsdl/src/recpt'
> g++ -o library receptionist.o cgiwrapper.o cgiargs.o action.o
> browserclass.o converter.o recptconfig.o cgiutils.o OIDtools.o
> browsetools.o statusaction.o pageaction.o comtypes.o recptproto.o
...
> -L/export/home/yzhu/greenstone/gdbm/lib -lgdbm -lcrypt -lstdc++ -lm
>
> ld: warning: file
> /export/home/yzhu/greenstone/gdbm/lib/libgdbm.a(gdbmopen.o): wrong ELF
> machine type: EM_386
> Undefined first referenced
> symbol in file
> gdbm_delete infodbclass.o
> gdbm_firstkey infodbclass.o
> gdbm_nextkey infodbclass.o
> gdbm_close infodbclass.o
> gdbm_store infodbclass.o
> gdbm_errno infodbclass.o
> gdbm_fetch infodbclass.o
> gdbm_open infodbclass.o
> ld: fatal: Symbol referencing errors. No output written to library
> collect2: ld returned 1 exit status
> make[1]: *** [library] Error 1
> make[1]: Leaving directory
> `/export/home/yzhu/greenstone/gsdl-2.41-src/gsdl/src/recpt'
> make: *** [all] Error 1
>
> Could anyone help me figure out what is wrong with it? What does
> "wrong ELF machine type: EM_386" mean? something wrong with the
> compiler?

You didn't say what operating system or architecture you are using,
so I'm assuming you are on a Sun Sparc machine :)

ELF refers to the executable file format, so it looks like there is a
problem with your gdbm library compilation (EM_386 refers to Intel
architectures). I haven't seen anything like that before, so I can't
really offer any insights. Perhaps you could try installing a binary
version of gdbm for solaris, and run your configure script again
(without the --with-gdbm=... option).

John