#1582 closed defect (fixed)
tcl-8.4.11 & tk-8.4.11 environment settings
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | high | Milestone: | 6.2.0 |
Component: | BOOK | Version: | SVN |
Severity: | normal | Keywords: | |
Cc: |
Description ¶
The following variable declarations can be found in the unprivileged user's environment:
export VERSION=8.4.11 &&
export V=echo $VERSION | cut -d "." -f 1,2
They are not found in root's environment. As a result, certain commands fail and the installation never completes.
I fixed this problem by just typing in the two above commands while in the root shell, and unsetting them afterwards.
Change History (3)
comment:1 by , 20 years ago
bug_file_loc: | http://www.linuxfromscratch.org/blfs/view/stable/general/tcl.html |
---|---|
Milestone: | future → 6.2 |
rep_platform: | PC → All |
Summary: | tcl-8.4.11 & tk-8.4.11 error in root install instructions → tcl-8.4.11 & tk-8.4.11 environment settings |
Version: | d-6.1 → a-SVN |
comment:2 by , 20 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Added notes to the Tk and Tcl instructions to ensure the env vars are properly set before issuing the installation commands.
comment:3 by , 20 years ago
An alternative approach might be to put the variables in a file. It has the advantage that it doesn't depend on becoming root with su. Like this
echo VERSION=8.4.11 > /tmp/details &&
echo 'V=echo $VERSION | cut -d "." -f 1,2
' >> /tmp/details &&
echo DIR=pwd
>> /tmp/details &&
source /tmp/details &&
cd unix &&
./configure --prefix=/usr --enable-threads &&
make &&
sed -i "s:${DIR}/unix:/usr/lib:" tclConfig.sh &&
sed -i "s:${DIR}:/usr/include/tcl${V}:" tclConfig.sh &&
sed -i "s,TCL_LIB_FILE='libtcl${V}..TCL_DBGX..so',\
TCL_LIB_FILE=\"libtcl${V}\$\{TCL_DBGX\}.so\"," tclConfig.sh
Then as root
source /tmp/details && make install && install -v -d /usr/include/tcl${V}/unix && install -v -m644 *.h /usr/include/tcl${V}/unix/ && install -v -d /usr/include/tcl${V}/generic && install -v -c -m644 ../generic/*.h /usr/include/tcl${V}/generic/ && rm -v -f /usr/include/tcl${V}/generic/{tcl,tclDecls,tclPlatDecls}.h && ln -v -nsf ../../include/tcl${V} /usr/lib/tcl${V}/include && ln -v -sf libtcl${V}.so /usr/lib/libtcl.so && ln -v -sf tclsh${V} /usr/bin/tclsh
Not sure how the OP is becoming root, but if you simply su then the environment is inherited. This issue has come up in the past and we actually had a note in the book to ensure the root user has these vars set, but the note was removed after we split the unprivileged and root tasks. Also the vars were exported so that they would be in the su environment.
Seeing how this is still remaining to be an issue, we should put the note back in the instructions. I believe the notes are simply commented out of the XML right now, and should be easy to put back in.