Error: ‘weak_ptr’ is not a member of ‘std’ when compile for linux

Hi!
I have some problems with cocos compile command for linux.

cocos compile -s ‘Path to game’ -p linux -m debug -o ‘Path to game’

I getting the following error

error: ‘weak_ptr’ is not a member of ‘std’

It looks like I have some problems with c++ standard.

Before starting compile, I run setup.py and install-deps-linux.sh

I’m trying to compile a standard HelloWorld app.

How to solve this problem with cocos2d-x 4.0?

i have this same issue, is there anything that can be done?