Getting "unknown type name 'GLfloat'" while installing Erlang 27.x with ASDF on M1

Hi all,

I’ve been away from Elixir code for nearly a year and now just trying to get everything up to latest. As per the topic title, I’m having a bit of trouble installing Erlang with asdf on Sequoia 15.1. The log below shows the lead up to the first error. Would really appreciate any advice.

Thanks!

gmake[3]: Entering directory '/Users/admin/.asdf/plugins/erlang/kerl-home/builds/asdf_27.1.2/otp_src_27.1.2/lib/wx/c_src'
 CXX	aarch64-apple-darwin24.1.0/wxe_wrapper_3.o
 CXX	aarch64-apple-darwin24.1.0/wxe_wrapper_1.o
 CXX	aarch64-apple-darwin24.1.0/wxe_wrapper_7.o
 CXX	aarch64-apple-darwin24.1.0/wxe_wrapper_8.o
 CXX	aarch64-apple-darwin24.1.0/wxe_wrapper_2.o
 CXX	aarch64-apple-darwin24.1.0/wxe_wrapper_4.o
 CXX	aarch64-apple-darwin24.1.0/wxe_wrapper_6.o
 CXX	aarch64-apple-darwin24.1.0/wxe_wrapper_5.o
 CXX	aarch64-apple-darwin24.1.0/wxe_events.o
 CXX	aarch64-apple-darwin24.1.0/wxe_init.o
 CXX	aarch64-apple-darwin24.1.0/wxe_func_table.o
 CC	aarch64-apple-darwin24.1.0/wxe_nif.o
 CC	aarch64-apple-darwin24.1.0/wxe_ps_init.o
 CXX	aarch64-apple-darwin24.1.0/wxe_main.o
 CXX	aarch64-apple-darwin24.1.0/wxe_impl.o
 CXX	aarch64-apple-darwin24.1.0/wxe_helpers.o
