Howto: Repackage a library with only the routines of interest?
Is there a way to repackage a static library (to reduce it size) by including only the functions (and their dependencies) that are needed? Are there any tools to help do this? (Help find dependencies, especially. I think doing this manually would take months...) I've managed to rewrite my algorithm(s) using routines from CBLAS and CLAPACK. The application when built is kind of large at 5MB., due to linking the entire CBLAS and CLAPACK libraries with my code. For this application to port to a DSP, I'll need to reduce the application size. One way to do this is to shrink the library. Any tips would be appreciated. TIA, Bruce Bruce Labitt Radar Systems Engineer Autoliv Active Safety 1011B Pawtucket Blvd, PO Box 1858 Lowell, MA 01853 Email: bruce.lab...@autoliv.com. Tel: (978) 674-6526 Fax: (978) 674-6581 ** Neither the footer nor anything else in this E-mail is intended to or constitutes an brelectronic signature and/or legally binding agreement in the absence of an brexpress statement or Autoliv policy and/or procedure to the contrary.brThis E-mail and any attachments hereto are Autoliv property and may contain legally brprivileged, confidential and/or proprietary information.brThe recipient of this E-mail is prohibited from distributing, copying, forwarding or in any way brdisseminating any material contained within this E-mail without prior written brpermission from the author. If you receive this E-mail in error, please brimmediately notify the author and delete this E-mail. Autoliv disclaims all brresponsibility and liability for the consequences of any person who fails to brabide by the terms herein. br ** ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
Re: Howto: Repackage a library with only the routines of interest?
Hi Bruce, I think you'd need to recompile the library. I'm not sure if the 'ar' command might be able to do this, I've never tried it. Hopefully the author was nice enough to include a bunch of preprocessor directives to make removing library functions easy. Another way to shrink the binary is to 'strip' all the symbols out. I'd do that first and see how much space you save. Cheers, David On Wed, Jun 2, 2010 at 9:46 AM, bruce.lab...@autoliv.com wrote: Is there a way to repackage a static library (to reduce it size) by including only the functions (and their dependencies) that are needed? Are there any tools to help do this? (Help find dependencies, especially. I think doing this manually would take months...) I've managed to rewrite my algorithm(s) using routines from CBLAS and CLAPACK. The application when built is kind of large at 5MB., due to linking the entire CBLAS and CLAPACK libraries with my code. For this application to port to a DSP, I'll need to reduce the application size. One way to do this is to shrink the library. Any tips would be appreciated. TIA, Bruce Bruce Labitt Radar Systems Engineer Autoliv Active Safety 1011B Pawtucket Blvd, PO Box 1858 Lowell, MA 01853 Email: bruce.lab...@autoliv.com. Tel: (978) 674-6526 Fax: (978) 674-6581 ** Neither the footer nor anything else in this E-mail is intended to or constitutes an brelectronic signature and/or legally binding agreement in the absence of an brexpress statement or Autoliv policy and/or procedure to the contrary.brThis E-mail and any attachments hereto are Autoliv property and may contain legally brprivileged, confidential and/or proprietary information.brThe recipient of this E-mail is prohibited from distributing, copying, forwarding or in any way brdisseminating any material contained within this E-mail without prior written brpermission from the author. If you receive this E-mail in error, please brimmediately notify the author and delete this E-mail. Autoliv disclaims all brresponsibility and liability for the consequences of any person who fails to brabide by the terms herein. br ** ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/ ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
Re: Howto: Repackage a library with only the routines of interest?
While doing the reverse of what you're asking (ie. combining multiple objects into a single object with mutual references resolved) is common, the information necessary to uncombine them is generally lost in the process, so your best bet would (as others have said) probably be to modify the build process for the library. ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
Re: Howto: Repackage a library with only the routines of interest?
ar d to delete modules? ar x to extract I once built libc.a on a minix system. I had to use tsort on another system to get the dependencies order correct. tsort needed more RAM then minix could provide. On Wed, Jun 2, 2010 at 10:20 AM, Michael ODonnell michael.odonn...@comcast.net wrote: While doing the reverse of what you're asking (ie. combining multiple objects into a single object with mutual references resolved) is common, the information necessary to uncombine them is generally lost in the process, so your best bet would (as others have said) probably be to modify the build process for the library. ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/ ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
Re: Howto: Repackage a library with only the routines of interest?
ar d to delete modules? ar x to extract Gaack! You guys have been saying library right along and my distracted brain kept translating that to object ie. a monolith. But you're right, of course - if he's linking against an ar archive he should be able to pick it apart using ar. And if he's unlucky one library member will depend on another, which will depend on another, etc, and soon he'll be back where he started... -/ ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
Open Source Auction Web Site software on Linux
A client of mine asked me this morning to create a new domain and web site for on-line auctions of their items , eventually, consignments (they are in the collectibles/antiques business, primarily weaponry). They are not trying to reinvent eBay; they only want to list their own items and not the general public's. Rather than write my own, I searched for some existing solutions, but haven't found anything which jumps out as good, let alone, best. Does anyone have any suggestions for on-line auction software, preferably open source, though commercial is acceptable, if source is available (Perl, PHP, or Ruby, preferable)? Running on Linux is mandatory (the distro started out as a RedHat variant years ago, but has been heavily customized since). We host with ICDSoft. They have the usual LAMP setup, as well as PostgreSQL, or other options, as needed. Any package likely will need us to customize it some, presumably nothing onerous, as there are a few oddities of this business (governmental regulations) that off-the-shelf software might not provide. Plus I really prefer to be able to modify anything as needed. So far I've seen the names of phpAuction, AuctionFactory (a module for Joomla), iLance, E-Z Auction, and a smattering of others which appear to be phpAuction-forks. I have only briefly looked at any of these, as I hope someone in the group has some experience with something reliable and, preferably, easy to work with. Any thoughts? TIA. -- Dan Jenkins, Rastech Inc., Bedford, NH, USA - 1-603-206-9951 +++ Excellence in IT Services for four decades. ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
Re: Open Source Auction Web Site software on Linux
Hi Dan: While I won't say it is anywhere near 'best', I did write an Auction package for some local organizations. Written in Django and thus easily customized. Is pretty straight forward to use and extend. You can see samples of it at: http://auction.peterborougchamber.com http://auction.monadpets.org We've been using it for a few years and it addresses our needs. Set up is: Linux Django PostgreSQL. I've not taken the time to package it up, but if you're interested I can whip up a tarball and forward it to you. --Ray - Original Message - From: Dan Jenkins d...@rastech.com To: Greater NH Linux User Group gnhlug-discuss@mail.gnhlug.org Sent: Wednesday, June 2, 2010 11:53:03 AM GMT -05:00 US/Canada Eastern Subject: Open Source Auction Web Site software on Linux A client of mine asked me this morning to create a new domain and web site for on-line auctions of their items , eventually, consignments (they are in the collectibles/antiques business, primarily weaponry). They are not trying to reinvent eBay; they only want to list their own items and not the general public's. Rather than write my own, I searched for some existing solutions, but haven't found anything which jumps out as good, let alone, best. Does anyone have any suggestions for on-line auction software, preferably open source, though commercial is acceptable, if source is available (Perl, PHP, or Ruby, preferable)? Running on Linux is mandatory (the distro started out as a RedHat variant years ago, but has been heavily customized since). We host with ICDSoft. They have the usual LAMP setup, as well as PostgreSQL, or other options, as needed. Any package likely will need us to customize it some, presumably nothing onerous, as there are a few oddities of this business (governmental regulations) that off-the-shelf software might not provide. Plus I really prefer to be able to modify anything as needed. So far I've seen the names of phpAuction, AuctionFactory (a module for Joomla), iLance, E-Z Auction, and a smattering of others which appear to be phpAuction-forks. I have only briefly looked at any of these, as I hope someone in the group has some experience with something reliable and, preferably, easy to work with. Any thoughts? TIA. -- Dan Jenkins, Rastech Inc., Bedford, NH, USA - 1-603-206-9951 +++ Excellence in IT Services for four decades. ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/ -- Ray Cote, President Appropriate Solutions, Inc. We Build Software 603.924.6079 ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
Re: Howto: Repackage a library with only the routines of interest?
Thanks for the tip on tsort. I'll try that. The trick is not the actual archive manipulation, but sorting through the dependencies. Here's hoping it is not too ugly... On Jun 2, 2010 10:41 AM, Tom Buskey t...@buskey.name wrote: ar d to delete modules? ar x to extract I once built libc.a on a minix system. I had to use tsort on another system to get the dependencies order correct. tsort needed more RAM then minix could provide. On Wed, Jun 2, 2010 at 10:20 AM, Michael ODonnell michael.odonn...@comcast.net wrote: Wh... ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/ ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/