Subject: bug#21400: Location of "file" is hard coded

From: Peter Rosin <[email-masked]>
Date: Wed, 2 Sep 2015 20:16:10 +0200

On 2015-09-02 17:18, John Frankish wrote:
> Hi,
> 
> I see an error that /usr/bin/file cannot be found when running the configure
> script in many packages - in my distro "file" is at /usr/local/bin/file.
> 
> As an example, using NetworkManager-1.0.4, gives:
> 
> ./configure
> ...
> checking for archiver @FILE support... @
> checking for strip... strip [which is in /usr/local/bin]
> checking for ranlib... ranlib [which is in /usr/local/bin]
> checking command to parse /usr/local/bin/nm -B output from gcc object... ok
> checking for sysroot... no
> ./configure: ./configure.lineno: line 1: /usr/bin/file: not found [but it is
> in /usr/local/bin]
> checking for mt... no
> checking if : is a manifest tool... no
> checking for dlfcn.h... yes
> 
> I'm told this is due to the location of "file" being hard coded in
> NetworkManager-1.0.4/m4/libtool.m4
> 
> Would it be possible to look for "file" in $PATH instead?

Hi,

and thanks for the report!

I'm not saying that I'm going to look further at this, but we need more
info.

What triplet is this? Did you build from the NetworkManager-1.0.4 release
tar-ball (which includes Libtool 2.4.2), or did you build NetworkManager
from git? And what version of Libtool did you bootstrap with in case you
did use git?

I had a quick look, and AFAICT, all uses of hardcoded /usr/bin/file are
in system-specific code paths. So, you must have the file utility in an
odd location for your type of system (and /usr/local/bin seems a bit odd
for a basic utility such as file).

Cheers,
Peter