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

Preprocessor fixes #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

byteit101
Copy link

  1. Don't delete the preprocessor file before running cpp
  2. Use the system temp dir, not the location (Fixes Preprocessor writes to file (or fails to) #4 )

I kept getting cpp complaining that the file couldn't be found under heavy IO load, and then realized this fix was necessary as the tempfile was being deleted before gcc could read it

gcc: error: /home/byteit101/project/cast-preprocessor-input.20221001-1388787-1lxyy5.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
Traceback (most recent call last):
	1: from test.rb:6:in `<main>'
/home/byteit101/rvm/gems/ruby-2.6.2/gems/cast-0.3.1/lib/cast/preprocessor.rb:40:in `preprocess': C::Preprocessor::Error

1. Don't delete the preprocessor file before running cpp
2. Use the system temp dir, not the location (Fixes oggy#4)
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

Successfully merging this pull request may close these issues.

Preprocessor writes to file (or fails to)
1 participant