Skip to content

llvm-nm command line too long on windows with 2.0.15 for big link line #13661

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jpharvey opened this issue Mar 15, 2021 · 2 comments
Closed

Comments

@jpharvey
Copy link

I am getting an error linking a library with 2.0.15 which didnt happen with 2.0.13
File "d:\compilers\emscripten-2.0.15\upstream\emscripten\em++.py", line 14, in
sys.exit(emcc.run(sys.argv))
File "d:\compilers\emscripten-2.0.15\upstream\emscripten\emcc.py", line 2105, in run
extra_files_to_link += system_libs.calculate([f for _, f in sorted(temp_files)] + extra_files_to_link, link_as_cxx, forced=forced_stdlibs)
File "d:\compilers\emscripten-2.0.15\upstream\emscripten\tools\system_libs.py", line 1422, in calculate
handle_reverse_deps(input_files)
File "d:\compilers\emscripten-2.0.15\upstream\emscripten\tools\system_libs.py", line 1390, in handle_reverse_deps
symbolses = building.llvm_nm_multiple([os.path.abspath(t) for t in input_files])
File "d:\compilers\emscripten-2.0.15\upstream\emscripten\tools\building.py", line 379, in llvm_nm_multiple
results = run_process(cmd, stdout=PIPE, stderr=PIPE, check=False)
File "d:\compilers\emscripten-2.0.15\upstream\emscripten\tools\shared.py", line 96, in run_process
ret = subprocess.run(cmd, check=check, input=input, *args, **kw)
File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\subprocess.py", line 472, in run
File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\subprocess.py", line 775, in init
File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\subprocess.py", line 1178, in _execute_child
FileNotFoundError: [WinError 206] The filename or extension is too long

I am linking a lot of files via a redirect file and i believe the command line is too long.
Previously before #13465 llvm-nm was run per file. now all the files are passed to it on the command line.
I suspect that the fix is to use a redirect file for running this which i believe llvm-nm supports.

@kripken
Copy link
Member

kripken commented Mar 15, 2021

This may be fixed by #13664 but I don't have a windows machine to test on - can you please verify @jpharvey ?

@juj juj closed this as completed in 6bfb7f1 Mar 16, 2021
@jpharvey
Copy link
Author

Confirmed this fixes the problem. Thankyou

juj added a commit that referenced this issue Mar 17, 2021
* Add a test for #13661. See #13664 and #13465.

* flake

* Address review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants