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

Compiler Segfaults without --obj-out specified while including a library #1503

Closed
Caleb-o opened this issue Sep 30, 2024 · 3 comments
Closed
Labels
Bug Something isn't working Fixed Needs Verification Fixed, but needs verification that it works
Milestone

Comments

@Caleb-o
Copy link
Contributor

Caleb-o commented Sep 30, 2024

Issue

I'm trying to compile my project directly with the compiler and I hit a segault. It seems that --obj-out must be specified for it to work. I am using a tiny wrapper around a C function, which seems to be what's causing the issue. Compiling without the library is fine, but with causes the segfault without the flag.

Command in question:

c3c compile src/main.c3 --output-dir temp --libdir lib --lib littlec -o helloc will cause a segfault:

image

The workaround

c3c compile src/main.c3 --obj-out temp --output-dir temp --libdir lib --lib littlec -o helloc

@lerno
Copy link
Collaborator

lerno commented Sep 30, 2024

Yes, it's likely the build directory isn't created at this point, which causes the issue.

@lerno lerno added Bug Something isn't working Open Bug A bug which needs to be looked at labels Sep 30, 2024
@Caleb-o Caleb-o changed the title Compiler Segfaults without --obj-out specified Compiler Segfaults without --obj-out specified while including a library Oct 2, 2024
@lerno lerno added Fixed Needs Verification Fixed, but needs verification that it works and removed Open Bug A bug which needs to be looked at labels Oct 2, 2024
@lerno
Copy link
Collaborator

lerno commented Oct 2, 2024

This should work now.

@lerno lerno added this to the 0.6.3 milestone Oct 2, 2024
@Caleb-o
Copy link
Contributor Author

Caleb-o commented Oct 3, 2024

Awesome! This is working @lerno

@lerno lerno closed this as completed Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Fixed Needs Verification Fixed, but needs verification that it works
Projects
None yet
Development

No branches or pull requests

2 participants