Installing WP43S on OSX (Mac)

General discussion about calculators, Swiss Micros or otherwise
Post Reply
hoverbeek
Posts: 2
Joined: Sat Sep 21, 2019 1:54 pm

Installing WP43S on OSX (Mac)

Post by hoverbeek » Tue Sep 24, 2019 10:54 am

Here is a step by step solution if you want the WP43S to run on OSX.

1 Install XCode from the App Store.

2 Clone the source code of the WP43S project by opening Xcode and clone a project using this link:
https://gitlab.com/Over_score/wp43s.git

(Cloning the project has some advantages over downloading the code.
It makes sure XCode tracks the changes for example.)

I first tried to use Homebrew for all the packages we need. However that gave me issues and I switched to Macports. So:

3 Install MacPorts using this guide:
https://guide.macports.org/chunked/inst ... ports.html

4 After install the following macports one by one:

sudo port install gcc9
sudo port install gtk3
sudo port install freeType
sudo port install pkgconfig
sudo port install x11
sudo port install dbus

5 Then run the makefile form the root directory of the project (probably wp43s)

6 When the project has successfully compiled, run the program, for example like this: ./wp43s


From the terminal window I got the following warning:

Gtk-WARNING **: 11:23:52.903: Locale not supported by C library.
Using the fallback 'C' locale.

Solve this by entering:

export LC_ALL="en_US"
export LANG="en_US"
export LANGUAGE="en_US"
export C_CTYPE="en_US"
export LC_NUMERIC=
export LC_TIME=en"en_US"

... or similar locale settings.


When you get this error:

dbus[1369]: Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded!

use this:

sudo launchctl load -w /Library/LaunchDaemons/org.freedesktop.dbus-system.plist
launchctl load /Library/LaunchAgents/org.freedesktop.dbus-session.plist
export DBUS_SESSION_BUS_ADDRESS="launchd:env=DBUS_FINK_SESSION_BUS_SOCKET"



After that I get no more warnings or error messages:


On the first 'make' I got error messages about header files that could not be found. I solved this by adding the following lines to the makefile,

after:

else ifeq ($(detected_OS),Darwin) # Mac OS X
CFLAGS += -D OSX

add:

CFLAGS += -I/opt/local/include/
CFLAGS += -I/opt/local/include/glib-2.0/
CFLAGS += -I/opt/local/lib/glib-2.0/include/
CFLAGS += -I/opt/local/include/gtk-3.0/
CFLAGS += -I/opt/local/include/pango-1.0/
CFLAGS += -I/opt/local/include/cairo/
CFLAGS += -I/opt/local/include/gdk-pixbuf-2.0/
CFLAGS += -I/opt/local/include/atk-1.0/
CFLAGS += -I/opt/local/include/freetype2


On my machine I put the project into ~/wp43s.
However, the application searches for the wp43s_pre.css in the local home directory. If no calculator window comes up, copy the css-file:

cp wp43s_pre.css ~


Let me know if this does not work.
DM42 SN: 00754
HP35, ..., HP67, HP41(C,CV,CX), ..., HP48GX, ..., HP33S, HP35S, WP34S, DM42, WP43S

hoverbeek
Posts: 2
Joined: Sat Sep 21, 2019 1:54 pm

Re: Installing WP43S on OSX (Mac)

Post by hoverbeek » Thu Oct 31, 2019 9:59 am

I upgraded my Mac os to Catalina and after that I cannot make the WP43S project anymore.

What happens is that the project generates fonts for the WP43S from ttf characters and just before doing this a segment fault comes up, halting the 'make'.

Yesterday I tried making the project on a factory reset machine (to Catalina) and that generates a segment fault as well.

Currently I can make the project on Mojave, just not on Catalina.
If you make WP43S on the Mac, you might want to wait with the upgrade.
DM42 SN: 00754
HP35, ..., HP67, HP41(C,CV,CX), ..., HP48GX, ..., HP33S, HP35S, WP34S, DM42, WP43S

User avatar
Walter
Posts: 1238
Joined: Tue May 02, 2017 9:13 am
Location: Close to FRA, Germany

Re: Installing WP43S on OSX (Mac)

Post by Walter » Thu Oct 31, 2019 10:45 am

Never modify a working OS unless you are forced to! ;)
DM42 SN: 00041 --- Follower of Platon.

