airsdk / Adobe-Runtime-Support

Report, track and discuss issues in Adobe AIR. Monitored by Adobe - and HARMAN - and maintained by the AIR community.
203 stars 11 forks source link

The input line is too long #2233

Open pfoof opened 2 years ago

pfoof commented 2 years ago

Problem Description

We probably found the limit of how many frameworks and libraries can be included in AIR SDK.

We tried to compile an iOS project and we hit the limit of The input line is too long. This information comes from cmd.exe that is spawned by Java within AIR. This cmd.exe should execute ld64.exe that has a long list of arguments (see attached screenshot).

image

For reference: https://devblogs.microsoft.com/oldnewthing/?p=41553

Steps to Reproduce

Add a lot of frameworks/libraries/things to link and try to build the project.

Known Workarounds

Use less libraries until AIR patches this issue ;)

marchbold commented 2 years ago

Best workaround for this is to reduce the directory structure to your app and sdk

i.e. place it in something like: C:\app and C:\sdk or similar.

The path seems to be reproduced a lot in the command and generally that has gotten us out of trouble.

Also make sure you are using the latest distriqt extensions. We did a round of minimising options passed in by the extensions earlier this year which should make a difference.

(or use macOS to compile your iOS app ;) )

Marcophono2 commented 1 year ago

Hi @marchbold ! I have the same problem. But re-organization of the path structure is no option for me. I have hundreds of mp3 files included. I can never reach < 8192 chars for my adt command. I tried to exclude the mp3 files with a second -extdir parameter but this one seems only to work for the libs folder. As far as I understand the problem is in the command shell (Windows 10 in my case). Can I use any other command shell tool? I tried it with Powershell but that one had absolutely no idea what I want from it.

Best regards Marc

marchbold commented 1 year ago

@Marcophono2 As far as I'm aware it's a windows limitation, I'm not sure that changing the shell will change this. I believe your best option is to reconsider your application folder layout and how you include files.

Marcophono2 commented 1 year ago

Thanks, @marchbold ! If so, I can do it on my Mac. Problem solved! :-)

pfoof commented 1 year ago

So what I suggest using ProcessBuilder or some similar thing instead of getRuntime().exec if that is the case

ajwfrost commented 1 year ago

If you're meaning the Java ProcessBuilder class then yes, that's what's used. But the command list starts with "cmd" and "/c" ...

Not entirely sure why that's the case, we can look to see why this mechanism was used rather than just running the linker directly...

spielepalast commented 1 year ago

we appreciate it.

spielepalast commented 1 year ago

This is actually a duplicate of #360.