Build error when AR is set

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Build error when AR is set

Daniel Miller
Hi, Lua developers!

Over at Nmap, we got a report of a build failure in Lua under the OpenWrt build environment, which turned out to be because it set the AR environment variable to the path to the cross-compiler's ar command. Lua's Makefile sets it to "ar rcu" so the "rcu" commands were not being passed to the ar program. Here's the link to our mailing list discussion: http://seclists.org/nmap-dev/2018/q2/7

The patch included in that thread solves the problem by moving the "rcu" commands to ar from the AR variable into the rule where AR is used. You could also set a separate variable like
AR_CMD = $(AR) rcu

and then use that wherever you currently use $(AR) in Make rules.

Thanks for an awesome tool! Lua is very valuable to Nmap, and we really enjoy working with it.

Dan
Reply | Threaded
Open this post in threaded view
|

Re: Build error when AR is set

Luiz Henrique de Figueiredo
> Over at Nmap, we got a report of a build failure in Lua under the OpenWrt
> build environment, which turned out to be because it set the AR environment
> variable to the path to the cross-compiler's ar command. Lua's Makefile sets
> it to "ar rcu" so the "rcu" commands were not being passed to the ar
> program

A simple solution is to pass AR="$AR rcu" when running make, as in
    make linux AR="$AR rcu"