Git Product home page Git Product logo

Comments (9)

eproxus avatar eproxus commented on September 28, 2024 24

To add a final note, to get proper Dark Mode support on Mojave or later, a build of wxMac 3.1.2 or 3.1.3 is needed (the default 3.0.4 version in Homebrew will work but tools like Observer look broken when Dark Mode is enabled).

On Catalina a working wxMac 3.1.3 install of Erlang 22.2.8 can be obtained by doing the following:

$ brew edit wxmac # Use patch below
$ rm -rf ~/.asdf/plugins/erlang/kerl-home/builds/asdf_22.2.8 # if you have tried building this version previously
$ brew install wxmac --build-from-source
$ asdf install erlang 22.2.8

Patch for Homebrew 2.2.15-12-ga5a5a1a and default wxMac 3.0.5:

diff --git a/Formula/wxmac.rb b/Formula/wxmac.rb
index d80b02f9e..9c68e7363 100644
--- a/Formula/wxmac.rb
+++ b/Formula/wxmac.rb
@@ -1,8 +1,8 @@
 class Wxmac < Formula
   desc "Cross-platform C++ GUI toolkit (wxWidgets for macOS)"
   homepage "https://www.wxwidgets.org"
-  url "https://github.com/wxWidgets/wxWidgets/releases/download/v3.0.5/wxWidgets-3.0.5.tar.bz2"
-  sha256 "8aacd56b462f42fb6e33b4d8f5d40be5abc3d3b41348ea968aa515cc8285d813"
+  url "https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.3/wxWidgets-3.1.3.tar.bz2"
+  sha256 "fffc1d34dac54ff7008df327907984b156c50cff5a2f36ee3da6052744ab554a"
   head "https://github.com/wxWidgets/wxWidgets.git"
 
   bottle do
@@ -19,6 +19,7 @@ class Wxmac < Formula
   def install
     args = [
       "--prefix=#{prefix}",
+      "--enable-compat28",
       "--enable-clipboard",
       "--enable-controls",
       "--enable-dataviewctrl",

(edit: Updated to patch match latest Homebrew version, thanks to @gregors!)

from asdf-erlang.

pasha avatar pasha commented on September 28, 2024 7

Changes to use wxmac 3.1.4 with erlang 3.2, erlang 3.2.1

diff --git a/Formula/wxmac.rb b/Formula/wxmac.rb
index 463bb08543..94088c09e9 100644
--- a/Formula/wxmac.rb
+++ b/Formula/wxmac.rb
@@ -1,8 +1,8 @@
 class Wxmac < Formula
   desc "Cross-platform C++ GUI toolkit (wxWidgets for macOS)"
   homepage "https://www.wxwidgets.org"
-  url "https://github.com/wxWidgets/wxWidgets/releases/download/v3.0.5.1/wxWidgets-3.0.5.1.tar.bz2"
-  sha256 "440f6e73cf5afb2cbf9af10cec8da6cdd3d3998d527598a53db87099524ac807"
+  url "https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.4/wxWidgets-3.1.4.tar.bz2"
+  sha256 "3ca3a19a14b407d0cdda507a7930c2e84ae1c8e74f946e0144d2fa7d881f1a94"
   license "wxWindows"
   revision 1
   head "https://github.com/wxWidgets/wxWidgets.git"
@@ -32,6 +32,7 @@ class Wxmac < Formula
   def install
     args = [
       "--prefix=#{prefix}",
+      "--enable-compat28",
       "--enable-clipboard",
       "--enable-controls",
       "--enable-dataviewctrl",

from asdf-erlang.

Stratus3D avatar Stratus3D commented on September 28, 2024

You may need to tell it where wx is on your system. I've had trouble with this in the past with this, and it turned out to be something trivial. Unfortunately I don't have anything written down in my notes.

Maybe helpful? kerl/kerl#294

from asdf-erlang.

minton avatar minton commented on September 28, 2024

@mspanc Did you ever find a solution for this?

from asdf-erlang.

Geekfish avatar Geekfish commented on September 28, 2024

Hey @mspanc
I ran into the same problem. When using wxmac version3.0.6 seems to make Erlang compile fine, but version 3.1.x (tried both 3.1.1 and 3.1.2) creates the same issue (no wx).

Looking at these Erlang docs about compiling wx with wxWidgets, it looks like 3.1.x would need to be compiled with the --enable-compat28 for some reason? I haven't tried this, but it might work.

Looking at the wx changelog for the upcoming OTP 22, it looks like better support is coming, maybe that will resolve the issues without needing a specially compiled version.

from asdf-erlang.

eproxus avatar eproxus commented on September 28, 2024

Just hit this problem. After some research it turns out the following combination work:

  • Erlang 22.0.2 and wxmac 3.1.2 built with the --enable-compat28 flag
    $ brew edit wxmac # Use patch below
    $ brew install wxmac
    $ asdf install erlang 22.0.2
    Screen Shot 2019-06-06 at 12 39 22

What seems to be important is to clean out the complete build folder when building again after changing wxmac version using rm -rf ~/.asdf/plugins/erlang/kerl-home/builds/asdf_22.0.2.

Patch for wxmac formula:

diff --git a/Formula/wxmac.rb b/Formula/wxmac.rb
index 60c0b777..c822c57d 100644
--- a/Formula/wxmac.rb
+++ b/Formula/wxmac.rb
@@ -1,9 +1,11 @@
 class Wxmac < Formula
   desc "Cross-platform C++ GUI toolkit (wxWidgets for macOS)"
   homepage "https://www.wxwidgets.org"
-  url "https://github.com/wxWidgets/wxWidgets/releases/download/v3.0.4/wxWidgets-3.0.4.tar.bz2"
-  sha256 "96157f988d261b7368e5340afa1a0cad943768f35929c22841f62c25b17bf7f0"
-  revision 1
+  url "https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.2/wxWidgets-3.1.2.tar.bz2"
+  sha256 "4cb8d23d70f9261debf7d6cfeca667fc0a7d2b6565adb8f1c484f9b674f1f27a"
   head "https://github.com/wxWidgets/wxWidgets.git"
 
   bottle do
@@ -21,6 +23,7 @@ class Wxmac < Formula
   def install
     args = [
       "--prefix=#{prefix}",
+      "--enable-compat28",
       "--enable-clipboard",
       "--enable-controls",
       "--enable-dataviewctrl",

(Note: --enable-compat28 is to enable wxWidgets 2.8 compatibility.)

from asdf-erlang.

eproxus avatar eproxus commented on September 28, 2024

Updating asdf to 0.7.2 and using the latest master version of asdf-erlang makes the 22.0.2 build pass out of the box with wxmac 3.0.4:

$ brew install wxmac
$ asdf install erlang 22.0.2

from asdf-erlang.

Stratus3D avatar Stratus3D commented on September 28, 2024

Closing this issue because I am not aware of any problems with asdf-erlang itself. If there is anything we can do improve asdf-erlang please open a new issue.

from asdf-erlang.

jj1bdx avatar jj1bdx commented on September 28, 2024

Successfully build OTP 23.3.4 with the Dark Mode support on macOS 10.15.7 Catalina, finally.

  • When you have already installed wxmac, you need to upgrade with brew upgrade wxmac --build-from-source.
  • If you have already installed Homebrew Erlang, it will be rebuilt from source.

Thanks for all the tips!

from asdf-erlang.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.