• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

SDK / getting "bad header in precompiled chunk" for my scripts.

Advocate ,
Apr 17, 2024 Apr 17, 2024

Copy link to clipboard

Copied

I have downloaded the latest lua here: https://www.lua.org/download.html

Initialled on my Mac and all is fine.

I then wanted to obfuscate my code so I need to compile the scripts.

 

I do

 

 luac -o CompiledScriptName.lua ScriptName.lua

 

All seems to be ok, the new compiled file is created no issues...but then I get this error whenever I run the script in LrC.

 

NameOfScript.lua: bad header in precompiled chunk

 

Don't know what I am doing wrong here.

Any help would be appreciated.

TOPICS
SDK

Views

476

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 2 Correct answers

LEGEND , Apr 17, 2024 Apr 17, 2024

That downloaded "luac" is version 5.4.6, while LR requires 5.1.  Use the "luac" stored in the SDK subfolder "Lua Compiler/{mac,win}".  I don't think that's documented anywhere.

Votes

Translate

Translate
LEGEND , Apr 17, 2024 Apr 17, 2024

Oh, I see it's a little geeky to install:

 

1. Download or re-download the Lightroom Classic SDK from here:

https://developer.adobe.com/console/servicesandapis

 

and unzip it. 

 

2. In Terminal, do these commands:

cd /Users/john/Downloads/LrC_13.2_202402141005-bf1aeb84.release_SDK/Lua\ Compiler/mac
chmod +x luac
xattr -r -d com.apple.quarantine luac
cp luac /usr/local/bin

 

replacing the path in the first line with the path of where you downloaded the SDK.

Votes

Translate

Translate
LEGEND ,
Apr 17, 2024 Apr 17, 2024

Copy link to clipboard

Copied

That downloaded "luac" is version 5.4.6, while LR requires 5.1.  Use the "luac" stored in the SDK subfolder "Lua Compiler/{mac,win}".  I don't think that's documented anywhere.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Apr 17, 2024 Apr 17, 2024

Copy link to clipboard

Copied

Ok, I will uninstall 5.4.6 and install the one that comes with the SDK.

 

.

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Apr 17, 2024 Apr 17, 2024

Copy link to clipboard

Copied

I have uninstalled lua 5.4.6

 

Now I don't understand how to install the luac I have in the SDK

There is no make.

I went to the Lua Binaries and I get this error when I want to download 5.1.5

The "/5.1.5/Tools Executa..MacOS1011_bin.tar.gz" file could not be found or is not available. Please select another file.

 

.

 

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 17, 2024 Apr 17, 2024

Copy link to clipboard

Copied

Oh, I see it's a little geeky to install:

 

1. Download or re-download the Lightroom Classic SDK from here:

https://developer.adobe.com/console/servicesandapis

 

and unzip it. 

 

2. In Terminal, do these commands:

cd /Users/john/Downloads/LrC_13.2_202402141005-bf1aeb84.release_SDK/Lua\ Compiler/mac
chmod +x luac
xattr -r -d com.apple.quarantine luac
cp luac /usr/local/bin

 

replacing the path in the first line with the path of where you downloaded the SDK.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Apr 18, 2024 Apr 18, 2024

Copy link to clipboard

Copied

LATEST

@John R Ellis

Thanks a million.
 I get permission denied but I used 

 

 

 

sudo cp luac /usr/local/bin

 

 

 

Now the compiling of my scripts is successful.

 

The SDK documentation has nothing on this, even worse the very latest documentation even suggests

luac53.exe can be used...ergo my total confusion and why I dowloaded 5.4.6




 

.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines