Closed huangganggui closed 2 weeks ago
NOTE That: When I used vscode extensions named esp-idf to install all, every thing is ok. may be I miss some steps?
Hi @huangganggui, I am also using macOS with M3 Pro and have never seen such an issue. Can you please tell us more details about your environment? Which version of macOS are you running?
MacOS should already contain libffi without need to install it using brew. In your case the lib from brew is getting used (TBH I don't think that should matter but is definitely not the default state for most users). When you install libffi using brew there is some additional information printed that you can export some variables to override the system libffi with the one from homebrew. Have you by any chance set those environment variables? Please check if any of PKG_CONFIG_PATH
, LDFLAGS
or CPPFLAGS
is set for you. This would also make sense why installation from VSCode might work, because those environment variables might not be set there.
Hi @huangganggui, I am also using macOS with M3 Pro and have never seen such an issue. Can you please tell us more details about your environment? Which version of macOS are you running? MacOS should already contain libffi without need to install it using brew. In your case the lib from brew is getting used (TBH I don't think that should matter but is definitely not the default state for most users). When you install libffi using brew there is some additional information printed that you can export some variables to override the system libffi with the one from homebrew. Have you by any chance set those environment variables? Please check if any of
PKG_CONFIG_PATH
,LDFLAGS
orCPPFLAGS
is set for you. This would also make sense why installation from VSCode might work, because those environment variables might not be set there.
I'm no mac user, but I think @peterdragun is right. It seems there might be problem with LDFLAGS
. Why is the :
present before the -L option? :-L/opt/homebrew/opt/libffi/lib
. This seems to be the culprit.
Thanks for yours reply @fhrbata @peterdragun . Installing by vscode extensions works well for me. when I want to use idf.py in command line, I use . ~/esp/v5.2.3/esp-idf/export.sh
and everythings work well.
So I will close this issue for now. If anyone encounters this problem again, please feel free to reopen it.
Answers checklist.
IDF version.
v5.2.3
Operating System used.
macOS
How did you build your project?
Command line with idf.py
If you are using Windows, please specify command line type.
None
What is the expected behavior?
success
What is the actual behavior?
faild
Steps to reproduce.
git clone -b v5.2.3 --recursive https://github.com/espressif/esp-idf.git
cd esp-idf ./install.sh esp32 . $HOME/esp/esp-idf/export.sh cd ~/esp cp -r $IDF_PATH/examples/get-started/hello_world . cd ~/esp/hello_world idf.py set-target esp32
Build or installation Logs.
More Information.
idf.py build
also failed/opt/homebrew/opt/libffi/lib exist
ls /opt/homebrew/opt/libffi/lib
libffi.8.dylib libffi.a libffi.dylib pkgconfigI also tried on version v5.2.3 v5.1.5 and same question.