Bug 279284 - audio/mixxx: Unable to upgrade your database schema to version 32
Summary: audio/mixxx: Unable to upgrade your database schema to version 32
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Jose Alonso Cardenas Marquez
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-25 08:18 UTC by Marcin Cieślak
Modified: 2024-09-15 22:34 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (acm)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcin Cieślak 2024-05-25 08:18:10 UTC
On 15-CURRENT and a recent sqlite3 mixxx will not start with an empty database reporting the following error:

Unable to upgrade your database schema to version 32
Your mixxxdb.sqlite file may be corrupt.
Try renaming it and restarting Mixxx.
For help with database issues contact:
mixxx-devel@lists.sourceforge.net

Click OK to exit.

The console output says: 

Critical [Main]: FwdSqlQuery - Failed to prepare "DELETE FROM settings WHERE name=\"mixxx.db.model.library.header_state\"" : QSqlError("1", "Unable to execute statement", "no such column: mixxx.db.model.library.header_state")
Critical [Main]: SchemaManager - Failed to upgrade database schema from version 6 to version 7

This is because we do not want to have double quotes for string literals enabled (see /usr/ports/UPDATING entry 20230227, the feature is also disabled for -CURRENT).

Currently affects only those user that have sqlite3 built without the compatibility option.
Comment 1 Marcin Cieślak 2024-05-25 12:22:25 UTC
Strange, can't seem to be able to build mixxx tests:

