From owner-freebsd-ports@FreeBSD.ORG Thu Jul 26 00:31:45 2012 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 11BBB106564A; Thu, 26 Jul 2012 00:31:45 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from hammer.pct.niksun.com (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 838478FC0C; Thu, 26 Jul 2012 00:31:44 +0000 (UTC) Message-ID: <50108FEF.3030405@FreeBSD.org> Date: Wed, 25 Jul 2012 20:31:43 -0400 From: Jung-uk Kim User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120626 Thunderbird/13.0.1 MIME-Version: 1.0 To: Andriy Gapon References: <500D91AA.70502@FreeBSD.org> <500DB55A.8000301@FreeBSD.org> <500DB8CE.4040206@FreeBSD.org> <500DBA56.5040800@FreeBSD.org> <500F13CC.4070706@FreeBSD.org> <500F9C55.1030009@FreeBSD.org> In-Reply-To: <500F9C55.1030009@FreeBSD.org> X-Enigmail-Version: 1.4.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-ports@freebsd.org Subject: Re: [RFC] LibreOffice build issues X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jul 2012 00:31:45 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2012-07-25 03:12:21 -0400, Andriy Gapon wrote: > on 25/07/2012 00:29 Jung-uk Kim said the following: >> On 2012-07-23 16:55:50 -0400, Andriy Gapon wrote: >>> on 23/07/2012 23:49 Jung-uk Kim said the following: >>>> On 2012-07-23 16:34:34 -0400, Andriy Gapon wrote: >>>>> Just a note: yesterday I built the port using GCC 4.6 and >>>>> external cppunit also built with GCC 4.6 (in fact almost >>>>> all of my ports are built with that compiler). I did not >>>>> run into any problems whatsoever. >>>> >>>>> I am a little bit saddened that GCC46 option was thrown >>>>> out. >>>> >>>> We can re-add it but it makes the Makefile little too >>>> complicated. :-( >> >>> Here is what I used: >>> http://people.freebsd.org/~avg/libreoffice-Makefile.txt But of >>> course I have my own version of bsd.gcc.mk which allows >>> WITH_GCC=gcc46 in make.conf to do the right thing (mostly). >> >> Can you please tell me your FreeBSD version? Was it stable/9? >> FYI, I wasn't able to build it sanely on head. :-( > > It's the head: FreeBSD 10.0-CURRENT r236503. I guess you had installed OpenSSL from ports. ;-) 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. Cheers, Jung-uk Kim -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAlAQj+8ACgkQmlay1b9qnVOZJgCgnHZ89oYEhzrMIEgWxKQvXxII ttUAn1pqGJFEUajZRjsqF3fDe3TFmnPe =uyRb -----END PGP SIGNATURE-----