On Mon, Aug 20, 2018 at 05:30:19PM -0400, Thomas Dickey wrote: > On Mon, Aug 20, 2018 at 07:32:44PM +0200, Sven Joachim wrote: > > On 2018-08-19 21:02 +0200, Sven Joachim wrote: > > > > > On 2018-08-19 11:48 -0400, Thomas Dickey wrote: > > > > > >> On Sat, Aug 11, 2018 at 09:34:51AM +0200, Sven Joachim wrote: > > >>> Running make twice ought to do nothing in the second run, but if shared > > >>> libraries are enabled, they will always be relinked. Example: > > >> ... > > >>> If "--without-progs --without-tests" is not specified, the result is > > >>> even worse since the programs are recompiled in the second make run. > > >>> This increases build times, invalidates stamp files and has caused > > >>> race conditions in the Debian build as noticed by Helmut Grohne in > > >>> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=903790. > > >> > > >> In my test-package, with the changes for "--disable-relink", I don't > > >> see any relinking left to fix... > > > > > > Indeed, but there seems to be another problem now: "make install" does > > > not always replace the shared libraries in the destination directory. > > > This breaks the Debian build, which relies on installing the non-wide > > > libraries first, then the wide ones. In my test build, dpkg-gensymbols > > > complained about missing symbols in libtinfo.so.6 because of that. > > > > Looking closer, I can only reproduce this if "--disable-relink" is _not_ > > passed to configure. If I add it to CONFARGS in debian/rules, the build > > succeeds. > > > > Attached is a relatively minimal testcase, building two configurations > > where the only difference is "--enable-widec" in one of them. If the > > wide configuration is built first but installed last, "make install.tinfo" > > does not replace libtinfo.so.6.1 in the destination directory. > > I see the problem (lengthy explanation required...): > > a) ncurses makefiles have a dependency of the installed-library on the > pieces needed to make the library (since the "installed" library is > generated during the process of installing: some platforms require > this; you cannot simply copy the file). > > b) in resolving the problem of _not_ relinking a shared library during > its install, I dropped a dependency of the installed library on the > library-directory itself. That's done with a "mkdir -p", to avoid > having the library regenerated every time the make-install is run > after something is modified in that directory. > > c) The dependency was there to ensure the directory existed, not to > force the library to be rebuilt. > > d) in the current situation, your script first creates the parts needed > to generate the library, and then later (tries to) create from > different sets of parts the same file -- twice. Both of those would > be later than the timestamps for the parts, so the make-program > doesn't find anything to do for the second version of the file. > > If your script did a "make uninstall.tinfo" before the second install, > that would fix the problem. (I assume it's a little more complicated > than the example script, of course).
I don't see a better solution than suggesting this change to your package script (since making the library regenerated after changing the contents of the lib-directory was not intentional). > > Cheers, > > Sven > > > > > #!/bin/sh > > > > set -e > > set -x > > INSTDIR=$(mktemp -d -t ncurses-XXXXXX) > > > > mkdir -p build-normal build-wide > > cd build-wide > > ../configure --with-shared --without-normal --without-debug --without-progs > > \ > > --without-tests --with-termlib=tinfo --enable-widec > > --prefix=$INSTDIR > > make -C ncurses -j2 > > cd ../build-normal > > ../configure --with-shared --without-normal --without-debug --without-progs > > \ > > --without-tests --with-termlib=tinfo --prefix=$INSTDIR > > make -C ncurses -j2 > > cd .. > > make -C build-normal/ncurses install.tinfo > > make -C build-wide/ncurses uninstall.tinfo > > > make -C build-wide/ncurses install.tinfo > > if cmp build-normal/lib/libtinfo.so.6.1 $INSTDIR/lib/libtinfo.so.6.1 > > then echo "Wide tinfo library has not been installed over non-wide one!" >&2 > > exit 1 > > fi > > -- Thomas E. Dickey <dic...@invisible-island.net> https://invisible-island.net ftp://ftp.invisible-island.net
signature.asc
Description: Digital signature