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:

>> Do you perhaps
>> still have MACOSX_DEPLOYMENT_TARGET set as an environment variable?
> 
> No. It's been *ages* since I've used MACOSX_DEPLOYMENT_TARGET.
> 
>> I am using Xcode 8.2.1 (8C1002) with the Command Line Tools installed:
> 
> Same here.
> 
> So, a mystery... But Like I said, we've been building Lua on the command line
> on Mac OS X for ages with no problems reported.

Actually, this is the first time I've encountered a problem building Lua
from a Makefile as well... I recently, well I guess nine months ago now,
upgraded to El Capitan. Looking around online, however, it seems I am not
alone with OS X/macOS deciding to build things strangely. That said, a
simple search for "osx invalid instruction" gives an immediate solution!

From what I have been reading online if you do not specify a target it is
supposed to use the currently selected SDK, which should default to your
version of OS X/macOS... which it obviously fails to do correctly for me.

Interestingly, however, if I take the compiled binary that gives me an
invalid instruction on my 10.11 system and copy it to my server, which is
running 10.8.5 (wow! do I need to upgrade that) it runs the entire test
suite just fine! On my partner's system, which is running 10.9, the tests
also all succeed... no invalid instructions on either system.

Even odder, when I add the -mmacosx-version-min=10.11 flag to the build and
the resulting executable works on my 10.11 system... it still actually works
on both the 10.8 and 10.9 systems without any issues... not what I expected!

Thanks for your feedback on this Luiz, it is appreciated, I wonder what is
going on with my system and building without that flag? :(

~Paige