-
Notifications
You must be signed in to change notification settings - Fork 994
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
[question] AutoToolsBuildEnvironment: add -stdlib in LDFLAGS if clang? #7109
Comments
I think this is something for the recipe, isn't it? It is something needed only for C++ libraries with a C API or for C libraries linking to C++ ones. IMO it is is something that only the recipe knows as it depends on the library being packaged and/or required. Probably I'm missing something so I'd more details. Thanks! |
No, I shouldn't have talk about C++ libraries with C API. GDAL has a complex dependency tree but it's unrelated. It's just that, as a lucky side effect of some dependencies propagating
What I mean is that using clang with libc++ on Linux seems to require For example, here are commands for building one executable of gdal: Compilation:
Link:
Error at link time:
Each command is a little bit long :p but you can see that |
With
AutoToolsBuildEnvironment
, I've noticed that-stdlib=libc++
was missing inLDFLAGS
while trying to make GDAL recipe works in CCI.Therefore, GDAL fails to build executables if
clang
andlibc++
on Linux (and shared lib build thanks to some dependencies passing-lc++
(C++ lib with C API) inLIB
I think).As a workaround, I've added
CXXFLAGS
to link commands creating executables in GDAL.Shouldn't
AutoToolsBuildEnvironment
add-stdlib
inLDFLAGS
env var?The text was updated successfully, but these errors were encountered: