From boris at codesynthesis.com Wed May 1 09:15:17 2019 From: boris at codesynthesis.com (Boris Kolpackov) Date: Wed May 1 09:34:43 2019 Subject: [odb-users] Visual Studio 2017 - LNK1104 cannot open file 'odb-mysql-d.lib' for Hello World In-Reply-To: References: Message-ID: Allan Head writes: > After following the Build2 installation instructions, I cannot seem to get > the Hello World example to work. I opened the hello-mysql-vc12 project and > upgraded it to vc141. The program compiles, but during the build it > generates the error LINK: fatal error LNK1104: cannot open file > 'odb-mysql-d.lib'. I do not have an 'odb-mysql-d.lib' file, but I do have > an odb-mysql.lib file and an odb-mysql.dll.lib file. Just replace odb-mysql-d.lib with odb-mysql.dll.lib in the VC project file (and also make sure you have added its location to VC Directories or equivalent). > Should the odb-example-2.4.0 work under ODB 2.5.0-b.13 or am I trying to do > the impossible? I think this should work. Eventually we will package ODB examples for build2 but for now this should do. From aheadsoftwaredeveloper at gmail.com Wed May 1 17:05:07 2019 From: aheadsoftwaredeveloper at gmail.com (Allan Head) Date: Thu May 2 09:47:22 2019 Subject: [odb-users] Visual Studio 2017 - LNK1104 cannot open file 'odb-mysql-d.lib' for Hello World In-Reply-To: References: Message-ID: Replacing odb-mysql-d.lib with odb-mysql.dll.lib and replacing odb-d.lib with odb.lib in the VC project file worked. However, when I run the following command from a VS Command Prompt: driver.exe --user --password --database odb_test I get the following error message: "operation can only be performed in transaction". Looking at driver.cxx the inserts for john, jane, and joe appear to be taking place in a transaction. Any suggestions? On Wed, May 1, 2019 at 6:15 AM Boris Kolpackov wrote: > Allan Head writes: > > > After following the Build2 installation instructions, I cannot seem to > get > > the Hello World example to work. I opened the hello-mysql-vc12 project > and > > upgraded it to vc141. The program compiles, but during the build it > > generates the error LINK: fatal error LNK1104: cannot open file > > 'odb-mysql-d.lib'. I do not have an 'odb-mysql-d.lib' file, but I do > have > > an odb-mysql.lib file and an odb-mysql.dll.lib file. > > Just replace odb-mysql-d.lib with odb-mysql.dll.lib in the VC project > file (and also make sure you have added its location to VC Directories > or equivalent). > > > > Should the odb-example-2.4.0 work under ODB 2.5.0-b.13 or am I trying to > do > > the impossible? > > I think this should work. Eventually we will package ODB examples for > build2 but for now this should do. > From boris at codesynthesis.com Thu May 2 12:05:40 2019 From: boris at codesynthesis.com (Boris Kolpackov) Date: Thu May 2 12:25:09 2019 Subject: [odb-users] Visual Studio 2017 - LNK1104 cannot open file 'odb-mysql-d.lib' for Hello World In-Reply-To: References: Message-ID: Allan Head writes: > Replacing odb-mysql-d.lib with odb-mysql.dll.lib and replacing odb-d.lib > with odb.lib in the VC project file worked. This should be odb.dll.lib, not odb.lib (which is a static library). From aheadsoftwaredeveloper at gmail.com Thu May 2 17:57:23 2019 From: aheadsoftwaredeveloper at gmail.com (Allan Head) Date: Fri May 3 10:43:54 2019 Subject: [odb-users] Visual Studio 2017 - LNK1104 cannot open file 'odb-mysql-d.lib' for Hello World In-Reply-To: References: Message-ID: Replacing odb.lib with odb.dll.lib generates the following error message when performing a build: odb person.hxx driver.cxx person-odb.cxx Generating Code... driver.obj : error LNK2001: unresolved external symbol "struct odb::details::share odb::details::shared" (?shared@details@odb@@3Ushare@12 @A) person-odb.obj : error LNK2001: unresolved external symbol "struct odb::details::share odb::details::shared" (?shared@details@odb@@3Ushare@12 @A) x64\Debug\driver.exe : fatal error LNK1120: 1 unresolved externals Don't know what to do at this point. On Thu, May 2, 2019 at 9:05 AM Boris Kolpackov wrote: > Allan Head writes: > > > Replacing odb-mysql-d.lib with odb-mysql.dll.lib and replacing odb-d.lib > > with odb.lib in the VC project file worked. > > This should be odb.dll.lib, not odb.lib (which is a static library). > From boris at codesynthesis.com Fri May 3 10:46:11 2019 From: boris at codesynthesis.com (Boris Kolpackov) Date: Fri May 3 11:05:44 2019 Subject: [odb-users] Visual Studio 2017 - LNK1104 cannot open file 'odb-mysql-d.lib' for Hello World In-Reply-To: References: Message-ID: Allan Head writes: > Replacing odb.lib with odb.dll.lib generates the following error message > when performing a build: > > driver.obj : error LNK2001: unresolved external symbol "struct > odb::details::share odb::details::shared" (?shared@details@odb@@3Ushare@12@A) > person-odb.obj : error LNK2001: unresolved external symbol "struct > odb::details::share odb::details::shared" (?shared@details@odb@@3Ushare@12@A) Hm, strange. Can you add LIBODB_SHARED to PreprocessorDefinitions in your VC project, rebuild, and see if that helps? From aheadsoftwaredeveloper at gmail.com Fri May 3 19:33:44 2019 From: aheadsoftwaredeveloper at gmail.com (Allan Head) Date: Mon May 6 08:29:59 2019 Subject: [odb-users] Visual Studio 2017 - LNK1104 cannot open file 'odb-mysql-d.lib' for Hello World In-Reply-To: References: Message-ID: Boris, adding LIBODB_SHARED to the Preprocessor Definitions in the VC Project worked. Thanks for the help! ~Allan Here is a recap of the steps taken to get the Hello Example from 2.4.0 to work using ODB 2.5.0-b.13 and MS Visual Studio 2017: Step 1: Replace odb-mysql-d.lib and odb-d.lib in the VC project file. 1.1 Click on *Project* *| Properties* from the VS menu bar. 1.2 In the *Property Pages* under *Configuration Properties*, click on *Linker* and then *Input*. Select *Additional Dependencies* in the right pane and then: 1.2.1. Replace odb-mysql-d.lib with odb-mysql.dll.lib. 1.2.2. Replace odb-d.lib with odb.dll.lib Step 2: Add LIBODB_SHARED to the Preprocessor Definitions. 2.1 Repeat Step 1.1 above. 2.2 In the *Property Pages* under *Configuration Properties*, click on *C/C++* and then *Preprocessor*. Select *Preprocessor Definitions* in the right pane, click on the down arrow, select *edit* and then: 2.2.1 Add LIBODB_SHARED to the bottom of the list. Step 3: Add odb\debug\bin to PATH. 3.1 Open x64 Native Tools Command Prompt for VS 2017 3.2 At the prompt enter: set "PATH=C:\odb\debug\bin;%PATH%" 3.2 Enter the following to run the Hello application: driver.exe --user --password --database odb_test where is your database user name and is your database password. 3.3 If successful, you should see the following printed on the Command Prompt screen: Hello, John Doe! Hello, Jane Doe! count : 3 min age: 31 max age: 33 On Fri, May 3, 2019 at 7:46 AM Boris Kolpackov wrote: > Allan Head writes: > > > Replacing odb.lib with odb.dll.lib generates the following error message > > when performing a build: > > > > driver.obj : error LNK2001: unresolved external symbol "struct > > odb::details::share odb::details::shared" (?shared@details@odb@ > @3Ushare@12@A) > > person-odb.obj : error LNK2001: unresolved external symbol "struct > > odb::details::share odb::details::shared" (?shared@details@odb@ > @3Ushare@12@A) > > Hm, strange. Can you add LIBODB_SHARED to PreprocessorDefinitions in > your VC project, rebuild, and see if that helps? > From gregs_ymb at yahoo.com Mon May 6 03:01:11 2019 From: gregs_ymb at yahoo.com (G G) Date: Mon May 6 08:29:59 2019 Subject: [odb-users] operation can only be performed in transaction References: <893593059.525916.1557126071435.ref@mail.yahoo.com> Message-ID: <893593059.525916.1557126071435@mail.yahoo.com> Hi. On this code"? ? std:: string pragmaKey("PRAGMA key=\''0123456789\'"); ? ? std::cout << "Execute " << pragmaKey << " result = " << db->execute( pragmaKey ) << std::endl;"? I got result:? Execute PRAGMA key='0123456789'? result = operation can only be performed in transaction Why??? odb-manual.pdf ("C++ Object Persistence with ODB", Revision 2.4, February 2015), page 45"The execute() functions allow us to execute native database statements on the connection.?Their semantics are equivalent to the database::execute() functions (Section 3.12, "Executing NativeSQL Statements") except that they can be legally called outside a transaction." Thanks. From boris at codesynthesis.com Tue May 7 10:16:11 2019 From: boris at codesynthesis.com (Boris Kolpackov) Date: Tue May 7 10:35:56 2019 Subject: [odb-users] operation can only be performed in transaction In-Reply-To: <893593059.525916.1557126071435@mail.yahoo.com> References: <893593059.525916.1557126071435.ref@mail.yahoo.com> <893593059.525916.1557126071435@mail.yahoo.com> Message-ID: G G writes: > db->execute( pragmaKey ) > > Why??? > > "The execute() functions allow us to execute native database statements on > the connection. Their semantics are equivalent to the database::execute() > functions (Section 3.12, "Executing NativeSQL Statements") except that they > can be legally called outside a transaction." Because you are executing it on a database, not a connection. From walker at kolomedical.com Sun May 12 23:16:18 2019 From: walker at kolomedical.com (walker@kolomedical.com) Date: Mon May 13 09:13:15 2019 Subject: [odb-users] How to make default value work Message-ID: <201905131116175089924@kolomedical.com>+ECF9D2236C6D3E1F Hi, I meet the issue to add the option default value to sqlite database, it shows ?19 (1299): NOT NULL constraint failed: Examination.exam_datetime?? how can I make this work for below define, Thanks! #pragma db options("DEFAULT CURRENT_TIMESTAMP") odb::nullable exam_datetime_; ?? - Walker From odb at a-cunningham.com Wed May 15 14:51:57 2019 From: odb at a-cunningham.com (Andrew Cunningham) Date: Wed May 15 15:12:25 2019 Subject: [odb-users] Use of data_migration_entry Message-ID: I must be misunderstanding something about how this is supposed to work. Assume I have three versions of my database 1,2,3 In version 2, I introduce a new class of object "class C" In version 3, I need to migrate some data of class C The base version of the database is 1, and I should be able to upgrade from 1->2 or from 1->3 To handle the migration of the "class C" object from versions 2->3 , I add a data migration entry static void migrate_c(odb::database& db) { for (C& c: db.query()) { // migrate data here db.update(c); } } static const odb::data_migration_entry<3, 2> migrate_c_entry(&migrate_c); This works as expected when I open a version "2" database in version "3". However , when I open a version "1" database, I get an exception as migrate_c () is called. The exception occurs, presumably, the version "1" db schema knows nothing about objects of class "C". I would have expected this function would NOT be called when migrating from 1->3, or at least db.query would return nothing. From boris at codesynthesis.com Thu May 16 11:32:28 2019 From: boris at codesynthesis.com (Boris Kolpackov) Date: Thu May 16 11:52:45 2019 Subject: [odb-users] Use of data_migration_entry In-Reply-To: References: Message-ID: Andrew Cunningham writes: > However, when I open a version "1" database, I get an exception as > migrate_c () is called. > The exception occurs, presumably, the version "1" db schema knows nothing > about objects of class "C". In this case the database should first be migrated from version 1 to 2 and then from 2 to 3 at which point migrate_c() should be called. Can you print the exception being thrown as well as db.schema_version() from inside migrate_c() and see if this sheds any light? From odb at a-cunningham.com Thu May 16 11:47:14 2019 From: odb at a-cunningham.com (Andrew Cunningham) Date: Thu May 16 12:07:46 2019 Subject: [odb-users] Use of data_migration_entry In-Reply-To: References: Message-ID: The odb::sqlite::database_exception is occurring here on the SELECT statement generated as the result of the query call. if (e != SQLITE_OK) translate_error (e, conn_); > odb-sqlite-rd-2.5-vc14.dll!odb::sqlite::statement::init(const char * text, unsigned __int64 text_size, odb::sqlite::statement_kind sk, const odb::sqlite::binding * proc, bool optimize) Line 149 C++ odb-sqlite-rd-2.5-vc14.dll!odb::sqlite::statement::statement(odb::sqlite::connection & conn, const std::basic_string,std::allocator > & text, odb::sqlite::statement_kind sk, const odb::sqlite::binding * process, bool optimize) Line 78 C++ odb-sqlite-rd-2.5-vc14.dll!odb::sqlite::select_statement::select_statement(odb::sqlite::connection & conn, const std::basic_string,std::allocator > & text, bool process, bool optimize, odb::sqlite::binding & param, odb::sqlite::binding & result) Line 568 C++ I have a feeling it is something obscure to do with the way my schema evolved over versions, as another query in another migration callback ,also for a class that was non-existent in the original schema, executes successfully. On Thu, May 16, 2019 at 8:32 AM Boris Kolpackov wrote: > Andrew Cunningham writes: > > > However, when I open a version "1" database, I get an exception as > > migrate_c () is called. > > The exception occurs, presumably, the version "1" db schema knows nothing > > about objects of class "C". > > In this case the database should first be migrated from version 1 to 2 > and then from 2 to 3 at which point migrate_c() should be called. > > Can you print the exception being thrown as well as db.schema_version() > from inside migrate_c() and see if this sheds any light? > From boris at codesynthesis.com Fri May 17 09:05:24 2019 From: boris at codesynthesis.com (Boris Kolpackov) Date: Fri May 17 09:25:40 2019 Subject: [odb-users] Use of data_migration_entry In-Reply-To: References: Message-ID: Andrew Cunningham writes: > I have a feeling it is something obscure to do with the way my schema > evolved over versions, as another query in another migration callback, > also for a class that was non-existent in the original schema, executes > successfully. In this case I would suggest that you find in the generated code the schema migration function that creates the corresponding table and confirm that it is registered for the correct version (and that it is there in the first place). From walker at kolomedical.com Fri May 24 02:11:21 2019 From: walker at kolomedical.com (walker@kolomedical.com) Date: Fri May 24 09:14:28 2019 Subject: [odb-users] How to make default value work References: <201905131116175089924@kolomedical.com> Message-ID: <201905241411207889071@kolomedical.com>+4896D1FCB6D74599 Dear Sir, How to add default value to the database by pragma db default, Thanks! #pragma db options("DEFAULT CURRENT_TIMESTAMP") odb::nullable exam_datetime_; ?? - Walker From kingle.zhuang at ringcentral.com Mon May 27 03:34:17 2019 From: kingle.zhuang at ringcentral.com (Kingle Zhuang) Date: Tue May 28 10:59:13 2019 Subject: [odb-users] ODB 2.5.0 Message-ID: <9344D2FD-DDCD-400C-A531-BBC44547EC36@rcoffice.ringcentral.com> Hi, Currently, our company use odb component, the version is 2.4.0. We want to upgrade to 2.5.0, we found a lot of changes & optimization on it. We have below questions: 1. When will the 2.5.0 version can be official released? 2. For android arm64-v8a support, int64_t is type defined to long on android ndk, and odb compiler only generate long long int for int64_t, so when we use std::vector for field, odb compiler will generate std::vector for that, finally cause compiler error when build 64bit app. So my question is that ?Is it fix on 2.5.0?? From boris at codesynthesis.com Tue May 28 10:54:49 2019 From: boris at codesynthesis.com (Boris Kolpackov) Date: Tue May 28 11:15:40 2019 Subject: [odb-users] ODB 2.5.0 In-Reply-To: <9344D2FD-DDCD-400C-A531-BBC44547EC36@rcoffice.ringcentral.com> References: <9344D2FD-DDCD-400C-A531-BBC44547EC36@rcoffice.ringcentral.com> Message-ID: Kingle Zhuang writes: > 1. When will the 2.5.0 version can be official released? While the release is overdue we don't yet have a firm date. The reason for the delay is that we are moving to a uniform build/packaging toolchain as well as more of "continuous delivery" model in the future. I would recommend that you do not wait for the official release and start using the new setup as described here: https://codesynthesis.com/products/odb/doc/install-build2.xhtml At this stage in the development cycle, it is as stable as 2.4.0, we are using it ourselves in multiple projects, we have migrated a number of users with very good results, and it is fully supported (i.e., we provide the same level of support as for 2.4.0). > 2. For android arm64-v8a support, int64_t is type defined to long on > android ndk, and odb compiler only generate long long int for int64_t, > so when we use std::vector for field, odb compiler will > generate std::vector for that, finally cause compiler > error when build 64bit app. So my question is that ?Is it fix on > 2.5.0?? I am guessing you are generating the database support code on Linux and then compiling it for the Android target. If that's the case, then yes, chances are this could be fixed in 2.5.0 since we've done some extra work on using aliases instead of the underlying types (it is still not always possible). So I would suggest that you try 2.5.0 and see how it goes. From cezanmeyen at gmail.com Wed May 29 09:41:03 2019 From: cezanmeyen at gmail.com (Cezan Meyen) Date: Wed May 29 10:02:16 2019 Subject: [odb-users] Weird problem/crash with object loading views Message-ID: Hello there, I am currently facing a weird problem with the object loading views. After I found out that the ODB queries only support one level of relationships ( https://www.codesynthesis.com40./pipermail/odb-users/2015-March/0024html) I tried to implement it with object loading views but this results in "glibc detected" and a abort. *The data model:* Parent3 ^ | Parent2 ^ | Parent1 ^ | Parent ^ | Child *View definition:* #pragma db view object(Child) object(Parent) object(Parent1) object(Parent2) object(Parent3) struct relation_object { shared_ptr child; shared_ptr parent1; shared_ptr parent3; }; *Entity defintion:* All entities are the same except Parent3 which does not contain a parent field #pragma db object struct Child { public: Child() { } //getters and setters private: friend class odb::access; #pragma db id auto int id_; std::string name_; #pragma db not_null shared_ptr parent_; }; *Query:* { odb::session s; typedef odb::query query; typedef odb::result result; transaction t (db->begin ()); result r(db->query(query::Parent::name == "parent")); for (result::iterator i (r.begin ()); i != r.end (); ++i) { cout << "in for "<< std::endl; cout << "name: " << i->parent1->name() << endl; cout << "name: " << i->parent3->name() << endl; cout << "name: " << i->child->name() << endl; } t.commit(); } As can be seen in the output(below) the objects and names are retrieved/printed correctly but after that the program crashes and aborts. But when removing object(Parent3) and the shared_ptr from the view it does not crash and behaves as expected. So is there a maximum of objects that can be linked to a view or is there something else happening? Thanks! Kind regards, Cezan *Output:* in for name: parent1 name: parent3 name: Main child *** glibc detected *** ./driver: double free or corruption (fasttop): 0x0000000001d29420 *** ======= Backtrace: ========= /lib64/libc.so.6[0x3224c75f3e] /lib64/libc.so.6[0x3224c78d8d] /usr/lib64/libstdc++.so.6(_ZNSsD1Ev+0x39)[0x322f89d4c9] ./driver[0x40976e] ./driver[0x412f1e] ./driver[0x412d1d] ./driver[0x40846c] ./driver[0x40777b] ./driver[0x406a16] ./driver[0x406a56] ./driver[0x409665] ./driver[0x412f50] ./driver[0x412d81] ./driver[0x40846c] ./driver[0x40777b] ./driver[0x406bd6] ./driver[0x406c16] ./driver[0x409559] ./driver[0x412f82] ./driver[0x412de5] ./driver[0x40846c] ./driver[0x40777b] ./driver[0x406d96] ./driver[0x406dd6] ./driver[0x409d8b] ./driver[0x40a7ff] ./driver[0x409e5d] ./driver[0x432511] ./driver[0x407ed7] ./driver[0x405a01] /lib64/libc.so.6(__libc_start_main+0xfd)[0x3224c1ed1d] ./driver[0x403fe9] ======= Memory map: ======== 00400000-00451000 r-xp 00000000 00:69 230886562 /home/ User /Desktop/ODBExample/driver 00651000-00652000 rw-p 00051000 00:69 230886562 /home/ User /Desktop/ODBExample/driver 01d09000-01d4b000 rw-p 00000000 00:00 0 [heap] 3224400000-3224420000 r-xp 00000000 fd:00 792187 /lib64/ld-2.12.so 322461f000-3224621000 r--p 0001f000 fd:00 792187 /lib64/ld-2.12.so 3224621000-3224622000 rw-p 00021000 fd:00 792187 /lib64/ld-2.12.so 3224622000-3224623000 rw-p 00000000 00:00 0 3224800000-3224802000 r-xp 00000000 fd:00 792782 /lib64/libdl-2.12.so 3224802000-3224a02000 ---p 00002000 fd:00 792782 /lib64/libdl-2.12.so 3224a02000-3224a03000 r--p 00002000 fd:00 792782 /lib64/libdl-2.12.so 3224a03000-3224a04000 rw-p 00003000 fd:00 792782 /lib64/libdl-2.12.so 3224c00000-3224d8a000 r-xp 00000000 fd:00 792781 /lib64/libc-2.12.so 3224d8a000-3224f8a000 ---p 0018a000 fd:00 792781 /lib64/libc-2.12.so 3224f8a000-3224f8e000 r--p 0018a000 fd:00 792781 /lib64/libc-2.12.so 3224f8e000-3224f90000 rw-p 0018e000 fd:00 792781 /lib64/libc-2.12.so 3224f90000-3224f94000 rw-p 00000000 00:00 0 3225000000-3225083000 r-xp 00000000 fd:00 792803 /lib64/libm-2.12.so 3225083000-3225282000 ---p 00083000 fd:00 792803 /lib64/libm-2.12.so 3225282000-3225283000 r--p 00082000 fd:00 792803 /lib64/libm-2.12.so 3225283000-3225284000 rw-p 00083000 fd:00 792803 /lib64/libm-2.12.so 3225400000-3225417000 r-xp 00000000 fd:00 792783 /lib64/libpthread-2.12.so 3225417000-3225617000 ---p 00017000 fd:00 792783 /lib64/libpthread-2.12.so 3225617000-3225618000 r--p 00017000 fd:00 792783 /lib64/libpthread-2.12.so 3225618000-3225619000 rw-p 00018000 fd:00 792783 /lib64/libpthread-2.12.so 3225619000-322561d000 rw-p 00000000 00:00 0 322e800000-322e816000 r-xp 00000000 fd:00 792818 /lib64/libgcc_s-4.4.7-20120601.so.1 322e816000-322ea15000 ---p 00016000 fd:00 792818 /lib64/libgcc_s-4.4.7-20120601.so.1 322ea15000-322ea16000 rw-p 00015000 fd:00 792818 /lib64/libgcc_s-4.4.7-20120601.so.1 322f800000-322f8e8000 r-xp 00000000 fd:00 1057699 /usr/lib64/libstdc++.so.6.0.13 322f8e8000-322fae8000 ---p 000e8000 fd:00 1057699 /usr/lib64/libstdc++.so.6.0.13 322fae8000-322faef000 r--p 000e8000 fd:00 1057699 /usr/lib64/libstdc++.so.6.0.13 322faef000-322faf1000 rw-p 000ef000 fd:00 1057699 /usr/lib64/libstdc++.so.6.0.13 322faf1000-322fb06000 rw-p 00000000 00:00 0 3236800000-323688b000 r-xp 00000000 fd:00 1089402 /usr/lib64/libsqlite3.so.0.8.6 323688b000-3236a8b000 ---p 0008b000 fd:00 1089402 /usr/lib64/libsqlite3.so.0.8.6 3236a8b000-3236a8e000 rw-p 0008b000 fd:00 1089402 /usr/lib64/libsqlite3.so.0.8.6 3236a8e000-3236a8f000 rw-p 00000000 00:00 0 7f58f0000000-7f58f0021000 rw-p 00000000 00:00 0 7f58f0021000-7f58f4000000 ---p 00000000 00:00 0 7f58f63d1000-7f58f63d7000 rw-p 00000000 00:00 0 7f58f63f1000-7f58f63f3000 rw-p 00000000 00:00 0 7f58f63f3000-7f58f6420000 r-xp 00000000 00:69 38217141 /home/ User /ODB2.4.0/SQLite_support_lib/lib/libodb-sqlite-2.4.so 7f58f6420000-7f58f661f000 ---p 0002d000 00:69 38217141 /home/User/ODB2.4.0/SQLite_support_lib/lib/libodb-sqlite-2.4.so 7f58f661f000-7f58f6621000 rw-p 0002c000 00:69 38217141 /home/ User /ODB2.4.0/SQLite_support_lib/lib/libodb-sqlite-2.4.so 7f58f6621000-7f58f6622000 rw-p 00000000 00:00 0 7f58f6622000-7f58f6644000 r-xp 00000000 00:69 113959029 /home/ User /ODB2.4.0/lib/lib/libodb-2.4.so 7f58f6644000-7f58f6844000 ---p 00022000 00:69 113959029 /home/ User /ODB2.4.0/lib/lib/libodb-2.4.so 7f58f6844000-7f58f6846000 rw-p 00022000 00:69 113959029 /home/ User /ODB2.4.0/lib/lib/libodb-2.4.so 7f58f6846000-7f58f6847000 rw-p 00000000 00:00 0 7fff89499000-7fff894af000 rw-p 00000000 00:00 0 [stack] 7fff895c3000-7fff895c4000 r-xp 00000000 00:00 0 [vdso] ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall] Abort (core dumped) From wsyre at harris.com Wed May 29 09:11:28 2019 From: wsyre at harris.com (Syre, William) Date: Wed May 29 10:06:07 2019 Subject: [odb-users] Problems using ODB w/SQLite on Windows Message-ID: Hello, I've been trying to compile sqlite using the existing project solution files but I keep getting the error 1>sqlite3.def : error LNK2001: unresolved external symbol sqlite3_unlock_notify Any idea what I can do to fix this issue? Thanks, William From ps.georgiou at gmail.com Wed May 29 09:58:59 2019 From: ps.georgiou at gmail.com (Panayiotis Georgiou) Date: Wed May 29 10:20:13 2019 Subject: [odb-users] unique constrain has no effect Message-ID: Hi odb-users, I am using ODB 2.4.0 for sqlite on windows. I am trying to declare one of the columns in my table with the "UNIQUE" constrain. I have tried several forms of the #pragma suggested in the manual but they do not seem to work, so I must be doing something wrong. As you can see from the code below, my persistent classes derive from an abstract base class (OdbRecord, declared with #pragma db object abstract ). Derived classes are then declared using #pragma db object polymorphic pointer(std::shared_ptr). The column which I would like to declare as unique is OdbRecord::m_Label. The commented code below shows my attempts in declaring this variable as unique. Any suggestions on how to fix this would be appreciated. Thanks for your help, Panos. ======================= #pragma db object abstract class OdbRecord { public: virtual ~OdbRecord() = 0; virtual std::string toString() const = 0; void printRecord(std::ostream& out) const { out << toString(); }; int getId() const { return m_Id; }; void setId(const int id) { m_Id = id; }; std::string getLabel() const { return m_Label; }; void setLabel(const std::string& label) { m_Label = label; }; protected: friend class odb::access; OdbRecord() {}; #pragma db id int m_Id = -1; //----> // #pragma db type("TEXT") unique //----> // #pragma db unique std::string m_Label; //----> // #pragma db index type("UNIQUE") member(m_Label) //----> // #pragma db index unique member(m_Label) }; inline OdbRecord::~OdbRecord() {} ======================= From kingle.zhuang at ringcentral.com Tue May 28 20:09:30 2019 From: kingle.zhuang at ringcentral.com (Kingle Zhuang) Date: Wed May 29 11:16:49 2019 Subject: [odb-users] ODB 2.5.0 In-Reply-To: References: <9344D2FD-DDCD-400C-A531-BBC44547EC36@rcoffice.ringcentral.com> Message-ID: Thank you for your reply. For 2, I suggest we can use int64_t instead of long long int when build on 64 bit platform. Attachment is error log when build 64 bit for android By the way, I installed build2 according to the documentation[https://build2.org/install.xhtml]. I tried two mac[10.14.4] machines that were not installed successfully, so I can't use the build2 tool. I tried 0.10 and 0.9. ?On 5/28/19, 10:55 PM, "Boris Kolpackov" wrote: Kingle Zhuang writes: > 1. When will the 2.5.0 version can be official released? While the release is overdue we don't yet have a firm date. The reason for the delay is that we are moving to a uniform build/packaging toolchain as well as more of "continuous delivery" model in the future. I would recommend that you do not wait for the official release and start using the new setup as described here: https://urldefense.proofpoint.com/v2/url?u=https-3A__codesynthesis.com_products_odb_doc_install-2Dbuild2.xhtml&d=DwIDaQ&c=fxtm8VyUXgCVDKhi9yIVsVsjq1ocZ-LZVehzdzjopw0&r=-h5cCTUebAX5iBiy5e8p2yBktDE1lF2eG68a_tt_aQw&m=wXsXGmbN3LbzLpZDmc0DhFWWxWP138oVsTQH9czdB1A&s=DP2BEhOBqmNEZ8wVrllT3w6Yc0GOBC-ySZv5ckCJOb4&e= At this stage in the development cycle, it is as stable as 2.4.0, we are using it ourselves in multiple projects, we have migrated a number of users with very good results, and it is fully supported (i.e., we provide the same level of support as for 2.4.0). > 2. For android arm64-v8a support, int64_t is type defined to long on > android ndk, and odb compiler only generate long long int for int64_t, > so when we use std::vector for field, odb compiler will > generate std::vector for that, finally cause compiler > error when build 64bit app. So my question is that ?Is it fix on > 2.5.0?? I am guessing you are generating the database support code on Linux and then compiling it for the Android target. If that's the case, then yes, chances are this could be fixed in 2.5.0 since we've done some extra work on using aliases instead of the underlying types (it is still not always possible). So I would suggest that you try 2.5.0 and see how it goes. -------------- next part -------------- FAILED: /Users/bill.shen/Library/Android/ndk/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ --target=aarch64-none-linux-android --gcc-toolchain=/Users/bill.shen/Library/Android/ndk/toolchains/aarch64-linux-android-4.9/prebuilt/darwin-x86_64 --sysroot=/Users/bill.shen/Library/Android/ndk/sysroot -DLOG4CPP_FIX_ERROR_COLLISION -DOPENSSL_NO_ENGINE -DSIO_TLS -DUSE_ASIO=1 -DWEBRTC_ANDROID -DWEBRTC_POSIX -D_ANDROID_ -D__STDINT_LIMITS -I/Users/bill.shen/workspace/Rincentral/RingCentral-Android/CoreLib/GlipCore/platform/android/libglipcore/../../../../../CoreLib/external/common -I/Users/bill.shen/workspace/Rincentral/RingCentral-Android/CoreLib/GlipCore/platform/android/libglipcore/../../../../../CoreLib/external/optional -I/Users/bill.shen/.conan/data/rapidjson/1.1.0/common/stable/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include -I/Users/bill.shen/.conan/data/pcre/8.43/mthor/stable/package/de9cd4a5ee68e8229a756ab59655c7ba47691cf8/include -I/Users/bill.shen/.conan/data/odb/3.27.0/mthor/stable/package/de9cd4a5ee68e8229a756ab59655c7ba47691cf8/include -I/Users/bill.shen/.conan/data/formatting/5.3.0/mthor/stable/package/de9cd4a5ee68e8229a756ab59655c7ba47691cf8/include -isystem /Users/bill.shen/Library/Android/ndk/sources/cxx-stl/llvm-libc++/include -isystem /Users/bill.shen/Library/Android/ndk/sources/android/support/include -isystem /Users/bill.shen/Library/Android/ndk/sources/cxx-stl/llvm-libc++abi/include -isystem /Users/bill.shen/Library/Android/ndk/sysroot/usr/include/aarch64-linux-android -D__ANDROID_API__=21 -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,--noexecstack -Wformat -Werror=format-security -std=c++11 -std=c++1y -DNO_WEBRTC -std=c++1y -O0 -fno-limit-debug-info -fPIC -O0 -pthread -fexceptions -frtti -MD -MT core_model/CMakeFiles/core_model.dir/glip-odb.cxx.o -MF core_model/CMakeFiles/core_model.dir/glip-odb.cxx.o.d -o core_model/CMakeFiles/core_model.dir/glip-odb.cxx.o -c /Users/bill.shen/workspace/Rincentral/RingCentral-Android/CoreLib/GlipCore/GlipCore/model/glip-odb.cxx /Users/bill.shen/workspace/Rincentral/RingCentral-Android/CoreLib/GlipCore/GlipCore/model/glip-odb.cxx:13088:45: error: no viable conversion from 'const vector' to 'const vector' ::std::vector< long long int > const& v = ^ /Users/bill.shen/Library/Android/ndk/sources/cxx-stl/llvm-libc++/include/vector:534:5: note: candidate constructor not viable: no known conversion from 'const std::vector' (aka 'const vector') to 'const std::__ndk1::vector > &' for 1st argument vector(const vector& __x); ^ /Users/bill.shen/Library/Android/ndk/sources/cxx-stl/llvm-libc++/include/vector:541:5: note: candidate constructor not viable: no known conversion from 'const std::vector' (aka 'const vector') to 'initializer_list >::value_type>' (aka 'initializer_list') for 1st argument vector(initializer_list __il); ^ /Users/bill.shen/Library/Android/ndk/sources/cxx-stl/llvm-libc++/include/vector:547:5: note: candidate constructor not viable: no known conversion from 'const std::vector' (aka 'const vector') to 'std::__ndk1::vector > &&' for 1st argument vector(vector&& __x) ^ /Users/bill.shen/workspace/Rincentral/RingCentral-Android/CoreLib/GlipCore/GlipCore/model/glip-odb.cxx:13099:45: error: no viable conversion from 'const vector' to 'const vector' ::std::vector< long long int > const& v = ^ /Users/bill.shen/Library/Android/ndk/sources/cxx-stl/llvm-libc++/include/vector:534:5: note: candidate constructor not viable: no known conversion from 'const std::vector' (aka 'const vector') to 'const std::__ndk1::vector > &' for 1st argument vector(const vector& __x); ^ /Users/bill.shen/Library/Android/ndk/sources/cxx-stl/llvm-libc++/include/vector:541:5: note: candidate constructor not viable: no known conversion from 'const std::vector' (aka 'const vector') to 'initializer_list >::value_type>' (aka 'initializer_list') for 1st argument vector(initializer_list __il); ^ /Users/bill.shen/Library/Android/ndk/sources/cxx-stl/llvm-libc++/include/vector:547:5: note: candidate constructor not viable: no known conversion from 'const std::vector' (aka 'const vector') to 'std::__ndk1::vector > &&' for 1st argument vector(vector&& __x) ^ /Users/bill.shen/workspace/Rincentral/RingCentral-Android/CoreLib/GlipCore/GlipCore/model/glip-odb.cxx:13185:45: error: no viable conversion from 'const vector' to 'const vector' ::std::vector< long long int > const& v = ^ /Users/bill.shen/Library/Android/ndk/sources/cxx-stl/llvm-libc++/include/vector:534:5: note: candidate constructor not viable: no known conversion from 'const std::vector' (aka 'const vector') to 'const std::__ndk1::vector > &' for 1st argument vector(const vector& __x); ^ /Users/bill.shen/Library/Android/ndk/sources/cxx-stl/llvm-libc++/include/vector:541:5: note: candidate constructor not viable: no known conversion from 'const std::vector' (aka 'const vector') to 'initializer_list >::value_type>' (aka 'initializer_list') for 1st argument vector(initializer_list __il); ^ /Users/bill.shen/Library/Android/ndk/sources/cxx-stl/llvm-libc++/include/vector:547:5: note: candidate constructor not viable: no known conversion from 'const std::vector' (aka 'const vector') to 'std::__ndk1::vector > &&' for 1st argument vector(vector&& __x) ^ /Users/bill.shen/workspace/Rincentral/RingCentral-Android/CoreLib/GlipCore/GlipCore/model/glip-odb.cxx:13196:45: error: no viable conversion from 'const vector' to 'const vector' ::std::vector< long long int > const& v = ^ /Users/bill.shen/Library/Android/ndk/sources/cxx-stl/llvm-libc++/include/vector:534:5: note: candidate constructor not viable: no known conversion from 'const std::vector' (aka 'const vector') to 'const std::__ndk1::vector > &' for 1st argument vector(const vector& __x); ^ /Users/bill.shen/Library/Android/ndk/sources/cxx-stl/llvm-libc++/include/vector:541:5: note: candidate constructor not viable: no known conversion from 'const std::vector' (aka 'const vector') to 'initializer_list >::value_type>' (aka 'initializer_list') for 1st argument vector(initializer_list __il); ^ /Users/bill.shen/Library/Android/ndk/sources/cxx-stl/llvm-libc++/include/vector:547:5: note: candidate constructor not viable: no known conversion from 'const std::vector' (aka 'const vector') to 'std::__ndk1::vector > &&' for 1st argument vector(vector&& __x) ^ /Users/bill.shen/workspace/Rincentral/RingCentral-Android/CoreLib/GlipCore/GlipCore/model/glip-odb.cxx:13453:35: error: no viable conversion from 'vector' to 'vector' obj.setGuestUserCompanyIDs (v); ^ /Users/bill.shen/Library/Android/ndk/sources/cxx-stl/llvm-libc++/include/vector:534:5: note: candidate constructor not viable: no known conversion from '::std::vector' to 'const std::__ndk1::vector > &' for 1st argument vector(const vector& __x); ^ /Users/bill.shen/Library/Android/ndk/sources/cxx-stl/llvm-libc++/include/vector:541:5: note: candidate constructor not viable: no known conversion from '::std::vector' to 'initializer_list >::value_type>' (aka 'initializer_list') for 1st argument vector(initializer_list __il); ^ /Users/bill.shen/Library/Android/ndk/sources/cxx-stl/llvm-libc++/include/vector:547:5: note: candidate constructor not viable: no known conversion from '::std::vector' to 'std::__ndk1::vector > &&' for 1st argument vector(vector&& __x) ^ /Users/bill.shen/workspace/Rincentral/RingCentral-Android/CoreLib/GlipCore/GlipCore/model/group.hpp:164:58: note: passing argument to parameter 'guestUserCompanyIDs' here void setGuestUserCompanyIDs(std::vector guestUserCompanyIDs) { m_guestUserCompanyIDs = guestUserCompanyIDs; } ^ /Users/bill.shen/workspace/Rincentral/RingCentral-Android/CoreLib/GlipCore/GlipCore/model/glip-odb.cxx:13459:39: error: non-const lvalue reference to type 'vector' cannot bind to a value of unrelated type 'vector' ::std::vector< long long int >& v = ^ /Users/bill.shen/workspace/Rincentral/RingCentral-Android/CoreLib/GlipCore/GlipCore/model/glip-odb.cxx:18592:45: error: no viable conversion from 'vector' to 'const vector' ::std::vector< long long int > const& v = ^ /Users/bill.shen/Library/Android/ndk/sources/cxx-stl/llvm-libc++/include/vector:534:5: note: candidate constructor not viable: no known conversion from 'std::vector' (aka 'vector') to 'const std::__ndk1::vector > &' for 1st argument vector(const vector& __x); ^ /Users/bill.shen/Library/Android/ndk/sources/cxx-stl/llvm-libc++/include/vector:541:5: note: candidate constructor not viable: no known conversion from 'std::vector' (aka 'vector') to 'initializer_list >::value_type>' (aka 'initializer_list') for 1st argument vector(initializer_list __il); ^ /Users/bill.shen/Library/Android/ndk/sources/cxx-stl/llvm-libc++/include/vector:547:5: note: candidate constructor not viable: no known conversion from 'std::vector' (aka 'vector') to 'std::__ndk1::vector > &&' for 1st argument vector(vector&& __x) ^ /Users/bill.shen/workspace/Rincentral/RingCentral-Android/CoreLib/GlipCore/GlipCore/model/glip-odb.cxx:18693:45: error: no viable conversion from 'vector' to 'const vector' ::std::vector< long long int > const& v = ^ /Users/bill.shen/Library/Android/ndk/sources/cxx-stl/llvm-libc++/include/vector:534:5: note: candidate constructor not viable: no known conversion from 'std::vector' (aka 'vector') to 'const std::__ndk1::vector > &' for 1st argument vector(const vector& __x); ^ /Users/bill.shen/Library/Android/ndk/sources/cxx-stl/llvm-libc++/include/vector:541:5: note: candidate constructor not viable: no known conversion from 'std::vector' (aka 'vector') to 'initializer_list >::value_type>' (aka 'initializer_list') for 1st argument vector(initializer_list __il); ^ /Users/bill.shen/Library/Android/ndk/sources/cxx-stl/llvm-libc++/include/vector:547:5: note: candidate constructor not viable: no known conversion from 'std::vector' (aka 'vector') to 'std::__ndk1::vector > &&' for 1st argument vector(vector&& __x) ^ /Users/bill.shen/workspace/Rincentral/RingCentral-Android/CoreLib/GlipCore/GlipCore/model/glip-odb.cxx:19045:32: error: no viable conversion from 'vector' to 'vector' obj.setAtmentionPostIds (v); ^ /Users/bill.shen/Library/Android/ndk/sources/cxx-stl/llvm-libc++/include/vector:534:5: note: candidate constructor not viable: no known conversion from '::std::vector' to 'const std::__ndk1::vector > &' for 1st argument vector(const vector& __x); ^ /Users/bill.shen/Library/Android/ndk/sources/cxx-stl/llvm-libc++/include/vector:541:5: note: candidate constructor not viable: no known conversion from '::std::vector' to 'initializer_list >::value_type>' (aka 'initializer_list') for 1st argument vector(initializer_list __il); ^ /Users/bill.shen/Library/Android/ndk/sources/cxx-stl/llvm-libc++/include/vector:547:5: note: candidate constructor not viable: no known conversion from '::std::vector' to 'std::__ndk1::vector > &&' for 1st argument vector(vector&& __x) ^ /Users/bill.shen/workspace/Rincentral/RingCentral-Android/CoreLib/GlipCore/GlipCore/model/item.hpp:223:55: note: passing argument to parameter 'atmentionPostIds' here void setAtmentionPostIds(std::vector atmentionPostIds) { ^ /Users/bill.shen/workspace/Rincentral/RingCentral-Android/CoreLib/GlipCore/GlipCore/model/glip-odb.cxx:53307:45: error: no viable conversion from 'vector' to 'const vector' ::std::vector< long long int > const& v = ^ /Users/bill.shen/Library/Android/ndk/sources/cxx-stl/llvm-libc++/include/vector:534:5: note: candidate constructor not viable: no known conversion from 'std::vector' (aka 'vector') to 'const std::__ndk1::vector > &' for 1st argument vector(const vector& __x); ^ /Users/bill.shen/Library/Android/ndk/sources/cxx-stl/llvm-libc++/include/vector:541:5: note: candidate constructor not viable: no known conversion from 'std::vector' (aka 'vector') to 'initializer_list >::value_type>' (aka 'initializer_list') for 1st argument vector(initializer_list __il); ^ /Users/bill.shen/Library/Android/ndk/sources/cxx-stl/llvm-libc++/include/vector:547:5: note: candidate constructor not viable: no known conversion from 'std::vector' (aka 'vector') to 'std::__ndk1::vector > &&' for 1st argument vector(vector&& __x) ^ /Users/bill.shen/workspace/Rincentral/RingCentral-Android/CoreLib/GlipCore/GlipCore/model/glip-odb.cxx:53399:45: error: no viable conversion from 'vector' to 'const vector' ::std::vector< long long int > const& v = ^ /Users/bill.shen/Library/Android/ndk/sources/cxx-stl/llvm-libc++/include/vector:534:5: note: candidate constructor not viable: no known conversion from 'std::vector' (aka 'vector') to 'const std::__ndk1::vector > &' for 1st argument vector(const vector& __x); ^ /Users/bill.shen/Library/Android/ndk/sources/cxx-stl/llvm-libc++/include/vector:541:5: note: candidate constructor not viable: no known conversion from 'std::vector' (aka 'vector') to 'initializer_list >::value_type>' (aka 'initializer_list') for 1st argument vector(initializer_list __il); ^ /Users/bill.shen/Library/Android/ndk/sources/cxx-stl/llvm-libc++/include/vector:547:5: note: candidate constructor not viable: no known conversion from 'std::vector' (aka 'vector') to 'std::__ndk1::vector > &&' for 1st argument vector(vector&& __x) ^ /Users/bill.shen/workspace/Rincentral/RingCentral-Android/CoreLib/GlipCore/GlipCore/model/glip-odb.cxx:53774:35: error: no viable conversion from 'vector' to 'vector' obj.setCompleteAssigneedId (v); ^ /Users/bill.shen/Library/Android/ndk/sources/cxx-stl/llvm-libc++/include/vector:534:5: note: candidate constructor not viable: no known conversion from '::std::vector' to 'const std::__ndk1::vector > &' for 1st argument vector(const vector& __x); ^ /Users/bill.shen/Library/Android/ndk/sources/cxx-stl/llvm-libc++/include/vector:541:5: note: candidate constructor not viable: no known conversion from '::std::vector' to 'initializer_list >::value_type>' (aka 'initializer_list') for 1st argument vector(initializer_list __il); ^ /Users/bill.shen/Library/Android/ndk/sources/cxx-stl/llvm-libc++/include/vector:547:5: note: candidate constructor not viable: no known conversion from '::std::vector' to 'std::__ndk1::vector > &&' for 1st argument vector(vector&& __x) ^ /Users/bill.shen/workspace/Rincentral/RingCentral-Android/CoreLib/GlipCore/GlipCore/model/item_task.hpp:144:58: note: passing argument to parameter 'completeAssigneedId' here void setCompleteAssigneedId(std::vector completeAssigneedId) { m_completeAssigneedId = completeAssigneedId; } ^ 12 errors generated. ninja: build stopped: subcommand failed. From kingle.zhuang at ringcentral.com Wed May 29 02:21:21 2019 From: kingle.zhuang at ringcentral.com (Kingle Zhuang) Date: Wed May 29 11:16:49 2019 Subject: [odb-users] ODB 2.5.0 In-Reply-To: References: <9344D2FD-DDCD-400C-A531-BBC44547EC36@rcoffice.ringcentral.com> Message-ID: <7F6206C4-6090-4C77-A623-19C7A38DFC52@rcoffice.ringcentral.com> Now I know how to fix build2 installation issues. 1. First can not use mac build-in openssl, should install openssl 1.1 or 1.0 through third party tools like homebrew 2. copy openssl to /usr/local/bin, copy include files to /usr/local/include, copy lib files to /usr/local/lib 3. sh build2-install-0.10.0.sh -j 1, else failure on some machines due to display 'can not execute clang++: too many open files' ?On 5/29/19, 8:09 AM, "Kingle Zhuang" wrote: Thank you for your reply. For 2, I suggest we can use int64_t instead of long long int when build on 64 bit platform. Attachment is error log when build 64 bit for android By the way, I installed build2 according to the documentation[https://build2.org/install.xhtml]. I tried two mac[10.14.4] machines that were not installed successfully, so I can't use the build2 tool. I tried 0.10 and 0.9. On 5/28/19, 10:55 PM, "Boris Kolpackov" wrote: Kingle Zhuang writes: > 1. When will the 2.5.0 version can be official released? While the release is overdue we don't yet have a firm date. The reason for the delay is that we are moving to a uniform build/packaging toolchain as well as more of "continuous delivery" model in the future. I would recommend that you do not wait for the official release and start using the new setup as described here: https://urldefense.proofpoint.com/v2/url?u=https-3A__codesynthesis.com_products_odb_doc_install-2Dbuild2.xhtml&d=DwIDaQ&c=fxtm8VyUXgCVDKhi9yIVsVsjq1ocZ-LZVehzdzjopw0&r=-h5cCTUebAX5iBiy5e8p2yBktDE1lF2eG68a_tt_aQw&m=wXsXGmbN3LbzLpZDmc0DhFWWxWP138oVsTQH9czdB1A&s=DP2BEhOBqmNEZ8wVrllT3w6Yc0GOBC-ySZv5ckCJOb4&e= At this stage in the development cycle, it is as stable as 2.4.0, we are using it ourselves in multiple projects, we have migrated a number of users with very good results, and it is fully supported (i.e., we provide the same level of support as for 2.4.0). > 2. For android arm64-v8a support, int64_t is type defined to long on > android ndk, and odb compiler only generate long long int for int64_t, > so when we use std::vector for field, odb compiler will > generate std::vector for that, finally cause compiler > error when build 64bit app. So my question is that ?Is it fix on > 2.5.0?? I am guessing you are generating the database support code on Linux and then compiling it for the Android target. If that's the case, then yes, chances are this could be fixed in 2.5.0 since we've done some extra work on using aliases instead of the underlying types (it is still not always possible). So I would suggest that you try 2.5.0 and see how it goes. From boris at codesynthesis.com Wed May 29 10:59:34 2019 From: boris at codesynthesis.com (Boris Kolpackov) Date: Wed May 29 11:20:30 2019 Subject: [odb-users] Problems using ODB w/SQLite on Windows In-Reply-To: References: Message-ID: Syre, William writes: > I've been trying to compile sqlite using the existing project solution > files but I keep getting the error > > 1>sqlite3.def : error LNK2001: unresolved external symbol > sqlite3_unlock_notify > > Any idea what I can do to fix this issue? You need to compile SQLite with -DSQLITE_ENABLE_UNLOCK_NOTIFY. See the INSTALL file in libodb-sqlite for details. Alternatively, you can use the build2-based build and have this taken care of auto-magically: https://codesynthesis.com/products/odb/doc/install-build2.xhtml From boris at codesynthesis.com Wed May 29 11:05:32 2019 From: boris at codesynthesis.com (Boris Kolpackov) Date: Wed May 29 11:26:25 2019 Subject: [odb-users] Weird problem/crash with object loading views In-Reply-To: References: Message-ID: Cezan Meyen writes: > *** glibc detected *** ./driver: double free or corruption (fasttop): My guess would be an ownership cycle or some such. Try adding a session and see if that helps. Also, I would recommend trying it with the latest pre-release: https://codesynthesis.com/products/odb/doc/install-build2.xhtml From wsyre at harris.com Wed May 29 12:18:55 2019 From: wsyre at harris.com (Syre, William) Date: Thu May 30 09:08:59 2019 Subject: [odb-users] Problems using ODB w/SQLite on Windows In-Reply-To: References: Message-ID: In the instructions for a windows install step 2.2 says > bpkg create -d odb-mingw cc^ config.cxx=g++^ config.cc.coptions=-O2^ config.install.root=C:\build2 how do I obtain bpkg on windows? Am I missing something? -----Original Message----- From: Boris Kolpackov Sent: Wednesday, May 29, 2019 11:00 AM To: Syre, William (US Person) Cc: odb-users@codesynthesis.com Subject: Re: [odb-users] Problems using ODB w/SQLite on Windows Syre, William writes: > I've been trying to compile sqlite using the existing project solution > files but I keep getting the error > > 1>sqlite3.def : error LNK2001: unresolved external symbol > sqlite3_unlock_notify > > Any idea what I can do to fix this issue? You need to compile SQLite with -DSQLITE_ENABLE_UNLOCK_NOTIFY. See the INSTALL file in libodb-sqlite for details. Alternatively, you can use the build2-based build and have this taken care of auto-magically: https://codesynthesis.com/products/odb/doc/install-build2.xhtml From boris at codesynthesis.com Thu May 30 08:50:35 2019 From: boris at codesynthesis.com (Boris Kolpackov) Date: Thu May 30 09:11:32 2019 Subject: [odb-users] Problems using ODB w/SQLite on Windows In-Reply-To: References: Message-ID: Syre, William writes: > In the instructions for a windows install step 2.2 says > > bpkg create -d odb-mingw cc^ > config.cxx=g++^ > config.cc.coptions=-O2^ > config.install.root=C:\build2 > > how do I obtain bpkg on windows? Am I missing something? This is step 2.1, "Installing build2": https://codesynthesis.com/products/odb/doc/install-build2.xhtml#windows-build2 From wsyre at harris.com Thu May 30 08:55:07 2019 From: wsyre at harris.com (Syre, William) Date: Thu May 30 09:19:30 2019 Subject: [odb-users] Problems using ODB w/SQLite on Windows In-Reply-To: References: Message-ID: Installing build2 doesn't include the bpkg utility as far as I can tell. -----Original Message----- From: Boris Kolpackov Sent: Thursday, May 30, 2019 8:51 AM To: Syre, William (US Person) Cc: odb-users@codesynthesis.com Subject: Re: [odb-users] Problems using ODB w/SQLite on Windows Syre, William writes: > In the instructions for a windows install step 2.2 says > > bpkg create -d odb-mingw cc^ > config.cxx=g++^ > config.cc.coptions=-O2^ > config.install.root=C:\build2 > > how do I obtain bpkg on windows? Am I missing something? This is step 2.1, "Installing build2": https://codesynthesis.com/products/odb/doc/install-build2.xhtml#windows-build2 From boris at codesynthesis.com Thu May 30 09:01:39 2019 From: boris at codesynthesis.com (Boris Kolpackov) Date: Thu May 30 09:22:36 2019 Subject: [odb-users] Problems using ODB w/SQLite on Windows In-Reply-To: References: Message-ID: Syre, William writes: > Installing build2 doesn't include the bpkg utility as far as I can tell. If you used the recommended automated install script approach, bpkg should be installed. Perhaps you forgot to add its location to PATH (as instructed at the beginning of steps 2.2 and 2.3)? > set "PATH=C:\build2\bin;%PATH%" > where bpkg From cezanmeyen at gmail.com Thu May 30 09:12:24 2019 From: cezanmeyen at gmail.com (Cezan Meyen) Date: Thu May 30 09:33:37 2019 Subject: [odb-users] Weird problem/crash with object loading views In-Reply-To: References: Message-ID: Hello Boris, I did try adding sessions to the entities and also added the session argument in the compiler but it still crashes. I will try running it with the new pre-release tomorrow. Thanks for the response! Kind regards, Cezan Op wo 29 mei 2019 17:05 schreef Boris Kolpackov : > Cezan Meyen writes: > > > *** glibc detected *** ./driver: double free or corruption (fasttop): > > My guess would be an ownership cycle or some such. Try adding a > session and see if that helps. Also, I would recommend trying it > with the latest pre-release: > > https://codesynthesis.com/products/odb/doc/install-build2.xhtml > > From wsyre at harris.com Thu May 30 09:09:08 2019 From: wsyre at harris.com (Syre, William) Date: Thu May 30 09:34:33 2019 Subject: [odb-users] Problems using ODB w/SQLite on Windows In-Reply-To: References: Message-ID: <56ce40a423a04d5ca19e67491a424373@MLBXCH15.cs.myharris.net> I added C:\build2\bin to my path but bpkg is still not a recognized command. I don't see bpkg.exe in build2/bin. I can use the other exe utilities that I have not installed anywhere else like curl which is located in that directory though. -----Original Message----- From: Boris Kolpackov Sent: Thursday, May 30, 2019 9:02 AM To: Syre, William (US Person) Cc: odb-users@codesynthesis.com Subject: Re: [odb-users] Problems using ODB w/SQLite on Windows Syre, William writes: > Installing build2 doesn't include the bpkg utility as far as I can tell. If you used the recommended automated install script approach, bpkg should be installed. Perhaps you forgot to add its location to PATH (as instructed at the beginning of steps 2.2 and 2.3)? > set "PATH=C:\build2\bin;%PATH%" > where bpkg From boris at codesynthesis.com Thu May 30 09:18:12 2019 From: boris at codesynthesis.com (Boris Kolpackov) Date: Thu May 30 09:39:10 2019 Subject: [odb-users] Problems using ODB w/SQLite on Windows In-Reply-To: <56ce40a423a04d5ca19e67491a424373@MLBXCH15.cs.myharris.net> References: <56ce40a423a04d5ca19e67491a424373@MLBXCH15.cs.myharris.net> Message-ID: Syre, William writes: > I added C:\build2\bin to my path but bpkg is still not a recognized > command. Ok, can you try the following for me: 1. Delete C:\build2 and C:\build2-build 2. Follow the instructions on the "Windows with MinGW" section to install build2: https://build2.org/install.xhtml#windows-mingw 3. Run the following command and send me the output: > dir C:\build2\bin From wsyre at harris.com Thu May 30 09:33:07 2019 From: wsyre at harris.com (Syre, William) Date: Thu May 30 10:10:31 2019 Subject: [odb-users] Problems using ODB w/SQLite on Windows In-Reply-To: References: <56ce40a423a04d5ca19e67491a424373@MLBXCH15.cs.myharris.net> Message-ID: <850824360a6e4ca482ebc6226196e84e@MLBXCH15.cs.myharris.net> Directory of H:\build2\bin 05/30/2019 09:30 AM . 05/30/2019 09:30 AM .. 03/18/2019 05:21 PM 1,088,650 busybox.exe 03/18/2019 05:21 PM 48,220 bzip2.exe 03/18/2019 05:21 PM 285,483 curl.exe 03/18/2019 05:21 PM 271,063 diff.exe 03/18/2019 05:21 PM 40,736 git-receive-pack.exe 03/18/2019 05:21 PM 1,661,216 git-remote-http.exe 03/18/2019 05:21 PM 1,661,216 git-remote-https.exe 03/18/2019 05:21 PM 40,736 git-upload-pack.exe 03/18/2019 05:21 PM 2,819,352 git.exe 03/18/2019 05:20 PM 101,937 gzip.exe 03/18/2019 05:20 PM 141,728 install.exe 03/18/2019 05:20 PM 149,646 less.exe 05/30/2019 09:30 AM mingw 05/30/2019 09:30 AM msys 03/18/2019 05:21 PM 705,908 openssl.exe 03/18/2019 05:20 PM 59,107 rm.exe 03/18/2019 05:20 PM 58,026 rmdir.exe 03/18/2019 05:21 PM 53,404 sha256sum.exe 05/30/2019 09:30 AM ssl 03/18/2019 05:21 PM 469,618 tar.exe 03/18/2019 05:21 PM 173,196 unzip.exe 03/18/2019 05:21 PM 82,335 xz.exe 03/18/2019 05:21 PM 188,913 zip.exe 20 File(s) 10,100,490 bytes 5 Dir(s) 3,769,720,832 bytes free H:\> I don't have access to C:\ so I am using H -----Original Message----- From: Boris Kolpackov Sent: Thursday, May 30, 2019 9:18 AM To: Syre, William (US Person) Cc: odb-users@codesynthesis.com Subject: Re: [odb-users] Problems using ODB w/SQLite on Windows Syre, William writes: > I added C:\build2\bin to my path but bpkg is still not a recognized > command. Ok, can you try the following for me: 1. Delete C:\build2 and C:\build2-build 2. Follow the instructions on the "Windows with MinGW" section to install build2: https://build2.org/install.xhtml#windows-mingw 3. Run the following command and send me the output: > dir C:\build2\bin From boris at codesynthesis.com Thu May 30 09:55:20 2019 From: boris at codesynthesis.com (Boris Kolpackov) Date: Thu May 30 10:16:19 2019 Subject: [odb-users] Problems using ODB w/SQLite on Windows In-Reply-To: <850824360a6e4ca482ebc6226196e84e@MLBXCH15.cs.myharris.net> References: <56ce40a423a04d5ca19e67491a424373@MLBXCH15.cs.myharris.net> <850824360a6e4ca482ebc6226196e84e@MLBXCH15.cs.myharris.net> Message-ID: Syre, William writes: > Directory of H:\build2\bin > > [...] > > H:\> > > I don't have access to C:\ so I am using H Ok, build2 executables are missing in that listing. How did you install build2 to H:\? Can you show the exact command line you ran? Also, I assume the install batch file finished successfully. Any chance you can provide its entire output? (Either upload somewhere and send the link or send it to me as an attachment off-list.) From wsyre at harris.com Thu May 30 09:59:30 2019 From: wsyre at harris.com (Syre, William) Date: Thu May 30 10:25:23 2019 Subject: [odb-users] Problems using ODB w/SQLite on Windows In-Reply-To: References: <56ce40a423a04d5ca19e67491a424373@MLBXCH15.cs.myharris.net> <850824360a6e4ca482ebc6226196e84e@MLBXCH15.cs.myharris.net> Message-ID: <5f0649c26f8542f4b9da7784ace5889e@MLBXCH15.cs.myharris.net> Here is the full output starting with the .bat file. -----Original Message----- From: Boris Kolpackov Sent: Thursday, May 30, 2019 9:55 AM To: Syre, William (US Person) Cc: odb-users@codesynthesis.com Subject: Re: [odb-users] Problems using ODB w/SQLite on Windows Syre, William writes: > Directory of H:\build2\bin > > [...] > > H:\> > > I don't have access to C:\ so I am using H Ok, build2 executables are missing in that listing. How did you install build2 to H:\? Can you show the exact command line you ran? Also, I assume the install batch file finished successfully. Any chance you can provide its entire output? (Either upload somewhere and send the link or send it to me as an attachment off-list.) -------------- next part -------------- H:\build2-build>build2-install-mingw-0.10.0.bat H:\build2-build>powershell.exe -nologo -noprofile -command "& { try{Invoke-WebRequest https://download.build2.org/toolchain.sha256 -OutFile toolchain.sha256 -TimeoutSec 600} catch {Write-Host $_.Exception.Message; Exit 1} }" About to download, build, and install build2 toolchain 0.10.0 (public). On: Windows 10 (10.0) From: https://download.build2.org Using: included MinGW GCC (x86_64-w64-mingw32) Install directory: C:\build2\ Build directory: H:\build2-build\ Package repository: https://pkg.cppget.org/1/alpha For options (change the installation directory, etc), run: build2-install-mingw-0.10.0.bat -h Continue? [y/n]y H:\build2-build>if exist C:\build2\ rmdir /S /Q C:\build2 C:\build2\bin\mingw - Access is denied. H:\build2-build>if exist build2-toolchain-0.10\ rmdir /S /Q build2-toolchain-0.10 H:\build2-build>if exist build2-toolchain-0.10.0\ rmdir /S /Q build2-toolchain-0.10.0 H:\build2-build>powershell.exe -nologo -noprofile -command "& { try{Invoke-WebRequest https://download.build2.org/0.10.0/build2-baseutils-0.10.0-x86_64-windows.zip -OutFile build2-baseutils-0.10.0-x86_64-windows.zip -TimeoutSec 600} catch {Write-Host $_.Exception.Message; Exit 1} }" info: build2-baseutils-0.10.0-x86_64-windows.zip checksum verified successfully H:\build2-build>powershell.exe -nologo -noprofile -command "& { try{Add-Type -A 'System.IO.Compression.FileSystem'; [IO.Compression.ZipFile]::ExtractToDirectory('build2-baseutils-0.10.0-x86_64-windows.zip', '.')} catch {Write-Host $_.Exception.Message; Exit 1} }" H:\build2-build>if not exist C:\ md C:\ H:\build2-build>move build2-baseutils-0.10.0-x86_64-windows C:\build2 Access is denied. info: move failed, falling back to copy... H:\build2-build>if not exist C:\build2\ md C:\build2 H:\build2-build>cd .. H:\>cd build2 H:\build2>cd .. H:\>dir build2\bin Volume in drive H is VOLSIS01 Volume Serial Number is 8029-84CF Directory of H:\build2\bin 05/30/2019 09:30 AM . 05/30/2019 09:30 AM .. 03/18/2019 05:21 PM 1,088,650 busybox.exe 03/18/2019 05:21 PM 48,220 bzip2.exe 03/18/2019 05:21 PM 285,483 curl.exe 03/18/2019 05:21 PM 271,063 diff.exe 03/18/2019 05:21 PM 40,736 git-receive-pack.exe 03/18/2019 05:21 PM 1,661,216 git-remote-http.exe 03/18/2019 05:21 PM 1,661,216 git-remote-https.exe 03/18/2019 05:21 PM 40,736 git-upload-pack.exe 03/18/2019 05:21 PM 2,819,352 git.exe 03/18/2019 05:20 PM 101,937 gzip.exe 03/18/2019 05:20 PM 141,728 install.exe 03/18/2019 05:20 PM 149,646 less.exe 05/30/2019 09:30 AM mingw 05/30/2019 09:30 AM msys 03/18/2019 05:21 PM 705,908 openssl.exe 03/18/2019 05:20 PM 59,107 rm.exe 03/18/2019 05:20 PM 58,026 rmdir.exe 03/18/2019 05:21 PM 53,404 sha256sum.exe 05/30/2019 09:30 AM ssl 03/18/2019 05:21 PM 469,618 tar.exe 03/18/2019 05:21 PM 173,196 unzip.exe 03/18/2019 05:21 PM 82,335 xz.exe 03/18/2019 05:21 PM 188,913 zip.exe 20 File(s) 10,100,490 bytes 5 Dir(s) 3,769,720,832 bytes free H:\> From boris at codesynthesis.com Thu May 30 10:10:54 2019 From: boris at codesynthesis.com (Boris Kolpackov) Date: Thu May 30 10:31:51 2019 Subject: [odb-users] Problems using ODB w/SQLite on Windows In-Reply-To: <5f0649c26f8542f4b9da7784ace5889e@MLBXCH15.cs.myharris.net> References: <56ce40a423a04d5ca19e67491a424373@MLBXCH15.cs.myharris.net> <850824360a6e4ca482ebc6226196e84e@MLBXCH15.cs.myharris.net> <5f0649c26f8542f4b9da7784ace5889e@MLBXCH15.cs.myharris.net> Message-ID: Syre, William writes: > Here is the full output starting with the .bat file. > > H:\build2-build>build2-install-mingw-0.10.0.bat > > [...] > > H:\build2-build>if exist C:\build2\ rmdir /S /Q C:\build2 > C:\build2\bin\mingw - Access is denied. > > H:\build2-build>move build2-baseutils-0.10.0-x86_64-windows C:\build2 > Access is denied. Ok, the script failed (because it cannot write to C:\build2, the default installation location). Try this: > build2-install-mingw-0.10.0.bat H:\build2 And then use H:\build2 instead of C:\build2 everywhere, for example: > set "PATH=H:\build2\bin;%PATH%" > where bpkg From boris at codesynthesis.com Thu May 30 10:25:02 2019 From: boris at codesynthesis.com (Boris Kolpackov) Date: Thu May 30 10:45:59 2019 Subject: [odb-users] unique constrain has no effect In-Reply-To: References: Message-ID: Panayiotis Georgiou writes: > #pragma db object abstract > class OdbRecord > { > //----> // #pragma db type("TEXT") unique > //----> // #pragma db unique > std::string m_Label; > }; The reason you don't get the unique constraint in your schema is because OdbRecord is abstract and therefore does not result in a table of its own. One could argue that we should automatically "propagate" such unique constraints to (all) the derived classes but we don't do it currently (due to the additional complexity that such propagation would entail). One way to make this work is using a virtual data member: #pragma db object abstract class OdbRecord { #pragma db transient std::string m_Label; }; #pragma db object polymorphic class OdbDerived: public OdbRecord { #pragma db member(m_Label_) virtual(std::string) unique access(m_Label) }; From wsyre at harris.com Thu May 30 10:24:32 2019 From: wsyre at harris.com (Syre, William) Date: Thu May 30 11:37:45 2019 Subject: [odb-users] Problems using ODB w/SQLite on Windows In-Reply-To: References: <56ce40a423a04d5ca19e67491a424373@MLBXCH15.cs.myharris.net> <850824360a6e4ca482ebc6226196e84e@MLBXCH15.cs.myharris.net> <5f0649c26f8542f4b9da7784ace5889e@MLBXCH15.cs.myharris.net> Message-ID: <6c944e435cd64072a4ef9023a51d6522@MLBXCH15.cs.myharris.net> I'm getting a curl error now curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above. I've included the text file of the greater output for context as well. -----Original Message----- From: Boris Kolpackov Sent: Thursday, May 30, 2019 10:11 AM To: Syre, William (US Person) Cc: odb-users@codesynthesis.com Subject: Re: [odb-users] Problems using ODB w/SQLite on Windows Syre, William writes: > Here is the full output starting with the .bat file. > > H:\build2-build>build2-install-mingw-0.10.0.bat > > [...] > > H:\build2-build>if exist C:\build2\ rmdir /S /Q C:\build2 > C:\build2\bin\mingw - Access is denied. > > H:\build2-build>move build2-baseutils-0.10.0-x86_64-windows C:\build2 > Access is denied. Ok, the script failed (because it cannot write to C:\build2, the default installation location). Try this: > build2-install-mingw-0.10.0.bat H:\build2 And then use H:\build2 instead of C:\build2 everywhere, for example: > set "PATH=H:\build2\bin;%PATH%" > where bpkg -------------- next part -------------- H:\build2-build>build2-install-mingw-0.10.0.bat H:\build2 H:\build2-build>powershell.exe -nologo -noprofile -command "& { try{Invoke-WebRequest https://download.build2.org/toolch ain.sha256 -OutFile toolchain.sha256 -TimeoutSec 600} catch {Write-Host $_.Exception.Message; Exit 1} }" About to download, build, and install build2 toolchain 0.10.0 (public). On: Windows 10 (10.0) From: https://download.build2.org Using: included MinGW GCC (x86_64-w64-mingw32) Install directory: H:\build2\ Build directory: H:\build2-build\ Package repository: https://pkg.cppget.org/1/alpha For options (change the installation directory, etc), run: build2-install-mingw-0.10.0.bat -h Continue? [y/n]y H:\build2-build>if exist H:\build2\ rmdir /S /Q H:\build2 H:\build2-build>if exist build2-toolchain-0.10\ rmdir /S /Q build2-toolchain-0.10 H:\build2-build>if exist build2-toolchain-0.10.0\ rmdir /S /Q build2-toolchain-0.10.0 info: build2-baseutils-0.10.0-x86_64-windows.zip checksum verified successfully H:\build2-build>powershell.exe -nologo -noprofile -command "& { try{Add-Type -A 'System.IO.Compression.FileSystem'; [IO.Compression.ZipFile]::ExtractToDirectory('build2-baseutils-0.10.0-x86_64-windows.zip', '.')} catch {Write-Host $_.Exception.Message; Exit 1} }" H:\build2-build>if not exist H:\ md H:\ H:\build2-build>move build2-baseutils-0.10.0-x86_64-windows H:\build2 1 dir(s) moved. H:\build2-build>curl -fLO --progress-bar --connect-timeout 60 --max-time 600 "https://download.build2.org/0.10.0/build2-mingw-0.10.0-x86_64-windows.tar.xz" ##O=# # curl: (60) SSL certificate problem: unable to get local issuer certificate More details here: https://curl.haxx.se/docs/sslcerts.html curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above. H:\build2-build> From boris at codesynthesis.com Thu May 30 11:25:28 2019 From: boris at codesynthesis.com (Boris Kolpackov) Date: Thu May 30 11:46:28 2019 Subject: [odb-users] Problems using ODB w/SQLite on Windows In-Reply-To: <6c944e435cd64072a4ef9023a51d6522@MLBXCH15.cs.myharris.net> References: <56ce40a423a04d5ca19e67491a424373@MLBXCH15.cs.myharris.net> <850824360a6e4ca482ebc6226196e84e@MLBXCH15.cs.myharris.net> <5f0649c26f8542f4b9da7784ace5889e@MLBXCH15.cs.myharris.net> <6c944e435cd64072a4ef9023a51d6522@MLBXCH15.cs.myharris.net> Message-ID: Syre, William writes: > H:\build2-build>curl -fLO --progress-bar --connect-timeout 60 --max-time 600 "https://download.build2.org/0.10.0/build2-mingw-0.10.0-x86_64-windows.tar.xz" > > curl: (60) SSL certificate problem: unable to get local issuer certificate > More details here: https://curl.haxx.se/docs/sslcerts.html > > curl failed to verify the legitimacy of the server and therefore could not > establish a secure connection to it. To learn more about this situation and > how to fix it, please visit the web page mentioned above. This is strange. I just tried the same, also on drive H:\, and it works for me fine. So far my only theory is that something (Windows Defender, your anti- virus software, etc) is interfering with the installation (if you have an excluded location for such cases, that would be a good place to try). You can try this command line to confirm if this is a flaky or persistent issue: H:\build2-build>H:\build2\bin\curl -fLO https://download.build2.org/0.10.0/build2-mingw-0.10.0-x86_64-windows.tar.xz FYI, the certificate bundle should be in H:\build2\bin\ssl\certs\ca-bundle.crt For 0.10.0 its size should be 242122 bytes. From sandisks555 at gmail.com Thu May 30 22:25:30 2019 From: sandisks555 at gmail.com (Cheng Wu) Date: Thu May 30 22:46:48 2019 Subject: [odb-users] charset in odb Message-ID: I write to this mail group at first time? now I useins odb to connection MySQL.While I want to run this script 'insert into table_name values('??1',''??2')'?my MySQL get error charset.I solve it throung 'auto_ptr db (new odb::mysql::database(argc, argv ,false,"utf8"));' Can I set charset to utf8 while using odb to generate cpp code? From wsyre at harris.com Thu May 30 13:18:21 2019 From: wsyre at harris.com (Syre, William) Date: Fri May 31 10:26:00 2019 Subject: [odb-users] Problems using ODB w/SQLite on Windows In-Reply-To: References: <56ce40a423a04d5ca19e67491a424373@MLBXCH15.cs.myharris.net> <850824360a6e4ca482ebc6226196e84e@MLBXCH15.cs.myharris.net> <5f0649c26f8542f4b9da7784ace5889e@MLBXCH15.cs.myharris.net> <6c944e435cd64072a4ef9023a51d6522@MLBXCH15.cs.myharris.net> Message-ID: <579ef0ad2f294d92903279960f0d1d10@MLBXCH15.cs.myharris.net> Yeah that seems to be the problem. Is there some way I can force all curl calls to default to use the -k option? -----Original Message----- From: Boris Kolpackov Sent: Thursday, May 30, 2019 11:25 AM To: Syre, William (US Person) Cc: odb-users@codesynthesis.com Subject: Re: [odb-users] Problems using ODB w/SQLite on Windows Syre, William writes: > H:\build2-build>curl -fLO --progress-bar --connect-timeout 60 --max-time 600 "https://download.build2.org/0.10.0/build2-mingw-0.10.0-x86_64-windows.tar.xz" > > curl: (60) SSL certificate problem: unable to get local issuer > certificate More details here: https://curl.haxx.se/docs/sslcerts.html > > curl failed to verify the legitimacy of the server and therefore could > not establish a secure connection to it. To learn more about this > situation and how to fix it, please visit the web page mentioned above. This is strange. I just tried the same, also on drive H:\, and it works for me fine. So far my only theory is that something (Windows Defender, your anti- virus software, etc) is interfering with the installation (if you have an excluded location for such cases, that would be a good place to try). You can try this command line to confirm if this is a flaky or persistent issue: H:\build2-build>H:\build2\bin\curl -fLO https://download.build2.org/0.10.0/build2-mingw-0.10.0-x86_64-windows.tar.xz FYI, the certificate bundle should be in H:\build2\bin\ssl\certs\ca-bundle.crt For 0.10.0 its size should be 242122 bytes. From boris at codesynthesis.com Fri May 31 10:12:14 2019 From: boris at codesynthesis.com (Boris Kolpackov) Date: Fri May 31 10:33:13 2019 Subject: [odb-users] Problems using ODB w/SQLite on Windows In-Reply-To: <579ef0ad2f294d92903279960f0d1d10@MLBXCH15.cs.myharris.net> References: <56ce40a423a04d5ca19e67491a424373@MLBXCH15.cs.myharris.net> <850824360a6e4ca482ebc6226196e84e@MLBXCH15.cs.myharris.net> <5f0649c26f8542f4b9da7784ace5889e@MLBXCH15.cs.myharris.net> <6c944e435cd64072a4ef9023a51d6522@MLBXCH15.cs.myharris.net> <579ef0ad2f294d92903279960f0d1d10@MLBXCH15.cs.myharris.net> Message-ID: Syre, William writes: > Yeah that seems to be the problem. What exactly is the problem (what did you try and what did you get)? You really need to provide more detailed information since otherwise all I can do is guess. > Is there some way I can force all curl calls to default to > use the -k option? No, there is no way (and would be a bad idea, anyway). You can try to pre-download the following files and place them next to the batch file: https://download.build2.org/0.10.0/build2-toolchain-0.10.0.tar.xz https://download.build2.org/0.10.0/build2-mingw-0.10.0-x86_64-windows.tar.xz If these files are already present, the batch file will use them instead of trying to download (with curl). But, further down the line curl will be used to download packages, so you may get the same problem. But it might still be worth a try: maybe by that time curl will become usable. From wsyre at harris.com Fri May 31 10:26:22 2019 From: wsyre at harris.com (Syre, William) Date: Mon Jun 3 09:27:18 2019 Subject: [odb-users] Problems using ODB w/SQLite on Windows In-Reply-To: References: <56ce40a423a04d5ca19e67491a424373@MLBXCH15.cs.myharris.net> <850824360a6e4ca482ebc6226196e84e@MLBXCH15.cs.myharris.net> <5f0649c26f8542f4b9da7784ace5889e@MLBXCH15.cs.myharris.net> <6c944e435cd64072a4ef9023a51d6522@MLBXCH15.cs.myharris.net> <579ef0ad2f294d92903279960f0d1d10@MLBXCH15.cs.myharris.net> Message-ID: I ended up getting past the certificate issue by installing from outside the firewall as you suggested. I seem to have all the .exe, .lib, and .dll files that I should. Thank you so much for your help! One final question, are there odb examples for odb 2.5? -----Original Message----- From: Boris Kolpackov Sent: Friday, May 31, 2019 10:12 AM To: Syre, William (US Person) Cc: odb-users@codesynthesis.com Subject: Re: [odb-users] Problems using ODB w/SQLite on Windows Syre, William writes: > Yeah that seems to be the problem. What exactly is the problem (what did you try and what did you get)? You really need to provide more detailed information since otherwise all I can do is guess. > Is there some way I can force all curl calls to default to use the -k > option? No, there is no way (and would be a bad idea, anyway). You can try to pre-download the following files and place them next to the batch file: https://download.build2.org/0.10.0/build2-toolchain-0.10.0.tar.xz https://download.build2.org/0.10.0/build2-mingw-0.10.0-x86_64-windows.tar.xz If these files are already present, the batch file will use them instead of trying to download (with curl). But, further down the line curl will be used to download packages, so you may get the same problem. But it might still be worth a try: maybe by that time curl will become usable.