How to let rpath run as Linux.

Hi everyone.

When I port Kingsoft Office from Linux to FreeBSD I meet a problem: FreeBSD looks to be supporting rpath as runpath. There are some small differences between them: when a program file has runpath, all libraries loaded by the program are searched in the runpath. But rpath does not like this, it only affects the libraries directly loaded by the program.

The attachment is an example to show the difference. Download and run ./build.sh. It works in Linux, but can not work in FreeBSD.

Thanks to everyone.
 

Attachments

  • bbb.tar.bz2
    565 bytes · Views: 161
liba directly depends on libb independently of main's dependencies; therefore, the -rpath of liba should let the dynamic linker find libb. In other words, it isn't good form for a program to resolve the locations of its dependencies' dependencies.

Kevin Barry
 
Back
Top