lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> wrote:

>> One question, when you compile Lua from the command line under your OS X do
>> you not have to specify the "-mmacosx-version-min" flag?
> 
> No, I don't have to specify this flag. The macosx Makefile target in the
> official tarballs does not use this flag and it works fine.
> 
> Perhaps you're using some switch in XCode that makes this necessary.
> 
> I used to have to set the MACOSX_DEPLOYMENT_TARGET environment variable
> in the old days of OS X 10.4 but this is not needed for 10.5+.

Specifying MACOSX_DEPLOYMENT_TARGET is just another way of setting that
flag, however, the command line variant takes precedent. Do you perhaps
still have MACOSX_DEPLOYMENT_TARGET set as an environment variable?


pmd$ echo $MACOSX_DEPLOYMENT_TARGET

pmd$


I get nothing, which may be why I need to specify the min version during
compile time and you do not? If you do not have the environment variable
set then I guess it's a mystery as to what is happening! ;)

I get the Invalid Instruction error when I try to build Lua from the command
line, not within Xcode as it automatically adds the minimum version flag.

I am using Xcode 8.2.1 (8C1002) with the Command Line Tools installed:


pmd$ clang --version
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin15.6.0
Thread model: posix


It seems odd that we would get different behaviour, but if you search online
for the "-mmacosx-version-min" flag you will see a good number of people who
have similar issues compiling code across a number of open source projects.

I just thought it would be prudent to put a note somewhere in the README for
people building under OS X/macOS to save them some potenital frustration.

~Paige