PragTob

PragTob

: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:

https://github.com/bencheeorg/benchee/actions/runs/8049202423/job/22126255043?pr=426#step:9:11

"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:

Showing Posts 1 to 4

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

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 OP

@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
— All posts loaded —

Where Next? Top

Trending in Questions Top

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
kpanic
Hi everyone, I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding. I sta...
New
nseaSeb
Hello, I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
asweet-confluent
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
apz
I’m new to elixir and just tried to install the elixirLS extension for VScode(ium) and it is throwing some errors that I would like help ...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews