-
Notifications
You must be signed in to change notification settings - Fork 447
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 definitions with quotation marks #1527
Comments
Interesting issue. I haven't looked in detail yet, but I've used bash variable editing tweaks for this in other contexts. Eg in bash:
POSIX defines a bunch of parameter expansions here, but it sadly doesn't include this one. I guess it could be something we pipe through |
I don't remember if this was discussed at the time, but I think I for one was vaguely assuming people using quoting inside these variables could be ‘encouraged’ to use single quotes. These are used only in the reporting functions for basically debugging purposes, so don't need to be 100% accurate. HTSlib's Makefile already uses some GNU-Make-specific stuff, so tweaking the value as follows ought to suffice (though I haven't tested it):
(…Though I see setup-cpp has already done something to work around this.) |
I don't understand how this quoting is working. On the command line, quotes aren't accepted.
So at the level of executing commands, the quotes must have been already stripped out. Hence all my attempts at getting quotes into these variables in the configure script have been met by the configure script failing due to the compiler rejecting them. What am I missing here? |
Ah no matter, I understand it now. I assume you modifying the make command line here? I don't use github actions so I'm not sure what those commands you listed translate to in terms of command-line activities. I see modifying vars after the make command offers an extra level of indirection (which for some reason wasn't working on my ./configure tests). Eg
removes the outer-quotes and so the command line is then valid once more. The additional double-quotes do indeed serve a purpose for when the directories involved contain spaces (for example), so I can understand the desire for this functionality to work. |
Hi there,
I'm having a weird issue in the interaction of my GitHub Actions CI environment and htslib.
The htslib
Makefile
defines some preprocessor values using quotation marks such asFor my CI, I'm using GitHub Actions with the setup-cpp action to access various compilers. For their clang/llvm setup however, they also use quotation marks around flags such as
which causes the preprocessor value to become for example
That of course fails to compile, as the path in there is not part of the quoted string.
I'm currently working around this by having
in my CI setup, but that does not seam ideal.
Honestly, I'm not entirely sure who is right here. On the one hand, putting a path in quotation marks seems okay on the setup-cpp side. On the other hand, having flags in a quoted string seems necessary from the point of view of htslib. My guess is that htslib should escape quotation marks within the
$(LDFLAGS)
when processing theMakefile
. Still, I've opened an issue on setup-cpp's end as well, as I am not sure that paths should necessarily be quoted.Cheers and thanks
Lucas
The text was updated successfully, but these errors were encountered: