Installing WP43S on OSX (Mac)

This area is for discussion about these families of custom high-end Scientific Calculator applications for SwissMicros devices.
hoverbeek
Posts: 17
Joined: Sat Sep 21, 2019 3:54 pm

Installing WP43S on OSX (Mac)

Post by hoverbeek »

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.
DM41X SN: 00070 DM42 SN: 00754
HP35, ..., HP67, HP41(C,CV,CX), ..., HP48GX, ..., HP33S, HP35S, WP34S, WP43S
hoverbeek
Posts: 17
Joined: Sat Sep 21, 2019 3:54 pm

Re: Installing WP43S on OSX (Mac)

Post by hoverbeek »

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.
DM41X SN: 00070 DM42 SN: 00754
HP35, ..., HP67, HP41(C,CV,CX), ..., HP48GX, ..., HP33S, HP35S, WP34S, WP43S
User avatar
Walter
Posts: 3070
Joined: Tue May 02, 2017 11:13 am
Location: On a mission close to DRS, Germany

Re: Installing WP43S on OSX (Mac)

Post by Walter »

Never modify a working OS unless you are forced to! ;)
WP43 SN00000, 34S, and 31S for obvious reasons; HP-35, 45, ..., 35S, 15CE, DM16L S/N# 00093, DM42β SN:00041
User avatar
Jaymos
Posts: 1635
Joined: Sun Nov 04, 2018 7:03 pm
Location: Cape Town

Re: Installing WP43S on OSX (Mac)

Post by Jaymos »

hoverbeek wrote:
Thu Oct 31, 2019 10: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
https://47calc.com C47 (s/n 03818 & 06199), WP43 (0015). In box: HP42S, HP32Sii, WP34S&C, HP28C, HP35s, EL-506P, EL-W506, PB700; ex: FX702P, 11C, HP67 & HP85; iOS: 42s Byron, Free42+, WP31S/34S, HCalc.
metawops
Posts: 4
Joined: Tue Feb 06, 2018 9:36 pm

Re: Installing WP43S on OSX (Mac)

Post by metawops »

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: 4
Joined: Tue Feb 06, 2018 9:36 pm

Re: Installing WP43S on OSX (Mac)

Post by metawops »

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

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 12:54 pm
5 Then run the makefile form the root directory of the project (probably wp43s)
Builds without errors. 🙂
hoverbeek wrote:
Tue Sep 24, 2019 12:54 pm
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 12:54 pm
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: 169
Joined: Tue May 02, 2017 12:12 pm
Location: Québec/Canada

Re: Installing WP43S on OSX (Mac)

Post by pcscote »

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]
User avatar
Jaymos
Posts: 1635
Joined: Sun Nov 04, 2018 7:03 pm
Location: Cape Town

Re: Installing WP43S on OSX (Mac)

Post by Jaymos »

I have a problem with the simulator on Mac that it crashes for long integer operations.

For example 2 ENTER 2203 [y^x] 1 [-] f [PRIME?].

Walter reports this to work on the Windows 10 version of the simulator.


Does anyone know how to fault find this? I have no idea.
Jaco Mostert
Elec Eng, South Africa
https://47calc.com C47 (s/n 03818 & 06199), WP43 (0015). In box: HP42S, HP32Sii, WP34S&C, HP28C, HP35s, EL-506P, EL-W506, PB700; ex: FX702P, 11C, HP67 & HP85; iOS: 42s Byron, Free42+, WP31S/34S, HCalc.
hoverbeek
Posts: 17
Joined: Sat Sep 21, 2019 3:54 pm

Re: Installing WP43S on OSX (Mac)

Post by hoverbeek »

Jaymos, is this fixed?

I was away for some time (personal problems). I compiled the latest version of the code and I get either 'true' as the result or the application crashes. I'll take a look at what's happening. Should get me pulled back into the code again ;)
DM41X SN: 00070 DM42 SN: 00754
HP35, ..., HP67, HP41(C,CV,CX), ..., HP48GX, ..., HP33S, HP35S, WP34S, WP43S
User avatar
Jaymos
Posts: 1635
Joined: Sun Nov 04, 2018 7:03 pm
Location: Cape Town

Re: Installing WP43S on OSX (Mac)

Post by Jaymos »

Hi,

I trust it goes better now.


No, it is not fixed. The problem extends to the Mac, Linux and the target hardware and only on Windows does not show up.

Martin has spent a lot of time, and made a test program today.

If you could have a look at : https://gitlab.com/Over_score/wp43s/-/i ... _334192022
Jaco Mostert
Elec Eng, South Africa
https://47calc.com C47 (s/n 03818 & 06199), WP43 (0015). In box: HP42S, HP32Sii, WP34S&C, HP28C, HP35s, EL-506P, EL-W506, PB700; ex: FX702P, 11C, HP67 & HP85; iOS: 42s Byron, Free42+, WP31S/34S, HCalc.
Post Reply