From owner-freebsd-arm@freebsd.org Fri Feb 19 20:34:36 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 B1A73AAC49E for ; Fri, 19 Feb 2016 20:34:36 +0000 (UTC) (envelope-from russ.haley@gmail.com) Received: from mail-vk0-x233.google.com (mail-vk0-x233.google.com [IPv6:2607:f8b0:400c:c05::233]) (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 6D9B01C33 for ; Fri, 19 Feb 2016 20:34:36 +0000 (UTC) (envelope-from russ.haley@gmail.com) Received: by mail-vk0-x233.google.com with SMTP id k196so85719627vka.0 for ; Fri, 19 Feb 2016 12:34:36 -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:content-transfer-encoding; bh=mGchrR21BwdaWmcj2KgNYBv5X4Nw5gekLNsFQ3BPBqU=; b=lVwtcTZqmeNG8v01Exp0bHjPpRbYJ5BW7xkOFOJiRyf/5zdyC1QH47eumLoh3zimnj IB8oNRy0E9CBeFGSAYs0b6rnXgG1RnSZjxcRO1fop65dgjE+hIl4qJGYlg9dWg3ixhhg p9gpzGE/ijOAxxsW+ie8MYj9fII0QuKD5vE0BXYdeiZ1376F2ZHME8ZM4ZJL82bYB5YE NudbE//2ZymfenrcGfdOdHnBH6934n1xfcYfIjoMSTuZP+/5nOI/Iol55lAp0IMByuvK PR7nvA+0VyifqriNbB3pAZwnWjciRYj0fBC6Tk0oWMVZmhZhDHyAfZIwZxprQHwY3a+1 MYuw== 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 :content-transfer-encoding; bh=mGchrR21BwdaWmcj2KgNYBv5X4Nw5gekLNsFQ3BPBqU=; b=ZFIBR9UFWeA7id1x5loggVEHKI7jIf4xtlvNaEq0qt0gmkTaNy2Xps04cu0KAeAEHc xbrS+R8caxBiijmgn3tKMLXEFrZOlaPajVS8q1fiVONZHStK3x63AbgEpHVfjAGyJ99R Ppf8AUZFpOmNwnkoB8k8BGVyIJ9SPJ5NhW0RMQch/P5Q/oQm+VnXAX0z5EpMeHaZe8Xf ww7nwzEnXnDohVCIWPXsMwFBb+yJapouii/lIvpc9cSuUZO/l4Ju9Ske13n4K6uD5vc+ GNU7MikgF/3vrylPV/bG0E6xTpawfhxh+SZ848cgArnXqkPIh9DBrUHxspI/0qzLxvNx i7FA== X-Gm-Message-State: AG10YOToCDnOUlak5KmxunGLK/9DmxiVj5YjJm2OhWNvMwc1j2Q1ozXQw8BrT7NkASWbsrkmCba81Vu+AHAKEw== MIME-Version: 1.0 X-Received: by 10.31.159.136 with SMTP id i130mr12928743vke.144.1455914075448; Fri, 19 Feb 2016 12:34:35 -0800 (PST) Received: by 10.31.54.13 with HTTP; Fri, 19 Feb 2016 12:34:35 -0800 (PST) In-Reply-To: References: Date: Fri, 19 Feb 2016 12:34:35 -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: freebsd-arm Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 20:34:36 -0000 On Fri, Feb 19, 2016 at 11:43 AM, Mark Millard wrote: > When attempting to build devel/kyua on a rpi2b under projects/clang380-im= port -r295601 via portmaster -DK devel/kyua the attempt failed in lang/lua5= 2 with: > > --- lapi.o --- > /usr/bin/clang -target armv6--freebsd11.0-gnueabi -march=3Darmv7-a -mcpu= =3Dcortex-a7 -mfloat-abi=3Dsoftfp -mno-unaligned-access -B/usr/local/arm-gn= ueabi-freebsd/bin/ -Wall -DLUA_COMPAT_ALL -pipe -mfloat-abi=3Dsoftfp -isy= stem /usr/local/include -g -fno-strict-aliasing -I/usr/local/include -isyst= em /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; re= compile with -fPIC > lapi.o: error adding symbols: Bad value > clang: error: linker command failed with exit code 1 (use -v to see invoc= ation) > *** [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/ Russ