HP-35, HP-45, ..., HP-50, WP 34S, WP 31S, DM16L

User avatar
Jaymos
Posts: 430
Joined: Sun Nov 04, 2018 6:03 pm
Location: Cape Town

Re: Installing WP43S on OSX (Mac)

Post by Jaymos » Fri Nov 01, 2019 9:25 am

hoverbeek wrote:
Thu Oct 31, 2019 9:59 am
I upgraded my Mac os to Catalina and after that I cannot make the WP43S project anymore.

What happens is that the project generates fonts for the WP43S from ttf characters and just before doing this a segment fault comes up, halting the 'make'.

Yesterday I tried making the project on a factory reset machine (to Catalina) and that generates a segment fault as well.

Currently I can make the project on Mojave, just not on Catalina.
If you make WP43S on the Mac, you might want to wait with the upgrade.
I will definitely heed this warning .... thx
Jaco Mostert
Elec Eng, South Africa
WP34C, HP42S, DM42 for complex math; 35S, 28C, 32Sii, WP34S, EL-506P, EL-W506, PB700; owned FX702P & 11C; used 67 & 85. iOS: 42s (Byron), Free42, WP31S/34S, HCalc.
43S operators right. DM42 sn. 03818.

metawops
Posts: 2
Joined: Tue Feb 06, 2018 8:36 pm

Re: Installing WP43S on OSX (Mac)

Post by metawops » Sat Feb 01, 2020 10:15 pm

Any news here?

I'm on Catalina as well and just came across this project.
The step-by-step instructions fail rather early: "sudo port install x11" delivers the error "Error: Port x11 not found".
😞

Thanks!
DM42 SN: 00566. Official HP Prime beta tester. Many HP calcs in collection.

metawops
Posts: 2
Joined: Tue Feb 06, 2018 8:36 pm

Re: Installing WP43S on OSX (Mac)

Post by metawops » Sat Feb 01, 2020 10:32 pm

I'm on macOS Catalina 10.15.3, XCode 11.3.1.
hoverbeek wrote:
Tue Sep 24, 2019 10:54 am

4 After install the following macports one by one:

sudo port install gcc9
sudo port install gtk3
sudo port install freeType
sudo port install pkgconfig
sudo port install x11
sudo port install dbus
The freeType, pkgconfig and dbus do (download, install) nothing.
The x11 gives a "Port not found" error. 😞
hoverbeek wrote:
Tue Sep 24, 2019 10:54 am
5 Then run the makefile form the root directory of the project (probably wp43s)
Builds without errors. 🙂
hoverbeek wrote:
Tue Sep 24, 2019 10:54 am
6 When the project has successfully compiled, run the program, for example like this: ./wp43s

From the terminal window I got the following warning:

Gtk-WARNING **: 11:23:52.903: Locale not supported by C library.
Using the fallback 'C' locale.

Solve this by entering:

export LC_ALL="en_US"
export LANG="en_US"
export LANGUAGE="en_US"
export C_CTYPE="en_US"
export LC_NUMERIC=
export LC_TIME=en"en_US"

... or similar locale settings.
Got the same error, used the export commands and the error was gone. 🙂
hoverbeek wrote:
Tue Sep 24, 2019 10:54 am
When you get this error:

dbus[1369]: Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded!
Didn't get that error.

However, I did get this error:

Code: Select all

 $ ./wp43s

(wp43s:11769): Gtk-WARNING **: 23:21:12.475: cannot open display:
I suppose that's because the above error where x11 couldn't be found. No Xserver is running so no display can be found. 😞
DM42 SN: 00566. Official HP Prime beta tester. Many HP calcs in collection.

User avatar
pcscote
Posts: 97
Joined: Tue May 02, 2017 10:12 am
Location: Near Montreal, Québec, Canada

Re: Installing WP43S on OSX (Mac)

Post by pcscote » Sun Feb 02, 2020 12:12 pm

I am running macOS Catalina 10.15.3 and I just installed X11 successfully:

First, just in case, update port:

Code: Select all

sudo port selfupdate
sudo port upgrade outdated
Then install X11

Code: Select all

sudo port install xorg-server
sudo port install xorg
Then you need to log out and log back on (or reboot) to activate X11

Edit: Some application works (xterm) but some others do not (xcalc run but is not displaying anything), more investigation is needed.
[DM1x/DM1xL/DM41/DM41L/DM41X/DM42]

Post Reply