apvlv icon indicating copy to clipboard operation
apvlv copied to clipboard

How do I build apvlv?

Open igavronski opened this issue 3 years ago • 5 comments

Ubuntu repositories for apvlv are very outdated. They have 0.1.5-rel I would like to build apvlv from the source but could not find the instructions on GitHub. Can you please update the readme file with some instructions for building it from the source?

igavronski avatar Sep 02 '21 11:09 igavronski

just press: cmake make make install

naihe2010 avatar Sep 07 '21 04:09 naihe2010

I tried the following and I am having trouble. Can you help me? What I have so far:

 git clone https://github.com/naihe2010/apvlv
 cd apvlv
 cd src
 sudo apt install libwebkit2gtk-4.0-dev
 sudo apt install libpoppler-glib-dev
 sudo apt install libepub-dev
 cmake .
 gvim CMakeLists.txt
 --- add project(apvlv) on line 1 ---
 cmake .
 make

Output of the make command:

[  5%] Building CXX object CMakeFiles/apvlv.dir/ApvlvMenu.o
/home/iuri/apvlv/src/ApvlvMenu.cc: In function ‘void apvlv::apvlv_menu_on_help_about()’:
/home/iuri/apvlv/src/ApvlvMenu.cc:136:62: error: ‘PACKAGE_NAME’ was not declared in this scope
  136 |   gtk_about_dialog_set_program_name (GTK_ABOUT_DIALOG (dia), PACKAGE_NAME);
      |                                                              ^~~~~~~~~~~~
/home/iuri/apvlv/src/ApvlvMenu.cc:137:57: error: ‘PACKAGE_VERSION’ was not declared in this scope; did you mean ‘PANGO_VERSION’?
  137 |   gtk_about_dialog_set_version (GTK_ABOUT_DIALOG (dia), PACKAGE_VERSION);
      |                                                         ^~~~~~~~~~~~~~~
      |                                                         PANGO_VERSION
