-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Broken build on Linux Mint #738
Comments
Maybe there is a way to install a newer version of Boost in a different location than the 1.74 you already have installed and then point the build system at the 1.79 directories? |
I finally had a chance to look at this. I have Boost 1.82 installed in /usr/local/lib. The brewtarget build throws lots of compiler warnings. Starting from the menu works but starting from the command line (/usr/bin/brewtarget) aborts. The final line of the stacktrace is: 31# _start in /usr/bin/brewtarget I don't know what this means but I will keep poking at it. |
The error you're seeing usually means we read something unexpected (and unparseable) out of the database. Are you starting with a fresh database or using an existing one? Also, what commands are you using to build and install brewtarget? (Depending on the compiler, you can see compiler warnings in some of the Qt headers, but there normally should not be very many in the Brewtarget code itself.) |
I am using an existing database. I turned on logging and have over 1800 lines of errors, mostly like "[13:43:25.193] (1dil1llge8) ERROR : int {anonymous}::stringToEnum(const ObjectStore::TableDefinition&, const ObjectStore::TableField&, const QVariant&) Could not decode "pellet" to enum when mapping column form to property form for hop so using 0 [database/ObjectStore.cpp:241]". I am using the regular cmake and make commands in brewtarget-build, ie cmake ..;make with the default tools distributed with Linux Mint. The warnings all appear to be Qt. I noticed that PROJECT_VERSION = 3.0.8 but the resulting bin says 3.0.6. As before, starting from the command line ends with an abort. Starting from the GUI gives me a running brewtarget with over 1800 errors in the log. |
Sounds like you might have two different binaries. If you're building from source, it's simplest to ensure that you don't already have the binary package installed. The .deb and .rpm packages will install the executable to Make a backup of your database file (just in case) and uninstall the packaged version ( Also, for a local build, note that you must install the binary before running it. Otherwise, it doesn't know where to look for various resources. If you're using CMake, in the
If you're using Meson, in the
|
The error about |
I always build from source. The last package I used was 2.3.1. That was removed years ago. After a make clean; make; sudo make install nothing works. Looks like it's time to clean up my build directories and start fresh. By the way, I found brewtarget binaries in both /usr/bin and /usr/local/bin so I removed all of them. |
Ah, OK, that's curious. I had a look on my system and I also seem to have Brewtarget 3.0.6 in /usr/bin! I wonder if we had a bug in one of the build scripts for that release. Anyway, yes, you're right, cleaning up build directories and starting fresh is a good idea. Let us know how you get on. |
I made a fresh clone of the repository. Brewtarget will run with the default database but aborts with my database. |
OK, sounds like progress. 😄 If the abort is still from the assert at line 702 of (I'm expecting there should be an easy fix for your existing database.) |
Like these: [12:29:20.221] (1dpk686xj4) ERROR : void ObjectStore::loadAll(Database*) Error executing database query "SELECT id, display, deleted, folder, abv, attenuation, boil_off, brewdate, brewhouse_eff, eff_into_bk, fermentdate, fg, final_volume, mash_final_temp, notes, og, pitch_temp, post_boil_volume, projected_abv, projected_atten, projected_boil_grav, projected_eff, projected_ferm_points, projected_fg, projected_mash_fin_temp, projected_og, projected_points, projected_strike_temp, projected_vol_into_bk, projected_vol_into_ferm, sg, strike_temp, volume_into_bk, volume_into_fermenter, recipe_id\n FROM brewnote;" : "no such column: notes Unable to execute statement" [database/ObjectStore.cpp:1240] |
Hmm, that's interesting. The first error is saying a column is missing from one of the database tables. The second is saying that, in another table, it found a decimal number where it expected an integer. The second error is relatively easily fixable. Either we update the data to say "make these decimals integers", or we update the code to say "decimal numbers in this integer-only field is a known legacy issue, just truncate the decimal to an integer and it will be fine". This is because, if I remember rightly, we had a field that, long ago, was accidentally declared as a decimal when it was something we only were every going to store integers in. So it's safe to do either of the corrections I mention. The first error though is a bit more puzzling. I can't think off the top of my head why the Are all the other messages for the same errors, or are there some different ones? |
There is one warning: 12:30:18.625] (1dmhap1hds) WARNING : QXcbConnection: XCB error: 3 (BadWindow), sequence: 531, resource id: 9868761, major code: 40 (TranslateCoords), minor code: 0 [:0] The other messages are all INFO with the strings "No value supplied for required parameter" and "so using generic default". Looks like my database is trashed so it won't merge. Did I miss a schema change somewhere? |
Good to know it's only one missing column. Not sure how come it isn't there. Every time we modify the DB schema, we update the schema version number, which is stored both in the code and in the Since you're compiling from source, are you OK to make a backup of your DB and try to fix it with some manual SQL -- eg using
NB: I have not tested this so there may be minor syntax errors to correct. Then, while you're at it, you should (I think) be able to fix the other error with:
|
The database and my code are both 10. I have some older backups that I can play with. I won't be able to get to it until mid-week. I have a backup database with my recipes that is schema version 10, assuming that's what the version number in the settings table is. I found a few older databases with different version numbers that I will move aside to avoid confusion. Thanks for your help. I will let you know what happens in a few days. |
I'm getting closer. I ran the SQL you suggested. Now it's complaining about an unexpected type. The stack trace is attached. While playing with DB Browser I found a bunch of old recipes and data created by previous versions of brewtarget. I suspect the best way to proceed is to get brewtarget running well enough to export the small number of recipes I want to keep and then start with a fresh database. |
Other folks are seeing the same issue (eg see #751) so I'll do a PR this week to fix it. Hopefully we can get the software to read your DB directly. The "Plan B" of export and start again should mostly work, but it might not be 100% as some things (eg brew notes) cannot be exported to BeerXML. |
Thanks. I'm not too concerned about the brew notes. I usually print a brew sheet, scribble notes on it while brewing and then forget to update the brew notes. |
I'm hoping https://github.com/Brewtarget/brewtarget/releases/tag/v3.0.9 fixes the bugs you're seeing and the rest is, as you say, data issues from old DBs. But, as ever, let me know if you see other problems. |
Still seeing an error: [08:55:21.392] (1dtodvnrr4) ERROR : void ObjectStore::impl::wrapAndUnmapAsNeeded(const ObjectStore::TableDefinition&, const ObjectStore::TableField&, QVariant&) Unexpected type # 6 = double in QVariant for property inventoryId , field type FieldType # 1 : ( "ObjectStore::FieldType::Int" ) , value QVariant(double, 10) , table hop , column inventory_id [database/ObjectStore.cpp:697] |
Ah, OK, that's the same error on another table. The fix is very similar! |
See #755 |
It's probably safe to close this issue. Any of my original comments have been superseded by the recent database updates. The newest version of brewtarget successfully converted and loaded my old database. My oldest recipes survived the conversion. |
Thanks - glad to hear things are working! |
The default version of Boost on Linux Mint 21.1 Vera is 1.74.0 but brewtarget wants at least 1.79.0. I'm reluctant to upgrade Boost because of scattered reports that a newer Boost might break other software.
Any suggestions?
Thanks.
Jim
The text was updated successfully, but these errors were encountered: