Project

General

Profile

Bug #8416

build system assumes GNU readlink

Added by ryandesign - about 8 years ago. Updated about 8 years ago.

Status:
Fixed
Priority:
Low
Assignee:
-
Category:
Buildsystem
Target version:
Start date:
Due date:
% Done:

100%

Affected Version:
System:
bitness:
64-bit
hardware architecture:
amd64/x86

Description

When building darktable 0.7.1 on Mac OS X Snow Leopard, I see these warnings:

Making all in src
  >>     version.h
readlink: illegal option -- f
usage: readlink [-n] [file ...]
usage: dirname path
./../tools/create_version_h.sh: line 7: /create_version_sh.sh: No such file or directory
./../tools/create_version_h.sh: line 10: /version.sh: No such file or directory

tools/create_version_h.sh is calling readlink this way:
readlink -f $0

According to "man greadlink" (I have GNU readlink installed as greadlink via the coreutils package; it is not found on Mac OS X by default), "-f" means "canonicalize" and does not take an argument, thus on systems with GNU readlink "$0" is taken as the symlink to read:
       -f, --canonicalize
              canonicalize by following every symlink in every component of the given name recursively; all but the last component must exist

However, BSD readlink, which is what Apple provides in Mac OS X, treats "-f" as "format", and accepts an argument for the format to use, hence the message about improper usage:
     -f format
             Display information using the specified format.  See the FORMATS section for a description of valid formats.

History

#1 Updated by Tobias Ellinghaus about 8 years ago

  • Status changed from New to Fixed

Either update to git (it's fixed there) or use "realpath" instead of "readlink -f". You can also have a look at tools/common.sh in git master.

Also available in: Atom PDF