I am building emacs from source code on github. It works fine days ago, then suddenly, it cannot find tputs in any library.

My OS: macOS Catalina 10.15.1
I have installed ncurses by brew install
I have set PATH, LDFLAGS CPPFLAGS PKG_CONFIG_PATH as brew told me, it not works. 

Anyone know how to fix this problem? And why? 

Thank you!