From pravorskyi.a at openmailbox.org Fri Aug 25 10:23:53 2017 From: pravorskyi.a at openmailbox.org (pravorskyi.a@openmailbox.org) Date: Fri Aug 25 10:24:01 2017 Subject: [odb-users] [Gentoo] dev-db/libodb-qt-2.4.0 build fails with Qt5 Message-ID: <20170825142354.11EAF4E004A@mta-1.openmailbox.og> Hello! dev-db/libodb-qt-2.4.0 build fails with Qt5. build.log https://pastebin.com/LBdu5wC2 Qt5 installed, /usr/lib/libQt5Core.so exists. In my opinion, detection of Qt4/Qt5 should be fixed without 'sed' hacks. From boris at codesynthesis.com Sun Aug 27 04:11:14 2017 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Aug 27 04:11:22 2017 Subject: [odb-users] [Gentoo] dev-db/libodb-qt-2.4.0 build fails with Qt5 In-Reply-To: <20170825142354.11EAF4E004A@mta-1.openmailbox.og> References: <20170825142354.11EAF4E004A@mta-1.openmailbox.og> Message-ID: pravorskyi.a@openmailbox.org writes: > Hello! dev-db/libodb-qt-2.4.0 build fails with Qt5. > > build.log https://pastebin.com/LBdu5wC2 Quoting the above log: > !!! Please attach the following file when seeking support: > !!! /var/tmp/portage/dev-db/libodb-qt-2.4.0/work/libodb-qt-2.4.0_build/config.log Can you please do that (since that's where the real information about the error is)? > In my opinion, detection of Qt4/Qt5 should be fixed without 'sed' hacks. I don't see any sed calls in m4/libqt.m4 (which is where things are detected). Boris From boris at codesynthesis.com Sun Aug 27 12:07:05 2017 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Aug 27 12:07:32 2017 Subject: [odb-users] [Gentoo] dev-db/libodb-qt-2.4.0 build fails with Qt5 In-Reply-To: <20170827104010.B7D864E0007@mta-1.openmailbox.og> References: <20170827104010.B7D864E0007@mta-1.openmailbox.og> Message-ID: pravorskyi.a@openmailbox.org writes: > Strange, I have already sent message with config.log. I just checked the mailing list spam inbox and there are not messages from you. So looks like something on your side. > config.log https://pastebin.com/Ret0fmqm Ok, there are two issues: > /usr/include/qt5/QtCore/qcompilerdetection.h:562:6: error: #error Qt > requires a C++11 compiler and yours does not seem to be that. It looks like your version of Qt requires C++11 support ('-std=c++11' GCC options, '--std c++11' ODB option). > /usr/include/qt5/QtCore/qglobal.h:1113:4: error: #error "You must build > your code with position independent code if Qt was built with > -reduce-relocations. " "Compile your code with -fPIC (-fPIE is not > enough)." Again, Qt peculiarities. We've added this to the INSTALL file: Note that if you are using Qt5 and building a static library, then you may have to manually add the -fPIC C++ compiler flag to satisfy the Qt5 requirements, for example: ./configure CXXFLAGS="-fPIC -O3" Boris From b.kountouriotis at gmail.com Wed Aug 30 05:27:30 2017 From: b.kountouriotis at gmail.com (Vassilios Kountouriotis) Date: Wed Aug 30 05:28:11 2017 Subject: [odb-users] Creating native mysql views Message-ID: Hello, I'm in the process of incorporating odb into my project and I've successfully managed to create all the objects mapping to database tables. I can't say that I've me with the same success when it comes to views. I have read the manual, and specifically, chapter 10 (http://www.codesynthesis.com/products/odb/doc/manual.xhtml#10) says: > Note, however, that ODB views are not mapped to database views. Rather, by default, an ODB view is > mapped to an SQL SELECT query. However, if desired, it is easy to create an ODB view that is based > on a database view. Reading on, I see how to create views (not server-side but my-project-side) based on persistent objects, existing unmapped tables and even custom queries. Unfortunately, I cannot find how to instruct ODB to actually create a view object on the server, i.e. issue a "CREATE VIEW AS SELECT ......" command. Is something like this not possible? Thanks -- Vassilios Kountouriotis From boris at codesynthesis.com Wed Aug 30 15:03:52 2017 From: boris at codesynthesis.com (Boris Kolpackov) Date: Wed Aug 30 15:04:03 2017 Subject: [odb-users] Creating native mysql views In-Reply-To: References: Message-ID: Vassilios Kountouriotis writes: > Unfortunately, I cannot find how to instruct ODB to actually create a > view object on the server, i.e. issue a "CREATE VIEW AS SELECT ......" > command. You don't actually need to create a database view in order to use a SELECT statement in an ODB view. So the only plausible situation where you would want to use database views is if you already have them defined. If you still want to create database views for some reason, then you will have to issue the necessary CREATE VIEW statements manually during schema creation. The schema/custom example shows how to do that. Boris From b.kountouriotis at gmail.com Thu Aug 31 12:23:14 2017 From: b.kountouriotis at gmail.com (Vassilios Kountouriotis) Date: Thu Aug 31 12:23:57 2017 Subject: [odb-users] Creating native mysql views In-Reply-To: References: Message-ID: Yes, that was what I imagined, thank you very much for clarifying it! On Wed, Aug 30, 2017 at 10:03 PM, Boris Kolpackov wrote: > Vassilios Kountouriotis writes: > >> Unfortunately, I cannot find how to instruct ODB to actually create a >> view object on the server, i.e. issue a "CREATE VIEW AS SELECT ......" >> command. > > You don't actually need to create a database view in order to use > a SELECT statement in an ODB view. So the only plausible situation > where you would want to use database views is if you already have > them defined. > > If you still want to create database views for some reason, then you > will have to issue the necessary CREATE VIEW statements manually > during schema creation. The schema/custom example shows how to do > that. > > Boris -- Vassilios Kountouriotis