“phearbear” <firstname.lastname@example.org> wrote in message
Andrew Thomas wrote:
“phearbear” <> email@example.com> > wrote in message
news:> 3D20AD91.firstname.lastname@example.org> …
Gave up on the problem for a while but i’m back trying to stab on it a
Just tried the ‘si’ trick and the results is very much confusing me.
If I ‘si’ through the whole dlopen() call, I get no segfault!
simply ‘s’ pass the dlopen give me a segfault though >
Found one issue with my application though. I was linking too both the
static and the shared libph as I am using the PtNumericFloat widget.
Realized i must use the libphS for it to work (…i think?)
That might be your issue. If your shared library is linked against a
static library, then the objects in the static library must be built
the -fPIC flag. QSSL does not use -fPIC when building static
libraries, so you cannot solve this problem. The only work-around
is to link your main executable against libphS, and then make sure
that your shared library does not link against libphS. Now you
need to use -shared during the link step for your main executable
so that your shared library can resolve symbols from the
executable when it loads.
This would all go away if
a) the dynamic Photon libs had the same functions as the static
Photon libs, or
b) QSSL compiled their static libs with -fPIC.
Both of these have been requested numerous times over the last
few years. I haven’t investigated the current status of things
recently to see what steps have been taken to address this issue.
I don’t use photon at all from my plugin.
In that case, linking your executable with libphS should not make any
difference at all. You only need -fPIC for code that is contained in,
or linked to, a shared object.
I can’t link with -shared for my main executable, QCC will then link it
as a library and it won’t be a executable no more.
Sorry, I was thinking -rdynamic (-Wl,-E) but said -shared. -rdynamic
doesn’t (didn’t used to) work in QNX6, but -Wl,-E does the same
b) is solved, as the *S.a libraries are compiled with -fPIC, that’s the
whole point >
That’s good to know.
Does your dynamic library have a constructor? Is it possible that
your crash is occuring at that point?
Have you had any luck generating a simplified example that you