[Scribus] Preview mode => crash (1.3.4cvs20070513)

Craig Ringer craig
Tue May 15 00:25:04 CEST 2007


intrigeri wrote:

> I?ll do this to go on with Scribus bug hunting :]
> 
> BTW, one question since I?m not aware of the dynamic library linking
> details : if I install a brand new upstream libcairo in /usr/local,
> I guess *all* apps will use it instead of the /lib one, right ?

Depends on your library path and whether the sonames of the two versions
of the library are the same.

If the sonames are different, ie libcairo.1.2 and libcairo.1.3 , then
you're fine and the correct application should link to the correct
library so long as both libraries are on the search path. If one cannot
be found, the apps requiring it will simply fail to run. The search path
is controlled by /etc/ld.so.conf and the LD_LIBRARY_PATH environment
variable.

Since the libraries are not compatible, the sonames should not be the
same, and you should not expect any problems. This is not, however,
guaranteed to be the case.

However, if the soname is the same or applications link only against
`libcairo.2' (so they claim to be happy with either version), then
whichever is on the library search path first will be found. If that's
the old version, and they're not *actually* compatible, then things go
splat bigtime.

Even if the sonames are different, it's quite likely that you'll upgrade
your system at some point to one with the version of cairo that you
compiled by hand. If those two binaries aren't completely compatible ...
*splat*.

If you wish to remain sane, use a wrapper script to launch Scribus with
an altered LD_LIBRARY_PATH. DO NOT ALTER LD_LIBRARY_PATH GLOBALLY OR
EDIT /etc/ld.so.conf . If you do so, do not submit any bug reports or
ask questions on the mailing list please.

> If yes, if I want to run my bug-hunting-Scribus with a new cairo
> version, I guess I should :
>   1. install this new cairo version in a place the system does not use
>      when looking for dynamic librarys, so that other apps don?t use
>      it

Correct. To the best of my knowledge, on Debian /usr/local/lib is NOT
searched for libraries by default, and it is safe to install things
there (though packages never should of course). In general, however,
it's probably best to install Scribus and all the custom built libraries
you compile for it into /opt/scribus_debug or something like that, and
execute Scribus with a wrapper script.

>   2. run scribus in a specific shell environment (custom
>      LD_LIBRARY_PATH, what else ?)

That's about it.

--
Craig Ringer



More information about the scribus mailing list