Package Details: mingw-w64-sqlite 3.40.0-1

Git Clone URL: (read-only, click to copy)
Package Base: mingw-w64-sqlite
Description: A C library that implements an SQL database engine (mingw-w64)
Upstream URL:
Licenses: custom:public domain
Submitter: felixonmars
Maintainer: jazztickets
Last Packager: jazztickets
Votes: 13
Popularity: 0.003449
First Submitted: 2014-06-07 14:17 (UTC)
Last Updated: 2022-11-17 18:08 (UTC)

Latest Comments

1 2 Next › Last »

bepaald commented on 2021-08-23 11:19 (UTC) (edited on 2021-08-23 12:08 (UTC) by bepaald)

@Martchus. Thanks for testing. I think there is probably something wrong on my end. Downgrading this package (or mingw-w64-gcc) has no effect. The same packages built on my laptop seem to work fine (although I need to add -lspp to link my example code). Maybe something in my makepkg.conf? I'll need to investigate, but I do not think there is any issue with this package at least.

Thanks again, sorry for the noise.

EDIT Yeah, I had some overly clever default options set in my makepkg.conf. So I fixed it on my end. Apologies again.

Martchus commented on 2021-08-21 00:25 (UTC)

Your example compiles/links here without errors:

source mingw-env x86_64-w64-mingw32
x86_64-w64-mingw32-g++ $CXXFLAGS -static -static-libgcc -static-libstdc++ sqlite.cpp -lsqlite3 $LDFLAGS

bepaald commented on 2021-08-19 17:44 (UTC)

[~] $ x86_64-w64-mingw32-nm /usr/x86_64-w64-mingw32/lib/libsqlite3.a | "grep" -E "sqlite3_open|sqlite3_close"
00000000 T sqlite3_close
00000000 T sqlite3_close_v2
00000000 T sqlite3_open
00000000 T sqlite3_open16
00000000 T sqlite3_open_v2

Thanks again. I'll just wait a bit and see if it becomes a problem for more people.

Martchus commented on 2021-08-19 16:15 (UTC) (edited on 2021-08-19 16:17 (UTC) by Martchus)

I haven't read your message correctly. So the problem happens when linking against the static library. I can try to reproduce it later; otherwise I'll find it out anyways when building the static Qt packages. I'm wondering whether x86_64-w64-mingw32-nm /usr/x86_64-w64-mingw32/lib/libsqlite3.a shows these symbols.

Maybe some of these upstream changes is responsible:

bepaald commented on 2021-08-19 13:47 (UTC)

@Martchus Thanks. Maybe I should clarify that I'm using static linking.

 $ cat
extern "C"
#include <sqlite3.h>

int main()
  sqlite3 *db;
  int r = sqlite3_open("databasename", &db);
  if (r == 0)
  return 0;
[~] $ x86_64-w64-mingw32-g++ -static -L/usr/x86_64-w64-mingw32/lib/ -lsqlite3
/usr/lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld: /tmp/ undefined reference to `sqlite3_open'
/usr/lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld: /tmp/ undefined reference to `sqlite3_close'
collect2: error: ld returned 1 exit status
[~] $ 

Removing the -static flag results in a succesful compile, but then the exe will not run on Windows because 'sqlite3-0.dll was not found'.

Martchus commented on 2021-08-18 14:44 (UTC)

I was able to build it just fine and also didn't get the warning.

bepaald commented on 2021-08-18 14:28 (UTC) (edited on 2021-08-18 14:40 (UTC) by bepaald)

Thanks for maintaining this package. Since the latest update, I can't seem to compile against this library anymore. Suddenly I keep getting undefined reference to 'sqlite3_[...]' errors when linking. Neither the project, nor the build process has changed. Anyone else having trouble?

I noticed when building, I get

==> WARNING: Package contains reference to $srcdir

Probably unrelated? But I thought I'd mention it anyway.

Martchus commented on 2016-03-05 00:33 (UTC)

Current version (since already 3.11.1 has been released): As already mentioned when flagging the package, concurrent builds seem to work again.

Schala commented on 2016-01-28 09:46 (UTC)

ah ok works now

Martchus commented on 2016-01-27 23:02 (UTC) (edited on 2016-01-28 00:52 (UTC) by Martchus)

Invoking the command which produces the error manually works and sqlite3.exe is built correctly. Some values in /etc/makepkg.conf might be the cause? EDIT: MAKEFLAGS="-j$(nproc)" in /etc/makepkg.conf which enables make to build concurrently caused the error. As this feature appears to be broken, you should call make with "make -j1" to force building one thing at a time. EDIT: You could alternatively add '!makeflags' to the options. The regular package does the same with the comment "json extensions breaks parallel build".