make[2]: *** [CMakeFiles/apvlv.dir/build.make:141: CMakeFiles/apvlv.dir/ApvlvMenu.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/apvlv.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

Thanks in advance!

igavronski avatar Nov 04 '21 14:11 igavronski

@naihe2010 I had to sudo apt install ghostscript and instead of cd ~/apvlv/src, run cmake . from cd ~/apvlv Then, the following occurs:

12:01 $ make
[  0%] Built target Startup.pdf
[  5%] Building CXX object src/CMakeFiles/apvlv.dir/ApvlvCmds.cc.o
[ 11%] Building CXX object src/CMakeFiles/apvlv.dir/ApvlvCore.cc.o
[ 17%] Building CXX object src/CMakeFiles/apvlv.dir/ApvlvDoc.cc.o
[ 23%] Building CXX object src/CMakeFiles/apvlv.dir/ApvlvFile.cc.o
[ 29%] Building CXX object src/CMakeFiles/apvlv.dir/ApvlvPdf.cc.o
[ 35%] Building CXX object src/CMakeFiles/apvlv.dir/ApvlvInfo.cc.o
[ 41%] Building CXX object src/CMakeFiles/apvlv.dir/ApvlvMenu.cc.o
[ 47%] Building CXX object src/CMakeFiles/apvlv.dir/ApvlvParams.cc.o
[ 52%] Building CXX object src/CMakeFiles/apvlv.dir/ApvlvUtil.cc.o
/home/iuri/apvlv/src/ApvlvUtil.cc: In function ‘void apvlv::apvlv_widget_set_background(GtkWidget*)’:
/home/iuri/apvlv/src/ApvlvUtil.cc:248:78: warning: ‘void gtk_widget_override_background_color(GtkWidget*, GtkStateFlags, const GdkRGBA*)’ is deprecated [-Wdeprecated-declarations]
  248 |       gtk_widget_override_background_color (wid, GTK_STATE_FLAG_NORMAL, &rgba);
      |                                                                              ^
In file included from /usr/include/gtk-3.0/gtk/gtkapplication.h:27,
                 from /usr/include/gtk-3.0/gtk/gtkwindow.h:33,
                 from /usr/include/gtk-3.0/gtk/gtkdialog.h:32,
                 from /usr/include/gtk-3.0/gtk/gtkaboutdialog.h:30,
                 from /usr/include/gtk-3.0/gtk/gtk.h:31,
                 from /home/iuri/apvlv/src/ApvlvUtil.h:32,
                 from /home/iuri/apvlv/src/ApvlvUtil.cc:29:
/usr/include/gtk-3.0/gtk/gtkwidget.h:1148:14: note: declared here
 1148 | void         gtk_widget_override_background_color (GtkWidget     *widget,
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/iuri/apvlv/src/ApvlvUtil.cc:248:78: warning: ‘void gtk_widget_override_background_color(GtkWidget*, GtkStateFlags, const GdkRGBA*)’ is deprecated [-Wdeprecated-declarations]
  248 |       gtk_widget_override_background_color (wid, GTK_STATE_FLAG_NORMAL, &rgba);
      |                                                                              ^
In file included from /usr/include/gtk-3.0/gtk/gtkapplication.h:27,
                 from /usr/include/gtk-3.0/gtk/gtkwindow.h:33,
                 from /usr/include/gtk-3.0/gtk/gtkdialog.h:32,
                 from /usr/include/gtk-3.0/gtk/gtkaboutdialog.h:30,
                 from /usr/include/gtk-3.0/gtk/gtk.h:31,
                 from /home/iuri/apvlv/src/ApvlvUtil.h:32,
                 from /home/iuri/apvlv/src/ApvlvUtil.cc:29:
/usr/include/gtk-3.0/gtk/gtkwidget.h:1148:14: note: declared here
 1148 | void         gtk_widget_override_background_color (GtkWidget     *widget,
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 58%] Building CXX object src/CMakeFiles/apvlv.dir/ApvlvView.cc.o
[ 64%] Building CXX object src/CMakeFiles/apvlv.dir/ApvlvWindow.cc.o
[ 70%] Building CXX object src/CMakeFiles/apvlv.dir/ApvlvCompletion.cc.o
[ 76%] Building CXX object src/CMakeFiles/apvlv.dir/ApvlvHtm.cc.o
[ 82%] Building CXX object src/CMakeFiles/apvlv.dir/ApvlvEpub.cc.o
[ 88%] Building CXX object src/CMakeFiles/apvlv.dir/ApvlvContent.cc.o
[ 94%] Building CXX object src/CMakeFiles/apvlv.dir/main.cc.o
[100%] Linking CXX executable apvlv
[100%] Built target apvlv
12:01 $ sudo make install
[  0%] Built target Startup.pdf
[100%] Built target apvlv
Install the project...
-- Install configuration: ""
-- Up-to-date: /etc/apvlvrc
-- Up-to-date: /usr/local/share/doc/apvlv/apvlvrc.example
-- Installing: /usr/local/share/doc/apvlv/Startup.pdf
-- Up-to-date: /usr/local/share/doc/apvlv/main_menubar.glade
-- Up-to-date: /usr/local/share/doc/apvlv/icons
-- Up-to-date: /usr/local/share/doc/apvlv/icons/dir.png
-- Up-to-date: /usr/local/share/doc/apvlv/icons/pdf.png
-- Up-to-date: /usr/local/share/doc/apvlv/icons/reg.png
-- Up-to-date: /usr/local/share/man/man1/apvlv.1
-- Up-to-date: /usr/local/share/applications/apvlv.desktop
-- Installing: /usr/local/bin/apvlv
12:03 $ apvlv
-bash: /usr/bin/apvlv: No such file or directory
12:04 $ ./src/apvlv

(apvlv:14837): Gtk-WARNING **: 12:04:19.539: Could not find signal handler 'apvlv_menu_on_help_about'.  Did you compile with -rdynamic?

(apvlv:14837): Gtk-WARNING **: 12:04:19.539: Could not find signal handler 'apvlv_menu_on_tools_jumpback'.  Did you compile with -rdynamic?

(apvlv:14837): Gtk-WARNING **: 12:04:19.539: Could not find signal handler 'apvlv_menu_on_tools_jumpto'.  Did you compile with -rdynamic?

(apvlv:14837): Gtk-WARNING **: 12:04:19.539: Could not find signal handler 'apvlv_menu_on_page_scrolldown'.  Did you compile with -rdynamic?

(apvlv:14837): Gtk-WARNING **: 12:04:19.540: Could not find signal handler 'apvlv_menu_on_page_scrollup'.  Did you compile with -rdynamic?

(apvlv:14837): Gtk-WARNING **: 12:04:19.540: Could not find signal handler 'apvlv_menu_on_page_next'.  Did you compile with -rdynamic?

(apvlv:14837): Gtk-WARNING **: 12:04:19.540: Could not find signal handler 'apvlv_menu_on_page_previous'.  Did you compile with -rdynamic?

(apvlv:14837): Gtk-WARNING **: 12:04:19.540: Could not find signal handler 'apvlv_menu_on_file_quit'.  Did you compile with -rdynamic?

(apvlv:14837): Gtk-WARNING **: 12:04:19.540: Could not find signal handler 'apvlv_menu_on_file_print'.  Did you compile with -rdynamic?

(apvlv:14837): Gtk-WARNING **: 12:04:19.540: Could not find signal handler 'apvlv_menu_on_file_saveas'.  Did you compile with -rdynamic?

(apvlv:14837): Gtk-WARNING **: 12:04:19.540: Could not find signal handler 'apvlv_menu_on_file_opentab'.  Did you compile with -rdynamic?

(apvlv:14837): Gtk-WARNING **: 12:04:19.540: Could not find signal handler 'apvlv_menu_on_file_open'.  Did you compile with -rdynamic?
12:05 $

igavronski avatar Nov 04 '21 15:11 igavronski

@naihe2010 I undid the changes to src/CMakeLists.txt and started again. Apparently, it now installed to the right place and opened the PDF file. However, when I click on any bookmarks, I got the following errors:


(apvlv:15329): GLib-CRITICAL **: 12:23:57.183: Source ID 69 was not found when attempting to remove it

(apvlv:15329): GLib-CRITICAL **: 12:24:23.839: Source ID 678 was not found when attempting to remove it

(apvlv:15329): Gtk-WARNING **: 12:24:54.435: Theme parsing error: <data>:1:19: Not using units is deprecated. Assuming 'px'.

(apvlv:15329): Gtk-WARNING **: 12:25:12.386: Theme parsing error: <data>:1:19: Not using units is deprecated. Assuming 'px'.

** (apvlv:15329): CRITICAL **: 12:25:20.482: bool apvlv::ApvlvDocCache::getAvailableSpace(apvlv::ApvlvPos, apvlv::ApvlvPos*): assertion '!mLines.empty ()' failed

(apvlv:15329): GLib-CRITICAL **: 12:25:23.425: Source ID 1239 was not found when attempting to remove it

Please advise!

igavronski avatar Nov 04 '21 15:11 igavronski

Still not able to comment or highlight any pdf file. Please advise.

$ apvlv -v
apvlv 0.4.38198fd-rel
Please send bug report to Alf <[email protected]>

@naihe2010

igavronski avatar Dec 03 '21 19:12 igavronski