Skip to content

Installation

Niklaus Schen edited this page Nov 11, 2023 · 6 revisions

Installation

Meproc is written in Melang scripting language. So we just need to install Melang interpreter.

And Melang is derived from a C core library named Melon, so it should be installed at first.

You can pull the built container image to run it.

docker pull melonc/meproc

Now, let me show you how to install Melon, Melang and Meproc on UNIX/Linux. If you are a Windows developer, please refer to the Github repository of Melon for more details. We will install them with default installation parameters.

Step 1. Install Melon

git clone https://github.com/Water-Melon/Melon.git
cd Melon
./configure
make
sudo make install

It will be installed at /usr/local/melon.

But this path is not the default library search path, so there are several solutions to resolve the loading issue during compilation and runtime.

Compilation

We can create symbolic links in /usr/lib and /usr/include to the lib and include subdirectories of our library installation path.

ln -s /usr/local/melon/conf /etc/melon
ln -s /usr/local/melon/lib/libmelon.* /usr/lib/
ln -s /usr/local/melon/include /usr/include/melon

In this example, we also create a symbolic link for its configuration.

Runtime

When using Melon's dynamic library, the path to the library needs to be added to the system configuration

sudo echo "/usr/local/melon/lib/" >> /etc/ld.so.conf
sudo ldconfig

Or use the command given below to solve dynamic library not found problem:

export LD_LIBRARY_PATH=/path/to/melon/libdir:$LD_LIBRARY_PATH

Step 2. Install Melang

git clone https://github.com/Water-Melon/Melon.git
cd Melon
./configure
make all
sudo make install

Now we can use melang to run a Melang program.

Step 3. Install Meproc

git clone https://github.comMelonCTech/Meproc.git

That's all.

The End

Now, we can start up Meproc.

melang Meproc/meproc.m

You will see the output of Meproc.

11/10/2023 16:19:12 UTC [INFO]: Listen: 0.0.0.0:8606
Clone this wiki locally