I am using ns2 (ns-2.34) in ubuntu 16.04.
After executing the command to recompile NS2, the following error appears in make:
I don't understand what's leading to the error.
I'm sorry, but could you teach me?
Recompile Procedure
./configure
make clean
make depend
make ← error
sudo make install
error message
/bin/sh:1:../tclcl-1.19/tcl2c++: Permission denied
error writing "stdout" —Broken pipe
while executing
"puts"###tcl-expand.tcl:begin expanding $name""
(procedure "expand_file" line 2)
invoked from within
"expand_file [file tail $name]"
("foreach" body line 5)
invoked from within
"foreach name $argv{
set dirname [ file dirname $name ]
if {$dirname!=".}{
cd$dirname
expand_file [file tail $name ]
cd$startupDir
} else..."
(file "bin/tcl-expand.tcl" line 65)
Makefile:528: Recipe for target 'gen/ns_tcl.cc'
make:***[gen/ns_tcl.cc] Error 126
○Makefile:528
$(GEN_DIR)ns_tcl.cc:$(NS_TCL_LIB)
$(TCLSH)bin/tcl-expand.tcl tcl/lib/ns-lib.tcl@V_NS_TCL_LIB_STL@|$(TCL2C)et_ns_lib>$@
(Answer from minish, supplement to comments)
The sample Makefile says the following, but
TCLSH=/usr/local/bin/tclsh 8.4
TCL2C=/usr/local/bin/tcl2c++
As a result of checking the dpkg
command in your environment, you can see that the installed file is in /usr/bin/tclsh8.4
, so you need to modify the Makefile description to suit your environment.
(tcl2c++
is written appropriately, but please check the actual environment and correct it.)
TCLSH=/usr/bin/tclsh 8.4
TCL2C=/usr/bin/tcl2c++
As I mentioned briefly in the comments section, /usr/local/bin
usually includes compiled items from the source code.On the other hand, the distribution-provided packages will be installed in /usr/bin/
and so on.
An error occurred while attempting to create gen/ns_tcl.cc by redirect using the script in tcl 8.4.
An excerpt from Makefile of ns-2.34 as a reference.
TCLSH=/usr/local/bin/tclsh 8.4
TCL2C=/usr/local/bin/tcl2c++
$(GEN_DIR)ns_tcl.cc:$(NS_TCL_LIB)
$(TCLSH)bin/tcl-expand.tcl tcl/lib/ns-lib.tcl$(NS_TCL_LIB_STL)|$(TCL2C)et_ns_lib>$@
You need tcl 8.4 (such as /usr/bin/tclsh or /usr/local/bin/tclsh 8.4) to compile, so why don't you reconfigure it by deploying a tcl package?
© 2024 OneMinuteCode. All rights reserved.