convenience libraries & binary size
In an autotools project, I recently moved sourcefiles into convenience libraries, because the number of sourcefiles was getting rather large. Before this reorganisation, the binary size of the resulting (stripped) executable was about 800KB. But after I moved about 50% of the total sourcecode into convenience libraries, the stripped executable had grown to a huge 1200KB. (this application is for an embedded controller, so binary size is a big issue) Is this a normal sideeffect when using convenience libraries? I tried to strip the libraries before linking them, but that also got rid of all symbols that weren't used by the library itself, so that's not an option. Any suggestions or alternatives are very much appreciated. Best regards, Pieter
running tests with automake on windows with mingw...
Howdy Automakers! I have finally gotten my library to build under mingw on windows, which is great, but there is a problem running the test programs. For each test program, on windows I get both an exe file and a shell wrapper. For example, with the test program t_nc.c, which on unix will end up as an executable t_nc, on windows I get an executable, t_nc.exe, and a shell script, t_nc. When I call the shell script, it works great. But when I run "make check" it doesn't call the shell script. It calls the .exe file, and that fails: libtool: link: gcc -g -O2 -o .libs/t_nc.exe t_nc.o ./.libs/libnetcdf.dll.a -L/usr/local/lib libtool: link: creating t_nc.exe make[2]: Leaving directory `/c/cygwin/home/ed/netcdf-3/libsrc' make check-TESTS make[2]: Entering directory `/c/cygwin/home/ed/netcdf-3/libsrc' FAIL: t_nc.exe However, if I run the t_nc script, directly from the command line, all works as expected: $ libsrc/t_nc dimrename: IXX nc_close ret = 0 reopen id = 3 for filename test.nc NC done GATTR VAR VATTR VATTR VATTR ... So how do I get automake to use the shell script, and not the .exe, when it builds the Makefile that runs the tests? Thanks! Ed -- Ed Hartnett -- [EMAIL PROTECTED]
Re: running tests with automake on windows with mingw...
When I call the shell script, it works great. But when I run "make check" it doesn't call the shell script. It calls the .exe file, and that fails: I see that you failed to identify the versions of autoconf, automake, and libtool you are using. Often it makes a difference, particularly when libtool is involved. Anyone reporting a problem with autotools should also report which versions are involved. The commands executed by the 'check' target in Makefile.am are entirely up to you. Probably you have added something (e.g. "$(EXEEXT)") which adds this .exe extension to the command name. For example you can have check: ./foo bar and your ./foo will never be converted to "./foo.exe". Bob == Bob Friesenhahn [EMAIL PROTECTED], http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer,http://www.GraphicsMagick.org/
Re: running tests with automake on windows with mingw...
Bob Friesenhahn <[EMAIL PROTECTED]> writes: >> >> When I call the shell script, it works great. But when I run "make >> check" it doesn't call the shell script. It calls the .exe file, and >> that fails: > > I see that you failed to identify the versions of autoconf, automake, > and libtool you are using. Often it makes a difference, particularly > when libtool is involved. Anyone reporting a problem with autotools > should also report which versions are involved. Of course, here they are: [EMAIL PROTECTED] ~/netcdf-3 $ autoconf --version autoconf (GNU Autoconf) 2.59 [EMAIL PROTECTED] ~/netcdf-3 $ automake --version automake (GNU automake) 1.9.6 [EMAIL PROTECTED] ~/netcdf-3 $ libtool --version ltmain.sh (GNU libtool 1.2304 2006/05/24 11:54:59) 2.1a > > The commands executed by the 'check' target in Makefile.am are > entirely up to you. Probably you have added something > (e.g. "$(EXEEXT)") which adds this .exe extension to the command name. > > For example you can have > > check: > ./foo bar > > and your ./foo will never be converted to "./foo.exe". I have no check target per se, just the automake primary. I have: # Test the netCDF-3 library. check_PROGRAMS = t_nc TESTS = ${check_PROGRAMS} This yields in the Makefile: check_PROGRAMS = t_nc$(EXEEXT) I see also in the automake manual here that this is something automake does automatically: http://sources.redhat.com/automake/automake.html#EXEEXT However it looks like this should not happen on mingw builds, because apparently some tool is constructing the shell script wrappers which make the EXEEXT unneeded. Thanks, Ed -- Ed Hartnett -- [EMAIL PROTECTED]
Re: running tests with automake on windows with mingw...
On Wed, 26 Jul 2006, Ed Hartnett wrote: I have no check target per se, just the automake primary. I have: # Test the netCDF-3 library. check_PROGRAMS = t_nc TESTS = ${check_PROGRAMS} This yields in the Makefile: check_PROGRAMS = t_nc$(EXEEXT) I see. It appears that the auto-extension of PROGRAMS (as explained in the automake URL you referenced) is causing the problem. This approach should work: TESTPROGRAMS = t_nc check_PROGRAMS = $(TESTPROGRAMS) TESTS = $(TESTPROGRAMS) Bob == Bob Friesenhahn [EMAIL PROTECTED], http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer,http://www.GraphicsMagick.org/
Re: running tests with automake on windows with mingw...
Bob Friesenhahn <[EMAIL PROTECTED]> writes: > On Wed, 26 Jul 2006, Ed Hartnett wrote: >> >> I have no check target per se, just the automake primary. I have: >> >> # Test the netCDF-3 library. >> check_PROGRAMS = t_nc >> TESTS = ${check_PROGRAMS} >> >> This yields in the Makefile: >> >> check_PROGRAMS = t_nc$(EXEEXT) > > I see. It appears that the auto-extension of PROGRAMS (as explained > in the automake URL you referenced) is causing the problem. This > approach should work: > > TESTPROGRAMS = t_nc > check_PROGRAMS = $(TESTPROGRAMS) > TESTS = $(TESTPROGRAMS) > > Bob > == > Bob Friesenhahn > [EMAIL PROTECTED], http://www.simplesystems.org/users/bfriesen/ > GraphicsMagick Maintainer,http://www.GraphicsMagick.org/ > > Yes indeed, that works great! Thanks! Ed -- Ed Hartnett -- [EMAIL PROTECTED]