asdf-vm / asdf-erlang

Erlang plugin for asdf version manager
https://github.com/asdf-vm/asdf
MIT License
479 stars 118 forks source link

unable to install erlang 22.3.4.22 on mac os sonoma 14.5 #315

Closed talhaazeemmughal closed 2 months ago

talhaazeemmughal commented 2 months ago

below is my error from installing erlang:

xcode-select: Failed to locate 'm4', requesting installation of command line developer tools.
make[2]: *** [x86_64-apple-darwin23.5.0/opt/smp/hipe_ppc_asm.h] Error 72
 GEN    x86_64-apple-darwin23.5.0/erl_version.h
 GEN    x86_64-apple-darwin23.5.0/preload.c
 GEN    x86_64-apple-darwin23.5.0/opt/smp/TABLES-GENERATED
 M4 x86_64-apple-darwin23.5.0/opt/smp/hipe_sparc_asm.h
xcode-select: Failed to locate 'm4', requesting installation of command line developer tools.
make[2]: *** [x86_64-apple-darwin23.5.0/opt/smp/hipe_sparc_asm.h] Error 72
make[1]: *** [generate] Error 2
make: *** [depend] Error 2

logs are as follows:

checking for GLint64EXT... yes
checking GLU Callbacks uses Tiger Style... no
checking for wx/stc/stc.h... yes
checking if we can link wxwidgets programs... no
checking if we can add -Werror=return-type to CFLAGS (via CFLAGS)... yes
checking if we can add -Werror=return-type to CXXFLAGS (via CFLAGS)... yes
configure: creating x86_64-apple-darwin23.5.0/config.status
config.status: creating config.mk
config.status: creating c_src/Makefile
configure: WARNING: Can not link wx program are all developer packages installed?

*********************************************************************
**********************  APPLICATIONS DISABLED  **********************
*********************************************************************

jinterface     : No Java compiler found

*********************************************************************
*********************************************************************
**********************  APPLICATIONS INFORMATION  *******************
*********************************************************************

wx             : Can not link the wx driver, wx will NOT be useable

*********************************************************************
 MAKE   depend
 MAKE   generate
 GEN    x86_64-apple-darwin23.5.0/gen_git_version.mk
 M4 x86_64-apple-darwin23.5.0/opt/smp/hipe_x86_asm.h
 M4 x86_64-apple-darwin23.5.0/opt/smp/hipe_amd64_asm.h
 M4 x86_64-apple-darwin23.5.0/opt/smp/hipe_ppc_asm.h
 GEN    x86_64-apple-darwin23.5.0/opt/smp/TABLES-GENERATED
xcode-select: Failed to locate 'm4', requesting installation of command line developer tools.
make[2]: *** [x86_64-apple-darwin23.5.0/opt/smp/hipe_x86_asm.h] Error 72
make[2]: *** Waiting for unfinished jobs....
 M4 x86_64-apple-darwin23.5.0/opt/smp/hipe_arm_asm.h
xcode-select: Failed to locate 'm4', requesting installation of command line developer tools.
make[2]: *** [x86_64-apple-darwin23.5.0/opt/smp/hipe_amd64_asm.h] Error 72
 GEN    x86_64-apple-darwin23.5.0/opt/smp/erl_alloc_types.h
xcode-select: Failed to locate 'm4', requesting installation of command line developer tools.
make[2]: *** [x86_64-apple-darwin23.5.0/opt/smp/hipe_ppc_asm.h] Error 72
 M4 x86_64-apple-darwin23.5.0/opt/smp/hipe_sparc_asm.h
xcode-select: Failed to locate 'm4', requesting installation of command line developer tools.
make[2]: *** [x86_64-apple-darwin23.5.0/opt/smp/hipe_arm_asm.h] Error 72
 GEN    x86_64-apple-darwin23.5.0/opt/smp/driver_tab.c
 GEN    x86_64-apple-darwin23.5.0/preload.c
xcode-select: Failed to locate 'm4', requesting installation of command line developer tools.
make[2]: *** [x86_64-apple-darwin23.5.0/opt/smp/hipe_sparc_asm.h] Error 72
 GEN    x86_64-apple-darwin23.5.0/opt/smp/OPCODES-GENERATED
 GEN    x86_64-apple-darwin23.5.0/erl_version.h
make[1]: *** [generate] Error 2
make: *** [depend] Error 2

Xcode command line tools are installed.

processor is intel

talhaazeemmughal commented 2 months ago

I resolved it. Steps i followed:

# install m4 using brew:
brew install m4

# set the path in the zshrc
echo 'export PATH="/usr/local/opt/m4/bin:$PATH"' >> ~/.zshrc

# source it
source ~/.zshrc

# install erlang:
asdf install erlang 22.3.4.22

leaving it here if someone else faces the same issue. P.s. i still don't know why it was not picking up the m4 installed by xcode command line tools