Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Feb 2016 14:35:14 -0700
From:      Ian Lepore <ian@freebsd.org>
To:        Russell Haley <russ.haley@gmail.com>, Mark Millard <markmi@dsl-only.net>
Cc:        freebsd-arm <freebsd-arm@freebsd.org>
Subject:   Re: I've submitted 207324 for lang/lua52 needing to use -fPIC (kyua build blocked, clang380-import context)
Message-ID:  <1455917714.1294.25.camel@freebsd.org>
In-Reply-To: <CABx9NuSRW_0aWazUEkJgOtYSxjpfaEgGNBzXde=40_h=kJin5Q@mail.gmail.com>
References:  <F783EBCE-80EA-499C-A760-3E6F3EEBD404@dsl-only.net> <CABx9NuSdJR8aHVyT=tDjVf0wRKACBfVsJYtbN4KHZ-zBKYC%2BVQ@mail.gmail.com> <CABx9NuQgdVwrSoBe_rMFYzSW6MHhWdfeQd6N_HmuMnM%2BDE4cwg@mail.gmail.com> <CABx9NuSRW_0aWazUEkJgOtYSxjpfaEgGNBzXde=40_h=kJin5Q@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 2016-02-19 at 12:42 -0800, Russell Haley wrote:
> On Fri, Feb 19, 2016 at 12:38 PM, Russell Haley <russ.haley@gmail.com
> > wrote:
> > On Fri, Feb 19, 2016 at 12:34 PM, Russell Haley <
> > russ.haley@gmail.com> wrote:
> > > On Fri, Feb 19, 2016 at 11:43 AM, Mark Millard <
> > > markmi@dsl-only.net> wrote:
> > > > When attempting to build devel/kyua on a rpi2b under
> > > > projects/clang380-import -r295601 via portmaster -DK devel/kyua
> > > > the attempt failed in lang/lua52 with:
> > > > 
> > > > --- lapi.o ---
> > > > /usr/bin/clang -target armv6--freebsd11.0-gnueabi -march=armv7
> > > > -a -mcpu=cortex-a7 -mfloat-abi=softfp -mno-unaligned-access 
> > > > -B/usr/local/arm-gnueabi-freebsd/bin/ -Wall -DLUA_COMPAT_ALL  
> > > > -pipe -mfloat-abi=softfp  -isystem /usr/local/include -g -fno
> > > > -strict-aliasing -I/usr/local/include -isystem
> > > > /usr/local/include -DLUA_USE_LINUX -c lapi.c -o lapi.o
> > > > . . .
> > > > --- liblua-5.2.so ---
> > > > /usr/local/arm-gnueabi-freebsd/bin/ld: lapi.o: relocation
> > > > R_ARM_MOVW_ABS_NC against `a local symbol' can not be used when
> > > > making a shared object; recompile with -fPIC
> > > > lapi.o: error adding symbols: Bad value
> > > > clang: error: linker command failed with exit code 1 (use -v to
> > > > see invocation)
> > > > *** [liblua-5.2.so] Error code 1
> > > > 
> > > I'm not sure about the kyua stuff, but I was getting a "similar
> > > error"
> > > when I built lua5.3 using clang on x64. From memory, I recall
> > > adding
> > > the -fPIC option to the lua5.3 Makefile (as the error indicates)
> > > and
> > > also having to remove a -luab (or something like that) and then
> > > it
> > > worked. Potentially you could just install lua from ports first?
> > 
> > > http://www.freshports.org/lang/lua52/
> > 
> > Sorry, I meant pkg. But it looks like it's not being built for
> > armv6?
> > http://portsmon.freebsd.org/portoverview.py?category=lang&portname=
> > lua52
> > 
> > Russ
> 
> Okay, if you look at the Makefile for Lau52 at line 60 there are 
> -fPIC
> cflags for other platforms but armv6 and i386 are missing.
> 
> https://svnweb.freebsd.org/ports/head/lang/lua52/Makefile?view=markup
> 

Are you guys setting CPUTYPE in your make.conf?  I've been building
lua52 and lua53 for a while without any problems, as crossbuilds or
native on a wandboard, but I'm not setting cpu type or arch.

Also, why are you using lua52 rather than lua53? (Just curious.)

I'm about to commit an unrelated fix for lua53.  I'll look into this
problem too, if I can figure out how to recreate it.

-- Ian




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1455917714.1294.25.camel>