PragTob

PragTob

Erlang brew package has the JIT disabled - should it be enabled by default?

:wave:

Hey folks!

So, this may be me not knowing how to interact with brew maintainers or Mac.

It seems like current versions of erlang on brew do not have the JIT enabled, despite being 26.2.2.

How do I know? Well, there is a benchee test that’s failing :sweat: And emu_flavor is returning :emu instead of :jit:

"26.2.2"
emu flavor: :emu

It used to work but seems to have broken in the past weeks. I can’t find anything suspicious in the brew formula. Other OSs also work fine, naturally.

I checked that this isn’t just a github action/CI behavior by running brew install erlang on my partners’ mac (still an intel mac) and it also reported the emu flavor.

Does anyone have an idea where to dig/report/fix this behavior or why it is like that? I don’t think it’s on purpose, the default experience should be the “JIT” experience by now.

I’m asking for the erlang experience on Mac, I’m going ahead and disabling the test on mac now :sweat_smile:

Marked As Solved

LostKobrakai

LostKobrakai

That’s expected as of 26.2.2, which disabled the jit on intel based macs: asmjit+macos+x86: ephemeral "Verifying shm-id-XXXXXXXXXXXXXXXX" security popups appear during each invocation of erlang · Issue #8043 · erlang/otp · GitHub

Also Liked

dimitarvp

dimitarvp

This is related to the super annoying small popup you get on Intel Macs when JIT is enabled.

Check this thread for context: Popup appears for a fraction of a second whenever a mix task is run (verifying shm-id-F8BD8E...)

Disabling the JIT is a workaround to avoid the popup. A proper fix will come in OTP 27 which is I think due in May 2024.

PragTob

PragTob

@LostKobrakai @dimitarvp thank you as always! I read the changelog to identify that this isn’t wanted behavior but couldn’t find anything but maybe I was too tired :sweat_smile:

So, thanks a lot for solving this mystery for me :dancer:

xinz

xinz

FYI, in OTP 27 can Allow explicit enabling the JIT on Intel Macs by bjorng · Pull Request #8219 · erlang/otp · GitHub, here are my steps to enable JIT for my macOS/intel case.

Step 1

brew uninstall --ignore-dependencies erlang

Step 2

brew edit erlang

Add --enable-jit option to configure

    args = %W[
      --enable-dynamic-ssl-lib
      --enable-jit
      --enable-hipe
      --enable-shared-zlib
      --enable-smp-support
      --enable-threads
      --enable-wx
      --with-odbc=#{Formula["unixodbc"].opt_prefix}
      --with-ssl=#{Formula["openssl@3"].opt_prefix}
      --without-javac
    ]

Step 3

export HOMEBREW_NO_INSTALL_FROM_API=1
brew install erlang --build-from-source

brew install ignores locally edited casks and formulae if
HOMEBREW_NO_INSTALL_FROM_API is not set, so we temporarily export the env argument, reinstall erlang via brew installer and my local erlang formulae file occurred conflict with the above edited "--enable-jit", resolve the conflict by rerun brew edit erlang and save it.

The above steps enable JIT for my case macOS Sonama(intel) with Erlang/OTP 27.2.1

➜  ~ erl -eval 'io:format("~p~n", [erlang:system_info(emu_flavor)]), halt().'
Erlang/OTP 27 [erts-15.2.1] [source] [64-bit] [smp:16:16] [ds:16:16:10] [async-threads:1] [jit:ns] [dtrace]

jit

Where Next?

Popular in Questions Top

jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
New
Werner
Hi, I’m using Ubuntu 18.04 and after updating to OTP-24.0 yesterday i have this warning when I run “mix local.hex”: 14:57:30.512 [warn] ...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New
Jim
As a follow up to my earlier question: I have the code compiling and running but not getting a successful login from the rest server. ...
New
dokuzbir
Hello, I am trying to convert my lists to string without losing brackets.For start i have 3 map. They look like these buyer = %{ id: ...
New
myronmarston
The Elixir Typespec docs show the following syntax for keyword lists in typespecs: # ... | [key: type] # keyword lis...
New
chensan
I have a User schema with a :from_id field set to type :string: defmodule TweetBot.Repo.Migrations.CreateUsers do use Ecto.Migration ...
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
lucidguppy
I have a super simple question about elixir - how would I take a file like this foo bar baz and output a new file that enumerates th...
New

Other popular topics Top

dotdotdotPaul
Okay, I'm having a heck of a time trying to figure out how to best handle the validation of belongs_to associations in Ecto. I'm sure I'...
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
lk-geimfari
What is most correct way to open, read and parse JSON file with poison? For example if we have example.json file in root of some projec...
New
myronmarston
The Elixir Typespec docs show the following syntax for keyword lists in typespecs: # ... | [key: type] # keyword lis...
New
mgjohns61585
Could someone help me? I'm making my first elixir program, number guessing game. I can't figure out how to convert the user's guess from ...
New
chensan
I have a User schema with a :from_id field set to type :string: defmodule TweetBot.Repo.Migrations.CreateUsers do use Ecto.Migration ...
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers' Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New

We're in Beta

About us Mission Statement