Skip to content

How to get _GLIBCXX_USE_CXX11_ABI to 1 ? #263

@blackrez

Description

@blackrez

Hello,

I'm using cargo lambda to build aws lambda function with rust. The cross compilation with cargo zig works very nicely, I have one little issue. When I build duckdb-rs, the compilation works.
For some context, duckdb is a memory database and it use an extension system that acts like dynamic librairies.

At the execution, duckdb detects that I use an old glibc but this is not the case (I use Amazon linux 2023)

In the duckdb code, they use this code to detect old glibc

#if !defined(_GLIBCXX_USE_CXX11_ABI) || _GLIBCXX_USE_CXX11_ABI == 0
	if (os == "linux") {
		postfix = "_gcc4";
	}
#endif

How I can get _GLIBCXX_USE_CXX11_ABI defined or equals to 1 (or find a better system to detect gilbc version) with cargo zig ?

note : without cross compilation it detects correctly the glib version.

Thanks for your help

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions