Re: wxWidgets 2.9 build

From: Peter Geoghegan <peter(dot)geoghegan86(at)gmail(dot)com>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: Guillaume Lelarge <guillaume(at)lelarge(dot)info>, pgadmin-hackers(at)postgresql(dot)org
Subject: Re: wxWidgets 2.9 build
Date: 2011-01-17 23:56:29
Message-ID: AANLkTinMcr04UtqP4wvyNBaTU+EZ7ERke4kDf-rC4Yf+@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hmmm....seem to be getting a weird linker error when I build OGL (from
the independent package) against 2.9:

/usr/bin/ld: ogl_dll_composit.o: relocation R_X86_64_32 against
`wxDivisionControlPoint::ms_classInfo' can not be used when making a
shared object; recompile with -fPIC
ogl_dll_composit.o: could not read symbols: Bad value
collect2: ld returned 1 exit status

I take it that you didn't see this Dave? I built it against 2.9, which
was itself built using a shell script that's the same as
./xtra/build-wxgtk, except that I removed the contrib stuff.

Should -fPIC be in our CXXFLAGS? If so, why wouldn't it be?

> Yeah - I imagine the code had a few contributors over the years. The
> wxWidgets licence is a weird one - bizarrely, it allows closed source
> developers to incorporate the code in their source trees, but not open
> source guys using liberal licences like ours.

I'll ask the question so.

> I imagine that makes for a big (and ugly) patch - the main reason we
> use c_str() is so we can pass wxStrings to variadics.

Maybe we should consider using an alternative to conventional variadic
functions. There are lots of things to not like about them.
Boost.format is a good alternative . It may not actually be worth
pursuing, but it's worth noting.

>> This code in  ctlSQLBox::RegexFindText() errors:
>>
>> wxWX2MBbuf buf = (wxWX2MBbuf)wx2stc(text);
>>
>> wx2stc is now in private.h . See
>> http://groups.google.com/group/wx-dev/browse_thread/thread/1477c44701f792ea/8205f32f8433b03b
>> and please advise.
>
> Hmm, I need to look into that some more when I'm a little more awake.
> Probably not for a couple of days though unfortunately.

Find attached latest error output. All miscellaneous issues have been
resolved. I'm only missing these object files now:

g++: pgAdmin3.o: No such file or directory
g++: ctlSQLBox.o: No such file or directory
g++: explainCanvas.o: No such file or directory
g++: explainShape.o: No such file or directory
g++: frmQuery.o: No such file or directory
g++: parser.tab.o: No such file or directory

I believe that the only things standing between us and a rough 2.9 build are:

1. The linker problem above. OGL compiles acceptably.
2. The problem with pgsParser.yy. This is probably exceedingly simple,
but I haven't managed to fix it yet.
3. The problem with wx2stc() above. I could have fixed this by copying
and pasting the tiny function which only appears in private.h in 2.9,
but it that would violate the wxWindows licence.

I have had to do one or two things that I'm not overjoyed with to get
to this point, including using a const_cast to cast away constness
from a handle (wxChar*) to the internal buffer used by wxString.

--
Regards,
Peter Geoghegan

Attachment Content-Type Size
remaining_build_errors.txt text/plain 15.9 KB

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2011-01-18 09:31:58 Re: wxWidgets 2.9 build
Previous Message Guillaume Lelarge 2011-01-17 22:31:10 Re: wxWidgets 2.9 build