Some notes:
On Mon, Mar 24, at 12:00 Randy McMurchy wrote:
>
> Not to take anything away from Ag's method, I propose this for
> review. It changes all 6 lines in the tclConfig.sh to sane values.
>
> sed -i -e 's|-L`pwd`|-L/usr/lib|' \
> -e 's|"`pwd`|"/usr/lib|' \
> configure
>
In a fresh tcl installation this fails with the following error:
========================================================================
LANGINFO=1 -DHAVE_SYS_IOCTL_H=1 -DTCL_SHLIB_EXT=\".so\"
/tmp/tcl8.4.18/unix/tclAppInit.c
gcc -O2 -O2 -march=athlon64 -pipe -fomit-frame-pointer -pipe -DTCL_DBGX=
-Wl,--export-dynamic tclAppInit.o -L/usr/lib -ltcl8.4 -ldl -lpthread -lieee
-lm \
-Wl,-rpath,/usr/lib -o tclsh
/usr/bin/ld: cannot find -ltcl8.4
collect2: η ld επέστρεψε κατάσταση εξόδου 1
make: *** [tclsh] Error 1
========================================================================
> sed -i -e 's|@.._SEARCH_FLAGS@|-Wl,-rpath,/usr/lib|' \
> -e 's|@TCL_SRC_DIR@|/usr/include|' \
> tclConfig.sh.in
I then tried to apply the seds in tclConfig.sh.in.
Tcl build went fine but tk build fails with:
========================================================================
_TIME=1 -DSTDC_HEADERS=1 -DHAVE_PW_GECOS=1 -DTCL_NO_DEPRECATED
/tmp/tk8.4.18/unix/tkAppInit.c
gcc -O2 -O2 -march=athlon64 -pipe -fomit-frame-pointer -pipe
-Wl,--export-dynamic tkAppInit.o -L/tmp/tk8.4.18/unix -ltk8.4 \
-lpthread -lX11 -ldl -lieee -lm -o wish
tkAppInit.o: In function `Tcl_AppInit':
tkAppInit.c:(.text+0x1e): undefined reference to `Tcl_Init'
tkAppInit.c:(.text+0x54): undefined reference to `Tcl_StaticPackage'
tkAppInit.c:(.text+0x78): undefined reference to `Tcl_SetVar'
tkAppInit.o: In function `main':
tkAppInit.c:(.text+0xde): undefined reference to `Tcl_CreateInterp'
/tmp/tk8.4.18/unix/libtk8.4.so: undefined reference to `tclStubsPtr'
/tmp/tk8.4.18/unix/libtk8.4.so: undefined reference to `tclIntStubsPtr'
/tmp/tk8.4.18/unix/libtk8.4.so: undefined reference to `Tcl_InitStubs'
collect2: η ld επέστρεψε κατάσταση εξόδου 1
make: *** [wish] Error 1
make 43,67s user 2,00s system 99% cpu 45,930 total
========================================================================
> These two seds would be run first thing after changing into the
> tcl8.4.x/unix directory. I do like the fact of what Alex mentioned
> that it is better to fix the root of the problem instead of a
> post-processing fix.
>
So I guess we don't have a choice, other than to apply the fixes after
building.
Here are the seds (based in the input from comments):
Note that this is a tcl/tk 8.4.18 build (same with LFS, needs updating?),
current version is 8.5.1 released in Feb 5 2008.
sed -i \
-e "[EMAIL PROTECTED](TCL_SRC_DIR='\)[EMAIL PROTECTED]/usr/include'@" \
-e "/TC_B/[EMAIL PROTECTED]'\(-L\)[EMAIL PROTECTED]'\1/usr/lib@" \
-e "/SEARCH/s/='.*/=''/" \
tclConfig.sh
diff:
[ag][689](~t/tcl8.4.18/unix)diff tclConfig.sh.orig tclConfig.sh
99,100c99,100
< TCL_CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
< TCL_LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
---
> TCL_CC_SEARCH_FLAGS=''
> TCL_LD_SEARCH_FLAGS=''
114c114
< TCL_BUILD_LIB_SPEC='-L/tmp/tcl8.4.18/unix -ltcl8.4${TCL_DBGX}'
---
> TCL_BUILD_LIB_SPEC='-L/usr/lib -ltcl8.4${TCL_DBGX}'
149c149
< TCL_SRC_DIR='/tmp/tcl8.4.18'
---
> TCL_SRC_DIR='/usr/include'
167c167
< TCL_BUILD_STUB_LIB_SPEC='-L/tmp/tcl8.4.18/unix -ltclstub8.4${TCL_DBGX}'
---
> TCL_BUILD_STUB_LIB_SPEC='-L/usr/lib -ltclstub8.4${TCL_DBGX}'
174c174
< TCL_BUILD_STUB_LIB_PATH='/tmp/tcl8.4.18/unix/libtclstub8.4${TCL_DBGX}.a'
---
> TCL_BUILD_STUB_LIB_PATH='/usr/lib/libtclstub8.4${TCL_DBGX}.a'
Similarly for tkConfig.sh
sed -i \
-e "[EMAIL PROTECTED](TK_SRC_DIR='\)[EMAIL PROTECTED]/usr/include'@" \
-e "/TK_B/[EMAIL PROTECTED]'\(-L\)[EMAIL PROTECTED]'\1/usr/lib@" \
-e "/SEARCH/s/='.*/=''/" \
tkConfig.sh
[ag][692](~t/tk8.4.18/unix)diff tkConfig.sh.orig tkConfig.sh
56c56
< TK_BUILD_LIB_SPEC='-L/tmp/tk8.4.18/unix -ltk8.4'
---
> TK_BUILD_LIB_SPEC='-L/usr/lib -ltk8.4'
72c72
< TK_SRC_DIR='/tmp/tk8.4.18'
---
> TK_SRC_DIR='/usr/include'
76,77c76,77
< TK_CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}:/usr/lib'
< TK_LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}:/usr/lib'
---
> TK_CC_SEARCH_FLAGS=''
> TK_LD_SEARCH_FLAGS=''
87c87
< TK_BUILD_STUB_LIB_SPEC='-L/tmp/tk8.4.18/unix -ltkstub8.4'
---
> TK_BUILD_STUB_LIB_SPEC='-L/usr/lib -ltkstub8.4'
94c94
< TK_BUILD_STUB_LIB_PATH='/tmp/tk8.4.18/unix/libtkstub8.4.a'
---
> TK_BUILD_STUB_LIB_PATH='/usr/lib/libtkstub8.4.a'
Suggestions?
--
http://wiki.linuxfromscratch.org/blfs/wiki/Hacking
--
http://linuxfromscratch.org/mailman/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page