Post Reply 
Trying to compile RPL/2 on MacOSX
10-02-2021, 09:05 PM
Post: #1
Trying to compile RPL/2 on MacOSX
Hello

I found an old textbook with some RPL code snippets in it and wanted to give them a try (disclaimer: I never used an HP calc and that language before). Of course, I could be hunting down a used HP 48GX (or HP50G?), but I found this:

http://www.rpl2.net/

And I believe I will be able to execute programs written in RPL, which would be ideal!

So far so good but I can't seem to make it work on MacOSX (big sur 11.5.2). When I do ./configure it says:

Code:
configure: error: Can not find libXinerama !
. Problem: I have installed it with:

Code:
brew install libxinerama

I tried specifying the path directly:
Code:
./configure --with-xinerama=/usr/local/Cellar/libxinerama/1.1.4/lib

But with no success. Has anybody tried to compile RPL/2 on Mac? I don't see any reason why it would not work as it is Unix under the hood after all.

Thanks a lot for your help
Find all posts by this user
Quote this message in a reply
10-03-2021, 01:17 AM
Post: #2
RE: Trying to compile RPL/2 on MacOSX
I recently got RPL/2 running on Linux Debian 10.10 (with some help) but no success with Debian 11. Even though OSX is based on BSD and not Linux I wonder if something similar applies where there might be an incompatibility with the latest OSX version but not with an earlier OSX version. I wish I could be more helpful.

I was wondering if you might share the name of the textbook that includes RPL snippets. As far as mainstream math/engineering textbooks, occasionally I come across one with RPN (but not RPL) code. For example, Applied Analysis By the Hilbert Space Method (Dover Publications) by Samuel S. Holland Jr. (a different Holland than the author of the HP48SX Engineering Mathematics Library) includes several HP15c code snippets but I haven't come across any books (except ones with specific HP calculator models in their title) that include RPL code.

Thanks and I hope you get a reply from someone with direct experience compiling RPL/2 on MacOSX.
Find all posts by this user
Quote this message in a reply
10-03-2021, 08:31 AM
Post: #3
RE: Trying to compile RPL/2 on MacOSX
Hello Carey and thanks for your answer

I managed to install it on another laptop running... Debian 11 bullseye (which I believed is the latest version). Apart from installing the missing libraries with the package manager (among them, if I recall correctly, there were "sharutils", "build-essential" "bison" "flex", "libz-dev"), the only trouble I ran into was related to something called "aclocal". I followed this answer on SO:

https://stackoverflow.com/a/46354308

to install, from source, aclocal version 1.15.

In case the answer on SO is somehow deleted, here is the code to build, install and use aclocal-1.15:

Code:

wget https://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz
tar -xzvf automake-1.15.tar.gz
cd automake-1.15
./configure  --prefix=/opt/aclocal-1.15
make
sudo mkdir -p /opt
sudo make install
export PATH=/opt/aclocal-1.15/bin:$PATH
aclocal --version

As for the textbook, it is an old one written in French called "cours de mathématiques supérieures" by A. Mézard and C. Delorme. It contains some RPL snippets, and is more about pure mathematics than programming.
Find all posts by this user
Quote this message in a reply
10-03-2021, 09:55 AM
Post: #4
RE: Trying to compile RPL/2 on MacOSX
(10-02-2021 09:05 PM)fricadelle Wrote:  But with no success. Has anybody tried to compile RPL/2 on Mac? I don't see any reason why it would not work as it is Unix under the hood after all.

This is because libxinerama depends on X11 librairies. The command "configure" runs is:

gcc -o conftest -g -O2 -O2 -fno-strict-overflow conftest.c -lXinerama -lc -lm -lXt -lX11 -lXext -L/usr/local/lib -lXinerama

And it fails because:

ld: library not found for -lXt

But it reports "Can not find libXinerama !".

Maybe you can compile it with XQuartz install and run it under X11 but this is the reason it works under Linux and not OSX: different graphic environments.
Find all posts by this user
Quote this message in a reply
10-03-2021, 12:53 PM
Post: #5
RE: Trying to compile RPL/2 on MacOSX
That's great that you were able to install RPL/2 on Debian 11 and thanks for the details on aclocal-1.15 and the textbook!

If I'm correct, RPL/2 was a spinoff of HP28 series RPL so if the RPL snippets in the textbook utilize RPL features from the HP48 series or higher you may want to try a calculator emulator (e.g., Christoph Gießelink's excellent EMU48) available on hpcalc.org.
Find all posts by this user
Quote this message in a reply
11-17-2021, 08:52 PM
Post: #6
RE: Trying to compile RPL/2 on MacOSX
Emu48 is good.. Also for android Droid48, but as OsX user, you porpably have iSmartDevice

Or Claudio et al. newRPL
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)