[100% 815/815] : && ccache /usr/bin/c++ -O2 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing  -DLIBICONV_PLUG -fdiagnostics-color=auto -O2 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing  -DLIBICONV_PLUG  -DNDEBUG -Wl,--undefined-version  -fstack-protector-strong CMakeFiles/mixxx-test.dir/mixxx-test_autogen/mocs_compilation.cpp.o CMakeFiles/mixxx-test.dir/src/test/analyserwaveformtest.cpp.o CMakeFiles/mixxx-test.dir/src/test/analyzersilence_test.cpp.o CMakeFiles/mixxx-test.dir/src/test/audiotaperpot_test.cpp.o CMakeFiles/mixxx-test.dir/src/test/autodjprocessor_test.cpp.o CMakeFiles/mixxx-test.dir/src/test/baseeffecttest.cpp.o CMakeFiles/mixxx-test.dir/src/test/beatgridtest.cpp.o CMakeFiles/mixxx-test.dir/src/test/beatmaptest.cpp.o CMakeFiles/mixxx-test.dir/src/test/beatstranslatetest.cpp.o CMakeFiles/mixxx-test.dir/src/test/bpmcontrol_test.cpp.o CMakeFiles/mixxx-test.dir/src/test/broadcastprofile_test.cpp.o CMakeFiles/mixxx-test.dir/src/test/broadcastsettings_test.cpp.o CMakeFiles/mixxx-test.dir/src/test/cache_test.cpp.o CMakeFiles/mixxx-test.dir/src/test/channelhandle_test.cpp.o CMakeFiles/mixxx-test.dir/src/test/colorconfig_test.cpp.o CMakeFiles/mixxx-test.dir/src/test/colormapperjsproxy_test.cpp.o CMakeFiles/mixxx-test.dir/src/test/colorpalette_test.cpp.o CMakeFiles/mixxx-test.dir/src/test/compatibility_test.cpp.o CMakeFiles/mixxx-test.dir/src/test/configobject_test.cpp.o CMakeFiles/mixxx-test.dir/src/test/controller_preset_validation_test.cpp.o CMakeFiles/mixxx-test.dir/src/test/controllerengine_test.cpp.o CMakeFiles/mixxx-test.dir/src/test/controlobjecttest.cpp.o CMakeFiles/mixxx-test.dir/src/test/coverartcache_test.cpp.o CMakeFiles/mixxx-test.dir/src/test/coverartutils_test.cpp.o CMakeFiles/mixxx-test.dir/src/test/cratestorage_test.cpp.o CMakeFiles/mixxx-test.dir/src/test/cue_test.cpp.o CMakeFiles/mixxx-test.dir/src/test/cuecontrol_test.cpp.o CMakeFiles/mixxx-test.dir/src/test/dbconnectionpool_test.cpp.o CMakeFiles/mixxx-test.dir/src/test/dbidtest.cpp.o CMakeFiles/mixxx-test.dir/src/test/directorydaotest.cpp.o CMakeFiles/mixxx-test.dir/src/test/duration_test.cpp.o CMakeFiles/mixxx-test.dir/src/test/durationutiltest.cpp.o CMakeFiles/mixxx-test.dir/src/test/effectchainslottest.cpp.o CMakeFiles/mixxx-test.dir/src/test/effectslottest.cpp.o CMakeFiles/mixxx-test.dir/src/test/effectsmanagertest.cpp.o CMakeFiles/mixxx-test.dir/src/test/enginebufferscalelineartest.cpp.o CMakeFiles/mixxx-test.dir/src/test/enginebuffertest.cpp.o CMakeFiles/mixxx-test.dir/src/test/enginefilterbiquadtest.cpp.o CMakeFiles/mixxx-test.dir/src/test/enginemastertest.cpp.o CMakeFiles/mixxx-test.dir/src/test/enginemicrophonetest.cpp.o CMakeFiles/mixxx-test.dir/src/test/enginesynctest.cpp.o CMakeFiles/mixxx-test.dir/src/test/globaltrackcache_test.cpp.o CMakeFiles/mixxx-test.dir/src/test/indexrange_test.cpp.o CMakeFiles/mixxx-test.dir/src/test/keyutilstest.cpp.o CMakeFiles/mixxx-test.dir/src/test/lcstest.cpp.o CMakeFiles/mixxx-test.dir/src/test/learningutilstest.cpp.o CMakeFiles/mixxx-test.dir/src/test/libraryscannertest.cpp.o CMakeFiles/mixxx-test.dir/src/test/librarytest.cpp.o CMakeFiles/mixxx-test.dir/src/test/looping_control_test.cpp.o CMakeFiles/mixxx-test.dir/src/test/main.cpp.o CMakeFiles/mixxx-test.dir/src/test/mathutiltest.cpp.o CMakeFiles/mixxx-test.dir/src/test/metadatatest.cpp.o CMakeFiles/mixxx-test.dir/src/test/metaknob_link_test.cpp.o CMakeFiles/mixxx-test.dir/src/test/midicontrollertest.cpp.o CMakeFiles/mixxx-test.dir/src/test/mixxxtest.cpp.o CMakeFiles/mixxx-test.dir/src/test/mock_networkaccessmanager.cpp.o CMakeFiles/mixxx-test.dir/src/test/movinginterquartilemean_test.cpp.o CMakeFiles/mixxx-test.dir/src/test/musicbrainzrecordingstasktest.cpp.o CMakeFiles/mixxx-test.dir/src/test/nativeeffects_test.cpp.o CMakeFiles/mixxx-test.dir/src/test/performancetimer_test.cpp.o CMakeFiles/mixxx-test.dir/src/test/playcountertest.cpp.o CMakeFiles/mixxx-test.dir/src/test/playlisttest.cpp.o CMakeFiles/mixxx-test.dir/src/test/portmidicontroller_test.cpp.o CMakeFiles/mixxx-test.dir/src/test/portmidienumeratortest.cpp.o CMakeFiles/mixxx-test.dir/src/test/queryutiltest.cpp.o CMakeFiles/mixxx-test.dir/src/test/rangelist_test.cpp.o CMakeFiles/mixxx-test.dir/src/test/readaheadmanager_test.cpp.o CMakeFiles/mixxx-test.dir/src/test/replaygaintest.cpp.o CMakeFiles/mixxx-test.dir/src/test/rescalertest.cpp.o CMakeFiles/mixxx-test.dir/src/test/rgbcolor_test.cpp.o CMakeFiles/mixxx-test.dir/src/test/samplebuffertest.cpp.o CMakeFiles/mixxx-test.dir/src/test/sampleutiltest.cpp.o CMakeFiles/mixxx-test.dir/src/test/schemamanager_test.cpp.o CMakeFiles/mixxx-test.dir/src/test/searchqueryparsertest.cpp.o CMakeFiles/mixxx-test.dir/src/test/seratobeatgridtest.cpp.o CMakeFiles/mixxx-test.dir/src/test/seratomarkerstest.cpp.o CMakeFiles/mixxx-test.dir/src/test/seratomarkers2test.cpp.o CMakeFiles/mixxx-test.dir/src/test/seratotagstest.cpp.o CMakeFiles/mixxx-test.dir/src/test/signalpathtest.cpp.o CMakeFiles/mixxx-test.dir/src/test/skincontext_test.cpp.o CMakeFiles/mixxx-test.dir/src/test/softtakeover_test.cpp.o CMakeFiles/mixxx-test.dir/src/test/soundproxy_test.cpp.o CMakeFiles/mixxx-test.dir/src/test/soundsourceproviderregistrytest.cpp.o CMakeFiles/mixxx-test.dir/src/test/sqliteliketest.cpp.o CMakeFiles/mixxx-test.dir/src/test/synccontroltest.cpp.o CMakeFiles/mixxx-test.dir/src/test/tableview_test.cpp.o CMakeFiles/mixxx-test.dir/src/test/taglibtest.cpp.o CMakeFiles/mixxx-test.dir/src/test/trackdao_test.cpp.o CMakeFiles/mixxx-test.dir/src/test/trackexport_test.cpp.o CMakeFiles/mixxx-test.dir/src/test/trackmetadata_test.cpp.o CMakeFiles/mixxx-test.dir/src/test/tracknumberstest.cpp.o CMakeFiles/mixxx-test.dir/src/test/trackreftest.cpp.o CMakeFiles/mixxx-test.dir/src/test/trackupdate_test.cpp.o CMakeFiles/mixxx-test.dir/src/test/wbatterytest.cpp.o CMakeFiles/mixxx-test.dir/src/test/wpushbutton_test.cpp.o CMakeFiles/mixxx-test.dir/src/test/wwidgetstack_test.cpp.o CMakeFiles/mixxx-test.dir/mixxx-test_autogen/PNK5WDWK6L/qrc_mixxx.cpp.o -o mixxx-test  -Wl,-rpath,/usr/local/lib:/usr/local/lib/qt5  libmixxx-lib.a  libmixxx-gitinfostore.a  lib/libgtest.a  lib/libgmock.a  lib/benchmark/src/libbenchmark.a  /usr/local/lib/liblilv-0.so  /usr/local/lib/libchromaprint.so  /usr/local/lib/libebur128.so  libfidlib.a  /usr/local/lib/libkeyfinder.so  /usr/local/lib/libFLAC.so  libFpClassify.a  /usr/local/lib/libmp3lame.so  libKaitai.a  libMP3GuessEnc.a  /usr/local/lib/libGLX.so  /usr/local/lib/libOpenGL.so  /usr/local/lib/libvorbisfile.so  /usr/local/lib/libportaudio.so  libPortAudioRingBuffer.a  /usr/local/lib/libportmidi.so  /usr/local/lib/libprotobuf-lite.so.24.4.0  /usr/local/lib/libabsl_log_internal_check_op.so.2301.0.0  /usr/local/lib/libabsl_leak_check.so.2301.0.0  /usr/local/lib/libabsl_die_if_null.so.2301.0.0  /usr/local/lib/libabsl_log_internal_conditions.so.2301.0.0  /usr/local/lib/libabsl_log_internal_message.so.2301.0.0  /usr/local/lib/libabsl_log_internal_nullguard.so.2301.0.0  /usr/local/lib/libabsl_examine_stack.so.2301.0.0  /usr/local/lib/libabsl_log_internal_format.so.2301.0.0  /usr/local/lib/libabsl_log_internal_proto.so.2301.0.0  /usr/local/lib/libabsl_log_internal_log_sink_set.so.2301.0.0  /usr/local/lib/libabsl_log_sink.so.2301.0.0  /usr/local/lib/libabsl_log_entry.so.2301.0.0  /usr/local/lib/libabsl_flags.so.2301.0.0  /usr/local/lib/libabsl_flags_internal.so.2301.0.0  /usr/local/lib/libabsl_flags_marshalling.so.2301.0.0  /usr/local/lib/libabsl_flags_reflection.so.2301.0.0  /usr/local/lib/libabsl_flags_config.so.2301.0.0  /usr/local/lib/libabsl_flags_program_name.so.2301.0.0  /usr/local/lib/libabsl_flags_private_handle_accessor.so.2301.0.0  /usr/local/lib/libabsl_flags_commandlineflag.so.2301.0.0  /usr/local/lib/libabsl_flags_commandlineflag_internal.so.2301.0.0  /usr/local/lib/libabsl_log_initialize.so.2301.0.0  /usr/local/lib/libabsl_log_globals.so.2301.0.0  /usr/local/lib/libabsl_log_internal_globals.so.2301.0.0  /usr/local/lib/libabsl_hash.so.2301.0.0  /usr/local/lib/libabsl_city.so.2301.0.0  /usr/local/lib/libabsl_low_level_hash.so.2301.0.0  /usr/local/lib/libabsl_raw_hash_set.so.2301.0.0  /usr/local/lib/libabsl_hashtablez_sampler.so.2301.0.0  /usr/local/lib/libabsl_statusor.so.2301.0.0  /usr/local/lib/libabsl_status.so.2301.0.0  /usr/local/lib/libabsl_cord.so.2301.0.0  /usr/local/lib/libabsl_cordz_info.so.2301.0.0  /usr/local/lib/libabsl_cord_internal.so.2301.0.0  /usr/local/lib/libabsl_cordz_functions.so.2301.0.0  /usr/local/lib/libabsl_exponential_biased.so.2301.0.0  /usr/local/lib/libabsl_cordz_handle.so.2301.0.0  /usr/local/lib/libabsl_crc_cord_state.so.2301.0.0  /usr/local/lib/libabsl_crc32c.so.2301.0.0  /usr/local/lib/libabsl_crc_internal.so.2301.0.0  /usr/local/lib/libabsl_crc_cpu_detect.so.2301.0.0  /usr/local/lib/libabsl_bad_optional_access.so.2301.0.0  /usr/local/lib/libabsl_str_format_internal.so.2301.0.0  /usr/local/lib/libabsl_strerror.so.2301.0.0  /usr/local/lib/libabsl_synchronization.so.2301.0.0  /usr/local/lib/libabsl_stacktrace.so.2301.0.0  /usr/local/lib/libabsl_symbolize.so.2301.0.0  /usr/local/lib/libabsl_debugging_internal.so.2301.0.0  /usr/local/lib/libabsl_demangle_internal.so.2301.0.0  /usr/local/lib/libabsl_graphcycles_internal.so.2301.0.0  /usr/local/lib/libabsl_malloc_internal.so.2301.0.0  /usr/local/lib/libabsl_time.so.2301.0.0  /usr/local/lib/libabsl_strings.so.2301.0.0  /usr/local/lib/libabsl_throw_delegate.so.2301.0.0  /usr/local/lib/libabsl_strings_internal.so.2301.0.0  /usr/local/lib/libabsl_base.so.2301.0.0  /usr/local/lib/libabsl_spinlock_wait.so.2301.0.0  /usr/local/lib/libabsl_int128.so.2301.0.0  /usr/local/lib/libabsl_civil_time.so.2301.0.0  /usr/local/lib/libabsl_time_zone.so.2301.0.0  /usr/local/lib/libabsl_bad_variant_access.so.2301.0.0  /usr/local/lib/libabsl_raw_logging_internal.so.2301.0.0  /usr/local/lib/libabsl_log_severity.so.2301.0.0  /usr/local/lib/qt5/libQt5Concurrent.so.5.15.13  /usr/local/lib/qt5/libQt5Network.so.5.15.13  /usr/local/lib/qt5/libQt5OpenGL.so.5.15.13  /usr/local/lib/qt5/libQt5Script.so.5.15.16  /usr/local/lib/qt5/libQt5ScriptTools.so.5.15.16  /usr/local/lib/qt5/libQt5Sql.so.5.15.13  /usr/local/lib/qt5/libQt5Svg.so.5.15.13  /usr/local/lib/qt5/libQt5Test.so.5.15.13  /usr/local/lib/qt5/libQt5Widgets.so.5.15.13  /usr/local/lib/qt5/libQt5Xml.so.5.15.13  /usr/local/lib/libSM.so  /usr/local/lib/libICE.so  /usr/local/lib/libX11.so  /usr/local/lib/libXext.so  /usr/local/lib/qt5/libQt5X11Extras.so.5.15.13  /usr/local/lib/qt5/libQt5Gui.so.5.15.13  libQtScriptByteArray.a  libQueenMaryDsp.a  libReplayGain.a  libReverb.a  /usr/local/lib/librubberband.so  /usr/local/lib/libsndfile.so  /usr/local/lib/libSoundTouch.so  /usr/local/lib/libtag.so  /usr/local/lib/libavcodec.so  /usr/local/lib/libavformat.so  /usr/local/lib/libavutil.so  /usr/local/lib/libswresample.so  lib/libshout-idjc/libshout_mixxx.a  /usr/local/lib/libogg.so  /usr/local/lib/libvorbis.so  /usr/local/lib/libvorbisenc.so  /usr/lib/libssl.so  /usr/lib/libcrypto.so  /usr/local/lib/libsqlite3.so  /usr/local/lib/libopus.so  /usr/local/lib/libopusfile.so  /usr/local/lib/libmad.so  /usr/local/lib/libid3tag.so  /usr/local/lib/libmodplug.so  /usr/local/lib/libqt5keychain.so.0.14.3  /usr/local/lib/qt5/libQt5DBus.so.5.15.13  /usr/local/lib/qt5/libQt5Core.so.5.15.13  /usr/local/lib/libhidapi.so  /usr/lib/libusb.so  libmixxx-xwax.a  /usr/local/lib/libwavpack.so  lib/libgtest.a  -lpthread  -pthread  /usr/lib/librt.so  -Wl,-rpath-link,/usr/local/lib && :

