Re: [PHP4] Problem with old versions of 'ar'

From: Date: Tue, 28 Mar 2000 17:26:51 +0000
Subject: Re: [PHP4] Problem with old versions of 'ar'
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-17322@lists.php.net to get a copy of this message
Sascha Schumann wrote: > > > That may or may not work :) Basically, you're requiring them > > to totally rebuild their entire compiler/assembler/loader system just > > so they can use GNU ar just because they can use libtool. > > > > Seems a bit much :) :) > > No. You need to build one single package. There is no separate ar. > Oh... I have binutils 2.8.1 which has a whole suite of programs, ar, strings, nm, etc... as well as as and ld. At least with this version, you install that and it replaces what you have, or supliments it. So, if you do convince libtool to use GNU ar, then you also need to convince your compiler to use GNU ld (and most likely GNU as and gcc) or else you won't be able to read your .a archive. The fix is pretty easy. It makes one assumption, which is pretty valid with older ar's. Basically, it assumes that whatever was 'ar cru'ed initially in the *.a archive, should also be re-added to the new archive. What libtool does is create a new directory and 'ar x's the archive there, extracting all the object files. It then selects only those ending in .o or .lo to be readded to the "old style" archive. If truncation occured, then some won't be added. The hack is to select _all_ the files in that temp dir. The only files that will exist there will be those that were in the initial archive, so it's "pretty safe" to do that. Ideally, a better fix would be to see if the archiver truncates, and if it does pre-truncate and leave room for an extension. Get's involves because of filename conflicts, and needing to make sure you generate unique pre-truncated ones. I have Email into the libtool maintainers to see if it's worth my time... if it's gonna wind up in some black hole, forget it :) By the by, if a local copy of libtool exists, shouldn't PHP4 use that one, as long as it's as new as what's required? PS: I'm cc'ing this to new-httpd. It's also appropriate, or at least informative, there :) -- =========================================================================== Jim Jagielski [|] jim@jaguNET.com [|] http://www.jaguNET.com/ "Are you suggesting coconuts migrate??"

« previous php.dev (#17322) next »