Neat-Lang / neat

The Neat Language compiler. Early beta?
BSD 3-Clause "New" or "Revised" License
111 stars 9 forks source link

Building Neat fails with "file name too long" #70

Closed apahl closed 7 months ago

apahl commented 8 months ago

Hi, thank you for this interesting project.

I tried to build the GCC and the LLVM version on Ubuntu 22.04, and for both the build process fails with this error:

/usr/bin/ld: cannot open output file .obj/macro_compiler142_module_std_macro_quasiquoting_addQuasiQuotingMacro_void_1_compiler142_module_neat_base_class_MacroState_425D990C8190F49E.77551.so: File name too long

Is there something I can try to make it work?

KR Axel

FeepingCreature commented 8 months ago

Thanks for the report! I'll try to repro this afternoon.

This is terrible, but can you try running it in a folder that's less deep in the filesystem, maybe? Like /tmp/neat? Linux's limits on filename length are surprisingly short.

apahl commented 8 months ago

Good idea and thank you for the fast answer.

Indeed, when I move the install dir to /tmp, compilation of the GCC version is successful.

Compilation of the LLVM version fails with some weird file not found error, where ld is looking in a completely unrelated directory.

/usr/bin/ld: /home/pahl/progs/swift/usr/bin/../lib/LLVMgold.so: error loading plugin: /home/pahl/progs/swift/usr/bin/../lib/LLVMgold.so: cannot open shared object file: No such file or directory
clang-15: error: linker command failed with exit code 1 (use -v to see invocation)
command failed with 256
Assertion failed! Aborting.

But that might be due to my setup. I will try out the GCC version for now.

Thanks again for the tip.

KR Axel

FeepingCreature commented 8 months ago

Yeah I think that one is due to your setup. Swift probably ships its own LLVM that's gotten into the path..?

apahl commented 8 months ago

Yes, something like that. I will check it out later.

FeepingCreature commented 7 months ago

Should be fixed now - macro filenames should be significantly shorter.