fails with

ld: error: undefined symbol: testing::Mock::FailUninterestingCalls(unsigned long)
>>> referenced by enginebufferscalelineartest.cpp
>>>               CMakeFiles/mixxx-test.dir/src/test/enginebufferscalelineartest.cpp.o:((anonymous namespace)::EngineBufferScaleLinearTest::SetUp())

ld: error: undefined symbol: testing::Mock::UnregisterCallReaction(unsigned long)
>>> referenced by enginebufferscalelineartest.cpp
>>>               CMakeFiles/mixxx-test.dir/src/test/enginebufferscalelineartest.cpp.o:((anonymous namespace)::EngineBufferScaleLinearTest::SetUp())
>>> referenced by enginebufferscalelineartest.cpp
>>>               CMakeFiles/mixxx-test.dir/src/test/enginebufferscalelineartest.cpp.o:(testing::StrictMock<(anonymous namespace)::ReadAheadManagerMock>::~StrictMock())
>>> referenced by enginebufferscalelineartest.cpp
>>>               CMakeFiles/mixxx-test.dir/src/test/enginebufferscalelineartest.cpp.o:(testing::StrictMock<(anonymous namespace)::ReadAheadManagerMock>::~StrictMock())
c++: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.

Looks like there is some type inconsistency:

/usr/ports/audio/mixxx # nm --demangle `make -V WRKDIR`/.build/lib/libgmock.a |grep testing::Mock::FailUninterestingCalls 
0000000000005fa0 T testing::Mock::FailUninterestingCalls(void const*)

