From: SourceForge.net <no...@so...> - 2011-01-05 08:08:03
|
Bugs item #3148192, was opened at 2010-12-30 16:33 Message generated for change (Comment added) made by nijtmans You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=3148192&group_id=10894 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: 53. Configuration and Build Tools Group: development: 8.6b1.1 Status: Closed Resolution: Fixed Priority: 9 Private: No Submitted By: Don Porter (dgp) Assigned to: Jan Nijtmans (nijtmans) Summary: [load] broken Initial Comment: Something happened to the HEAD in the last month: $ cd tcl/unix $ make distclean $ ./configure --disable-shared ... $ make test-tcl TESTFLAGS="-file load.test" ... ==== load-2.1 basic loading, with guess for package name FAILED ==== Contents of test case: load [file join $testDir pkga$ext] list [pkga_eq abc def] [lsort [info commands pkga_*]] ---- Test generated error; Return code was: 1 ---- Return code should have been one of: 0 2 ---- errorInfo: cannot find symbol "Pkga_Init": /home/dgp/cvs/tcl-only/unix/dltest/pkga.so: undefined symbol: _Pkga_Init while executing "load [file join $testDir pkga$ext]" ("uplevel" body line 2) invoked from within "uplevel 1 $script" ---- errorCode: TCL LOOKUP LOAD_SYMBOL Pkga_Init ==== load-2.1 FAILED ==== load-2.2 loading into a safe interpreter, with package name conversion FAILED ==== Contents of test case: load [file join $testDir pkgb$ext] pKgB child list [child eval pkgb_sub 44 13] [catch {child eval pkgb_unsafe} msg] $msg [catch {pkgb_sub 12 10} msg2] $msg2 ---- Test generated error; Return code was: 1 ---- Return code should have been one of: 0 2 ---- errorInfo: cannot find symbol "Pkgb_Init": /home/dgp/cvs/tcl-only/unix/dltest/pkgb.so: undefined symbol: _Pkgb_Init while executing "load [file join $testDir pkgb$ext] pKgB child" ("uplevel" body line 2) invoked from within "uplevel 1 $script" ---- errorCode: TCL LOOKUP LOAD_SYMBOL Pkgb_Init ==== load-2.2 FAILED ==== load-2.4 loading with no _SafeInit procedure FAILED ==== Contents of test case: list [catch {load [file join $testDir pkga$ext] {} child} msg] $msg ---- Result was: 1 {cannot find symbol "Pkga_Init": /home/dgp/cvs/tcl-only/unix/dltest/pkga.so: undefined symbol: _Pkga_Init} ---- Result should have been (exact matching): 1 {can't use package in a safe interpreter: no Pkga_SafeInit procedure} ==== load-2.4 FAILED ==== load-3.1 error in _Init procedure, same interpreter FAILED ==== Contents of test case: list [catch {load [file join $testDir pkge$ext] pkge} msg] $msg $::errorInfo $::errorCode ---- Result was: 1 {cannot find symbol "Pkge_Init": /home/dgp/cvs/tcl-only/unix/dltest/pkge.so: undefined symbol: _Pkge_Init} {cannot find symbol "Pkge_Init": /home/dgp/cvs/tcl-only/unix/dltest/pkge.so: undefined symbol: _Pkge_Init while executing "load [file join $testDir pkge$ext] pkge"} {TCL LOOKUP LOAD_SYMBOL Pkge_Init} ---- Result should have been (exact matching): 1 {couldn't open "non_existent": no such file or directory} {couldn't open "non_existent": no such file or directory while executing "open non_existent" invoked from within "if 44 {open non_existent}" invoked from within "load [file join $testDir pkge$ext] pkge"} {POSIX ENOENT {no such file or directory}} ==== load-3.1 FAILED ==== load-3.2 error in _Init procedure, slave interpreter FAILED ==== Contents of test case: catch {interp delete x} interp create x set ::errorCode foo set ::errorInfo bar set result [list [catch {load [file join $testDir pkge$ext] pkge x} msg] $msg $::errorInfo $::errorCode] interp delete x set result ---- Result was: 1 {cannot find symbol "Pkge_Init": /home/dgp/cvs/tcl-only/unix/dltest/pkge.so: undefined symbol: _Pkge_Init} {cannot find symbol "Pkge_Init": /home/dgp/cvs/tcl-only/unix/dltest/pkge.so: undefined symbol: _Pkge_Init while executing "load [file join $testDir pkge$ext] pkge x"} {TCL LOOKUP LOAD_SYMBOL Pkge_Init} ---- Result should have been (exact matching): 1 {couldn't open "non_existent": no such file or directory} {couldn't open "non_existent": no such file or directory while executing "open non_existent" invoked from within "if 44 {open non_existent}" invoked from within "load [file join $testDir pkge$ext] pkge x"} {POSIX ENOENT {no such file or directory}} ==== load-3.2 FAILED ==== load-4.1 reloading package into same interpreter FAILED ==== Contents of test case: list [catch {load [file join $testDir pkga$ext] pkga} msg] $msg ---- Result was: 1 {cannot find symbol "Pkga_Init": /home/dgp/cvs/tcl-only/unix/dltest/pkga.so: undefined symbol: _Pkga_Init} ---- Result should have been (exact matching): 0 {} ==== load-4.1 FAILED ==== load-4.2 reloading package into same interpreter FAILED ==== Contents of test case: list [catch {load [file join $testDir pkga$ext] pkgb} msg] $msg ---- Result was: 1 {cannot find symbol "Pkgb_Init": /home/dgp/cvs/tcl-only/unix/dltest/pkga.so: undefined symbol: _Pkgb_Init} ---- Result should have been (exact matching): 1 {file "/home/dgp/cvs/tcl-only/unix/dltest/pkga.so" is already loaded for package "Pkga"} ==== load-4.2 FAILED ==== load-5.1 file name not specified and no static package: pick default FAILED ==== Contents of test case: catch {interp delete x} interp create x load [file join $testDir pkga$ext] pkga load {} pkga x set result [info loaded x] interp delete x set result ---- Test generated error; Return code was: 1 ---- Return code should have been one of: 0 2 ---- errorInfo: cannot find symbol "Pkga_Init": /home/dgp/cvs/tcl-only/unix/dltest/pkga.so: undefined symbol: _Pkga_Init while executing "load [file join $testDir pkga$ext] pkga" ("uplevel" body line 4) invoked from within "uplevel 1 $script" ---- errorCode: TCL LOOKUP LOAD_SYMBOL Pkga_Init ==== load-5.1 FAILED ==== load-7.4 Tcl_StaticPackage procedure, redundant calls FAILED ==== Contents of test case: teststaticpkg Double 0 1 teststaticpkg Double 0 1 info loaded ---- Result was: {{} Double} {{} More} {{} Another} {{} Test} {{} Tcltest} ---- Result should have been (exact matching): {{} Double} {{} More} {{} Another} {{} Test} {/home/dgp/cvs/tcl-only/unix/dltest/pkge.so Pkge} {/home/dgp/cvs/tcl-only/unix/dltest/pkgb.so Pkgb} {/home/dgp/cvs/tcl-only/unix/dltest/pkga.so Pkga} {{} Tcltest} ==== load-7.4 FAILED ==== load-8.1 TclGetLoadedPackages procedure FAILED ==== Contents of test case: info loaded ---- Result was: {{} Double} {{} More} {{} Another} {{} Test} {{} Tcltest} ---- Result should have been (exact matching): {{} Double} {{} More} {{} Another} {{} Test} {/home/dgp/cvs/tcl-only/unix/dltest/pkge.so Pkge} {/home/dgp/cvs/tcl-only/unix/dltest/pkgb.so Pkgb} {/home/dgp/cvs/tcl-only/unix/dltest/pkga.so Pkga} {{} Tcltest} ==== load-8.1 FAILED ==== load-8.3 TclGetLoadedPackages procedure FAILED ==== Contents of test case: list [info loaded {}] [info loaded child] ---- Result was: {{{} Double} {{} More} {{} Another} {{} Test} {{} Tcltest}} {{{} Test}} ---- Result should have been (exact matching): {{{} Double} {{} More} {{} Another} {{} Test} {/home/dgp/cvs/tcl-only/unix/dltest/pkga.so Pkga} {{} Tcltest}} {{{} Test} {/home/dgp/cvs/tcl-only/unix/dltest/pkgb.so Pkgb}} ==== load-8.3 FAILED ==== load-8.4 TclGetLoadedPackages procedure FAILED ==== Contents of test case: load [file join $testDir pkgb$ext] pkgb list [info loaded {}] [lsort [info commands pkgb_*]] ---- Test generated error; Return code was: 1 ---- Return code should have been one of: 0 2 ---- errorInfo: cannot find symbol "Pkgb_Init": /home/dgp/cvs/tcl-only/unix/dltest/pkgb.so: undefined symbol: _Pkgb_Init while executing "load [file join $testDir pkgb$ext] pkgb" ("uplevel" body line 2) invoked from within "uplevel 1 $script" ---- errorCode: TCL LOOKUP LOAD_SYMBOL Pkgb_Init ==== load-8.4 FAILED ==== load-10.1 load from vfs FAILED ==== Contents of test case: list [catch {load simplefs:/pkgd$ext pkgd} msg] $msg ---- Result was: 1 {cannot find symbol "Pkgd_Init": /tmp/tclO8NLQT: undefined symbol: _Pkgd_Init} ---- Result should have been (exact matching): 0 {} ==== load-10.1 FAILED ... A full `make test` run reveals similar failing test symptoms in pkgMkIndex.test and unload.test as well. ---------------------------------------------------------------------- >Comment By: Jan Nijtmans (nijtmans) Date: 2011-01-05 09:08 Message: >_As I understand it_ .... Yes, that understanding is correct. The problem is that the -DSTATIC_BUILD is taken over by the pkg*.c makefile, just because they don't have their own configure script. Maybe a better solution would be not to take over CFLAGS from Tcl anyway, I don't think any of them are really needed. Hmmm.... ---------------------------------------------------------------------- Comment By: Donal K. Fellows (dkf) Date: 2011-01-04 17:34 Message: _As I understand it_, what changed is that there was some simplification of the macros that govern visibility of symbols. For most code, it will continue as before and have no problems, but the pkg*.c files are extensions that are compiled with Tcl's own makefile, which is a bit of an unusual combination. (It's not an issue for the contributed packages because they use their own build systems; they have a different CFLAGS...) ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2011-01-04 17:17 Message: Hmmm... The "fix" was to make changes to the pkg*.c files. This means that something changed in Tcl so that now something has to be changed in source code of extensions to make them work again with Tcl 8.6 ? That doesn't sound like a good thing to me. What am I not getting? I fear that any existing extensions out there that were produced by copying the patterns of pkg*.c are going to be broken when used with Tcl 8.6. Please assure me that's not the case. ---------------------------------------------------------------------- Comment By: Jan Nijtmans (nijtmans) Date: 2010-12-31 17:39 Message: The problem was that unix/dltest shares it's configure script with unix, which defines STATIC_BUILD in this case. But those packages should never built statically at all, even though Tcl is built statically. This STATIC_BUILD was causing the troubles here. Fixed in HEAD, it indeed was a problem in the test case, not with the load command. ---------------------------------------------------------------------- Comment By: Jan Nijtmans (nijtmans) Date: 2010-12-31 09:54 Message: I'll have a look. My first guess is that the test dll's are built using BUILD_tcl, which would indicate a problem with the test case, not really with Tcl. ---------------------------------------------------------------------- Comment By: Kevin B KENNY (kennykb) Date: 2010-12-30 17:50 Message: Problem was introduced by Jan Nijtmans's build system changes dated 2010-12-13 addressing Bug 3135271. The attached patch reverts the offending change ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=3148192&group_id=10894 |