Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 23824 - sqlguipart-0.4 doesn't compile under GCC 3.2
Summary: sqlguipart-0.4 doesn't compile under GCC 3.2
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Linux MySQL bugs team
URL:
Whiteboard:
Keywords:
: 34283 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-07-01 12:13 UTC by Howard B. Golden
Modified: 2004-03-07 08:42 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
proposed sqlgui-0.5 patch (sqlgui-0.5.0-namespace.patch,830 bytes, patch)
2003-10-14 16:59 UTC, Brandy Westcott (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Howard B. Golden 2003-07-01 12:13:57 UTC
When compiling sqlguipart-0.4 on GCC 3.2 there is an error in sqlguiview.cpp:

----------------------

g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/kde/3.1/include -I/usr/qt/3/include -I.
-DQT_THREAD_SUPPORT -D_REENTRANT -O2 -fno-exceptions -fno-check-new
-Wp,-MD,.deps/sqlguiview.pp -c sqlguiview.cpp  -fPIC -DPIC -o .libs/sqlguiview.o
In file included from sqlguiview.cpp:48:
sqlguidoc.h:36:19: mysql.h: No such file or directory
In file included from sqlguidoc.h:43,
                 from sqlguiview.cpp:48:
db_components.h:75:7: warning: no newline at end of file
In file included from sqlguiview.cpp:48:
sqlguidoc.h:178: `MYSQL_RES' was not declared in this scope
sqlguidoc.h:178: `res' was not declared in this scope
sqlguidoc.h:178: invalid data member initialization
sqlguidoc.h:178: (use `=' to initialize static data members)
sqlguidoc.h:178: variable or field `slotUpdate' declared void
sqlguiview.cpp: In member function `void SqlGuiView::slotSelectExport(const
   QString&)':
sqlguiview.cpp:1380: warning: taking address of temporary
sqlguiview.cpp:1413: warning: taking address of temporary
make[2]: *** [sqlguiview.lo] Error 1
make[2]: Leaving directory
`/var/tmp/portage/sqlguipart-0.4/work/sqlgui-0.4.0/sqlguipart-0.4/sqlguipart'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/var/tmp/portage/sqlguipart-0.4/work/sqlgui-0.4.0/sqlguipart-0.4'
make: *** [all-recursive-am] Error 2

----------------------

There is a new version 0.5.1 on http://www.sqlgui.org that fixes this.
Comment 1 Peter Ruskin 2003-07-12 12:24:30 UTC
I get a similar failure, that I only encountered when remerging after 
upgrading from mysql-3.23.57 to mysql-4.0.13-r3:

In file included from sqlguidoc.h:43,
                 from sqlguiview.cpp:48:
db_components.h:75:7: warning: no newline at end of file
sqlguiview.cpp: In member function `void SqlGuiView::slotSelectExport(const
   QString&)':
sqlguiview.cpp:1380: warning: taking address of temporary
sqlguiview.cpp:1413: warning: taking address of temporary
/bin/sh ../libtool --mode=compile --tag=CXX g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/kde/3.1/include -I/usr/qt/3/include -I/usr/X11R6/include  -I/usr/include/mysql  -DQT_THREAD_SUPPORT  -D_REENTRANT  -DNDEBUG -DNO_DEBUG -O2 -march=athlon-xp -O3 -pipe -fomit-frame-pointer -fno-exceptions -fno-check-new  -c sqlguidoc.cpp
g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/kde/3.1/include -I/usr/qt/3/include -I/usr/X11R6/include -I/usr/include/mysql -DQT_THREAD_SUPPORT -D_REENTRANT -DNDEBUG -DNO_DEBUG -O2 -march=athlon-xp -O3 -pipe -fomit-frame-pointer -fno-exceptions -fno-check-new -Wp,-MD,.deps/sqlguidoc.pp -c sqlguidoc.cpp  -fPIC -DPIC -o .libs/sqlguidoc.o
In file included from sqlguidoc.h:43,
                 from sqlguidoc.cpp:43:
db_components.h:75:7: warning: no newline at end of file
sqlguidoc.cpp: In member function `void SqlGuiDoc::slotServerStatus()':
sqlguidoc.cpp:429: invalid conversion from `const char*' to `char*'
sqlguidoc.cpp: In member function `QString
   SqlGuiDoc::getTableFromSQL(QString*)':
sqlguidoc.cpp:634: warning: taking address of temporary
sqlguidoc.cpp: In member function `bool SqlGuiDoc::openDocument(const QString&,
   const QString&, const QString&)':
sqlguidoc.cpp:1375: invalid conversion from `const char*' to `char*'
make[2]: *** [sqlguidoc.lo] Error 1
make[2]: Leaving directory `/var/tmp/portage/sqlguipart-0.4/work/sqlgui-0.4.0/sqlguipart-0.4/sqlguipart'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/sqlguipart-0.4/work/sqlgui-0.4.0/sqlguipart-0.4'
make: *** [all-recursive-am] Error 2

!!! ERROR: dev-db/sqlguipart-0.4 failed.
!!! Function kde_src_compile, Line 123, Exitcode 2
!!! died running emake, kde_src_compile:make
Comment 2 Caleb Tennis (RETIRED) gentoo-dev 2003-09-16 14:46:05 UTC
ebuild for new version submitted - please test 
Comment 3 Howard B. Golden 2003-09-16 15:00:58 UTC
I am trying to find the new ebuild to test it. I did an emerge sync, but it isn't available yet. Is there a way to get the new ebuild sooner, e.g., specific website or CVS? (I've never used Gentoo's CVS, though I know how to use CVS in general.) Or, alternatively, how soon will Portage mirrors be updated? Thanks.
Comment 4 Peter Ruskin 2003-09-22 05:52:37 UTC
sqlgui still depends on sqlguipart-0.4, which won't compile.  I made an overlay 
ebuild for sqlgui-0.4 that depends on sqlguipart-0.5.1.  sqlgui and sqlguipart 
now emerge correctly, but when I run sqlgui and try to connect to mysql local 
server, I get the message "No libsqlguimysql found". 
Comment 5 Martin Holzer (RETIRED) gentoo-dev 2003-10-13 13:35:48 UTC
try 0.5.1 & 0.5
Comment 6 Peter Ruskin 2003-10-13 16:30:50 UTC
OK, I just tried `emerge sqlguipart sqlgui` 0.5.1 & 0.5:

In file included from /usr/kde/3.1/include/sqlgui/sqlguidoc.h:39,
                 from /usr/kde/3.1/include/sqlgui/sqlgui_part.h:26,
                 from main.cpp:29:
/usr/kde/3.1/include/sqlgui/db_components.h:77:23: warning: no newline at
end of file
main.cpp: In function `int main(int, char**)':
main.cpp:61: `cout' undeclared (first use this function)
main.cpp:61: (Each undeclared identifier is reported only once for each
   function it appears in.)
make[2]: *** [main.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /usr/kde/3.1/include/sqlgui/sqlguidoc.h:39,
                 from /usr/kde/3.1/include/sqlgui/sqlgui_part.h:26,
                 from sqlgui.cpp:59:
/usr/kde/3.1/include/sqlgui/db_components.h:77:23: warning: no newline at
end of file
sqlgui.cpp: In constructor `Shell::Shell()':
sqlgui.cpp:101: `cout' undeclared (first use this function)
sqlgui.cpp:101: (Each undeclared identifier is reported only once for each
   function it appears in.)
make[2]: *** [sqlgui.o] Error 1
make[2]: Leaving directory `/var/tmp/portage/sqlgui-0.5/work/sqlgui-0.5.0/sqlgui'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/sqlgui-0.5/work/sqlgui-0.5.0'
make: *** [all-recursive-am] Error 2

!!! ERROR: dev-db/sqlgui-0.5 failed.
!!! Function kde_src_compile, Line 137, Exitcode 2
!!! died running emake, kde_src_compile:make
Comment 7 Martin Holzer (RETIRED) gentoo-dev 2003-10-13 23:00:31 UTC
brandy any patch ideas ?
Comment 8 Caleb Tennis (RETIRED) gentoo-dev 2003-10-14 05:43:57 UTC
Adding the line:

using namespace std;

After the #includes and before the start of main() in main.cpp will fix the
error.

But, I don't necessarily think it's Gentoo's bug to fix.
Comment 9 Peter Ruskin 2003-10-14 10:24:05 UTC
It doesn't fix it here Caleb.

Here is the modified bit of main.c:
#include "sqlgui.h"

static KCmdLineOptions options[] =
{
    { "+[URL]", I18N_NOOP( "Location to open" ), 0 },
    { 0,        0,                               0 }
};

static const char *version = "1.0";
static const char *description = I18N_NOOP("A graphical database-frontend.");

using namespace std;

int main( int argc, char** argv )

...and after `ebuild unpack`, `ebuild compile` gives:

In file included from /usr/kde/3.1/include/sqlgui/sqlguidoc.h:39,
                 from /usr/kde/3.1/include/sqlgui/sqlgui_part.h:26,
                 from main.cpp:29:
/usr/kde/3.1/include/sqlgui/db_components.h:77:23: warning: no newline at
end of file
main.cpp: In function `int main(int, char**)':
main.cpp:62: `cout' undeclared (first use this function)
main.cpp:62: (Each undeclared identifier is reported only once for each
   function it appears in.)
make[2]: *** [main.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /usr/kde/3.1/include/sqlgui/sqlguidoc.h:39,
                 from /usr/kde/3.1/include/sqlgui/sqlgui_part.h:26,
                 from sqlgui.cpp:59:
/usr/kde/3.1/include/sqlgui/db_components.h:77:23: warning: no newline at
end of file
sqlgui.cpp: In constructor `Shell::Shell()':
sqlgui.cpp:101: `cout' undeclared (first use this function)
sqlgui.cpp:101: (Each undeclared identifier is reported only once for each
   function it appears in.)
make[2]: *** [sqlgui.o] Error 1
make[2]: Leaving directory `/var/tmp/portage/sqlgui-0.5/work/sqlgui-0.5.0/sqlgui'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/sqlgui-0.5/work/sqlgui-0.5.0'
make: *** [all-recursive-am] Error 2
Comment 10 Brandy Westcott (RETIRED) gentoo-dev 2003-10-14 16:59:34 UTC
Created attachment 19243 [details, diff]
proposed sqlgui-0.5 patch

It also looks like an '#include <iostream>' is missing from main.cpp and
a 'using namespace std' is missing from sqlgui.cpp
Comment 11 Peter Ruskin 2003-10-18 03:54:40 UTC
Thanks Brandy, sqlgui-0.5.0 builds OK with that patch.  However, it seems
to be broken:  when I start sqlgui and attempt to login to a mysql database
I get a dialog saying "No libsqlguimysql found."  

Using sqlguipart 0.5.1
Comment 12 Martin Holzer (RETIRED) gentoo-dev 2003-10-19 13:50:14 UTC
and when you are using sqlguipart 0.5.0 ?
Comment 13 Peter Ruskin 2003-10-19 14:54:58 UTC
0.5.1 doesn't exist in portage Martin
Comment 14 Brandy Westcott (RETIRED) gentoo-dev 2003-11-27 04:28:05 UTC
*** Bug 34283 has been marked as a duplicate of this bug. ***
Comment 15 Martin Holzer (RETIRED) gentoo-dev 2004-02-24 11:46:19 UTC
closing wiht 0.5.1
Comment 16 Daniel Seyffer 2004-03-06 07:55:28 UTC
Hmmm, same problem here (sqlgui-0.5 does not compile).

Just that /dev-db/sqlgui/sqlgui-0.5.1.ebuild is apparently not in Portage?

"cp sqlgui-0.5.ebuild sqlgui-0.5.1.ebuild", patching as below and "ebuild ... digest" works fine though. 
------------ [Patch] ------------ 
--- sqlgui-0.5.ebuild   2004-03-06 16:44:05.702034040 +0100
+++ sqlgui-0.5.1.ebuild 2004-03-06 16:44:52.843867392 +0100
@@ -8,7 +8,7 @@
 newdepend ">=dev-db/mysql-3.23.38
        >=dev-db/sqlguipart-${PV}"

-MY_P="${PN}-${PV}.0"
+MY_P="${PN}-${PV}"
 DESCRIPTION="GUI for the dev-db/sqlguipart, administration tool for a mysql db"
 SRC_URI="http://www.sqlgui.de/download/${MY_P}.tar.gz"
 HOMEPAGE="http://www.sqlgui.de/"
------------ [/Patch] ------------ 
Comment 17 Daniel Seyffer 2004-03-06 08:25:32 UTC
PS: also same here as mentioned in comment #11 :(
Comment 18 Peter Ruskin 2004-03-06 11:56:33 UTC
With patch from Comment #16 I can emerge sqlgui-0.5.1 and sqlguipart-0.5.1.  Running it fails, however: try to connect to mysql local server and I still get the message "No libsqlguimysql found".
Comment 19 Daniel Seyffer 2004-03-07 08:42:19 UTC
Peter: Same here. 
The mysql component is indeed missing (http://www.sqlgui.de/download.html -> Plugins). This renders the sqlgui ebuild as it currenlty is almost useless I'd say... ;-(

Apparently while there is a user submitted ebuild for the postgresql somewhere here in buzilla including an "untested ebuild" for the mysql plugin that one didn't merge when I tried it yesterday. I didn't have time so far to report that i.e. really check what's wrong with it...