Looks like the decided to use system installed googletest after https://github.com/mixxxdj/mixxx/pull/11841 anway. (I have googletest installed system-wide trying to build this)
Comment 2 godsparkingvalet 2024-08-17 08:28:10 UTC
Unable to upgrade your database schema to version 39
Your mixxxdb.sqlite file may be corrupt.
Try renaming it and restarting Mixxx.
For help with database issues consult:
https://www.mixxx.org/support

Click OK to exit.

ConfigObject: Could not read "/home/Joint/.mixxx/mixxx.cfg"
Loading resources from  "/usr/local/share/mixxx/"
ConfigObject: Could not read "/home/Joint/.mixxx/mixxx.cfg"
ConfigObject: Could not read "/home/Joint/.mixxx/mixxx.cfg"
No version number in configuration file. Setting to "2.4.1"
BroadcastSettings - Found 1 profile(s)
warning [Main] No fonts directory found in "/usr/local/share/mixxx/"
critical [Main] FwdSqlQuery - Failed to prepare statement "DELETE FROM settings WHERE name=\"mixxx.db.model.library.header_state\"" : QSqlError("1", "Unable to execute statement", "no such column: \"mixxx.db.model.library.header_state\" - should this be a string literal in single-quotes?")
critical [Main] SchemaManager - Failed to upgrade database schema from version 6 to version 7

