From owner-freebsd-arm@freebsd.org Fri Feb 19 22:58:23 2016 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 27A14AAE264 for ; Fri, 19 Feb 2016 22:58:23 +0000 (UTC) (envelope-from russ.haley@gmail.com) Received: from mail-vk0-x229.google.com (mail-vk0-x229.google.com [IPv6:2607:f8b0:400c:c05::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D62D019DC; Fri, 19 Feb 2016 22:58:22 +0000 (UTC) (envelope-from russ.haley@gmail.com) Received: by mail-vk0-x229.google.com with SMTP id e6so87681595vkh.2; Fri, 19 Feb 2016 14:58:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=JME+/OVJaYotgdblfDDNAyOb7ZB/BNvIB+rLToEvCKg=; b=ksdHj8nN9XX42YPqS2mKttkdMSbLHpS/ZEIRUP8Yud6OmPFpVLEP2HrG8nYx73RTBj 5DWOw99FCUxUM2m2lQYoeboIYgKYNzN9/o3lDNcigSMKfCfEoI7RciYBwTqA3TY3iY/G fbrTToDpK7nRr7YjAHtk8+fY8tTw8wbFbtBlAQf72C5H2WwSV7Yz43AeTR+RCgqbTtBm +ClUSH8UApdvWHCfZfTHU82mwRgsfN++/e2MXd56Epy/ZawLomUEnlhZLDuSyKk9gcmi nVsg/X2liLxvJ9fLYyywb872MufQ1Uyqu0nfRgnauxaYopqzSG73G3cwPbZkMGv3zMY3 GvmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=JME+/OVJaYotgdblfDDNAyOb7ZB/BNvIB+rLToEvCKg=; b=et86cVLo2fdpF4CiFkDtL/eA7R+7KnKzZG7r8QLXlwpeKV8rPKe6ZF/Fm3n1DJeSo7 DRfvMRlZGtvwyELZ1JR7gKNJ3etJ7VUq73IvJpibckmnjg2dnnMsY8OjdjS05axAq7/i M6lKuCdgwqeL6pxcIAHtATamb7u+LlzpQjFcdA+ep8GdGZuVdBE0IiDhVh0XIMi8TOy9 Jf3Ik/ZXFImVy6DZgGXRuQdJmitb4ZDokU6OLVcoWOvUYCgOTdHQMV1X2IwsV7wZAgfe MJ6aFeb+HqWCtX2bOqe3PUX6nQNfWd9NPg7CWK515VGuA39w86hr1Jhnqiw2j05PLF44 Rg6g== X-Gm-Message-State: AG10YOQXZqJ2ycC4ID++YInVJsJnb2ny48RJN45dqa7F9A3fe1k/Qjl+HepDUsbUXgkjevGl0o0WGwgo219krg== MIME-Version: 1.0 X-Received: by 10.31.56.151 with SMTP id f145mr13537820vka.107.1455922701801; Fri, 19 Feb 2016 14:58:21 -0800 (PST) Received: by 10.31.54.13 with HTTP; Fri, 19 Feb 2016 14:58:21 -0800 (PST) In-Reply-To: <9B10FB3B-257C-4282-932D-E53376678FB5@dsl-only.net> References: <1455917714.1294.25.camel@freebsd.org> <9B10FB3B-257C-4282-932D-E53376678FB5@dsl-only.net> Date: Fri, 19 Feb 2016 14:58:21 -0800 Message-ID: Subject: Re: I've submitted 207324 for lang/lua52 needing to use -fPIC (kyua build blocked, clang380-import context) From: Russell Haley To: Mark Millard Cc: Ian Lepore , freebsd-arm Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2016 22:58:23 -0000 Duplicate top post for brevity: Just for the record I'm not having issues, I was just pointing out that adding -fPIC to the Makefile cleared an issue I was experiencing on a different platform. On Fri, Feb 19, 2016 at 2:26 PM, Mark Millard wrote: > On 2016-Feb-19, at 2:18 PM, Mark Millard wrote: >> >> On 2016-Feb-19, at 1:35 PM, Ian Lepore wrote: >>> >>> On Fri, 2016-02-19 at 12:42 -0800, Russell Haley wrote: >>>> On Fri, Feb 19, 2016 at 12:38 PM, Russell Haley >>>> 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 Just for the record I'm not having issues, I was just pointing out that adding -fPIC to the Makefile cleared an issue I was experiencing on a different platform. >> I tried to build devel/kyua via portmaster and lang/lua52 got involved in the process by default. Apparently this is indirectly via devel/lutok being used. >> >> As for one of the example make.conf's that I'm using that results in the behavior: >> (it does target -march=armv7-a -mcpu=cortex-a7 very explicitly) >> >>> # more /etc/make.conf >>> DEFAULT_VERSIONS+=perl5=5.22 >>> WRKDIRPREFIX=/usr/obj/portswork >>> WITH_DEBUG= >>> WITH_DEBUG_FILES= >>> MALLOC_PRODUCTION= >>> # >>> TO_TYPE=armv6 >>> VERSION_CONTEXT=11.0 >>> CFLAGS+=-target ${TO_TYPE}--freebsd${VERSION_CONTEXT}-gnueabi -march=armv7-a -mcpu=cortex-a7 -mfloat-abi=softfp -mno-unaligned-access >> >> Note: the projects/clang380-import -r295601 buildworld/buildkernel context installed on the rpi2 also has those CFLAGS entries. >> >> Other context: >> >>> # svnlite info /usr/ports >>> Path: /usr/ports >>> Working Copy Root Path: /usr/ports >>> URL: https://svn0.us-west.freebsd.org/ports/head >>> Relative URL: ^/head >>> Repository Root: https://svn0.us-west.freebsd.org/ports >>> Repository UUID: 35697150-7ecd-e111-bb59-0022644237b5 >>> Revision: 408706 >>> Node Kind: directory >>> Schedule: normal >>> Last Changed Author: danilo >>> Last Changed Rev: 408706 >>> Last Changed Date: 2016-02-11 23:50:55 +0000 (Thu, 11 Feb 2016) >> >>> # freebsd-version -ku; uname -aKU >>> 11.0-CURRENT >>> 11.0-CURRENT >>> FreeBSD rpi2 11.0-CURRENT FreeBSD 11.0-CURRENT #16 r295601M: Sun Feb 14 01:28:43 PST 2016 markmi@FreeBSDx64:/usr/obj/clang/arm.armv6/usr/src/sys/RPI2-NODBG arm 1100097 1100097 > > I should have noted that without forcing use of /usr/local/arm-gnueabi-freebsd/bin/ld the message is not as explicit about -fPIC: > > --- liblua-5.2.so --- > /usr/bin/ld: lauxlib.o(.text+0x1a50): unresolvable R_ARM_MOVW_ABS_NC relocation against symbol `__stdinp@@FBSD_1.0' > /usr/bin/ld: final link failed: Nonrepresentable section on output > cc: error: linker command failed with exit code 1 (use -v to see invocation) > *** [liblua-5.2.so] Error code 1 > > I choose to submit based on a make.conf that forced use of /usr/local/arm-gnueabi-freebsd/bin/ tools in order to get the more explicit error message into the submittal. > > === > Mark Millard > markmi at dsl-only.net > > >