Opened 12 months ago

Last modified 12 months ago

#71869 new defect

Changing vendor/tcl doesn't automatically re-run configure

Reported by: jordanhubbard (Jordan Hubbard) Owned by:
Priority: Normal Milestone: MacPorts Future
Component: base Version: 2.10.99
Keywords: Cc: jmroot (Joshua Root)
Port:

Description (last modified by jmroot (Joshua Root))

The end result is that macports build and installs properly, but if you are updating an older version of /opt/local from a checked out source and ports tree, you will get a backtrace:

/opt/local/libexec/macports/bin/tclsh8.6 ./src/images_to_archives.tcl
dlopen(/opt/local/libexec/macports/lib/pextlib1.0/Pextlib.dylib, 0x0006): Library not loaded: /opt/local/libexec/macports/lib/sqlite3.45.3/libsqlite3.45.3.dylib
  Referenced from: <98D3107B-C4AE-3952-BB87-41FD6375C2C2> /opt/local/libexec/macports/lib/registry2.0/registry.dylib
  Reason: tried: '/opt/local/libexec/macports/lib/sqlite3.45.3/libsqlite3.45.3.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/local/libexec/macports/lib/sqlite3.45.3/libsqlite3.45.3.dylib' (no such file), '/opt/local/libexec/macports/lib/sqlite3.45.3/libsqlite3.45.3.dylib' (no such file)
    while executing
"load /opt/local/libexec/macports/lib/pextlib1.0/Pextlib.dylib"
    ("package ifneeded Pextlib 1.0" script)
    invoked from within
"package require Pextlib 1.0"
    (file "/opt/local/libexec/macports/lib/registry2.0/receipt_flat.tcl" line 37)
    invoked from within
"source /opt/local/libexec/macports/lib/registry2.0/receipt_flat.tcl"
    ("package ifneeded receipt_flat 1.0" script)
    invoked from within
"package require receipt_flat 1.0"
    (file "/opt/local/libexec/macports/lib/registry2.0/registry.tcl" line 36)
    invoked from within
"source /opt/local/libexec/macports/lib/registry2.0/registry.tcl"
    ("package ifneeded registry 1.0" script)
    invoked from within
"package require registry 1.0"
    (file "/opt/local/libexec/macports/lib/registry2.0/portuninstall.tcl" line 35)
    invoked from within
"source /opt/local/libexec/macports/lib/registry2.0/portuninstall.tcl"
    ("package ifneeded registry_uninstall 2.0" script)
    invoked from within
"package require registry_uninstall 2.0"
    (file "/opt/local/libexec/macports/lib/macports1.0/reclaim.tcl" line 52)
    invoked from within
"source /opt/local/libexec/macports/lib/macports1.0/reclaim.tcl"
    ("package ifneeded reclaim 1.0" script)
    invoked from within
"package require reclaim 1.0"
    (file "/opt/local/libexec/macports/lib/macports1.0/diagnose.tcl" line 67)
    invoked from within
"source /opt/local/libexec/macports/lib/macports1.0/diagnose.tcl"
    ("package ifneeded diagnose 1.0" script)
    invoked from within
"package require diagnose 1.0"
    (file "/opt/local/libexec/macports/lib/macports1.0/macports.tcl" line 38)
    invoked from within
"source /opt/local/libexec/macports/lib/macports1.0/macports.tcl"
    ("package ifneeded macports 1.0" script)
    invoked from within
"package require macports 1.0"
    (file "./src/images_to_archives.tcl" line 6)
make: *** [install] Error 1

Here's the fix:

diff --git a/portmgr/dmg/postflight.in b/portmgr/dmg/postflight.in
index 7dc89c473..8bfa9d060 100755
--- a/portmgr/dmg/postflight.in
+++ b/portmgr/dmg/postflight.in
@@ -70,7 +70,7 @@ OLD_VENDOR_DIRS="thread2.7.0 thread2.7.2 thread2.7.3 thread2.8.7 \
 thread2.8.8 thread2.8.9 thread2.8.10 \
 tcllib1.15 tcllib1.17 tcllib1.18 tclx8.4 tcl8.5 \
 itcl4.2.2 itcl4.2.3 itcl4.2.4 itcl4.3.0 \
-sqlite3.36.0 sqlite3.40.0 sqlite3.44.2 sqlite3.45.3 \
+sqlite3.47.2 sqlite3.36.0 sqlite3.40.0 sqlite3.44.2 sqlite3.45.3 \
 tdbc1.1.3 tdbcmysql1.1.3 tdbcodbc1.1.3 tdbcpostgres1.1.3 \
 tdbc1.1.5 tdbcmysql1.1.5 tdbcodbc1.1.5 tdbcpostgres1.1.5 \
 tdbc1.1.7 tdbcmysql1.1.7 tdbcodbc1.1.7 tdbcpostgres1.1.7 \

Change History (5)

comment:1 Changed 12 months ago by jmroot (Joshua Root)

Component: portsbase
Description: modified (diff)

Hey Jordan. Odd that I've never seen this. I don't think your patch is correct because it would delete the newly installed sqlite3.47.2 directory which is needed. Also, postflight is only run from the .pkg installer and so wouldn't affect make install.

comment:2 Changed 12 months ago by jmroot (Joshua Root)

images_to_archives.tcl should theoretically be loading the newly installed registry.dylib which should in turn be linked with the new sqlite. Maybe the issue is a missing rule to rebuild registry.dylib when vendor/tcl changes.

comment:3 Changed 12 months ago by jmroot (Joshua Root)

Cc: jmroot added

comment:4 Changed 12 months ago by jmroot (Joshua Root)

Summary: When new sqlite dependency was added, it was not properly added to postflightChanging vendor/tcl doesn't automatically re-run configure

comment:5 Changed 12 months ago by jordanhubbard (Jordan Hubbard)

Whoops, I misunderstood that rule I patched - I see, those are "old versions" to clean, not versions to support simultaneously as I thought it was (I should have read the entire file, not just that section!).

Note: See TracTickets for help on using tickets.