Skip to content
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

lastest bpftrace need -lstdc++fs #5

Closed
b-ripper opened this issue Oct 12, 2020 · 3 comments
Closed

lastest bpftrace need -lstdc++fs #5

b-ripper opened this issue Oct 12, 2020 · 3 comments

Comments

@b-ripper
Copy link

b-ripper commented Oct 12, 2020

Hi,

The lastest bpftrace master need -lstdc++fs, current env not supported.
I found libc++fs is available on Android R AOSP source code(external/libcxx).
also available in projects/llvm/sources/libcxx.

So, use libc++fs instead of libstdc++fs?
Do you have any suggestion?

Very thanks

@michalgr
Copy link
Contributor

So there are a few things we could try.

std::filesystem will be supported in ndk r22, at least according to this issue: android/ndk#609. But we're on r17 here for a reason (r18 removed gcc and libelf does not build with clang). Plus it's not obvious whether std::filesystem will be available on all the platforms we support (API 28+). The best way forward would be to move to r22 (if that works), but it won't happen soon.

Another way is to do what you suggest. We can compile our own libc++ as you suggest and link against that. It seems that we should be able to set ANDROID_STL to none to prevent ndk from providing its own stl.

I wonder whether we can do something quick to unblock you sooner. How much of libstdc++fs do we actually need ? Maybe we can just define our own filesystem header and define absolute and canonical functions in terms of realpath ?

@michalgr
Copy link
Contributor

michalgr commented Nov 3, 2020

I just pushed 2b28f5e which updates version of bpftrace to current master. @b-ripper: does it solve problems you run into ?

@b-ripper
Copy link
Author

b-ripper commented Nov 3, 2020

Yes, thanks very much!

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

No branches or pull requests

2 participants