MacPorts has updated tcl to version 8.6.0 and now expect 5.45 does not build:
Undefined symbols for architecture x86_64:
"_Tcl_InitStubs", referenced from:
_Expect_Init in libexpect5.45.a(exp_main_sub.o)
"_tclIntStubsPtr", referenced from:
_exp_interpreter in libexpect5.45.a(exp_main_sub.o)
_Expect_Init in libexpect5.45.a(exp_main_sub.o)
_print_argv in libexpect5.45.a(Dbg.o)
_exp_create_commands in libexpect5.45.a(exp_command.o)
"_tclStubsPtr", referenced from:
_exp_exit_handlers in libexpect5.45.a(exp_main_sub.o)
_Exp_Prompt1ObjCmd in libexpect5.45.a(exp_main_sub.o)
_history_nextid in libexpect5.45.a(exp_main_sub.o)
_Exp_Prompt2ObjCmd in libexpect5.45.a(exp_main_sub.o)
_exp_interpreter in libexpect5.45.a(exp_main_sub.o)
_handle_eval_error in libexpect5.45.a(exp_main_sub.o)
_Exp_ExpVersionObjCmd in libexpect5.45.a(exp_main_sub.o)
...
ld: symbol(s) not found for architecture x86_64
https://trac.macports.org/ticket/37450
Please advise how we can build expect with tcl 8.6. Thanks.
Are you linking with the stubs library libtclstub86.a?
From Tcl 8.6 release notes:
Issues for users of the public C API:
* C code compiled with USE_TCL_STUBS now must be linked against a
stub library. The Tcl shared library no longer exports variables
used in the stub interface. Analogous changes also made to Tk.
Thank you, adding "-ltclstub8.6" to LDFLAGS worked.