[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: question about "invalid string offset" & "could not read symbols: Ma

From: Roger Moore
Subject: Re: question about "invalid string offset" & "could not read symbols: Malformed archive" linker errors (fwd)
Date: Thu, 28 Aug 2008 11:38:18 -0600 (MDT)

Hi Nick,

On Wed, 27 Aug 2008, Nick Clifton wrote:

> > Do you have any other ways I could extract tapp.o besides using ar?  
> Nope, sorry.
> > Please find libxvtxmapi.a and tapp.o 
> Well that libxvtxmapi.a is definitely corrupt, and he tapp.o file is OK.
> > If I take ranlib out of the link.txt file, and then try to build, I get 
> > the same malformed archive message on libxvtxmapi.a, so it appears that 
> > the corruption occurs before ranlib is called.
> OK, then "ar" is the culprit.
> > address@hidden debug]$ ar --version
> > GNU ar (GNU Binutils)
> Looks good - are you sure that this the version being used by cmake ? 
> Ie is it possible that you have other versions of the ar program in your 
> search path ?

It turns out there *is* another ar in the path:

address@hidden pclinux]$ ls /usr/bin/ar
address@hidden pclinux]$ /usr/bin/ar --version
GNU ar 20061020
Copyright 2005 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License.  This program has absolutely no warranty.
address@hidden pclinux]$ 

The ar located in /usr/local/bin is the one that is version 2.18.  

> > Do you have any suggestions in terms of how to intercept the build 
> > process?
> First check to see if the corruption takes place if you run the "ar" 
> command by hand, ie not inside the cmake process.  If the corruption 
> does happen then it is the ar program that is to blame.  If the 
> corruption does not happen then it is the build process/cmake that is to 
> blame.

If I explicitly run the *correct* ar command by hand,

/usr/local/bin/ar cr ../../lib/libxvtxmapi.a  
"CMakeFiles/xvtxmapi.dir/tapp.o" "CMakeFiles/xvtxmapi.dir/tcb.o" 
"CMakeFiles/xvtxmapi.dir/tctl.o" "CMakeFiles/xvtxmapi.dir/tcxo.o" 
"CMakeFiles/xvtxmapi.dir/tdebug.o" "CMakeFiles/xvtxmapi.dir/tdlg.o" 
"CMakeFiles/xvtxmapi.dir/tdm.o" "CMakeFiles/xvtxmapi.dir/tdwin.o" 
"CMakeFiles/xvtxmapi.dir/terr.o" "CMakeFiles/xvtxmapi.dir/tevent.o" 
"CMakeFiles/xvtxmapi.dir/tfont.o" "CMakeFiles/xvtxmapi.dir/tfsys.o" 
"CMakeFiles/xvtxmapi.dir/tgmem.o" "CMakeFiles/xvtxmapi.dir/thtml.o" 
"CMakeFiles/xvtxmapi.dir/timage.o" "CMakeFiles/xvtxmapi.dir/tiostr.o" 
"CMakeFiles/xvtxmapi.dir/tlist.o" "CMakeFiles/xvtxmapi.dir/tmem.o" 
"CMakeFiles/xvtxmapi.dir/tmenu.o" "CMakeFiles/xvtxmapi.dir/tnav.o" 
"CMakeFiles/xvtxmapi.dir/tnotebk.o" "CMakeFiles/xvtxmapi.dir/tpalet.o" 
"CMakeFiles/xvtxmapi.dir/tpat.o" "CMakeFiles/xvtxmapi.dir/tpict.o" 
"CMakeFiles/xvtxmapi.dir/tpmap.o" "CMakeFiles/xvtxmapi.dir/tprint.o" 
"CMakeFiles/xvtxmapi.dir/trect.o" "CMakeFiles/xvtxmapi.dir/tres.o" 
"CMakeFiles/xvtxmapi.dir/tsbar.o" "CMakeFiles/xvtxmapi.dir/tscr.o" 
"CMakeFiles/xvtxmapi.dir/tslist.o" "CMakeFiles/xvtxmapi.dir/tstr.o" 
"CMakeFiles/xvtxmapi.dir/ttimer.o" "CMakeFiles/xvtxmapi.dir/ttreev.o" 
"CMakeFiles/xvtxmapi.dir/ttx.o" "CMakeFiles/xvtxmapi.dir/tvobj.o" 
"CMakeFiles/xvtxmapi.dir/twin.o" "CMakeFiles/xvtxmapi.dir/rotated.o" 

It gives me this ouput:

/usr/local/bin/ar: ../../lib/libxvtxmapi.a: Malformed archive
> If it is "ar" that is to blame, please could you see if you can reduce 
> the test to as few input object files as possible (whilst still showing 
> the corruption of tapp.o) and then put them together into a tarball and 
> email it to me, along with a copy of the exact command line that you 
> have been using. Ie I would like to try to reproduce the corruption locally.

Okay, I'll send the files to you shortly.  The command I'm using is 
simply 'make'.

Thank you,


reply via email to

[Prev in Thread] Current Thread [Next in Thread]