From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3590 invoked by alias); 14 Jul 2002 17:06:42 -0000 Mailing-List: contact insight-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: insight-owner@sources.redhat.com Received: (qmail 3583 invoked from network); 14 Jul 2002 17:06:41 -0000 Received: from unknown (HELO disaster.jaj.com) (66.93.20.253) by sources.redhat.com with SMTP; 14 Jul 2002 17:06:41 -0000 Received: (from phil@localhost) by disaster.jaj.com (8.11.4/8.11.4) id g6EH6eb28571; Sun, 14 Jul 2002 12:06:40 -0500 Date: Sun, 14 Jul 2002 10:06:00 -0000 From: Phil Edwards To: insight@sources.redhat.com Subject: Tk lib build doesn't look in the Tcl build directory Message-ID: <20020714130640.A28498@disaster.basement.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i X-SW-Source: 2002-q3/txt/msg00013.txt.bz2 Trying to build CVS GDB. It fails in the tk stage with (command wrapped): rm -f libtk8.3.so gcc -pipe -shared -o libtk8.3.so [a gazillion object files] -Wl,-rpath,/home/pme/build/install-2002-07-14/lib:/usr/X11R6/lib -L/home/pme/build/install-2002-07-14/lib -ltclstub8.3 -L/usr/X11R6/lib -lX11 -ldl -lieee -lm -lc /usr/bin/ld: cannot find -ltclstub8.3 collect2: ld returned 1 exit status gmake[2]: *** [libtk8.3.so] Error 1 gmake[2]: Leaving directory `/home/pme/build/build-2002-07-14/tk/unix' Looking in the generated Makefile, I see the rule being fired is ${TK_LIB_FILE}: ${OBJS} rm -f ${TK_LIB_FILE} ${SHLIB_LD} -o ${TK_LIB_FILE} ${OBJS} $(TK_LD_SEARCH_FLAGS) -L/home/pme/build/install-2002-07-14/lib -ltclstub8.3${TCL_DBGX} ${LIBS} @case ${TK_LIB_FILE} in *.a) $(TK_RANLIB) ${TK_LIB_FILE};; esac Okay, that's obvious enough. The -l is being given, but not the correct -L, since tcl hasn't been installed yet (the tree is still building). Where is this line generated from? The tk/unix/Makefile.in has the entire line written as @MAKE_LIB@. This in turn is set in tk/unix/configure.in with MAKE_LIB="\${SHLIB_LD} -o \${TK_LIB_FILE} \${OBJS} \$(TK_LD_SEARCH_FLAGS) ${TCL_STUB_LIB_SPEC} \${LIBS}" so the "-L$prefix/lib -ltclstub8.3" is clearly the expansion of TCL_STUB_LIB_SPEC. However, this variable seems to be set in some other tclConfig file, and that's as far as I got before giving up. Am I the only one seeing this? It would seem that the Tk build requires all the Tcl stuff to have been /installed/, not just built, before it itself can build. Perhaps the majority (totality?) of the developers already have a Tcl installation somewhere in the default paths searched by the linker? Phil -- If ye love wealth greater than liberty, the tranquility of servitude greater than the animating contest for freedom, go home and leave us in peace. We seek not your counsel, nor your arms. Crouch down and lick the hand that feeds you; and may posterity forget that ye were our countrymen. - Samuel Adams