Audacity 3.0.2 : can't close after saving project

Hello,

Since the last NixOS upgrade, I have this problem with audacity, the same as specified in this forum :

http://64.227.98.153/viewtopic.php?f=68&t=116712&sid=6be8c12ad6a39b289fb4d237fd9c0390

“Internal Error at DBConnection.cpp”

It occures after saving a project and quitting the audacity application.

and they say the solution migth be :
“SQLite must be compiled with SQLITE_ENABLE_DBPAGE_VTAB”

This is the link to the nixpkgs SQlite default.nix :

I would like to try an overlay of sqlite to add this compilation option in :
"NIX_CFLAGS_COMPILE = toString [ … "

But I have no idea of how to do that, could you please help me.

Thanks.

Thanks for chasing this upstream. I hit the same problem yesterday and came across your report here. The following fixes it for me. Create a new audacity.nix with the following:

{ pkgs ? import <nixpkgs> {} }:

let
  sqlite = pkgs.sqlite.overrideAttrs (oldAttrs: {
    NIX_CFLAGS_COMPILE = oldAttrs.NIX_CFLAGS_COMPILE + " -DSQLITE_ENABLE_DBPAGE_VTAB";
  });
in
  pkgs.audacity.override { inherit sqlite; }

Then a nix-build ./audacity.nix will do the rest. The resulting audacity binary no longer has the problem - saving project does not give an error.

I hope that helps.

Wonderfull ! Thank you for your solution, I’m not at home but will try what you did as soon as possible.
I’m eager to try it, I used to try something, but it was wrong, with endless compilation …
Next step is for me to understand, with nix pill or whatever !

Thanks a lot, I tell you when I try, but I’m sure it’ll work thanks to you.
bravo !

Ok it works for me too,

I used your solution directly in my /etc/nixos/configuration.nix
in the
environment.systemPackages = with pkgs; [
section,
just adding parenthesis as the documentation mention in : NixOS - NixOS 21.05 manual
with this exemple :
environment.systemPackages = [ (pkgs.emacs.override { gtk = pkgs.gtk3; }) ];

but without :
{ pkgs ? import <nixpkgs> {} }:

In my case it looks like this :

environment.systemPackages = with pkgs; [

     (
       let
          sqlite = pkgs.sqlite.overrideAttrs (oldAttrs: {
          NIX_CFLAGS_COMPILE = oldAttrs.NIX_CFLAGS_COMPILE + " -DSQLITE_ENABLE_DBPAGE_VTAB";
          });
       in
         pkgs.audacity.override { inherit sqlite; }
     )
];

Thank you again !

1 Like