Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Jan 2012 10:26:34 -0500
From:      "illoai@gmail.com" <illoai@gmail.com>
To:        Christer Solskogen <christer.solskogen@gmail.com>
Cc:        Lee Thomas <lthomas_lists@lthomas.net>, FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: lang/lua fails to build on 9.0-STABLE amd64 - bug or config issue?
Message-ID:  <CAHHBGkrdvG0oBjc0%2BjmyMZB4W=M3QF6YJkYxdOpc1shvbQx1fA@mail.gmail.com>
In-Reply-To: <CAMVU60Z7DrA9OTL0ayJe93qyfX81fwfaGCLrwKCB9Zmqq%2B6gPw@mail.gmail.com>
References:  <522f40f6b20c88cc7b17b4967e09cea6@lthomas.net> <CAMVU60Z7DrA9OTL0ayJe93qyfX81fwfaGCLrwKCB9Zmqq%2B6gPw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 24 January 2012 02:12, Christer Solskogen
<christer.solskogen@gmail.com> wrote:
> On Tue, Jan 24, 2012 at 12:22 AM, Lee Thomas <lthomas_lists@lthomas.net> wrote:
>> Hello fellow FreeBSD users,
>> I ran across an odd issue compiling lua from ports on amd64 with FreeBSD
>> 9.0-STABLE, and I'm not sure whether it's a bug or incorrect configuration
>> on my part. The lang/lua port throws a linker error, claiming to need -fPIC,
>> which is odd because the port Makefile seems to have logic to add that in,
>> but somehow the logic seems not to have any effect, at least in my case.
>> Making the port Makefile put ${CFLAGS} directly into lua's Makefile (patch
>> at the end of this mail) fixes matters for me, but I don't understand the
>> port infrastructure well enough to understand whether this patch represents
>> a bugfix or a workaround of some local configuration issue. Has anyone run
>> into this issue before? If this is a config issue, any hints on what might
>> be going on or how to dope it out?
>>
>
> I think I had the same problem about a moth ago. The problem was my
> CFLAGS in make.conf.
> You probably have CFLAGS=<something>, try setting it to CFLAGS?=<something>.
>

We note above that:
CFLAGS= -O2 -fno-strict-aliasing -pipe
& since that tends to be the default anyway (see
/usr/share/mk/sys.mk ), you're generally better off
leaving it out entirely.

-- 
--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAHHBGkrdvG0oBjc0%2BjmyMZB4W=M3QF6YJkYxdOpc1shvbQx1fA>