Re: DEV300_m96: rtld difference on FreeBSD

Maho NAKATA <[email protected]> Sun, 30 Jan 2011 18:36:32 +0900 (JST)
Newsgroups gmane.comp.openoffice.devel.porting
Message-ID <[email protected]>
Hi Kostik Belousov, Stephan, Bj=F6rn,

Now I find an answer.

I forgot that, to pass $ORIGIN for FreeBSD,
we also need "-Wl,-z,origin" as well. Still some parts use
older "DEV300_m96/solenv/inc/unxfbsd.mk", which have correct
$ORIGIN line and not "gmake" migrated modules. For such parts
$ORIGIN worked fine. For other parts, which are migrated modules,  =

I just copy and pasted from Linux, then for that part, build was
broken.

Thanks
 Nakata Maho


From: Maho NAKATA <[email protected]>
Subject: Re: [porting-dev] DEV300_m96: rtld difference on FreeBSD
Date: Sun, 30 Jan 2011 16:09:53 +0900 (JST)

> Hi Kostik Belousov,
> I found a small difference of rtld behavior between Linux and FreeBSD=
.=

> =

>> libexec/rtld-elf/rtld.c:    _rtld_error("%s: Unexpected inconsistenc=
y: dependency %s not found",
> =

> ldd fails like that on FreeBSD,
>> # cd basegfx/unxfbsdi.pro/lib ; ldd ./libbasegfxfi.so =

>> ./libbasegfxfi.so:
>> /libexec/ld-elf.so.1: ./libbasegfxfi.so: Unexpected inconsistency: d=
ependency libuno_sal.so.3 not found
>> ./libbasegfxfi.so: exit status 1
> =

> but on Linux
> =

>> maho@:~/DEV300_m96/basegfx/unxlngi6.pro/lib$ ldd ./libbasegfxli.so =

>>   linux-gate.so.1 =3D>  (0x0040d000)
>>   libuno_sal.so.3 =3D> not found
>>   libuno_cppuhelpergcc3.so.3 =3D> not found
>>   libuno_cppu.so.3 =3D> not found
>>   libstlport_gcc.so =3D> not found
>>   libstdc++.so.6 =3D> /usr/lib/libstdc++.so.6 (0x00542000)
>>   libm.so.6 =3D> /lib/tls/i686/cmov/libm.so.6 (0x00b77000)
>>   libgcc_s.so.1 =3D> /lib/libgcc_s.so.1 (0x00d8b000)
>>   libc.so.6 =3D> /lib/tls/i686/cmov/libc.so.6 (0x008d5000)
>>   /lib/ld-linux.so.2 (0x00e4b000)
> .
> =

> Is it a correct behavior? Just i'm not sure ...
> =

> Thanks
>  Nakata Maho
> =

> From: Maho NAKATA <[email protected]>
> Subject: [porting-dev] DEV300_m96: rtld difference on FreeBSD
> Date: Sun, 30 Jan 2011 15:16:28 +0900 (JST)
> =

>> Hi Stephan, Bj=F6rn,
>> =

>> I encountered another build brekage of DEV300_m96 on FreeBSD.
>> it seems small difference rtld between Linux and FreeBSD.
>> =

>> On FreeBSD 8,
>> =

>> # cd basegfx/unxfbsdi.pro/lib ; ldd ./libbasegfxfi.so =

>> ./libbasegfxfi.so:
>> /libexec/ld-elf.so.1: ./libbasegfxfi.so: Unexpected inconsistency: d=
ependency libuno_sal.so.3 not found
>> ./libbasegfxfi.so: exit status 1
>> =

>> On FreeBSD ldd erroneously exit on libbasegfxfi.so when it =

>> didn't find some libraries.  =

>> =

>> On Linux
>> maho@:~/DEV300_m96/basegfx/unxlngi6.pro/lib$ ldd ./libbasegfxli.so =

>>   linux-gate.so.1 =3D>  (0x0040d000)
>>   libuno_sal.so.3 =3D> not found
>>   libuno_cppuhelpergcc3.so.3 =3D> not found
>>   libuno_cppu.so.3 =3D> not found
>>   libstlport_gcc.so =3D> not found
>>   libstdc++.so.6 =3D> /usr/lib/libstdc++.so.6 (0x00542000)
>>   libm.so.6 =3D> /lib/tls/i686/cmov/libm.so.6 (0x00b77000)
>>   libgcc_s.so.1 =3D> /lib/libgcc_s.so.1 (0x00d8b000)
>>   libc.so.6 =3D> /lib/tls/i686/cmov/libc.so.6 (0x008d5000)
>>   /lib/ld-linux.so.2 (0x00e4b000)
>> =

>> problem here on FreeBSD is that ldd fails after it didn't find some =
libraries,
>> whereas on Linux, it just says it doesn't found.
>> =

>> It prevents packaging process, so FreeBSD build is broken at instset=
oo_native
>> like following:
>> **************************************************
>> ERROR: ERROR: unopkg sync --verbose -env:BUNDLED_EXTENSIONS_USER=3D"=
file:///work/OOO/debussy8i386/DEV300_m96/ports/editors/openoffice.org-3=
-devel/work/DEV300_m96/instsetoo_native/unxfbsdi.pro/OpenOffice/archive=
/install/en-US_inprogress/OOo_3.4.0_FreeBSD_install-arc_en-US/openoffic=
e.org3/share/prereg/bundled" -env:UserInstallation=3Dfile:///work/tmp/o=
oopackaging/i_485471296326978/unxfbsdi.pro/OpenOffice/archive/uno/en-US=
 -env:UNO_JAVA_JFW_ENV_JREHOME=3Dtrue 2>&1 | failed!
>> in function: register_extensions
>> **************************************************
>> =

>> **************************************************
>> ERROR: Saved logfile: /work/OOO/debussy8i386/DEV300_m96/ports/editor=
s/openoffice.org-3-devel/work/DEV300_m96/instsetoo_native/unxfbsdi.pro/=
OpenOffice/archive/logging/en-US/log_DEV300_en-US.log
>> **************************************************
>> ... cleaning the output tree ...
>> ... removing directory /work/tmp/ooopackaging/i_485471296326978 ...
>> Sun Jan 30 03:54:19 2011 (04:41 min.)
>> dmake:  Error code 255, while making 'openoffice_en-US.archive'
>> =

>> .
>> =

>> The relevant part of output of "DEV300_m96/instsetoo_native/unxfbsdi=
.pro/OpenOffice/archive/logging/en-US/log_DEV300_en-US.log" is =

>> =

>>> /libexec/ld-elf.so.1: Shared object "libbasegfxfi.so" not found, re=
quired by "libtlfi.so"
>> =

>> Systemcall: unopkg sync --verbose -env:BUNDLED_EXTENSIONS_USER=3D"fi=
le:///work/OOO/debussy8i386/DEV300_m96/ports/editors/openoffice.org-3-d=
evel/work/DEV300_m96/instsetoo_native/unxfbsdi.pro/OpenOffice/archive/i=
nstall/en-US_inprogress/OOo_3.4.0_FreeBSD_install-arc_en-US/openoffice.=
org3/share/prereg/bundled" -env:UserInstallation=3Dfile:///work/tmp/ooo=
packaging/i_671801296343016/unxfbsdi.pro/OpenOffice/archive/uno/en-US -=
env:UNO_JAVA_JFW_ENV_JREHOME=3Dtrue 2>&1 |
>> /libexec/ld-elf.so.1: Shared object "libbasegfxfi.so" not found, req=
uired by "libtlfi.so"
>> ERROR: Could not execute "unopkg sync --verbose -env:BUNDLED_EXTENSI=
ONS_USER=3D"file:///work/OOO/debussy8i386/DEV300_m96/ports/editors/open=
office.org-3-devel/work/DEV300_m96/instsetoo_native/unxfbsdi.pro/OpenOf=
fice/archive/install/en-US_inprogress/OOo_3.4.0_FreeBSD_install-arc_en-=
US/openoffice.org3/share/prereg/bundled" -env:UserInstallation=3Dfile:/=
//work/tmp/ooopackaging/i_671801296343016/unxfbsdi.pro/OpenOffice/archi=
ve/uno/en-US -env:UNO_JAVA_JFW_ENV_JREHOME=3Dtrue 2>&1 |"!Exitcode: '25=
6'
>> =

>> It seems we need LD_LIBRARY_PATH at packaging process(?)
>> =

>> Thanks,
>> =

>> -- Nakata Maho http://accc.riken.jp/maho/ , JA OOO http://ja.openoff=
ice.org/
>> http://blog.goo.ne.jp/nakatamaho/ ,GPG: http://accc.riken.jp/maho/ma=
ho.pgp.txt
>> =

>> --------------------------------------------------------------------=
-
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>> =

>> =

>> =

>> =

> =

> ---------------------------------------------------------------------=

> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> =

> =

> =

> =