Skip to content

remove C++ std dependency#14812

Closed
lemire wants to merge 5 commits into
redis:unstablefrom
lemire:unstable
Closed

remove C++ std dependency#14812
lemire wants to merge 5 commits into
redis:unstablefrom
lemire:unstable

Conversation

@lemire

@lemire lemire commented Feb 24, 2026

Copy link
Copy Markdown

The fast_float library does not depend on the C++ library so there is no point in linking against the C++ standard library. You only need a C++ compiler at compile time but no C++ library at runtime.

Alternative to #14661

(I hereby declare this work to be in the public domain. Merge it or not, I do not claim copyright over it.)


Note

Medium Risk
Changes global link flags in src/Makefile, which can cause build/link failures on specific platforms or toolchains if any indirect C++ runtime dependency exists.

Overview
Build now avoids a hard dependency on the C++ standard library. FINAL_LIBS no longer includes -lstdc++ by default, reducing runtime/link requirements when C++ is only used at compile time.

On macOS, the Makefile explicitly links -lc++ alongside -ldl to satisfy the platform’s C++ runtime expectations without pulling in libstdc++.

Written by Cursor Bugbot for commit e640c98. This will update automatically on new commits. Configure here.

@jit-ci

jit-ci Bot commented Feb 24, 2026

Copy link
Copy Markdown

Hi, I’m Jit, a friendly security platform designed to help developers build secure applications from day zero with an MVS (Minimal viable security) mindset.

In case there are security findings, they will be communicated to you as a comment inside the PR.

Hope you’ll enjoy using Jit.

Questions? Comments? Want to learn more? Get in touch with us.

@CLAassistant

CLAassistant commented Feb 24, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ lemire
❌ Daniel Lemire


Daniel Lemire seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@jit-ci

jit-ci Bot commented Feb 24, 2026

Copy link
Copy Markdown

🛡️ Jit Security Scan Results

CRITICAL HIGH MEDIUM

✅ No security findings were detected in this PR


Security scan by Jit

@paulorsousa

paulorsousa commented Feb 24, 2026

Copy link
Copy Markdown
Contributor

Hi @lemire! I think the main purpose of #14661 is to remove the need of a C++ compiler

But, even with the C++ compiler, I'm getting an error building redis-server (undefined symbols)
image

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Comment thread deps/jemalloc/configure.ac
@lemire

lemire commented Feb 24, 2026

Copy link
Copy Markdown
Author

@paulorsousa I think I fixed the issue with my latest commit.

I think the main purpose of ##14661 is to remove the need of a C++ compiler

Yes, I understand the issue.

@paulorsousa

Copy link
Copy Markdown
Contributor

@lemire I can confirm it's compiling now
Thank you! :)

@lemire

lemire commented Feb 24, 2026

Copy link
Copy Markdown
Author

@paulorsousa Thanks.

Now, whether it is useful or not to you, I leave it up to you to judge. :-)

@lemire

lemire commented Mar 7, 2026

Copy link
Copy Markdown
Author

I am going to close this and open a new PR.

@sundb

sundb commented Apr 15, 2026

Copy link
Copy Markdown
Collaborator

Close via #14661

@sundb sundb closed this Apr 15, 2026
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.

4 participants