[RFC] LibreOffice build issues

Jung-uk Kim jkim at FreeBSD.org
Mon Jul 30 23:20:12 UTC 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2012-07-26 08:18:26 -0400, Andriy Gapon wrote:
> on 26/07/2012 03:31 Jung-uk Kim said the following:
>> I guess you had installed OpenSSL from ports. ;-)
> 
> Yes, bingo.
> 
>> Now I am able to build it with GCC 4.6:
>> 
>> http://people.freebsd.org/~jkim/libreoffice-20120725.tar.bz2
>> 
>> Basically, bsd.openssl.mk adds -rpath=/usr/lib:/usr/local/lib to 
>> LDFLAGS first, then bsd.gcc.mk adds
>> -Wl,-rpath=/usr/local/lib/gcc46 to it later.
>> 
>> Before: % make -V LDFLAGS -rpath=/usr/lib:/usr/local/lib % make
>> -V LDFLAGS USE_OPENSSL_BASE=yes -rpath=/usr/lib:/usr/local/lib %
>> make -V LDFLAGS USE_OPENSSL_PORT=yes -rpath=/usr/local/lib % make
>> -V LDFLAGS USE_OPENSSL_BASE=yes WITH_GCC=yes 
>> -rpath=/usr/lib:/usr/local/lib -Wl,-rpath=/usr/local/lib/gcc46 %
>> make -V LDFLAGS USE_OPENSSL_PORT=yes WITH_GCC=yes 
>> -rpath=/usr/local/lib -Wl,-rpath=/usr/local/lib/gcc46
>> 
>> For WITH_GCC case, I just defined OPENSSL_LDFLAGS as 
>> "-rpath=/usr/local/lib/gcc46".
>> 
>> After: % make -V LDFLAGS -rpath=/usr/lib:/usr/local/lib % make -V
>> LDFLAGS USE_OPENSSL_BASE=yes -rpath=/usr/lib:/usr/local/lib %
>> make -V LDFLAGS USE_OPENSSL_PORT=yes -rpath=/usr/local/lib % make
>> -V LDFLAGS USE_OPENSSL_BASE=yes WITH_GCC=yes 
>> -rpath=/usr/local/lib/gcc46 -rpath=/usr/lib:/usr/local/lib 
>> -Wl,-rpath=/usr/local/lib/gcc46 % make -V LDFLAGS
>> USE_OPENSSL_PORT=yes WITH_GCC=yes -rpath=/usr/local/lib/gcc46
>> -rpath=/usr/local/lib -Wl,-rpath=/usr/local/lib/gcc46
>> 
>> It's ugly but it's good enough for now.
>> 
>> Please note this is really a bug in bsd.openssl.mk (and/or
>> bsd.port.mk depending on how you look at it).  It shouldn't have
>> added /usr/lib in the first place.  It is only needed for
>> OPENSSL_PORT case and just /usr/local/lib itself.  Also,
>> bsd.gcc.mk had to be included before all bsd.foo.mk, whatever
>> touches rpath.
> 
> Good analysis and catch! I think that just dropping /usr/lib from
> rpath should be sufficient, but the way you are doing it could be
> safer in the long term.

I found that it doesn't really work, either.  For example, when
cppunit is installed, /usr/local/lib/libcppunit.so is always picked up
instead of local libcppunit.so.  Therefore, bsd.openssl.mk should
never ever set LDFLAGS globally IMHO.

Jung-uk Kim
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlAXFqsACgkQmlay1b9qnVN4IQCdFUo+QjJto7zoGX2f1W6Jhvfa
SxgAn2p1bP8bF9guoAmEIylU7kpKn/F0
=cTWj
-----END PGP SIGNATURE-----


More information about the freebsd-ports mailing list