Re: Compilation on Debian SID

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: pgadmin-hackers(at)postgresql(dot)org, philippe rimbault <philippe(at)rimbault(dot)org>
Subject: Re: Compilation on Debian SID
Date: 2011-11-15 21:22:11
Message-ID: 1321392131.4918.4.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

On Mon, 2011-11-14 at 23:23 +0100, Guillaume Lelarge wrote:
> On Mon, 2011-11-14 at 09:24 +0100, philippe rimbault wrote:
> > 2011/11/13 Guillaume Lelarge <guillaume(at)lelarge(dot)info>
> >
> > > On Fri, 2011-11-04 at 10:15 +0100, philippe rimbault wrote:
> > > > 2011/11/4 Guillaume Lelarge <guillaume(at)lelarge(dot)info>
> > > >
> > > > > On Fri, 2011-11-04 at 10:01 +0100, philippe rimbault wrote:
> > > > > > GCC : gcc (Debian 4.6.1-15) 4.6.1
> > > > >
> > > > > Same here.
> > > > >
> > > > > > GLIBC : glibc-2.13-1
> > > > >
> > > > >
> > > > > 2.14 for me.
> > > > >
> > > > > > I'have tried to compile on an other computer (fresh Debian SID) and
> > > it's
> > > > > > the same issue.
> > > > > >
> > > > >
> > > > > How do you get a debian sid? I failed last evening. Here are my steps:
> > > > > * squeeze netinstall
> > > > > * sed -i -e 's/squeeze/unstable/' /etc/apt/sources.list
> > > > > * aptitude update
> > > > > * aptitude full-upgrade
> > > > >
> > > > >
> > > > I always start with a testing ISO :
> > > > http://cdimage.debian.org/cdimage/weekly-builds/
> > > > and after :
> > > > - change /etc/apt/sources.list
> > > > - apt-get update
> > > > - apt-get upgrade
> > > > - apt-get dist-upgrade
> > > >
> > > > But yours steps seems ok too.
> > > > What kind of error you get ?
> > > >
> > >
> > > First, sorry to answer that late.
> > >
> > > I tried with a testing ISO, and I reproduce the error. No need to change
> > > sources.list.
> > >
> > > The only way I found to fix this is to change the file
> > > pgadmin/include/utils/sysLogger.h, this way:
> > >
> > > /*
> > > #define DECLARE_INT_LOG_FUNCTION(level) \
> > > extern void wxVLog##level(const wxChar *szFormat, va_list argptr); \
> > > extern void wxLog##level(const wxChar *szFormat, ...) ATTRIBUTE_PRINTF_1
> > >
> > > DECLARE_INT_LOG_FUNCTION(Notice);
> > > DECLARE_INT_LOG_FUNCTION(Sql);
> > > DECLARE_INT_LOG_FUNCTION(QuietError);
> > > DECLARE_INT_LOG_FUNCTION(Script);
> > > DECLARE_INT_LOG_FUNCTION(ScriptVerbose);
> > > */
> > > DECLARE_LOG_FUNCTION(Notice);
> > > DECLARE_LOG_FUNCTION(Sql);
> > > DECLARE_LOG_FUNCTION(QuietError);
> > > DECLARE_LOG_FUNCTION(Script);
> > > DECLARE_LOG_FUNCTION(ScriptVerbose);
> > >
> > > In other words, I replace DECLARE_INT_LOG_FUNCTION with
> > > DECLARE_LOG_FUNCTION, and comment the DECLARE_INT_LOG_FUNCTION
> > > declaration.
> > >
> > > AFAICT, this macro is here since the development of 1.14 to be able to
> > > dynamically link with wxWidgets on Windows. This is commit
> > > 1270bcd192729d95cb5e2aa687e5ba1c366b7f5f. I don't quite understand why
> > > the new macro was required, but it doesn't help on Linux. One possible
> > > way to get rid of this is to put this code in place when compiling on
> > > Linux, and not otherwise.
> > >
> > > Not still sure if this is the right move. Something bothers me: why does
> > > it work on Fedora without the patch, and not on Debian? how do the
> > > Debian guys have a pgadmin 1.14 packaged without changing this file?
> > > (yes, 1.14 shows also the issue, and yes there is no patch on this file
> > > for their prebuilt package)
> > >
> > > Well, it still needs more investigation, but at least, you can compile
> > > it with this "patch".
> > >
> > >
> > > --
> > > Guillaume
> > > http://blog.guillaume.lelarge.info
> > > http://www.dalibo.com
> > >
> > >
> > Thanks for your investigation !
> >
>
> Still working on this. Gerfried Fuchs (the Debian packager for pgAdmin)
> also has the issue. I tried a few things, namely install gcc 4.6.2, but
> it still doesn't work without the patch.
>
> One interesting thing is that I can compile wxWidgets which has the same
> ATTRIBUTE_PRINTF_1 identifier. Maybe they do something smarter than us.
> Problem is I don't know what yet :-/
>

Seems they do pretty much what we do.

Biggest issue I have is that I actually don't understand the statement:

#define DECLARE_INT_LOG_FUNCTION(level) \
extern void wxVLog##level(const wxChar *szFormat, va_list argptr); \
extern void wxLog##level(const wxChar *szFormat, ...) ATTRIBUTE_PRINTF_1

Dave, according to git, you're the one that added this line. Can you do
something to make it work on debian unstable?

--
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Kris Shannon 2011-11-16 02:47:02 Re: [PATCH] Improve autocompletion for SELECT statements
Previous Message Guillaume Lelarge 2011-11-15 21:01:44 Re: [PATCH] Improve autocompletion for SELECT statements