gen/wxe_init.cpp:610:57: warning: wxSTC_INDICS_MASK is deprecated. Style byte indicators are no longer used. [-W#pragma-messages]
  610 |     { WXE_ATOM_define, "wxSTC_INDICS_MASK", rt.make_int(wxSTC_INDICS_MASK) },
      |                                                         ^
/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.1/include/wx-3.2/wx/stc/stc.h:2493:27: note: expanded from macro 'wxSTC_INDICS_MASK'
 2493 | #define wxSTC_INDICS_MASK wxSTC_DEPRECATED_MACRO_VALUE(0xE0,\
      |                           ^
/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.1/include/wx-3.2/wx/stc/stc.h:2473:9: note: expanded from macro 'wxSTC_DEPRECATED_MACRO_VALUE'
 2473 |         _Pragma(wxSTC_STRINGIFY(GCC warning msg)) value
      |         ^
<scratch space>:44:6: note: expanded from here
   44 |  GCC warning "wxSTC_INDICS_MASK is deprecated. Style byte indicators are no longer used."
      |      ^
gen/wxe_init.cpp:611:57: warning: wxSTC_INDIC2_MASK is deprecated. Style byte indicators are no longer used. [-W#pragma-messages]
  611 |     { WXE_ATOM_define, "wxSTC_INDIC2_MASK", rt.make_int(wxSTC_INDIC2_MASK) },
      |                                                         ^
/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.1/include/wx-3.2/wx/stc/stc.h:2491:27: note: expanded from macro 'wxSTC_INDIC2_MASK'
 2491 | #define wxSTC_INDIC2_MASK wxSTC_DEPRECATED_MACRO_VALUE(0x80,\
      |                           ^
/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.1/include/wx-3.2/wx/stc/stc.h:2473:9: note: expanded from macro 'wxSTC_DEPRECATED_MACRO_VALUE'
 2473 |         _Pragma(wxSTC_STRINGIFY(GCC warning msg)) value
      |         ^
<scratch space>:47:6: note: expanded from here
   47 |  GCC warning "wxSTC_INDIC2_MASK is deprecated. Style byte indicators are no longer used."
      |      ^
gen/wxe_init.cpp:612:57: warning: wxSTC_INDIC1_MASK is deprecated. Style byte indicators are no longer used. [-W#pragma-messages]
  612 |     { WXE_ATOM_define, "wxSTC_INDIC1_MASK", rt.make_int(wxSTC_INDIC1_MASK) },
      |                                                         ^
/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.1/include/wx-3.2/wx/stc/stc.h:2489:27: note: expanded from macro 'wxSTC_INDIC1_MASK'
 2489 | #define wxSTC_INDIC1_MASK wxSTC_DEPRECATED_MACRO_VALUE(0x40,\
      |                           ^
/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.1/include/wx-3.2/wx/stc/stc.h:2473:9: note: expanded from macro 'wxSTC_DEPRECATED_MACRO_VALUE'
 2473 |         _Pragma(wxSTC_STRINGIFY(GCC warning msg)) value
      |         ^
<scratch space>:50:6: note: expanded from here
   50 |  GCC warning "wxSTC_INDIC1_MASK is deprecated. Style byte indicators are no longer used."
      |      ^
gen/wxe_init.cpp:613:57: warning: wxSTC_INDIC0_MASK is deprecated. Style byte indicators are no longer used. [-W#pragma-messages]
  613 |     { WXE_ATOM_define, "wxSTC_INDIC0_MASK", rt.make_int(wxSTC_INDIC0_MASK) },
      |                                                         ^
/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.1/include/wx-3.2/wx/stc/stc.h:2487:27: note: expanded from macro 'wxSTC_INDIC0_MASK'
 2487 | #define wxSTC_INDIC0_MASK wxSTC_DEPRECATED_MACRO_VALUE(0x20,\
      |                           ^
/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.1/include/wx-3.2/wx/stc/stc.h:2473:9: note: expanded from macro 'wxSTC_DEPRECATED_MACRO_VALUE'
 2473 |         _Pragma(wxSTC_STRINGIFY(GCC warning msg)) value
      |         ^
<scratch space>:53:6: note: expanded from here
   53 |  GCC warning "wxSTC_INDIC0_MASK is deprecated. Style byte indicators are no longer used."
      |      ^
 CXX	aarch64-apple-darwin24.1.0/wxe_callback_impl.o
 CXX	aarch64-apple-darwin24.1.0/wxe_return.o
 CXX	aarch64-apple-darwin24.1.0/wxe_gl.o
 CXX	aarch64-apple-darwin24.1.0/gl_nif.o
 CXX	aarch64-apple-darwin24.1.0/glu_nif.o
In file included from gen/glu_nif.cpp:25:
gen/../egl_impl.h:144:54: error: unknown type name 'GLfloat'; did you mean 'float'?
  144 | int egl_get_float(ErlNifEnv* env, ERL_NIF_TERM term, GLfloat* dp);
      |                                                      ^~~~~~~
      |                                                      float

If you’re not obligated to use asdf, I recommend you use mise together with .kerlrc file that works on Apple Silicon. I’m using this one on M1.

1 Like

Most probably a wx version mismatch, if you don’t use wx you can easily do the following before trying to install otp:

export KERL_CONFIGURE_OPTIONS="--without-wx"

This should disable the wx application from getting built.

1 Like

I hadn’t heard of it before. I’m using ASDF for development on other platforms, and I’d like to keep it consistent, but thanks for the suggestion.

Right on the money! I downgraded wxWidgets from 3.2 to 3.0 and that works. Thanks for the help.

1 Like

mise can use all asdf plugins and it’s faster. It’s the better program with no drawbacks.

2 Likes

You can also try GitHub - michallepicki/asdf-erlang-prebuilt-macos: Erlang plugin for asdf version manager, using Erlang builds by erlef/otp_builds for macOS , it is using builds from GitHub - erlef/otp_builds: Community-maintained pre-compiled Erlang/OTP for macOS so you won’t get compilation errors

3 Likes

Thanks, @dimitarvp. I wasn’t aware it’s a drop-in replacement. I might try it in the future.

I’d heard about these prebuilds but didn’t know their as an ASDF plugin for it. This is great, thanks!