nkh / P5-App-Asciio

Plain ASCII diagram
https://nkh.github.io/P5-App-Asciio/
54 stars 4 forks source link

Install instructions on Debian #12

Closed ceremcem closed 1 year ago

ceremcem commented 1 year ago

How do we install this app on Debian? perl Makefile.PL generates the Makefile, then issuing make prints the following:

/usr/bin/perl Build --makefile_env_macros 1
Building App-Asciio

And then nothing happens. I tried to run the app by:

$ perl lib/App/Asciio.pm 
Can't locate Eval/Context.pm in @INC (you may need to install the Eval::Context module) (@INC contains: /home/ceremcem/perl5/lib/perl5/5.32.1/x86_64-linux-gnu-thread-multi /home/ceremcem/perl5/lib/perl5/5.32.1 /home/ceremcem/perl5/lib/perl5/x86_64-linux-gnu-thread-multi /home/ceremcem/perl5/lib/perl5 /home/ceremcem/perl5/lib/perl5/5.32.1/x86_64-linux-gnu-thread-multi /home/ceremcem/perl5/lib/perl5/5.32.1 /home/ceremcem/perl5/lib/perl5/x86_64-linux-gnu-thread-multi /home/ceremcem/perl5/lib/perl5 /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.32.1 /usr/local/share/perl/5.32.1 /usr/lib/x86_64-linux-gnu/perl5/5.32 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.32 /usr/share/perl/5.32 /home/ceremcem/perl5/lib/perl5/5.32.0 /home/ceremcem/perl5/lib/perl5/5.32.0/x86_64-linux-gnu-thread-multi /home/ceremcem/perl5/lib/perl5/5.32.0 /home/ceremcem/perl5/lib/perl5/5.32.0/x86_64-linux-gnu-thread-multi /usr/local/lib/site_perl) at /usr/share/perl5/App/Asciio/Setup.pm line 10.
BEGIN failed--compilation aborted at /usr/share/perl5/App/Asciio/Setup.pm line 10.
Compilation failed in require at lib/App/Asciio.pm line 15.
BEGIN failed--compilation aborted at lib/App/Asciio.pm line 15.

I installed the module via cpan but it didn't help. Installing the module via sudo apt install libeval-context-perl did something, and running the app again gave the following error:

$ perl lib/App/Asciio.pm 
Can't locate App/Asciio/Setup.pm in @INC (you may need to install the App::Asciio::Setup module) (@INC contains: /home/ceremcem/perl5/lib/perl5/5.32.1/x86_64-linux-gnu-thread-multi /home/ceremcem/perl5/lib/perl5/5.32.1 /home/ceremcem/perl5/lib/perl5/x86_64-linux-gnu-thread-multi /home/ceremcem/perl5/lib/perl5 /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.32.1 /usr/local/share/perl/5.32.1 /usr/lib/x86_64-linux-gnu/perl5/5.32 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.32 /usr/share/perl/5.32 /home/ceremcem/perl5/lib/perl5/5.32.0 /home/ceremcem/perl5/lib/perl5/5.32.0/x86_64-linux-gnu-thread-multi /usr/local/lib/site_perl) at lib/App/Asciio.pm line 15.
BEGIN failed--compilation aborted at lib/App/Asciio.pm line 15.
nkh commented 1 year ago

I guess that you are installing the latest version.

I've never used "--makefile_env_macros 1", don't even know what it does,

asciio is started by running "asciio" after you've installed. During development/test you can run script/A which will set the library path properly.

ceremcem commented 1 year ago

--makefile_env_macros 1 is issued by the automatically generated Makefile.

Sorry, it's unclear how to install the app in Debian.

sudo make install

