Fix macOS build: use strtof instead of std::from_chars for float CSV parsing#29
Draft
Fix macOS build: use strtof instead of std::from_chars for float CSV parsing#29
Conversation
Agent-Logs-Url: https://github.com/audiohacking/acestep.cpp/sessions/3822a733-dbac-4964-8207-6418ecc203d9 Co-authored-by: lmangani <1423657+lmangani@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix failing macOS build in pipeline-synth-ops.cpp
Fix macOS build: use strtof instead of std::from_chars for float CSV parsing
May 6, 2026
…it-graph.h Agent-Logs-Url: https://github.com/audiohacking/acestep.cpp/sessions/b1a4e02e-b7cf-4128-ac70-fd9acd368334 Co-authored-by: lmangani <1423657+lmangani@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
src/pipeline-synth-ops.cpp,src/qwen3-enc.h, andsrc/dit-graph.hOriginal prompt
Fix the failing macOS build in repository
audiohacking/acestep.cpp.Context:
.github/workflows/release.yml60fb5521be0b7143f04f8cd33f9f278caa09983asrc/pipeline-synth-ops.cppduring the macOS build.Observed failure from the job logs:
src/pipeline-synth-ops.cpp:41:18: error: call to deleted function 'from_chars'std::from_chars(first, last, v)in a generic CSV parser template.audio_codes) and floating-point parsing (custom_timesteps).std::from_charsis unavailable/deleted, causing compilation to fail whenT = float.Relevant files:
.github/workflows/release.ymlsrc/pipeline-synth-ops.cppRequested fix:
src/pipeline-synth-ops.cppso CSV parsing remains compatible with macOS toolchains.audio_codes.custom_timestepswith a portable implementation such asstrtof/strtod, or otherwise avoidstd::from_charsfor floating-point types.Acceptance criteria:
audio_codesparsing still works correctly.custom_timestepsparsing still works correctly.Please create a pull request with the code change.
The following is the prior conversation context from the user's chat exploration (may be truncated):
User: Please find a solution for this failing job. Use the logs, job definition, and any referenced files where the failure occurred. Keep your response focused on the solution and include code suggestions when appropriate.
Assistant: The failure is caused by
std::from_charsbeing used withfloatinsrc/pipeline-synth-ops.cpp:41, which is not supported by the macOS toolchain in this job.Root cause
In the macOS job definition, the build runs with the platform default compiler:
release.ymlThe compile error is here:
src/pipeline-synth-ops.cppsrc/pipeline-synth-ops.cpp#L41You currently have a generic parser:
This works for
int(audio_codes), but fails forfloat(custom_timesteps) on this runner.Solution
Keep
std::from_charsfor integral types, and usestrtoffor floating-point types.Suggested code change
Replace the generic parser with type-specific branches:
If you want to preserve
floatparsing without going throughdouble, use:float v = std::strtof(first, &end);and specialize only for
float.Minimal safer version
Since th...
This pull request was created from Copilot chat.