Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#52855 closed defect (invalid)

sqlite error: table registry.files has no column named mtime (1) while executing query: INSERT INTO registry.files (id, path, mtime, active) VALUES (?, ?, 0, 0)

Reported by: MG62 Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: base Version: 2.3.4
Keywords: Cc:
Port:

Description (last modified by ryandesign (Ryan Carsten Schmidt))

When I am trying to install libcxx, I obtain:

version:1
:debug:main libcxx has no conflicts
:debug:main Executing org.macports.main (libcxx)
:debug:main Attempting ln -sf /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_libcxx/libcxx/work /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/lang/libcxx/work
:debug:main changing euid/egid - current euid: 0 - current egid: 0
:debug:main egid changed to: 501
:debug:main euid changed to: 502
:debug:main Skipping completed org.macports.archivefetch (libcxx)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:main Skipping completed org.macports.fetch (libcxx)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:main Skipping completed org.macports.checksum (libcxx)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:main Skipping completed org.macports.extract (libcxx)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:main Skipping completed org.macports.patch (libcxx)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:main Skipping completed org.macports.configure (libcxx)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:main Skipping completed org.macports.build (libcxx)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:main Skipping completed org.macports.destroot (libcxx)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:install install phase started at Thu Nov 10 23:29:41 CET 2016
:notice:install --->  Installing libcxx @3.9.0_0+universal
:debug:install Can't run install on this port without elevated privileges. Escalating privileges back to root.
:debug:install euid changed to: 0. egid changed to: 0.
:debug:install Executing org.macports.install (libcxx)
:debug:install Using /usr/bin/tar
:debug:install Using /usr/bin/bzip2
:debug:install Creating libcxx-3.9.0_0+universal.darwin_14.i386-x86_64.tbz2
:debug:install Environment: 
CC_PRINT_OPTIONS='YES'
CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_libcxx/libcxx/work/.CC_PRINT_OPTIONS'
CPATH='/opt/local/include'
LIBRARY_PATH='/opt/local/lib'
MACOSX_DEPLOYMENT_TARGET='10.10'
:debug:install Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_libcxx/libcxx/work/destroot" && /usr/bin/tar -cvf - . | /usr/bin/bzip2 -c9 > /opt/local/var/macports/software/libcxx/libcxx-3.9.0_0+universal.darwin_14.i386-x86_64.tbz2'
:debug:install Executing command line:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_libcxx/libcxx/work/destroot" && /usr/bin/tar -cvf - . | /usr/bin/bzip2 -c9 > /opt/local/var/macports/software/libcxx/libcxx-3.9.0_0+universal.darwin_14.i386-x86_64.tbz2 
:info:install a .
:info:install a ./+COMMENT
:info:install a ./+CONTENTS
:info:install a ./+DESC
:info:install a ./+PORTFILE
:info:install a ./+STATE
:debug:install Archive libcxx-3.9.0_0+universal.darwin_14.i386-x86_64.tbz2 packaged
:debug:install removing file: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_libcxx/libcxx/work/destroot/+COMMENT
:debug:install removing file: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_libcxx/libcxx/work/destroot/+CONTENTS
:debug:install removing file: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_libcxx/libcxx/work/destroot/+DESC
:debug:install removing file: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_libcxx/libcxx/work/destroot/+PORTFILE
:debug:install removing file: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_libcxx/libcxx/work/destroot/+STATE
:error:install org.macports.install for port libcxx returned: sqlite error: table registry.files has no column named mtime (1) while executing query: INSERT INTO registry.files (id, path, mtime, active) VALUES (?, ?, 0, 0)
:debug:install Error code: registry::sqlite-error
:debug:install Backtrace: sqlite error: table registry.files has no column named mtime (1) while executing query: INSERT INTO registry.files (id, path, mtime, active) VALUES (?, ?, 0, 0)
    while executing
"$regref map $installPlist"
    invoked from within
"registry::write {

        set regref [registry::entry create $subport $version $revision $portvariants $epoch]

        if {[info exists user_options..."
    (procedure "portinstall::install_main" line 38)
    invoked from within
"portinstall::install_main org.macports.install"
    ("eval" body line 1)
    invoked from within
"eval $procedure $targetname"
:info:install Warning: targets not executed for libcxx: org.macports.activate org.macports.install
:notice:install Please see the log file for port libcxx for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_libcxx/libcxx/main.log

At first, it could not access to destroot so I created the directory. The issue stayed. I tried to clean libcxx, to update the outdated ports, selfupdate, re-install MacPorts from scratch. Nothing works. I am on OS Yosemite (10.10.5).

Thanks for your help.

Change History (11)

comment:1 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Summary: Issue with the installation of libcxxsqlite error: table registry.files has no column named mtime (1) while executing query: INSERT INTO registry.files (id, path, mtime, active) VALUES (?, ?, 0, 0)

The error:

sqlite error: table registry.files has no column named mtime (1) while executing query: INSERT INTO registry.files (id, path, mtime, active) VALUES (?, ?, 0, 0)

sounds like a problem with the registry, not specific to any particular port.

comment:2 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)

But the problem could be caused by what you said:

At first, it could not access to destroot so I created the directory

You should not have had to manually create any directory.

comment:3 Changed 8 years ago by neverpanic (Clemens Lang)

Your version of MacPorts does not match the database your have on your disk. The database seems to have been upgraded by a newer version of MacPorts (where we removed the mtime field because it was unused), but the version of MacPorts you are currently running still expects it to be present.

Please make sure port version prints 2.3.4. If not, run sudo port selfupdate or install the current version of MacPorts using the installer from our website.

comment:4 Changed 8 years ago by MG62

port version leads to 'Version: 2.3.4'. So it was not the issue.

I de-installed the ports by doing 'sudo port clean --all' Then de-install MacPorts and re-installed it again.

Same issue unfortunately. I have no clue what to try now.

comment:5 in reply to:  3 Changed 8 years ago by raimue (Rainer Müller)

Replying to neverpanic:

Your version of MacPorts does not match the database your have on your disk. The database seems to have been upgraded by a newer version of MacPorts (where we removed the mtime field because it was unused), but the version of MacPorts you are currently running still expects it to be present.

Indeed it looks like that, but MacPorts should have failed earlier as the registry version would have an unexpected value. You can check the version of the registry file itself with this command:

$ sqlite3 /opt/local/var/macports/registry/registry.db "SELECT value FROM metadata WHERE key = 'version';"

How did you uninstall and reinstall MacPorts? Do you have anything related to MacPorts in /Library/Tcl/?

comment:6 Changed 8 years ago by neverpanic (Clemens Lang)

Oh, it seems 2.3.4 did not actually drop the fields, only trunk did. So it seems you installed trunk at some point and then re-installed an older version from the installer. Unfortunately that isn't supported, so you'll have to install MacPorts from the master branch off github now to get this working again.

comment:7 Changed 8 years ago by MG62

How did you uninstall and reinstall MacPorts?

After cleaning the ports, I remove the /opt/local/libexec/macports directory

Do you have anything related to MacPorts in /Library/Tcl/?

Nope, nothing.

you'll have to install MacPorts from the master branch off github

Could you tell me how I can do that?

Thanks for your help!

comment:8 Changed 8 years ago by neverpanic (Clemens Lang)

Follow https://guide.macports.org/#installing.macports.subversion, but replace svn checkout with git clone https://github.com/macports/macports-base.git. Make sure /opt/local is not in your $PATH when doing this, though.

comment:9 Changed 8 years ago by MG62

After two days of nearly throwing my computer through the window, it worked. Thanks neverpanic, the github solution was the way to go! Thanks for your help!

comment:10 Changed 8 years ago by neverpanic (Clemens Lang)

Component: portsbase
Resolution: invalid
Status: newclosed

Glad it worked! Sorry about the fallout, but unfortunately we don't support going back with MacPorts versions, so once you're on a development version you can only ever go forward (e.g. to the next major release).

comment:11 Changed 8 years ago by raimue (Rainer Müller)

Has duplicate #50112.

This will be solved with [16239f7540cf03f6b5b3c71b5b8825999bd2b90e/macports-base] in the future, but this is only in master and was not merged to release-2.3.

Note: See TracTickets for help on using tickets.