Обсуждение: gcc-3.4.1

Поиск
Список
Период
Сортировка

gcc-3.4.1

От
Thomas Trepl
Дата:
Hi,

I'm on a beLFS installation (kernel 2.6.7, glibc-2.3.4-cvs, gcc-3.4.1)
and i have found an issue related to gcc-3.4.1.  I have to add that I'm
really no C++ programmer, so i don't know whether the following patch
produces nice/correct/complete code, but it helps to get pgAdmin3
compilable with gcc-3.4.1.  The patch relies on a cvs checkout of the
18, July 2004.

You may check the patch...

Thomas

diff -Naur pgadmin3-20040718.orig/src/include/dlgClasses.h pgadmin3-20040718/src/include/dlgClasses.h
--- pgadmin3-20040718.orig/src/include/dlgClasses.h    2004-06-21 19:06:00.000000000 +0200
+++ pgadmin3-20040718/src/include/dlgClasses.h    2004-07-18 11:08:29.642299039 +0200
@@ -30,10 +30,10 @@
     void RestorePosition(int defaultX=-1, int defaultY=-1, int defaultW=-1, int defaultH=-1, int minW=100, int
minH=70);
     void SavePosition();
     void LoadResource(const wxChar *name=0);
-
-protected:
     void OnCancel(wxCommandEvent& ev);
     void OnClose(wxCloseEvent& event);
+
+protected:
     wxString dlgName;

     DECLARE_EVENT_TABLE();
@@ -104,6 +104,8 @@
     virtual wxString GetCmd(int step)=0;
     bool Execute(int step=0);
     void Abort();
+    void OnCancel(wxCommandEvent& ev);
+    void OnClose(wxCloseEvent& event);

 protected:
     wxTextCtrl *txtMessages;
@@ -112,8 +114,6 @@
     bool done;

     void OnOK(wxCommandEvent& ev);
-    void OnCancel(wxCommandEvent& ev);
-    void OnClose(wxCloseEvent& event);
     void OnEndProcess(wxProcessEvent& event);

     void OnPollProcess(wxTimerEvent& event);

Re: gcc-3.4.1

От
Andreas Pflug
Дата:
Thomas Trepl wrote:
> Hi,
>
> I'm on a beLFS installation (kernel 2.6.7, glibc-2.3.4-cvs, gcc-3.4.1)
> and i have found an issue related to gcc-3.4.1.  I have to add that I'm
> really no C++ programmer, so i don't know whether the following patch
> produces nice/correct/complete code, but it helps to get pgAdmin3
> compilable with gcc-3.4.1.  The patch relies on a cvs checkout of the
> 18, July 2004.

Can you provide the error message you received from gcc?
I don't quite see why we should make those methods public, they're
protected intentionally.

Regards,
Andreas

Re: gcc-3.4.1

От
Thomas Trepl
Дата:
Hi Andreas,

--- Andreas Pflug <pgadmin@pse-consulting.de> schrieb: > Thomas Trepl
wrote:
 > > Hi,
 > >
 > > I'm on a beLFS installation (kernel 2.6.7, glibc-2.3.4-cvs, gcc-3.4.1)
 > > and i have found an issue related to gcc-3.4.1.  I have to add that
I'm
 > > really no C++ programmer, so i don't know whether the following patch
 > > produces nice/correct/complete code, but it helps to get pgAdmin3
 > > compilable with gcc-3.4.1.  The patch relies on a cvs checkout of the
 > > 18, July 2004.
 >
 > Can you provide the error message you received from gcc?
 > I don't quite see why we should make those methods public, they're
 > protected intentionally.

oh yes, of course - I should have added the error message to my first
mail. Well, here it is:

<hardcopy>
if g++ -DHAVE_CONFIG_H -I. -I. -I..
-DDATA_DIR=\"/opt/postgresql/share/pgadmin3/\" -Wall -g -I../src/include
-I../src/agent/include -I/opt/postgresql/include -DSSL
-I/usr/lib/wx/include/gtk2ud-2.5 -D__WXDEBUG__ -D__WXGTK__
-D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DWX_PRECOMP -DNO_GCC_PRAGMA
-I/usr/include -DDATA_DIR=\"/opt/postgresql/share/pgadmin3/\" -Wall -g
-I../src/include -I../src/agent/include -Wall -g -O0 -MT frmHelp.o -MD
-MP -MF ".deps/frmHelp.Tpo" -c -o frmHelp.o `test -f 'ui/frmHelp.cpp' ||
echo './'`ui/frmHelp.cpp; \
then mv -f ".deps/frmHelp.Tpo" ".deps/frmHelp.Po"; else rm -f
".deps/frmHelp.Tpo"; exit 1; fi
if g++ -DHAVE_CONFIG_H -I. -I. -I..
-DDATA_DIR=\"/opt/postgresql/share/pgadmin3/\" -Wall -g -I../src/include
-I../src/agent/include -I/opt/postgresql/include -DSSL
-I/usr/lib/wx/include/gtk2ud-2.5 -D__WXDEBUG__ -D__WXGTK__
-D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DWX_PRECOMP -DNO_GCC_PRAGMA
-I/usr/include -DDATA_DIR=\"/opt/postgresql/share/pgadmin3/\" -Wall -g
-I../src/include -I../src/agent/include -Wall -g -O0 -MT frmQBJoin.o -MD
-MP -MF ".deps/frmQBJoin.Tpo" -c -o frmQBJoin.o `test -f
'ui/frmQBJoin.cpp' || echo './'`ui/frmQBJoin.cpp; \
then mv -f ".deps/frmQBJoin.Tpo" ".deps/frmQBJoin.Po"; else rm -f
".deps/frmQBJoin.Tpo"; exit 1; fi
../src/include/dlgClasses.h:35: Fehler: `void
pgDialog::OnCancel(wxCommandEvent&)' is protected
ui/frmQBJoin.cpp:28: Fehler: within this context
make[2]: *** [frmQBJoin.o] Fehler 1
make[2]: Leaving directory `/tmp/pgadmin3-20040718/src'
make[1]: *** [all-recursive] Fehler 1
make[1]: Leaving directory `/tmp/pgadmin3-20040718'
make: *** [all] Fehler 2
</hardcopy>

Such issues from time to time occurs when using gcc-3.4.x. On many
packages there are little patches required to get them compilable with
the new compiler versions.

Greetings,

Thomas
R

Re: gcc-3.4.1 [solved]

От
Raphaël Enrici
Дата:
Thomas Trepl wrote:
> .../src/include/dlgClasses.h:35: Fehler: `void
> pgDialog::OnCancel(wxCommandEvent&)' is protected
> ui/frmQBJoin.cpp:28: Fehler: within this context
> make[2]: *** [frmQBJoin.o] Fehler 1
> make[2]: Leaving directory `/tmp/pgadmin3-20040718/src'
> make[1]: *** [all-recursive] Fehler 1
> make[1]: Leaving directory `/tmp/pgadmin3-20040718'
> make: *** [all] Fehler 2
> Such issues from time to time occurs when using gcc-3.4.x. On many
> packages there are little patches required to get them compilable with
> the new compiler versions.

Hi Thomas,

just a small mail to tell you that this issue is now solved.

Andreas has just commited the last patch. So, try to checkout now or
wait for the next tarball snapshot (tomorrow morning).

For reference, the entire thread is available here:
http://www.mail-archive.com/pgadmin-hackers@postgresql.org/msg04031.html

Thanks for the report.

Regards,
Raphaël