Skip to content
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

Missing linking file could be handled automatically by Crystalline's build process. #81

Open
MyrddinE opened this issue Jan 14, 2024 · 1 comment

Comments

@MyrddinE
Copy link

For understandable reasons, Crystal doesn't ship linking files out with the Crystal repo, since they are platform specific. However, because of that the Crystalline build fails unless an extra manual step is taken, and this manual step is not easily discovered without notable coding expertise or significant searching.

I think it would be appropriate for Crystalline to detect the existence of llvm_ext.o and build it as part of the Crystalline build process if it is missing to alleviate this.

@UltimaTerra
Copy link

UltimaTerra commented Feb 7, 2024

Second this, I just got this error, but I believe the above fix will work, I will have to test it though.

collect2: error: ld returned 1 exit status
Error: execution of command failed with exit status 1: cc "${@}" -o /home/nicolt/crystalline/bin/crystalline  -rdynamic -L/usr/lib64/crystal -lyaml /usr/share/crystal/src/llvm/ext/llvm_ext.o `/usr/bin/llvm-config --libs --system-libs --ldflags 2> /dev/null` -lstdc++ -lpcre2-8 -lm -lgc -lpthread -levent_pthreads -levent -levent -lrt -lpthread -ldl

I should have just configured my LLVM config in my path, so I know it is not any of the known build errors, so I have to assume it is about linking the above ext.

Edit 2: It seems even the fix above did not quite work for me. I copied the make file and ran it, then I tried this and got this new error, I ran it with a full trace and I got this (exit code 127)


 1 | require "./crystalline/requires"
     ^
Error: while requiring "./crystalline/requires"


In src/crystalline/requires.cr:1:1

 1 | require "llvm/lib_llvm"
     ^
Error: while requiring "llvm/lib_llvm"


In /usr/share/crystal/src/llvm/lib_llvm.cr:1:1

 1 | {% begin %}
     ^
Error: expanding macro


In /usr/share/crystal/src/llvm/lib_llvm.cr:25:23

 25 | {% llvm_version = `#{llvm_config.id} --version`.stringify %}
                        ^
Error: error executing command: 

For full coverage. I am on Nobara (a fedora Linux spin) 39, x86 and using the newest version of crystal. Also, strangely I believe the LSP works for me on Kate but not Neovim (I mean, I downloaded it just fine with Mason, but it doesn't highlight).

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