kernel info FreeBSD  15.0-CURRENT FreeBSD 15.0-CURRENT #0 main-n271670-bd4f2023bb05: Thu Aug 15 03:22:49 UTC 2024     root@releng3.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
Comment 3 commit-hook freebsd_committer freebsd_triage 2024-09-15 22:27:54 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=da458ee537d66a1dab2beec4e4091af20029994f

commit da458ee537d66a1dab2beec4e4091af20029994f
Author:     Jose Alonso Cardenas Marquez <acm@FreeBSD.org>
AuthorDate: 2024-09-15 22:22:15 +0000
Commit:     Jose Alonso Cardenas Marquez <acm@FreeBSD.org>
CommitDate: 2024-09-15 22:22:15 +0000

    audio/mixxx: Fix issue with newest version of sqlite

    - Bump PORTREVISION

    PR:             279284
    Reported by:    Marcin Cieslak <saper  _at_ saper.info>

 audio/mixxx/Makefile | 6 ++++--
 audio/mixxx/distinfo | 6 +++++-
 2 files changed, 9 insertions(+), 3 deletions(-)
Comment 4 Jose Alonso Cardenas Marquez freebsd_committer freebsd_triage 2024-09-15 22:34:25 UTC
Please try the new audio/mixxx update. This was updated with Marcin patch file sent to mixxx project and another one.