installs asciio to $HOME/perl5/...but fails to run because of unmet dependencies. Installing deps viacpan` does not work.

Installing the deps via apt works (the error message changes) but I couldn't find all the dependencies so it keeps printing a different error message as I keep installing the current dependency in the error output.

nkh commented 1 year ago

run: perl Build.pl then: ./build install

nkh commented 1 year ago

You can also run: ./build installdeps

post the whole output here

ceremcem commented 1 year ago

What I did is:

$ sudo apt install libeval-context-perl libdirectory-scratch-structured-perl
$ sudo ./Build installdeps 
All prerequisites satisfied
$ perl Build.PL
WARNING: the following files are missing in your kit:
    Changes
    META.yml
    README
Please inform the author.

Created MYMETA.yml and MYMETA.json
Creating new 'Build' script for 'App-Asciio' version '1.7'

$ sudo ./Build install
Building App-Asciio

It throw the following error when I run the app:

$ asciio
Can't locate Pango.pm in @INC (you may need to install the Pango module) (@INC contains: /home/ceremcem/perl5/lib/perl5/5.32.1/x86_64-linux-gnu-thread-multi /home/ceremcem/perl5/lib/perl5/5.32.1 /home/ceremcem/perl5/lib/perl5/x86_64-linux-gnu-thread-multi /home/ceremcem/perl5/lib/perl5 /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.32.1 /usr/local/share/perl/5.32.1 /usr/lib/x86_64-linux-gnu/perl5/5.32 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.32 /usr/share/perl/5.32 /home/ceremcem/perl5/lib/perl5/5.32.0 /home/ceremcem/perl5/lib/perl5/5.32.0/x86_64-linux-gnu-thread-multi /usr/local/lib/site_perl) at /home/ceremcem/perl5/lib/perl5/App/Asciio/GTK/Asciio.pm line 13.
BEGIN failed--compilation aborted at /home/ceremcem/perl5/lib/perl5/App/Asciio/GTK/Asciio.pm line 13.
Compilation failed in require at /home/ceremcem/perl5/bin/asciio line 12.
BEGIN failed--compilation aborted at /home/ceremcem/perl5/bin/asciio line 12.

I installed the module via apt install libpango-perl and the next error is:

GLib-GObject-CRITICAL **: g_boxed_type_register_static: assertion 'g_type_from_name (name) == 0' failed at /usr/lib/x86_64-linux-gnu/perl-base/DynaLoader.pm line 204.
GLib-GObject-CRITICAL **: g_boxed_type_register_static: assertion 'g_type_from_name (name) == 0' failed at /usr/lib/x86_64-linux-gnu/perl-base/DynaLoader.pm line 204.
GLib-GObject-CRITICAL **: g_boxed_type_register_static: assertion 'g_type_from_name (name) == 0' failed at /usr/lib/x86_64-linux-gnu/perl-base/DynaLoader.pm line 204.
GLib-GObject-CRITICAL **: g_boxed_type_register_static: assertion 'g_type_from_name (name) == 0' failed at /usr/lib/x86_64-linux-gnu/perl-base/DynaLoader.pm line 204.
Can't locate Data/TreeDumper/Renderer/GTK.pm in @INC (you may need to install the Data::TreeDumper::Renderer::GTK module) (@INC contains: /home/ceremcem/perl5/lib/perl5/5.32.1/x86_64-linux-gnu-thread-multi /home/ceremcem/perl5/lib/perl5/5.32.1 /home/ceremcem/perl5/lib/perl5/x86_64-linux-gnu-thread-multi /home/ceremcem/perl5/lib/perl5 /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.32.1 /usr/local/share/perl/5.32.1 /usr/lib/x86_64-linux-gnu/perl5/5.32 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.32 /usr/share/perl/5.32 /home/ceremcem/perl5/lib/perl5/5.32.0 /home/ceremcem/perl5/lib/perl5/5.32.0/x86_64-linux-gnu-thread-multi /usr/local/lib/site_perl) at /home/ceremcem/perl5/lib/perl5/App/Asciio/GTK/Asciio/Dialogs.pm line 9.
BEGIN failed--compilation aborted at /home/ceremcem/perl5/lib/perl5/App/Asciio/GTK/Asciio/Dialogs.pm line 9.
Compilation failed in require at /home/ceremcem/perl5/lib/perl5/App/Asciio/GTK/Asciio.pm line 28.
BEGIN failed--compilation aborted at /home/ceremcem/perl5/lib/perl5/App/Asciio/GTK/Asciio.pm line 28.
Compilation failed in require at /home/ceremcem/perl5/bin/asciio line 12.
BEGIN failed--compilation aborted at /home/ceremcem/perl5/bin/asciio line 12.
nkh commented 1 year ago

You're getting close!

You need this module: https://github.com/nkh/P5-Data-TreeDumper-Renderer-GTK

as you can see in the commits it's a port to gtk3

install from source. this one has a Makefile.PL.

let me know how it goes

ceremcem commented 1 year ago

I installed https://github.com/nkh/P5-Data-TreeDumper-Renderer-GTK as it says in the Readme and it went OK.

After running asciio, new error was Can not find File::HomeDir module error.

sudo apt install libfile-homedir-perl 

And voilà!

image

nkh commented 1 year ago

Well done!

Could you please write down the process you hd to follow? That would help me making it easier to install.

The new version is a completely different beast, apart the port to gkt3, it is much faster and made to handle large diagrams.

The keyboard bindings have changed, to the better, and are more vim like.

There's also a terminal version, TUI, it's experimental but already stable.

If you install https://github.com/blampe/goat, you'll be able to export to SVG.

To use Chinese and Korean you'll need a font that supports it, if you write in another language, non european, please let me know how it goes.

nkh commented 1 year ago

perldoc App::Asciio will display the documentation with all the bindings, it's much, and I mean MUCH, faster to use the keyboard than the mouse.

nkh commented 1 year ago

the binding ":m" will open a browser with the man page.

ceremcem commented 1 year ago

Overall install instructions are as follows (I think):

$ sudo apt install libeval-context-perl libdirectory-scratch-structured-perl libfile-homedir-perl libgtk3-perl
$ git clone https://github.com/nkh/P5-Data-TreeDumper-Renderer-GTK # and follow the README to install 
$ git clone https://github.com/nkh/P5-App-Asciio
$ cd P5-App-Asciio
$ ./Build installdeps 
All prerequisites satisfied
$ perl Build.PL
$ ./Build install
$ asciio

For the Terminal Asciio (tasciio) install the following packages:

$ sudo apt install libterm-size-any-perl libio-prompter-perl libterm-termkey-perl
nkh commented 1 year ago

you can also try tasciio in a terminal

nkh commented 1 year ago

didn't you have to install the perl gtk 3 bindings?

ceremcem commented 1 year ago

didn't you have to install the perl gtk 3 bindings?

I checked my system and libgtk3-perl is installed. I must have installed and forgot to mention here. I'm editing my previous answer.

ceremcem commented 1 year ago

I also updated the answer for tasciio dependencies.