- WooCommerce REST API PHP Client Library
“A PHP wrapper for the WooCommerce REST API. Easily interact with the WooCommerce REST API using this library.”
PHP Client: https://github.com/kloon/WooCommerce-REST-API-Client-Library
It still supports the OAuth 1 one-legged (use consumer key and secret for the authentication), limited OOP, no test
Tutorial: https://www.skyverge.com/blog/using-woocommerce-rest-api-introduction/
https://www.skyverge.com/blog/using-woocommerce-rest-api-orders-endpoint/ (complete with curl and Http implementations and samples result)
Great tutorial to use/extend woocommerce: https://www.skyverge.com/blog/category/tutorials/woocommerce-tutorials/.
Month: February 2017
Removing Old Kernel of Ubuntu 14.04 Safely
References: https://help.ubuntu.com/community/RemoveOldKernels
http://blog.dustinkirkland.com/2016/06/purge-old-kernels.html
http://www.webupd8.org/2016/07/how-to-safely-remove-old-linux-kernels.html
My current running kernel:
|
1 2 |
teddy@teddy-K43SJ:~$ uname -r 4.4.0-62-generic |
List of all kernel I have:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
teddy@teddy-K43SJ:~$ dpkg -l | tail -n +6 | grep -E 'linux-image-[0-9]+' | grep -Fv $(uname -r) ii linux-image-3.13.0-100-generic-tuxonice 3.13.0-100.147~ppa1 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP ii linux-image-3.13.0-101-generic-tuxonice 3.13.0-101.148~ppa1 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP ii linux-image-3.13.0-103-generic-tuxonice 3.13.0-103.150~ppa1 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP ii linux-image-3.13.0-106-generic-tuxonice 3.13.0-106.153~ppa1 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP ii linux-image-3.13.0-107-generic-tuxonice 3.13.0-107.154~ppa1 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP ii linux-image-3.13.0-108-generic-tuxonice 3.13.0-108.155~ppa1 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP ii linux-image-3.13.0-76-generic-tuxonice 3.13.0-76.120~ppa2 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP ii linux-image-3.13.0-77-generic-tuxonice 3.13.0-77.121~ppa1 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP ii linux-image-3.13.0-79-generic-tuxonice 3.13.0-79.123~ppa1 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP ii linux-image-3.13.0-83-generic-tuxonice 3.13.0-83.127~ppa1 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP ii linux-image-3.13.0-85-generic-tuxonice 3.13.0-85.129~ppa1 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP ii linux-image-3.13.0-86-generic-tuxonice 3.13.0-86.131~ppa2 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP ii linux-image-3.13.0-87-generic-tuxonice 3.13.0-87.133~ppa1 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP ii linux-image-3.13.0-88-generic-tuxonice 3.13.0-88.135~ppa1 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP ii linux-image-3.13.0-91-generic-tuxonice 3.13.0-91.138~ppa1 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP ii linux-image-3.13.0-92-generic-tuxonice 3.13.0-92.139~ppa1 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP ii linux-image-3.13.0-93-generic-tuxonice 3.13.0-93.140~ppa1 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP ii linux-image-3.13.0-95-generic-tuxonice 3.13.0-95.142~ppa1 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP ii linux-image-3.13.0-96-generic-tuxonice 3.13.0-96.143~ppa1 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP ii linux-image-3.13.0-98-generic-tuxonice 3.13.0-98.145~ppa1 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP ii linux-image-3.19.0-25-generic 3.19.0-25.26~14.04.1 amd64 Linux kernel image for version 3.19.0 on 64 bit x86 SMP ii linux-image-3.19.0-43-generic 3.19.0-43.49~14.04.1 amd64 Linux kernel image for version 3.19.0 on 64 bit x86 SMP ii linux-image-3.19.0-47-generic 3.19.0-47.53~14.04.1 amd64 Linux kernel image for version 3.19.0 on 64 bit x86 SMP ii linux-image-3.19.0-49-generic 3.19.0-49.55~14.04.1 amd64 Linux kernel image for version 3.19.0 on 64 bit x86 SMP ii linux-image-3.19.0-51-generic 3.19.0-51.58~14.04.1 amd64 Linux kernel image for version 3.19.0 on 64 bit x86 SMP ii linux-image-3.19.0-56-generic 3.19.0-56.62~14.04.1 amd64 Linux kernel image for version 3.19.0 on 64 bit x86 SMP ii linux-image-3.19.0-58-generic 3.19.0-58.64~14.04.1 amd64 Linux kernel image for version 3.19.0 on 64 bit x86 SMP ii linux-image-3.19.0-59-generic 3.19.0-59.66~14.04.1 amd64 Linux kernel image for version 3.19.0 on 64 bit x86 SMP ii linux-image-3.19.0-61-generic 3.19.0-61.69~14.04.1 amd64 Linux kernel image for version 3.19.0 on 64 bit x86 SMP ii linux-image-3.19.0-64-generic 3.19.0-64.72~14.04.1 amd64 Linux kernel image for version 3.19.0 on 64 bit x86 SMP ii linux-image-3.19.0-65-generic 3.19.0-65.73~14.04.1 amd64 Linux kernel image for version 3.19.0 on 64 bit x86 SMP ii linux-image-3.19.0-66-generic 3.19.0-66.74~14.04.1 amd64 Linux kernel image for version 3.19.0 on 64 bit x86 SMP ii linux-image-3.19.0-68-generic 3.19.0-68.76~14.04.1 amd64 Linux kernel image for version 3.19.0 on 64 bit x86 SMP ii linux-image-3.19.0-69-generic 3.19.0-69.77~14.04.1 amd64 Linux kernel image for version 3.19.0 on 64 bit x86 SMP ii linux-image-3.19.0-71-generic 3.19.0-71.79~14.04.1 amd64 Linux kernel image for version 3.19.0 on 64 bit x86 SMP ii linux-image-3.19.0-73-generic 3.19.0-73.81~14.04.1 amd64 Linux kernel image for version 3.19.0 on 64 bit x86 SMP ii linux-image-3.19.0-74-generic 3.19.0-74.82~14.04.1 amd64 Linux kernel image for version 3.19.0 on 64 bit x86 SMP ii linux-image-3.19.0-75-generic 3.19.0-75.83~14.04.1 amd64 Linux kernel image for version 3.19.0 on 64 bit x86 SMP ii linux-image-3.19.0-77-generic 3.19.0-77.85~14.04.1 amd64 Linux kernel image for version 3.19.0 on 64 bit x86 SMP ii linux-image-3.19.0-78-generic 3.19.0-78.86~14.04.1 amd64 Linux kernel image for version 3.19.0 on 64 bit x86 SMP ii linux-image-3.19.0-79-generic 3.19.0-79.87~14.04.1 amd64 Linux kernel image for version 3.19.0 on 64 bit x86 SMP ii linux-image-3.19.0-80-generic 3.19.0-80.88~14.04.1 amd64 Linux kernel image for version 3.19.0 on 64 bit x86 SMP ii linux-image-4.4.0-34-generic 4.4.0-34.53~14.04.1 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP ii linux-image-4.4.0-36-generic 4.4.0-36.55~14.04.1 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP ii linux-image-4.4.0-38-generic 4.4.0-38.57~14.04.1 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP ii linux-image-4.4.0-42-generic 4.4.0-42.62~14.04.1 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP ii linux-image-4.4.0-45-generic 4.4.0-45.66~14.04.1 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP ii linux-image-4.4.0-47-generic 4.4.0-47.68~14.04.1 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP ii linux-image-4.4.0-51-generic 4.4.0-51.72~14.04.1 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP ii linux-image-4.4.0-53-generic 4.4.0-53.74~14.04.1 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP ii linux-image-4.4.0-57-generic 4.4.0-57.78~14.04.1 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP ii linux-image-4.4.0-59-generic 4.4.0-59.80~14.04.1 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP |
Oh man. My machine still keep the kernel 3.xx.xx. It’s already version 4.4.x now! I need to remove the old ones. I got this command ‘sudo purge-old-kernels’ can remove them. The website says:
“purge-old-kernels will remove old kernel and header packages from the system, freeing disk space. It will never remove the currently running kernel. By default, it will keep at least the latest 2 kernels, but the user can override that value using the –keep parameter. Any additional parameters will be passed directly to apt-get(8).”
But first update my system and install ‘bikeshed’
|
1 2 |
teddy@teddy-K43SJ:~$ sudo apt-get update teddy@teddy-K43SJ:~$ sudo apt-get install bikeshed |
then run ‘sudo purge-old-kernels’ command! (NOTE: READ THE KERNELS LISTED FIRST BEFORE TYPING ‘Y’ TO DELETE THEM! BE CAREFUL! CREATE A BACKUP FIRST!!!)
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
teddy@teddy-K43SJ:~$ sudo purge-old-kernels Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: linux-generic-lts-vivid* linux-headers-3.13.0-100-generic-tuxonice* linux-headers-3.13.0-101-generic-tuxonice* linux-headers-3.13.0-103-generic-tuxonice* linux-headers-3.13.0-106-generic-tuxonice* linux-headers-3.13.0-107-generic-tuxonice* linux-headers-3.13.0-76-generic-tuxonice* linux-headers-3.13.0-77-generic-tuxonice* linux-headers-3.13.0-79-generic-tuxonice* linux-headers-3.13.0-83-generic-tuxonice* linux-headers-3.13.0-85-generic-tuxonice* linux-headers-3.13.0-86-generic-tuxonice* linux-headers-3.13.0-87-generic-tuxonice* linux-headers-3.13.0-88-generic-tuxonice* linux-headers-3.13.0-91-generic-tuxonice* linux-headers-3.13.0-92-generic-tuxonice* linux-headers-3.13.0-93-generic-tuxonice* linux-headers-3.13.0-95-generic-tuxonice* linux-headers-3.13.0-96-generic-tuxonice* linux-headers-3.13.0-98-generic-tuxonice* linux-headers-3.19.0-25-generic* linux-headers-3.19.0-43-generic* linux-headers-3.19.0-47-generic* linux-headers-3.19.0-49-generic* linux-headers-3.19.0-51-generic* linux-headers-3.19.0-56-generic* linux-headers-3.19.0-58-generic* linux-headers-3.19.0-59-generic* linux-headers-3.19.0-61-generic* linux-headers-3.19.0-64-generic* linux-headers-3.19.0-65-generic* linux-headers-3.19.0-66-generic* linux-headers-3.19.0-68-generic* linux-headers-3.19.0-69-generic* linux-headers-3.19.0-71-generic* linux-headers-3.19.0-73-generic* linux-headers-3.19.0-74-generic* linux-headers-3.19.0-75-generic* linux-headers-3.19.0-77-generic* linux-headers-3.19.0-78-generic* linux-headers-3.19.0-79-generic* linux-headers-3.19.0-80-generic* linux-headers-4.4.0-34-generic* linux-headers-4.4.0-36-generic* linux-headers-4.4.0-38-generic* linux-headers-4.4.0-42-generic* linux-headers-4.4.0-45-generic* linux-headers-4.4.0-47-generic* linux-headers-4.4.0-51-generic* linux-headers-4.4.0-53-generic* linux-headers-4.4.0-57-generic* linux-headers-4.4.0-59-generic* linux-headers-generic-lts-vivid* linux-image-3.13.0-100-generic-tuxonice* linux-image-3.13.0-101-generic-tuxonice* linux-image-3.13.0-103-generic-tuxonice* linux-image-3.13.0-106-generic-tuxonice* linux-image-3.13.0-107-generic-tuxonice* linux-image-3.13.0-76-generic-tuxonice* linux-image-3.13.0-77-generic-tuxonice* linux-image-3.13.0-79-generic-tuxonice* linux-image-3.13.0-83-generic-tuxonice* linux-image-3.13.0-85-generic-tuxonice* linux-image-3.13.0-86-generic-tuxonice* linux-image-3.13.0-87-generic-tuxonice* linux-image-3.13.0-88-generic-tuxonice* linux-image-3.13.0-91-generic-tuxonice* linux-image-3.13.0-92-generic-tuxonice* linux-image-3.13.0-93-generic-tuxonice* linux-image-3.13.0-95-generic-tuxonice* linux-image-3.13.0-96-generic-tuxonice* linux-image-3.13.0-98-generic-tuxonice* linux-image-3.19.0-25-generic* linux-image-3.19.0-43-generic* linux-image-3.19.0-47-generic* linux-image-3.19.0-49-generic* linux-image-3.19.0-51-generic* linux-image-3.19.0-56-generic* linux-image-3.19.0-58-generic* linux-image-3.19.0-59-generic* linux-image-3.19.0-61-generic* linux-image-3.19.0-64-generic* linux-image-3.19.0-65-generic* linux-image-3.19.0-66-generic* linux-image-3.19.0-68-generic* linux-image-3.19.0-69-generic* linux-image-3.19.0-71-generic* linux-image-3.19.0-73-generic* linux-image-3.19.0-74-generic* linux-image-3.19.0-75-generic* linux-image-3.19.0-77-generic* linux-image-3.19.0-78-generic* linux-image-3.19.0-79-generic* linux-image-3.19.0-80-generic* linux-image-4.4.0-34-generic* linux-image-4.4.0-36-generic* linux-image-4.4.0-38-generic* linux-image-4.4.0-42-generic* linux-image-4.4.0-45-generic* linux-image-4.4.0-47-generic* linux-image-4.4.0-51-generic* linux-image-4.4.0-53-generic* linux-image-4.4.0-57-generic* linux-image-4.4.0-59-generic* linux-image-extra-3.13.0-100-generic-tuxonice* linux-image-extra-3.13.0-101-generic-tuxonice* linux-image-extra-3.13.0-103-generic-tuxonice* linux-image-extra-3.13.0-106-generic-tuxonice* linux-image-extra-3.13.0-107-generic-tuxonice* linux-image-extra-3.13.0-77-generic-tuxonice* linux-image-extra-3.13.0-79-generic-tuxonice* linux-image-extra-3.13.0-83-generic-tuxonice* linux-image-extra-3.13.0-85-generic-tuxonice* linux-image-extra-3.13.0-86-generic-tuxonice* linux-image-extra-3.13.0-87-generic-tuxonice* linux-image-extra-3.13.0-88-generic-tuxonice* linux-image-extra-3.13.0-91-generic-tuxonice* linux-image-extra-3.13.0-92-generic-tuxonice* linux-image-extra-3.13.0-93-generic-tuxonice* linux-image-extra-3.13.0-95-generic-tuxonice* linux-image-extra-3.13.0-96-generic-tuxonice* linux-image-extra-3.13.0-98-generic-tuxonice* linux-image-extra-3.19.0-43-generic* linux-image-extra-3.19.0-47-generic* linux-image-extra-3.19.0-49-generic* linux-image-extra-3.19.0-51-generic* linux-image-extra-3.19.0-56-generic* linux-image-extra-3.19.0-58-generic* linux-image-extra-3.19.0-59-generic* linux-image-extra-3.19.0-61-generic* linux-image-extra-3.19.0-64-generic* linux-image-extra-3.19.0-65-generic* linux-image-extra-3.19.0-66-generic* linux-image-extra-3.19.0-68-generic* linux-image-extra-3.19.0-69-generic* linux-image-extra-3.19.0-71-generic* linux-image-extra-3.19.0-73-generic* linux-image-extra-3.19.0-74-generic* linux-image-extra-3.19.0-75-generic* linux-image-extra-3.19.0-77-generic* linux-image-extra-3.19.0-78-generic* linux-image-extra-3.19.0-79-generic* linux-image-extra-3.19.0-80-generic* linux-image-extra-4.4.0-36-generic* linux-image-extra-4.4.0-38-generic* linux-image-extra-4.4.0-42-generic* linux-image-extra-4.4.0-45-generic* linux-image-extra-4.4.0-47-generic* linux-image-extra-4.4.0-51-generic* linux-image-extra-4.4.0-53-generic* linux-image-extra-4.4.0-57-generic* linux-image-extra-4.4.0-59-generic* linux-image-generic-lts-vivid* 0 upgraded, 0 newly installed, 153 to remove and 0 not upgraded. After this operation, 10,7 GB disk space will be freed. Do you want to continue? [Y/n] |
THE LAST KERNEL WOULD BE REMOVED IS ‘4.4.0-59’. My current kernel version is ‘4.4.0-62’. IT SAID WOULD FREE MY DISK SPACE FOR 10.7 GB!!!
IF YOU SURE, TYPE ‘Y’. HERE IS THE LAST PROCESS I CAN CAPTURE
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
... done Purging configuration files for linux-image-extra-4.4.0-59-generic (4.4.0-59.80~14.04.1) ... Removing linux-image-4.4.0-59-generic (4.4.0-59.80~14.04.1) ... Examining /etc/kernel/prerm.d. run-parts: executing /etc/kernel/prerm.d/dkms 4.4.0-59-generic /boot/vmlinuz-4.4.0-59-generic dkms: removing: bbswitch 0.7 (4.4.0-59-generic) (x86_64) -------- Uninstall Beginning -------- Module: bbswitch Version: 0.7 Kernel: 4.4.0-59-generic (x86_64) ------------------------------------- Status: Before uninstall, this module version was ACTIVE on this kernel. bbswitch.ko: - Uninstallation - Deleting from: /lib/modules/4.4.0-59-generic/updates/dkms/ - Original module - No original module was found for this module on this kernel. - Use the dkms install command to reinstall any previous module version. depmod.... DKMS: uninstall completed. dkms: removing: nvidia-367 367.57 (4.4.0-59-generic) (x86_64) -------- Uninstall Beginning -------- Module: nvidia-367 Version: 367.57 Kernel: 4.4.0-59-generic (x86_64) ------------------------------------- Status: Before uninstall, this module version was ACTIVE on this kernel. nvidia_367.ko: - Uninstallation - Deleting from: /lib/modules/4.4.0-59-generic/updates/dkms/ - Original module - No original module was found for this module on this kernel. - Use the dkms install command to reinstall any previous module version. nvidia_367_modeset.ko: - Uninstallation - Deleting from: /lib/modules/4.4.0-59-generic/updates/dkms/ - Original module - No original module was found for this module on this kernel. - Use the dkms install command to reinstall any previous module version. nvidia_367_drm.ko: - Uninstallation - Deleting from: /lib/modules/4.4.0-59-generic/updates/dkms/ - Original module - No original module was found for this module on this kernel. - Use the dkms install command to reinstall any previous module version. nvidia_367_uvm.ko: - Uninstallation - Deleting from: /lib/modules/4.4.0-59-generic/updates/dkms/ - Original module - No original module was found for this module on this kernel. - Use the dkms install command to reinstall any previous module version. depmod.... DKMS: uninstall completed. Examining /etc/kernel/postrm.d . run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.4.0-59-generic /boot/vmlinuz-4.4.0-59-generic update-initramfs: Deleting /boot/initrd.img-4.4.0-59-generic run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.4.0-59-generic /boot/vmlinuz-4.4.0-59-generic Generating grub configuration file ... Found linux image: /boot/vmlinuz-4.4.0-62-generic Found initrd image: /boot/initrd.img-4.4.0-62-generic Found linux image: /boot/vmlinuz-3.13.0-108-generic-tuxonice Found initrd image: /boot/initrd.img-3.13.0-108-generic-tuxonice Found memtest86+ image: /boot/memtest86+.elf Found memtest86+ image: /boot/memtest86+.bin Found Windows 10 (loader) on /dev/sda1 Found Windows 10 (loader) on /dev/sdb1 Found Ubuntu 12.04.5 LTS (12.04) on /dev/sdb6 Found Windows 10 (loader) on /dev/sda1 Found Windows 10 (loader) on /dev/sdb1 Found Ubuntu 12.04.5 LTS (12.04) on /dev/sdb6 done Purging configuration files for linux-image-4.4.0-59-generic (4.4.0-59.80~14.04.1) ... Examining /etc/kernel/postrm.d . run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.4.0-59-generic /boot/vmlinuz-4.4.0-59-generic run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.4.0-59-generic /boot/vmlinuz-4.4.0-59-generic dpkg: warning: while removing linux-image-4.4.0-59-generic, directory '/lib/modules/4.4.0-59-generic' not empty so not removed |
OK. NOW My disk space is 16.8GB FROM 3.5GB!
RUN UPDATE AFTER THE PROCESS IS FINISHED. RESTART IF NEEDED.
PDF TO TEXT CONVERTER
Reference: http://okfnlabs.org/blog/2016/04/19/pdf-tools-extract-text-and-data-from-pdfs.html
I already tested and installed a few good open source code, like pdfparser, pdfbox and pdfminer.
PDFPARSER:
- clone from https://github.com/smalot/pdfparser
- composer install
- test by creating a new file index.php in /works/pdfparser/index.php
12345678910111213141516171819<?phpini_set('display_errors', 1);ini_set('display_startup_errors', 1);error_reporting(E_ALL);// Include Composer autoloader if not already done.//include 'vendor/autoload.php';require_once('vendor/autoload.php');// Parse pdf file and build necessary objects.$parser = new \Smalot\PdfParser\Parser();$pdf = $parser->parseFile('export1.pdf');//$pdf = $parser->parseFile('samples/Document1_foxitreader.pdf');$pages = $pdf->getPages();// Loop over each page to extract text.foreach ($pages as $page) {echo nl2br($page->getText());//echo $page->getText();}?>
NOT GOOD!
PDFBOX:
- clone from https://github.com/schmengler/PdfBox
- composer install
- download jarfile from http://pdfbox.apache.org/index.html (pdfbox-app-2.4.0.jar)
then move it to /usr/bin - test by creating a new file index.php in /works/PdfBox/index.php
1234567891011121314151617<?phpini_set('display_errors', 1);ini_set('display_startup_errors', 1);error_reporting(E_ALL);// Include Composer autoloader if not already done.//include 'vendor/autoload.php';require_once('vendor/autoload.php');//use SGH\PdfBox;//$pdf = GENERATED_PDF;$converter = new \SGH\PdfBox\PdfBox();$converter->setPathToPdfBox('/usr/bin/pdfbox-app-2.4.0.jar');//$text = $converter->textFromPdfStream($pdf);$text = $converter->textFromPdfFile('export1.pdf');echo $text;?>
BUT NEVER WORKS BECAUSE ALWAYS COMPLAIN ABOUT ‘RUNTIME ERROR CANNOT ACCESS JARFILE’. ALREADY SET PERMISSION BUT THE ERROR STILL PERSIST. SO I RUN THE JAR VIA TERMINAL (READ: http://pdfbox.apache.org/2.0/commandline.html)
1java -jar pdfbox-app-2.4.0.jar ExtractText export1.pdf
BUT NOT GOOD!
PDFMINER INSTALLATION:
It use python 2.7
- clone from the source (https://github.com/euske/pdfminer/)
1teddy@teddy-K43SJ:~/Documents/python$ git clone https://github.com/euske/pdfminer.git - Run setup.py
1teddy@teddy-K43SJ:~/Documents/python$ sudo python setup.py install
Here I have to use ‘sudo’ to install because I got permission problem without it - Test
1teddy@teddy-K43SJ:~/Documents/python$ pdf2txt.py -o export1.txt export1.pdf
BEST OF THE OTHERS BUT STILL NOT GOOD! SELECT ALL THE TEXT THEN COPY PASTE STILL BETTER!
I TRIED TO INSTALL TESSERACT BUT EVEN WORSE THEN ABOVE!!!
Installing Tesseract OCR on Ubuntu 14.04
Reference: https://github.com/tesseract-ocr/tesseract/wiki/Compiling
http://hanzratech.in/2015/01/16/ocr-using-tesseract-on-ubuntu-14-04.html
Compilation:
- clone the package from github
1git clone --depth 1 https://github.com/tesseract-ocr/tesseract.git - Go to the new dir
1cd tesseract - autogen
1./autogen.sh - configure
1./configure --enable-debug
Here i can’t configure it correctly because it always complained about leptonica 1.74
123checking pkg-config is at least version 0.9.0... yeschecking for LEPTONICA... noconfigure: error: Leptonica 1.74 or higher is required. Try to install libleptonica-dev package.
I already did
1PKG_CONFIG_PATH=/usr/local/lib/pkgconfig LIBLEPT_HEADERSDIR=/usr/local/include ./configure --with-extra-includes=/usr/local/include --with-extra-libraries=/usr/local/lib
But the error still persist!
SOLUTION: I HAVE TO COMPILE AND INSTALL LEPTONICA 1.74 MANUALLY (READ: http://myprojects.advchaweb.com/index.php/2017/02/02/installing-leptonica-1-74-1-on-ubuntu-14-04/)
NOW IT SUCCESS!
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194teddy@teddy-K43SJ:~/Documents/cpp/tesseract$ ./configure --enable-debugchecking for g++... g++checking whether the C++ compiler works... yeschecking for C++ compiler default output file name... a.outchecking for suffix of executables...checking whether we are cross compiling... nochecking for suffix of object files... ochecking whether we are using the GNU C++ compiler... yeschecking whether g++ accepts -g... yesUsing git revision: bd45b3achecking for a BSD-compatible install... /usr/bin/install -cchecking whether build environment is sane... yeschecking for a thread-safe mkdir -p... /bin/mkdir -pchecking for gawk... gawkchecking whether make sets $(MAKE)... yeschecking for style of include used by make... GNUchecking whether make supports nested variables... yeschecking dependency style of g++... gcc3checking whether to enable maintainer-specific portions of Makefiles... nochecking build system type... x86_64-unknown-linux-gnuchecking host system type... x86_64-unknown-linux-gnuchecking whether C++ compiler accepts -mavx... yeschecking whether C++ compiler accepts -msse4.1... yeschecking --enable-graphics argument... yeschecking --enable-embedded argument... nochecking for g++ option to support OpenMP... -fopenmpchecking --enable-opencl argument... nochecking how to run the C++ preprocessor... g++ -Echecking for grep that handles long lines and -e... /bin/grepchecking for egrep... /bin/grep -Echecking for ANSI C header files... yeschecking for sys/types.h... yeschecking for sys/stat.h... yeschecking for stdlib.h... yeschecking for string.h... yeschecking for memory.h... yeschecking for strings.h... yeschecking for inttypes.h... yeschecking for stdint.h... yeschecking for unistd.h... yeschecking CL/cl.h usability... nochecking CL/cl.h presence... nochecking for CL/cl.h... nochecking OpenCL/cl.h usability... nochecking OpenCL/cl.h presence... nochecking for OpenCL/cl.h... nochecking tiffio.h usability... yeschecking tiffio.h presence... yeschecking for tiffio.h... yeschecking for clGetPlatformIDs in -lOpenCL... yeschecking --enable-visibility argument... nochecking --enable-multiple-libraries argument... nochecking whether to use tessdata-prefix... yeschecking whether to enable debugging... yeschecking how to print strings... printfchecking for gcc... gccchecking whether we are using the GNU C compiler... yeschecking whether gcc accepts -g... yeschecking for gcc option to accept ISO C89... none neededchecking whether gcc understands -c and -o together... yeschecking dependency style of gcc... gcc3checking for a sed that does not truncate output... /bin/sedchecking for fgrep... /bin/grep -Fchecking for ld used by gcc... /usr/bin/ldchecking if the linker (/usr/bin/ld) is GNU ld... yeschecking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -Bchecking the name lister (/usr/bin/nm -B) interface... BSD nmchecking whether ln -s works... yeschecking the maximum length of command line arguments... 1572864checking whether the shell understands some XSI constructs... yeschecking whether the shell understands "+="... yeschecking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noopchecking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noopchecking for /usr/bin/ld option to reload object files... -rchecking for objdump... objdumpchecking how to recognize dependent libraries... pass_allchecking for dlltool... nochecking how to associate runtime and link libraries... printf %s\nchecking for ar... archecking for archiver @FILE support... @checking for strip... stripchecking for ranlib... ranlibchecking command to parse /usr/bin/nm -B output from gcc object... okchecking for sysroot... nochecking for mt... mtchecking if mt is a manifest tool... nochecking for dlfcn.h... yeschecking for objdir... .libschecking if gcc supports -fno-rtti -fno-exceptions... nochecking for gcc option to produce PIC... -fPIC -DPICchecking if gcc PIC flag -fPIC -DPIC works... yeschecking if gcc static flag -static works... yeschecking if gcc supports -c -o file.o... yeschecking if gcc supports -c -o file.o... (cached) yeschecking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yeschecking whether -lc should be explicitly linked in... nochecking dynamic linker characteristics... GNU/Linux ld.sochecking how to hardcode library paths into programs... immediatechecking whether stripping libraries is possible... yeschecking if libtool supports shared libraries... yeschecking whether to build shared libraries... yeschecking whether to build static libraries... yeschecking how to run the C++ preprocessor... g++ -Echecking for ld used by g++... /usr/bin/ld -m elf_x86_64checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yeschecking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yeschecking for g++ option to produce PIC... -fPIC -DPICchecking if g++ PIC flag -fPIC -DPIC works... yeschecking if g++ static flag -static works... yeschecking if g++ supports -c -o file.o... yeschecking if g++ supports -c -o file.o... (cached) yeschecking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yeschecking dynamic linker characteristics... (cached) GNU/Linux ld.sochecking how to hardcode library paths into programs... immediatechecking whether byte ordering is bigendian... nochecking if compiling with clang... nochecking whether compiler supports C++11... yeschecking for snprintf... yeschecking for library containing sem_init... -lpthreadchecking for ANSI C header files... (cached) yeschecking whether time.h and sys/time.h may both be included... yeschecking for sys/wait.h that is POSIX.1 compatible... yeschecking sys/ipc.h usability... yeschecking sys/ipc.h presence... yeschecking for sys/ipc.h... yeschecking sys/shm.h usability... yeschecking sys/shm.h presence... yeschecking for sys/shm.h... yeschecking limits.h usability... yeschecking limits.h presence... yeschecking for limits.h... yeschecking malloc.h usability... yeschecking malloc.h presence... yeschecking for malloc.h... yeschecking for stdbool.h that conforms to C99... yeschecking for _Bool... nochecking whether #! works in shell scripts... yeschecking for special C compiler options needed for large files... nochecking for _FILE_OFFSET_BITS value needed for large files... nochecking for getline... yeschecking for wchar_t... yeschecking for long long int... yeschecking for off_t... yeschecking for mbstate_t... yeschecking for pkg-config... /usr/bin/pkg-configchecking pkg-config is at least version 0.9.0... yeschecking for LEPTONICA... yeschecking for ICU_UC... yeschecking for ICU_I18N... yeschecking for pango... yeschecking for cairo... yeschecking that generated files are newer than configure... doneconfigure: creating ./config.statusconfig.status: creating Makefileconfig.status: creating tesseract.pcconfig.status: creating api/Makefileconfig.status: creating arch/Makefileconfig.status: creating ccmain/Makefileconfig.status: creating opencl/Makefileconfig.status: creating ccstruct/Makefileconfig.status: creating ccutil/Makefileconfig.status: creating classify/Makefileconfig.status: creating cutil/Makefileconfig.status: creating dict/Makefileconfig.status: creating lstm/Makefileconfig.status: creating textord/Makefileconfig.status: creating viewer/Makefileconfig.status: creating wordrec/Makefileconfig.status: creating tessdata/Makefileconfig.status: creating tessdata/configs/Makefileconfig.status: creating tessdata/tessconfigs/Makefileconfig.status: creating testing/Makefileconfig.status: creating java/Makefileconfig.status: creating java/com/Makefileconfig.status: creating java/com/google/Makefileconfig.status: creating java/com/google/scrollview/Makefileconfig.status: creating java/com/google/scrollview/events/Makefileconfig.status: creating java/com/google/scrollview/ui/Makefileconfig.status: creating doc/Makefileconfig.status: creating training/Makefileconfig.status: creating config_auto.hconfig.status: executing depfiles commandsconfig.status: executing libtool commandsConfiguration is done.You can now build and install tesseract by running:$ make$ sudo make installTraining tools can be build and installed (after building of tesseract) with:$ make training$ sudo make training-install
- Since we have to compile leptonica to use version 1.74, we should use LDFLAGS=”-L/usr/local/lib” CFLAGS=”-I/usr/local/include” make instead of make for Tesseract.
1234567891011121314151617181920212223242526272829teddy@teddy-K43SJ:~/Documents/cpp/tesseract$ LDFLAGS="-L/usr/local/lib" CFLAGS="-I/usr/local/include" make...g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DLOCALEDIR=\"/usr/local/share/locale\" -DUSE_STD_NAMESPACE -I../arch -I../lstm -I../ccutil -I../ccstruct -I../viewer -I../textord -I../dict -I../classify -I../ccmain -I../wordrec -I../cutil -I../opencl -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT tesseract-tesseractmain.o -MD -MP -MF .deps/tesseract-tesseractmain.Tpo -c -o tesseract-tesseractmain.o `test -f 'tesseractmain.cpp' || echo './'`tesseractmain.cppmv -f .deps/tesseract-tesseractmain.Tpo .deps/tesseract-tesseractmain.Po/bin/bash ../libtool --tag=CXX --mode=link g++ -g -O2 -std=c++11 -o tesseract tesseract-tesseractmain.o libtesseract.la -L/usr/local/lib -llept -fopenmp -ltiff -lrt -lpthreadlibtool: link: g++ -g -O2 -std=c++11 -o .libs/tesseract tesseract-tesseractmain.o -fopenmp ./.libs/libtesseract.so -L/usr/local/lib /usr/local/lib/liblept.so /usr/lib/x86_64-linux-gnu/libtiff.so -lrt -lpthread -fopenmpmake[2]: Leaving directory `/home/teddy/Documents/cpp/tesseract/api'Making all in .make[2]: Entering directory `/home/teddy/Documents/cpp/tesseract'make[2]: Leaving directory `/home/teddy/Documents/cpp/tesseract'Making all in tessdatamake[2]: Entering directory `/home/teddy/Documents/cpp/tesseract/tessdata'Making all in configsmake[3]: Entering directory `/home/teddy/Documents/cpp/tesseract/tessdata/configs'make[3]: Nothing to be done for `all'.make[3]: Leaving directory `/home/teddy/Documents/cpp/tesseract/tessdata/configs'Making all in tessconfigsmake[3]: Entering directory `/home/teddy/Documents/cpp/tesseract/tessdata/tessconfigs'make[3]: Nothing to be done for `all'.make[3]: Leaving directory `/home/teddy/Documents/cpp/tesseract/tessdata/tessconfigs'make[3]: Entering directory `/home/teddy/Documents/cpp/tesseract/tessdata'make[3]: Nothing to be done for `all-am'.make[3]: Leaving directory `/home/teddy/Documents/cpp/tesseract/tessdata'make[2]: Leaving directory `/home/teddy/Documents/cpp/tesseract/tessdata'Making all in docmake[2]: Entering directory `/home/teddy/Documents/cpp/tesseract/doc'make[2]: Nothing to be done for `all'.make[2]: Leaving directory `/home/teddy/Documents/cpp/tesseract/doc'make[1]: Leaving directory `/home/teddy/Documents/cpp/tesseract'
- make install
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576teddy@teddy-K43SJ:~/Documents/cpp/tesseract$ sudo make install...libtool: install: /usr/bin/install -c .libs/libtesseract.lai /usr/local/lib/libtesseract.lalibtool: install: /usr/bin/install -c .libs/libtesseract.a /usr/local/lib/libtesseract.alibtool: install: chmod 644 /usr/local/lib/libtesseract.alibtool: install: ranlib /usr/local/lib/libtesseract.alibtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/sbin" ldconfig -n /usr/local/lib----------------------------------------------------------------------Libraries have been installed in:/usr/local/libIf you ever happen to want to link against installed librariesin a given directory, LIBDIR, you must either use libtool, andspecify the full pathname of the library, or use the `-LLIBDIR'flag during linking and do at least one of the following:- add LIBDIR to the `LD_LIBRARY_PATH' environment variableduring execution- add LIBDIR to the `LD_RUN_PATH' environment variableduring linking- use the `-Wl,-rpath -Wl,LIBDIR' linker flag- have your system administrator add LIBDIR to `/etc/ld.so.conf'See any operating system documentation about shared libraries formore information, such as the ld(1) and ld.so(8) manual pages.----------------------------------------------------------------------/bin/mkdir -p '/usr/local/bin'/bin/bash ../libtool --mode=install /usr/bin/install -c tesseract '/usr/local/bin'libtool: install: /usr/bin/install -c .libs/tesseract /usr/local/bin/tesseract/bin/mkdir -p '/usr/local/include/tesseract'/usr/bin/install -c -m 644 apitypes.h baseapi.h capi.h renderer.h '/usr/local/include/tesseract'make[2]: Leaving directory `/home/teddy/Documents/cpp/tesseract/api'make[1]: Leaving directory `/home/teddy/Documents/cpp/tesseract/api'Making install in .make[1]: Entering directory `/home/teddy/Documents/cpp/tesseract'make[2]: Entering directory `/home/teddy/Documents/cpp/tesseract'make[2]: Nothing to be done for `install-exec-am'./bin/mkdir -p '/usr/local/lib/pkgconfig'/usr/bin/install -c -m 644 tesseract.pc '/usr/local/lib/pkgconfig'make[2]: Leaving directory `/home/teddy/Documents/cpp/tesseract'make[1]: Leaving directory `/home/teddy/Documents/cpp/tesseract'Making install in tessdatamake[1]: Entering directory `/home/teddy/Documents/cpp/tesseract/tessdata'Making install in configsmake[2]: Entering directory `/home/teddy/Documents/cpp/tesseract/tessdata/configs'make[3]: Entering directory `/home/teddy/Documents/cpp/tesseract/tessdata/configs'make[3]: Nothing to be done for `install-exec-am'./bin/mkdir -p '/usr/local/share/tessdata/configs'/usr/bin/install -c -m 644 inter makebox box.train unlv ambigs.train api_config kannada box.train.stderr quiet logfile digits hocr tsv linebox pdf rebox strokewidth bigram txt '/usr/local/share/tessdata/configs'make[3]: Leaving directory `/home/teddy/Documents/cpp/tesseract/tessdata/configs'make[2]: Leaving directory `/home/teddy/Documents/cpp/tesseract/tessdata/configs'Making install in tessconfigsmake[2]: Entering directory `/home/teddy/Documents/cpp/tesseract/tessdata/tessconfigs'make[3]: Entering directory `/home/teddy/Documents/cpp/tesseract/tessdata/tessconfigs'make[3]: Nothing to be done for `install-exec-am'./bin/mkdir -p '/usr/local/share/tessdata/tessconfigs'/usr/bin/install -c -m 644 batch batch.nochop nobatch matdemo segdemo msdemo '/usr/local/share/tessdata/tessconfigs'make[3]: Leaving directory `/home/teddy/Documents/cpp/tesseract/tessdata/tessconfigs'make[2]: Leaving directory `/home/teddy/Documents/cpp/tesseract/tessdata/tessconfigs'make[2]: Entering directory `/home/teddy/Documents/cpp/tesseract/tessdata'make[3]: Entering directory `/home/teddy/Documents/cpp/tesseract/tessdata'make[3]: Nothing to be done for `install-exec-am'./bin/mkdir -p '/usr/local/share/tessdata'/usr/bin/install -c -m 644 pdf.ttf '/usr/local/share/tessdata'make[3]: Leaving directory `/home/teddy/Documents/cpp/tesseract/tessdata'make[2]: Leaving directory `/home/teddy/Documents/cpp/tesseract/tessdata'make[1]: Leaving directory `/home/teddy/Documents/cpp/tesseract/tessdata'Making install in docmake[1]: Entering directory `/home/teddy/Documents/cpp/tesseract/doc'make[2]: Entering directory `/home/teddy/Documents/cpp/tesseract/doc'make[2]: Nothing to be done for `install-exec-am'./bin/mkdir -p '/usr/local/share/man/man1'/usr/bin/install -c -m 644 cntraining.1 combine_tessdata.1 mftraining.1 tesseract.1 unicharset_extractor.1 wordlist2dawg.1 ambiguous_words.1 shapeclustering.1 dawg2wordlist.1 '/usr/local/share/man/man1'/bin/mkdir -p '/usr/local/share/man/man5'/usr/bin/install -c -m 644 unicharambigs.5 unicharset.5 '/usr/local/share/man/man5'make[2]: Leaving directory `/home/teddy/Documents/cpp/tesseract/doc'make[1]: Leaving directory `/home/teddy/Documents/cpp/tesseract/doc'
- sudo ldconfig
1teddy@teddy-K43SJ:~/Documents/cpp/tesseract$ sudo ldconfig
- Make training
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391teddy@teddy-K43SJ:~/Documents/cpp/tesseract$ make trainingmakemake[1]: Entering directory `/home/teddy/Documents/cpp/tesseract'make all-recursivemake[2]: Entering directory `/home/teddy/Documents/cpp/tesseract'Making all in archmake[3]: Entering directory `/home/teddy/Documents/cpp/tesseract/arch'make[4]: Entering directory `/home/teddy/Documents/cpp/tesseract/arch'make[4]: Nothing to be done for `all-am'.make[4]: Leaving directory `/home/teddy/Documents/cpp/tesseract/arch'make[3]: Leaving directory `/home/teddy/Documents/cpp/tesseract/arch'Making all in ccutilmake[3]: Entering directory `/home/teddy/Documents/cpp/tesseract/ccutil'make[4]: Entering directory `/home/teddy/Documents/cpp/tesseract/ccutil'make[4]: Nothing to be done for `all-am'.make[4]: Leaving directory `/home/teddy/Documents/cpp/tesseract/ccutil'make[3]: Leaving directory `/home/teddy/Documents/cpp/tesseract/ccutil'Making all in viewermake[3]: Entering directory `/home/teddy/Documents/cpp/tesseract/viewer'make[3]: Nothing to be done for `all'.make[3]: Leaving directory `/home/teddy/Documents/cpp/tesseract/viewer'Making all in cutilmake[3]: Entering directory `/home/teddy/Documents/cpp/tesseract/cutil'make[3]: Nothing to be done for `all'.make[3]: Leaving directory `/home/teddy/Documents/cpp/tesseract/cutil'Making all in openclmake[3]: Entering directory `/home/teddy/Documents/cpp/tesseract/opencl'make[3]: Nothing to be done for `all'.make[3]: Leaving directory `/home/teddy/Documents/cpp/tesseract/opencl'Making all in ccstructmake[3]: Entering directory `/home/teddy/Documents/cpp/tesseract/ccstruct'make[3]: Nothing to be done for `all'.make[3]: Leaving directory `/home/teddy/Documents/cpp/tesseract/ccstruct'Making all in dictmake[3]: Entering directory `/home/teddy/Documents/cpp/tesseract/dict'make[3]: Nothing to be done for `all'.make[3]: Leaving directory `/home/teddy/Documents/cpp/tesseract/dict'Making all in classifymake[3]: Entering directory `/home/teddy/Documents/cpp/tesseract/classify'make[3]: Nothing to be done for `all'.make[3]: Leaving directory `/home/teddy/Documents/cpp/tesseract/classify'Making all in wordrecmake[3]: Entering directory `/home/teddy/Documents/cpp/tesseract/wordrec'make[3]: Nothing to be done for `all'.make[3]: Leaving directory `/home/teddy/Documents/cpp/tesseract/wordrec'Making all in textordmake[3]: Entering directory `/home/teddy/Documents/cpp/tesseract/textord'make[3]: Nothing to be done for `all'.make[3]: Leaving directory `/home/teddy/Documents/cpp/tesseract/textord'Making all in lstmmake[3]: Entering directory `/home/teddy/Documents/cpp/tesseract/lstm'make[4]: Entering directory `/home/teddy/Documents/cpp/tesseract/lstm'make[4]: Nothing to be done for `all-am'.make[4]: Leaving directory `/home/teddy/Documents/cpp/tesseract/lstm'make[3]: Leaving directory `/home/teddy/Documents/cpp/tesseract/lstm'Making all in ccmainmake[3]: Entering directory `/home/teddy/Documents/cpp/tesseract/ccmain'make[3]: Nothing to be done for `all'.make[3]: Leaving directory `/home/teddy/Documents/cpp/tesseract/ccmain'Making all in apimake[3]: Entering directory `/home/teddy/Documents/cpp/tesseract/api'make[3]: Nothing to be done for `all'.make[3]: Leaving directory `/home/teddy/Documents/cpp/tesseract/api'Making all in .make[3]: Entering directory `/home/teddy/Documents/cpp/tesseract'make[3]: Leaving directory `/home/teddy/Documents/cpp/tesseract'Making all in tessdatamake[3]: Entering directory `/home/teddy/Documents/cpp/tesseract/tessdata'Making all in configsmake[4]: Entering directory `/home/teddy/Documents/cpp/tesseract/tessdata/configs'make[4]: Nothing to be done for `all'.make[4]: Leaving directory `/home/teddy/Documents/cpp/tesseract/tessdata/configs'Making all in tessconfigsmake[4]: Entering directory `/home/teddy/Documents/cpp/tesseract/tessdata/tessconfigs'make[4]: Nothing to be done for `all'.make[4]: Leaving directory `/home/teddy/Documents/cpp/tesseract/tessdata/tessconfigs'make[4]: Entering directory `/home/teddy/Documents/cpp/tesseract/tessdata'make[4]: Nothing to be done for `all-am'.make[4]: Leaving directory `/home/teddy/Documents/cpp/tesseract/tessdata'make[3]: Leaving directory `/home/teddy/Documents/cpp/tesseract/tessdata'Making all in docmake[3]: Entering directory `/home/teddy/Documents/cpp/tesseract/doc'make[3]: Nothing to be done for `all'.make[3]: Leaving directory `/home/teddy/Documents/cpp/tesseract/doc'make[2]: Leaving directory `/home/teddy/Documents/cpp/tesseract'make[1]: Leaving directory `/home/teddy/Documents/cpp/tesseract'make[1]: Entering directory `/home/teddy/Documents/cpp/tesseract/training'depbase=`echo boxchar.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\/bin/bash ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT boxchar.lo -MD -MP -MF $depbase.Tpo -c -o boxchar.lo boxchar.cpp &&\mv -f $depbase.Tpo $depbase.Plolibtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT boxchar.lo -MD -MP -MF .deps/boxchar.Tpo -c boxchar.cpp -fPIC -DPIC -o .libs/boxchar.oboxchar.cpp: In static member function 'static void tesseract::BoxChar::TranslateBoxes(int, int, std::vector<tesseract::BoxChar*>*)':boxchar.cpp:54:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]for (int i = 0; i < boxes->size(); ++i) {^boxchar.cpp: In static member function 'static void tesseract::BoxChar::PrepareToWrite(std::vector<tesseract::BoxChar*>*)':boxchar.cpp:71:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]for (int i = 0; i < boxes->size(); ++i) {^boxchar.cpp: In static member function 'static void tesseract::BoxChar::InsertNewlines(bool, bool, std::vector<tesseract::BoxChar*>*)':boxchar.cpp:85:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]for (int i = 0; i < boxes->size(); ++i) {^boxchar.cpp:88:64: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]if (prev_i < 0 || prev_i < i - 1 || i + 1 == boxes->size()) {^boxchar.cpp:94:49: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]} while (i >= 0 && i + 1 == boxes->size() &&^boxchar.cpp: In static member function 'static void tesseract::BoxChar::InsertSpaces(bool, bool, std::vector<tesseract::BoxChar*>*)':boxchar.cpp:149:39: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]for (int i = 1; i + 1 < boxes->size(); ++i) {^boxchar.cpp:181:45: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]for (int j = i + 2; j < boxes->size() && (*boxes)[j]->box_ != nullptr &&^boxchar.cpp: In static member function 'static void tesseract::BoxChar::ReorderRTLText(std::vector<tesseract::BoxChar*>*)':boxchar.cpp:207:43: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]for (int start = 0; start < boxes->size(); start = end + 1) {^boxchar.cpp:209:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]while (end < boxes->size() && (*boxes)[end]->ch_ != "\t") ++end;^boxchar.cpp: In static member function 'static bool tesseract::BoxChar::ContainsMostlyRTL(const std::vector<tesseract::BoxChar*>&)':boxchar.cpp:218:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]for (int i = 0; i < boxes.size(); ++i) {^boxchar.cpp:224:46: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]for (int c = 0; c < boxes[i]->ch_.size(); ++c) {^boxchar.cpp: In static member function 'static bool tesseract::BoxChar::MostlyVertical(const std::vector<tesseract::BoxChar*>&)':boxchar.cpp:247:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]for (int i = 1; i < boxes.size(); ++i) {^boxchar.cpp: In static member function 'static int tesseract::BoxChar::TotalByteLength(const std::vector<tesseract::BoxChar*>&)':boxchar.cpp:266:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]for (int i = 0; i < boxes.size(); ++i) total_length += boxes[i]->ch_.size();^boxchar.cpp: In static member function 'static std::string tesseract::BoxChar::GetTesseractBoxStr(int, const std::vector<tesseract::BoxChar*>&)':boxchar.cpp:305:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]for (int i = 0; i < boxes.size(); ++i) {^libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT boxchar.lo -MD -MP -MF .deps/boxchar.Tpo -c boxchar.cpp -o boxchar.o >/dev/null 2>&1depbase=`echo commandlineflags.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\/bin/bash ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT commandlineflags.lo -MD -MP -MF $depbase.Tpo -c -o commandlineflags.lo commandlineflags.cpp &&\mv -f $depbase.Tpo $depbase.Plolibtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT commandlineflags.lo -MD -MP -MF .deps/commandlineflags.Tpo -c commandlineflags.cpp -fPIC -DPIC -o .libs/commandlineflags.ocommandlineflags.cpp: In function 'void tesseract::ParseCommandLineFlags(const char*, int*, char***, bool)':commandlineflags.cpp:163:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]for (i = 1; i < *argc; ++i) {^commandlineflags.cpp:217:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]if (i + 1 >= *argc) {^commandlineflags.cpp:249:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]if (i + 1 >= *argc) {^commandlineflags.cpp:298:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]if (i + 1 >= *argc) {^libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT commandlineflags.lo -MD -MP -MF .deps/commandlineflags.Tpo -c commandlineflags.cpp -o commandlineflags.o >/dev/null 2>&1depbase=`echo commontraining.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\/bin/bash ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT commontraining.lo -MD -MP -MF $depbase.Tpo -c -o commontraining.lo commontraining.cpp &&\mv -f $depbase.Tpo $depbase.Plolibtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT commontraining.lo -MD -MP -MF .deps/commontraining.Tpo -c commontraining.cpp -fPIC -DPIC -o .libs/commontraining.ocommontraining.cpp: In function 'void ReadTrainingSamples(const FEATURE_DEFS_STRUCT&, const char*, int, UNICHARSET*, FILE*, list_rec**)':commontraining.cpp:430:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]for (i = 0; i < char_desc->NumFeatureSets; i++) {^libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT commontraining.lo -MD -MP -MF .deps/commontraining.Tpo -c commontraining.cpp -o commontraining.o >/dev/null 2>&1depbase=`echo degradeimage.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\/bin/bash ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT degradeimage.lo -MD -MP -MF $depbase.Tpo -c -o degradeimage.lo degradeimage.cpp &&\mv -f $depbase.Tpo $depbase.Plolibtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT degradeimage.lo -MD -MP -MF .deps/degradeimage.Tpo -c degradeimage.cpp -fPIC -DPIC -o .libs/degradeimage.olibtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT degradeimage.lo -MD -MP -MF .deps/degradeimage.Tpo -c degradeimage.cpp -o degradeimage.o >/dev/null 2>&1depbase=`echo fileio.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\/bin/bash ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT fileio.lo -MD -MP -MF $depbase.Tpo -c -o fileio.lo fileio.cpp &&\mv -f $depbase.Tpo $depbase.Plolibtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT fileio.lo -MD -MP -MF .deps/fileio.Tpo -c fileio.cpp -fPIC -DPIC -o .libs/fileio.olibtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT fileio.lo -MD -MP -MF .deps/fileio.Tpo -c fileio.cpp -o fileio.o >/dev/null 2>&1depbase=`echo ligature_table.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\/bin/bash ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT ligature_table.lo -MD -MP -MF $depbase.Tpo -c -o ligature_table.lo ligature_table.cpp &&\mv -f $depbase.Tpo $depbase.Plolibtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT ligature_table.lo -MD -MP -MF .deps/ligature_table.Tpo -c ligature_table.cpp -fPIC -DPIC -o .libs/ligature_table.olibtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT ligature_table.lo -MD -MP -MF .deps/ligature_table.Tpo -c ligature_table.cpp -o ligature_table.o >/dev/null 2>&1depbase=`echo lstmtester.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\/bin/bash ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT lstmtester.lo -MD -MP -MF $depbase.Tpo -c -o lstmtester.lo lstmtester.cpp &&\mv -f $depbase.Tpo $depbase.Plolibtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT lstmtester.lo -MD -MP -MF .deps/lstmtester.Tpo -c lstmtester.cpp -fPIC -DPIC -o .libs/lstmtester.olibtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT lstmtester.lo -MD -MP -MF .deps/lstmtester.Tpo -c lstmtester.cpp -o lstmtester.o >/dev/null 2>&1depbase=`echo normstrngs.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\/bin/bash ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT normstrngs.lo -MD -MP -MF $depbase.Tpo -c -o normstrngs.lo normstrngs.cpp &&\mv -f $depbase.Tpo $depbase.Plolibtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT normstrngs.lo -MD -MP -MF .deps/normstrngs.Tpo -c normstrngs.cpp -fPIC -DPIC -o .libs/normstrngs.onormstrngs.cpp: In function 'bool tesseract::IsUTF8Whitespace(const char*)':normstrngs.cpp:184:49: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]return SpanUTF8Whitespace(text) == strlen(text);^libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT normstrngs.lo -MD -MP -MF .deps/normstrngs.Tpo -c normstrngs.cpp -o normstrngs.o >/dev/null 2>&1depbase=`echo pango_font_info.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\/bin/bash ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT pango_font_info.lo -MD -MP -MF $depbase.Tpo -c -o pango_font_info.lo pango_font_info.cpp &&\mv -f $depbase.Tpo $depbase.Plolibtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT pango_font_info.lo -MD -MP -MF .deps/pango_font_info.Tpo -c pango_font_info.cpp -fPIC -DPIC -o .libs/pango_font_info.opango_font_info.cpp: In static member function 'static void tesseract::FontUtils::GetAllRenderableCharacters(const std::vector<std::basic_string<char> >&, std::vector<bool>*)':pango_font_info.cpp:677:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]for (int i = 0; i < fonts.size(); ++i) {^pango_font_info.cpp: In static member function 'static std::string tesseract::FontUtils::BestFonts(const std::unordered_map<int, long int>&, std::vector<std::pair<const char*, std::vector<bool> > >*)':pango_font_info.cpp:740:39: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]for (int i = 0; i < font_names.size(); ++i) {^pango_font_info.cpp:765:39: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]for (int i = 0; i < font_names.size(); ++i) {^pango_font_info.cpp: In static member function 'static bool tesseract::FontUtils::SelectFont(const char*, int, const std::vector<std::basic_string<char> >&, std::string*, std::vector<std::basic_string<char> >*)':pango_font_info.cpp:800:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]for (int i = 0; i < all_fonts.size(); ++i) {^libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT pango_font_info.lo -MD -MP -MF .deps/pango_font_info.Tpo -c pango_font_info.cpp -o pango_font_info.o >/dev/null 2>&1depbase=`echo stringrenderer.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\/bin/bash ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT stringrenderer.lo -MD -MP -MF $depbase.Tpo -c -o stringrenderer.lo stringrenderer.cpp &&\mv -f $depbase.Tpo $depbase.Plolibtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT stringrenderer.lo -MD -MP -MF .deps/stringrenderer.Tpo -c stringrenderer.cpp -fPIC -DPIC -o .libs/stringrenderer.ostringrenderer.cpp: In member function 'void tesseract::StringRenderer::SetWordUnderlineAttributes(const string&)':stringrenderer.cpp:249:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]while (offset < page_text.length()) {^stringrenderer.cpp:251:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]if (offset == page_text.length()) break;^stringrenderer.cpp: In member function 'void tesseract::StringRenderer::ClearBoxes()':stringrenderer.cpp:344:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]for (int i = 0; i < boxchars_.size(); ++i)^stringrenderer.cpp: In function 'void tesseract::MergeBoxCharsToWords(std::vector<tesseract::BoxChar*>*)':stringrenderer.cpp:419:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]for (int i = 0; i < boxchars->size(); ++i) {^stringrenderer.cpp: In member function 'void tesseract::StringRenderer::ComputeClusterBoxes()':stringrenderer.cpp:483:54: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]for (int i = 0; i < cluster_start_indices.size() - 1; ++i) {^stringrenderer.cpp:595:42: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]for (int i = 0; i < page_boxchars.size(); ++i) {^stringrenderer.cpp: In member function 'int tesseract::StringRenderer::StripUnrenderableWords(std::string*) const':stringrenderer.cpp:626:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]while (offset < utf8_text->length()) {^stringrenderer.cpp:630:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]if (offset == utf8_text->length()) break;^stringrenderer.cpp: In member function 'int tesseract::StringRenderer::RenderAllFontsToImage(double, const char*, int, std::string*, Pix**)':stringrenderer.cpp:868:48: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]for (int i = font_index_; i < all_fonts.size(); ++i) {^libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT stringrenderer.lo -MD -MP -MF .deps/stringrenderer.Tpo -c stringrenderer.cpp -o stringrenderer.o >/dev/null 2>&1depbase=`echo tlog.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\/bin/bash ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT tlog.lo -MD -MP -MF $depbase.Tpo -c -o tlog.lo tlog.cpp &&\mv -f $depbase.Tpo $depbase.Plolibtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT tlog.lo -MD -MP -MF .deps/tlog.Tpo -c tlog.cpp -fPIC -DPIC -o .libs/tlog.olibtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT tlog.lo -MD -MP -MF .deps/tlog.Tpo -c tlog.cpp -o tlog.o >/dev/null 2>&1depbase=`echo unicharset_training_utils.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\/bin/bash ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT unicharset_training_utils.lo -MD -MP -MF $depbase.Tpo -c -o unicharset_training_utils.lo unicharset_training_utils.cpp &&\mv -f $depbase.Tpo $depbase.Plolibtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT unicharset_training_utils.lo -MD -MP -MF .deps/unicharset_training_utils.Tpo -c unicharset_training_utils.cpp -fPIC -DPIC -o .libs/unicharset_training_utils.olibtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT unicharset_training_utils.lo -MD -MP -MF .deps/unicharset_training_utils.Tpo -c unicharset_training_utils.cpp -o unicharset_training_utils.o >/dev/null 2>&1/bin/bash ../libtool --tag=CXX --mode=link g++ -g -O2 -std=c++11 -o libtesseract_training.la boxchar.lo commandlineflags.lo commontraining.lo degradeimage.lo fileio.lo ligature_table.lo lstmtester.lo normstrngs.lo pango_font_info.lo stringrenderer.lo tlog.lo unicharset_training_utils.lo ../cutil/libtesseract_cutil.la -lpthreadlibtool: link: (cd .libs/libtesseract_training.lax/libtesseract_cutil.a && ar x "/home/teddy/Documents/cpp/tesseract/training/../cutil/.libs/libtesseract_cutil.a")libtool: link: ar cru .libs/libtesseract_training.a .libs/boxchar.o .libs/commandlineflags.o .libs/commontraining.o .libs/degradeimage.o .libs/fileio.o .libs/ligature_table.o .libs/lstmtester.o .libs/normstrngs.o .libs/pango_font_info.o .libs/stringrenderer.o .libs/tlog.o .libs/unicharset_training_utils.o .libs/libtesseract_training.lax/libtesseract_cutil.a/bitvec.o .libs/libtesseract_training.lax/libtesseract_cutil.a/callcpp.o .libs/libtesseract_training.lax/libtesseract_cutil.a/cutil.o .libs/libtesseract_training.lax/libtesseract_cutil.a/cutil_class.o .libs/libtesseract_training.lax/libtesseract_cutil.a/danerror.o .libs/libtesseract_training.lax/libtesseract_cutil.a/efio.o .libs/libtesseract_training.lax/libtesseract_cutil.a/emalloc.o .libs/libtesseract_training.lax/libtesseract_cutil.a/freelist.o .libs/libtesseract_training.lax/libtesseract_cutil.a/oldlist.o .libs/libtesseract_training.lax/libtesseract_cutil.a/structures.olibtool: link: ranlib .libs/libtesseract_training.alibtool: link: rm -fr .libs/libtesseract_training.laxlibtool: link: ( cd ".libs" && rm -f "libtesseract_training.la" && ln -s "../libtesseract_training.la" "libtesseract_training.la" )depbase=`echo tessopt.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\/bin/bash ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT tessopt.lo -MD -MP -MF $depbase.Tpo -c -o tessopt.lo tessopt.cpp &&\mv -f $depbase.Tpo $depbase.Plolibtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT tessopt.lo -MD -MP -MF .deps/tessopt.Tpo -c tessopt.cpp -fPIC -DPIC -o .libs/tessopt.olibtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT tessopt.lo -MD -MP -MF .deps/tessopt.Tpo -c tessopt.cpp -o tessopt.o >/dev/null 2>&1/bin/bash ../libtool --tag=CXX --mode=link g++ -g -O2 -std=c++11 -o libtesseract_tessopt.la tessopt.lo -lpthreadlibtool: link: ar cru .libs/libtesseract_tessopt.a .libs/tessopt.olibtool: link: ranlib .libs/libtesseract_tessopt.alibtool: link: ( cd ".libs" && rm -f "libtesseract_tessopt.la" && ln -s "../libtesseract_tessopt.la" "libtesseract_tessopt.la" )depbase=`echo ambiguous_words.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT ambiguous_words.o -MD -MP -MF $depbase.Tpo -c -o ambiguous_words.o ambiguous_words.cpp &&\mv -f $depbase.Tpo $depbase.Po/bin/bash ../libtool --tag=CXX --mode=link g++ -g -O2 -std=c++11 -o ambiguous_words ambiguous_words.o libtesseract_training.la libtesseract_tessopt.la ../api/libtesseract.la -L/usr/local/lib -llept -lpthreadlibtool: link: g++ -g -O2 -std=c++11 -o .libs/ambiguous_words ambiguous_words.o ./.libs/libtesseract_training.a ./.libs/libtesseract_tessopt.a ../api/.libs/libtesseract.so -L/usr/local/lib /usr/local/lib/liblept.so -lpthread -fopenmpdepbase=`echo classifier_tester.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT classifier_tester.o -MD -MP -MF $depbase.Tpo -c -o classifier_tester.o classifier_tester.cpp &&\mv -f $depbase.Tpo $depbase.Po/bin/bash ../libtool --tag=CXX --mode=link g++ -g -O2 -std=c++11 -o classifier_tester classifier_tester.o libtesseract_training.la libtesseract_tessopt.la ../api/libtesseract.la -L/usr/local/lib -llept -lpthreadlibtool: link: g++ -g -O2 -std=c++11 -o .libs/classifier_tester classifier_tester.o ./.libs/libtesseract_training.a ./.libs/libtesseract_tessopt.a ../api/.libs/libtesseract.so -L/usr/local/lib /usr/local/lib/liblept.so -lpthread -fopenmpdepbase=`echo cntraining.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT cntraining.o -MD -MP -MF $depbase.Tpo -c -o cntraining.o cntraining.cpp &&\mv -f $depbase.Tpo $depbase.Po/bin/bash ../libtool --tag=CXX --mode=link g++ -g -O2 -std=c++11 -o cntraining cntraining.o libtesseract_training.la libtesseract_tessopt.la ../api/libtesseract.la -L/usr/local/lib -llept -lpthreadlibtool: link: g++ -g -O2 -std=c++11 -o .libs/cntraining cntraining.o ./.libs/libtesseract_training.a ./.libs/libtesseract_tessopt.a ../api/.libs/libtesseract.so -L/usr/local/lib /usr/local/lib/liblept.so -lpthread -fopenmpdepbase=`echo combine_tessdata.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT combine_tessdata.o -MD -MP -MF $depbase.Tpo -c -o combine_tessdata.o combine_tessdata.cpp &&\mv -f $depbase.Tpo $depbase.Po/bin/bash ../libtool --tag=CXX --mode=link g++ -g -O2 -std=c++11 -o combine_tessdata combine_tessdata.o ../api/libtesseract.la -L/usr/local/lib -llept -lpthreadlibtool: link: g++ -g -O2 -std=c++11 -o .libs/combine_tessdata combine_tessdata.o ../api/.libs/libtesseract.so -L/usr/local/lib /usr/local/lib/liblept.so -lpthread -fopenmpdepbase=`echo dawg2wordlist.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT dawg2wordlist.o -MD -MP -MF $depbase.Tpo -c -o dawg2wordlist.o dawg2wordlist.cpp &&\mv -f $depbase.Tpo $depbase.Po/bin/bash ../libtool --tag=CXX --mode=link g++ -g -O2 -std=c++11 -o dawg2wordlist dawg2wordlist.o libtesseract_tessopt.la ../api/libtesseract.la -L/usr/local/lib -llept -lpthreadlibtool: link: g++ -g -O2 -std=c++11 -o .libs/dawg2wordlist dawg2wordlist.o ./.libs/libtesseract_tessopt.a ../api/.libs/libtesseract.so -L/usr/local/lib /usr/local/lib/liblept.so -lpthread -fopenmpdepbase=`echo lstmeval.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT lstmeval.o -MD -MP -MF $depbase.Tpo -c -o lstmeval.o lstmeval.cpp &&\mv -f $depbase.Tpo $depbase.Po/bin/bash ../libtool --tag=CXX --mode=link g++ -g -O2 -std=c++11 -o lstmeval lstmeval.o libtesseract_training.la libtesseract_tessopt.la -licuuc -licudata ../api/libtesseract.la -L/usr/local/lib -llept -lpthreadlibtool: link: g++ -g -O2 -std=c++11 -o .libs/lstmeval lstmeval.o ./.libs/libtesseract_training.a ./.libs/libtesseract_tessopt.a -licuuc -licudata ../api/.libs/libtesseract.so -L/usr/local/lib /usr/local/lib/liblept.so -lpthread -fopenmpdepbase=`echo lstmtraining.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT lstmtraining.o -MD -MP -MF $depbase.Tpo -c -o lstmtraining.o lstmtraining.cpp &&\mv -f $depbase.Tpo $depbase.Polstmtraining.cpp: In function ‘int main(int, char**)’:lstmtraining.cpp:176:8: warning: unused variable ‘best_dumped’ [-Wunused-variable]bool best_dumped = true;^lstmtraining.cpp:177:9: warning: unused variable ‘best_model_dump’ [-Wunused-variable]char* best_model_dump = nullptr;^lstmtraining.cpp:178:10: warning: unused variable ‘best_model_size’ [-Wunused-variable]size_t best_model_size = 0;^/bin/bash ../libtool --tag=CXX --mode=link g++ -g -O2 -std=c++11 -o lstmtraining lstmtraining.o libtesseract_training.la libtesseract_tessopt.la -licui18n -licuuc -licudata -licuuc -licudata ../api/libtesseract.la -L/usr/local/lib -llept -lpthreadlibtool: link: g++ -g -O2 -std=c++11 -o .libs/lstmtraining lstmtraining.o ./.libs/libtesseract_training.a ./.libs/libtesseract_tessopt.a -licui18n -licuuc -licudata ../api/.libs/libtesseract.so -L/usr/local/lib /usr/local/lib/liblept.so -lpthread -fopenmpdepbase=`echo mftraining.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT mftraining.o -MD -MP -MF $depbase.Tpo -c -o mftraining.o mftraining.cpp &&\mv -f $depbase.Tpo $depbase.Podepbase=`echo mergenf.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT mergenf.o -MD -MP -MF $depbase.Tpo -c -o mergenf.o mergenf.cpp &&\mv -f $depbase.Tpo $depbase.Po/bin/bash ../libtool --tag=CXX --mode=link g++ -g -O2 -std=c++11 -o mftraining mftraining.o mergenf.o libtesseract_training.la libtesseract_tessopt.la -licuuc -licudata ../api/libtesseract.la -L/usr/local/lib -llept -lpthreadlibtool: link: g++ -g -O2 -std=c++11 -o .libs/mftraining mftraining.o mergenf.o ./.libs/libtesseract_training.a ./.libs/libtesseract_tessopt.a -licuuc -licudata ../api/.libs/libtesseract.so -L/usr/local/lib /usr/local/lib/liblept.so -lpthread -fopenmpdepbase=`echo set_unicharset_properties.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT set_unicharset_properties.o -MD -MP -MF $depbase.Tpo -c -o set_unicharset_properties.o set_unicharset_properties.cpp &&\mv -f $depbase.Tpo $depbase.Po/bin/bash ../libtool --tag=CXX --mode=link g++ -g -O2 -std=c++11 -o set_unicharset_properties set_unicharset_properties.o libtesseract_training.la libtesseract_tessopt.la -licui18n -licuuc -licudata -licuuc -licudata ../api/libtesseract.la -L/usr/local/lib -llept -lpthreadlibtool: link: g++ -g -O2 -std=c++11 -o .libs/set_unicharset_properties set_unicharset_properties.o ./.libs/libtesseract_training.a ./.libs/libtesseract_tessopt.a -licui18n -licuuc -licudata ../api/.libs/libtesseract.so -L/usr/local/lib /usr/local/lib/liblept.so -lpthread -fopenmpdepbase=`echo shapeclustering.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT shapeclustering.o -MD -MP -MF $depbase.Tpo -c -o shapeclustering.o shapeclustering.cpp &&\mv -f $depbase.Tpo $depbase.Po/bin/bash ../libtool --tag=CXX --mode=link g++ -g -O2 -std=c++11 -o shapeclustering shapeclustering.o libtesseract_training.la libtesseract_tessopt.la ../api/libtesseract.la -L/usr/local/lib -llept -lpthreadlibtool: link: g++ -g -O2 -std=c++11 -o .libs/shapeclustering shapeclustering.o ./.libs/libtesseract_training.a ./.libs/libtesseract_tessopt.a ../api/.libs/libtesseract.so -L/usr/local/lib /usr/local/lib/liblept.so -lpthread -fopenmpdepbase=`echo text2image.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT text2image.o -MD -MP -MF $depbase.Tpo -c -o text2image.o text2image.cpp &&\mv -f $depbase.Tpo $depbase.Potext2image.cpp: In function ‘std::string tesseract::StringReplace(const string&, const string&, const string&)’:text2image.cpp:196:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]if (pos == string::npos) break;^text2image.cpp: In function ‘void tesseract::ExtractFontProperties(const string&, tesseract::StringRenderer*, const string&)’:text2image.cpp:242:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]for (int b = 0; b < boxes.size(); b += 2) {^text2image.cpp:243:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]while (b < boxes.size() && IsWhitespaceBox(boxes[b])) ++b;^text2image.cpp:244:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]if (b + 1 >= boxes.size()) break;^text2image.cpp: In function ‘int main(int, char**)’:text2image.cpp:425:40: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]for (int i = 0; i < all_fonts.size(); ++i) {^text2image.cpp:550:48: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]for (int i = 0, line = 1; i < offsets.size(); ++i) {^text2image.cpp:559:39: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]if (rand_utf8.length() > line * kCharsPerLine) {^text2image.cpp:591:56: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]for (int offset = 0; offset < strlen(to_render_utf8); ++im, ++page_num) {^text2image.cpp:667:43: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]for (int i = 0; i < font_names.size(); ++i) {^/bin/bash ../libtool --tag=CXX --mode=link g++ -g -O2 -std=c++11 -o text2image text2image.o libtesseract_training.la libtesseract_tessopt.la -licui18n -licuuc -licudata -licuuc -licudata ../api/libtesseract.la -licuuc -licudata -lpango-1.0 -lpangocairo-1.0 -lgobject-2.0 -lglib-2.0 -lcairo -lpangoft2-1.0 -lfontconfig -L/usr/local/lib -llept -lpthreadlibtool: link: g++ -g -O2 -std=c++11 -o .libs/text2image text2image.o ./.libs/libtesseract_training.a ./.libs/libtesseract_tessopt.a -licui18n ../api/.libs/libtesseract.so -licuuc -licudata -lpango-1.0 -lpangocairo-1.0 -lgobject-2.0 -lglib-2.0 /usr/lib/x86_64-linux-gnu/libcairo.so -lpangoft2-1.0 -lfontconfig -L/usr/local/lib /usr/local/lib/liblept.so -lpthread -fopenmpdepbase=`echo unicharset_extractor.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT unicharset_extractor.o -MD -MP -MF $depbase.Tpo -c -o unicharset_extractor.o unicharset_extractor.cpp &&\mv -f $depbase.Tpo $depbase.Po/bin/bash ../libtool --tag=CXX --mode=link g++ -g -O2 -std=c++11 -L/usr/local/lib -llept -o unicharset_extractor unicharset_extractor.o libtesseract_tessopt.la ../api/libtesseract.la -lpthreadlibtool: link: g++ -g -O2 -std=c++11 -o .libs/unicharset_extractor unicharset_extractor.o -L/usr/local/lib /usr/local/lib/liblept.so ./.libs/libtesseract_tessopt.a ../api/.libs/libtesseract.so -lpthread -fopenmpdepbase=`echo wordlist2dawg.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\g++ -DHAVE_CONFIG_H -I. -I.. -g -Wall -O0 -DDEBUG -DUSE_STD_NAMESPACE -DPANGO_ENABLE_ENGINE -I../ccmain -I../api -I../ccutil -I../ccstruct -I../lstm -I../arch -I../viewer -I../textord -I../dict -I../classify -I../display -I../wordrec -I../cutil -I/usr/local/include/leptonica -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -std=c++11 -MT wordlist2dawg.o -MD -MP -MF $depbase.Tpo -c -o wordlist2dawg.o wordlist2dawg.cpp &&\mv -f $depbase.Tpo $depbase.Po/bin/bash ../libtool --tag=CXX --mode=link g++ -g -O2 -std=c++11 -o wordlist2dawg wordlist2dawg.o libtesseract_tessopt.la ../api/libtesseract.la -L/usr/local/lib -llept -lpthreadlibtool: link: g++ -g -O2 -std=c++11 -o .libs/wordlist2dawg wordlist2dawg.o ./.libs/libtesseract_tessopt.a ../api/.libs/libtesseract.so -L/usr/local/lib /usr/local/lib/liblept.so -lpthread -fopenmpmake[1]: Leaving directory `/home/teddy/Documents/cpp/tesseract/training'
- Install the training
12345678910111213141516171819202122teddy@teddy-K43SJ:~/Documents/cpp/tesseract$ sudo make training-install[sudo] password for teddy:make[1]: Entering directory `/home/teddy/Documents/cpp/tesseract/training'make[2]: Entering directory `/home/teddy/Documents/cpp/tesseract/training'/bin/mkdir -p '/usr/local/bin'/bin/bash ../libtool --mode=install /usr/bin/install -c ambiguous_words classifier_tester cntraining combine_tessdata dawg2wordlist lstmeval lstmtraining mftraining set_unicharset_properties shapeclustering text2image unicharset_extractor wordlist2dawg '/usr/local/bin'libtool: install: /usr/bin/install -c .libs/ambiguous_words /usr/local/bin/ambiguous_wordslibtool: install: /usr/bin/install -c .libs/classifier_tester /usr/local/bin/classifier_testerlibtool: install: /usr/bin/install -c .libs/cntraining /usr/local/bin/cntraininglibtool: install: /usr/bin/install -c .libs/combine_tessdata /usr/local/bin/combine_tessdatalibtool: install: /usr/bin/install -c .libs/dawg2wordlist /usr/local/bin/dawg2wordlistlibtool: install: /usr/bin/install -c .libs/lstmeval /usr/local/bin/lstmevallibtool: install: /usr/bin/install -c .libs/lstmtraining /usr/local/bin/lstmtraininglibtool: install: /usr/bin/install -c .libs/mftraining /usr/local/bin/mftraininglibtool: install: /usr/bin/install -c .libs/set_unicharset_properties /usr/local/bin/set_unicharset_propertieslibtool: install: /usr/bin/install -c .libs/shapeclustering /usr/local/bin/shapeclusteringlibtool: install: /usr/bin/install -c .libs/text2image /usr/local/bin/text2imagelibtool: install: /usr/bin/install -c .libs/unicharset_extractor /usr/local/bin/unicharset_extractorlibtool: install: /usr/bin/install -c .libs/wordlist2dawg /usr/local/bin/wordlist2dawgmake[2]: Nothing to be done for `install-data-am'.make[2]: Leaving directory `/home/teddy/Documents/cpp/tesseract/training'make[1]: Leaving directory `/home/teddy/Documents/cpp/tesseract/training'
For the training tutorial, pls read: https://github.com/tesseract-ocr/tesseract/wiki/TrainingTesseract-4.00 (OR https://github.com/tesseract-ocr/tesseract/wiki/Training-Tesseract for older tesseract version). It says it use neural network-based recognition engine. ALSO “Tesseract 4.00 takes a few days to a couple of weeks. Even with all this new training data, you might find it inadequate for your particular problem, and therefore you are here wanting to retrain it.”. IT’D TAKE A FEW DAYS – WEEKS??? IT SEEMS SAME WITH TRAINING OPENCV. IF I HAVE PLENTY OF TIME I CAN DO THAT. ACTUALLY IT’S INTERESTING! - For visual debugging, build ScrollView.jar
12345678910111213141516teddy@teddy-K43SJ:~/Documents/cpp/tesseract$ make ScrollView.jarmake[1]: Entering directory `/home/teddy/Documents/cpp/tesseract/java'curl -L http://search.maven.org/remotecontent?filepath=org/piccolo2d/piccolo2d-core/3.0/piccolo2d-core-3.0.jar > piccolo2d-core-3.0.jar% Total % Received % Xferd Average Speed Time Time Time CurrentDload Upload Total Spent Left Speed100 161 100 161 0 0 194 0 --:--:-- --:--:-- --:--:-- 193100 121k 100 121k 0 0 48064 0 0:00:02 0:00:02 --:--:-- 139kcurl -L http://search.maven.org/remotecontent?filepath=org/piccolo2d/piccolo2d-extras/3.0/piccolo2d-extras-3.0.jar > piccolo2d-extras-3.0.jar% Total % Received % Xferd Average Speed Time Time Time CurrentDload Upload Total Spent Left Speed100 161 100 161 0 0 280 0 --:--:-- --:--:-- --:--:-- 280100 145k 100 145k 0 0 69142 0 0:00:02 0:00:02 --:--:-- 153kjavac -encoding UTF8 -sourcepath . -classpath piccolo2d-core-3.0.jar:piccolo2d-extras-3.0.jar ./com/google/scrollview/ui/SVAbstractMenuItem.java ./com/google/scrollview/ui/SVCheckboxMenuItem.java ./com/google/scrollview/ui/SVEmptyMenuItem.java ./com/google/scrollview/events/SVEvent.java ./com/google/scrollview/events/SVEventHandler.java ./com/google/scrollview/events/SVEventType.java ./com/google/scrollview/ui/SVImageHandler.java ./com/google/scrollview/ui/SVMenuBar.java ./com/google/scrollview/ui/SVMenuItem.java ./com/google/scrollview/ui/SVPopupMenu.java ./com/google/scrollview/ui/SVSubMenuItem.java ./com/google/scrollview/ui/SVWindow.java ./com/google/scrollview/ScrollView.java -d .jar cfm ScrollView.jar ./Manifest.txt com/google/scrollview/*.class \com/google/scrollview/events/*.class com/google/scrollview/ui/*.classmake[1]: Leaving directory `/home/teddy/Documents/cpp/tesseract/java'
Export ‘SCROLLVIEW_PATH’:
1teddy@teddy-K43SJ:~/Documents/cpp/tesseract$ export SCROLLVIEW_PATH=$PWD/java
- Install Language
For example to install english and many other files, pls see https://github.com/tesseract-ocr/tesseract/wiki/Data-Files. I downloaded english language https://sourceforge.net/projects/tesseract-ocr-alt/files/tesseract-ocr-3.02.eng.tar.gz/download.
<OLD>Then extract the zip file ‘tesseract-ocr-3.02.eng.tar.gz’. then move all files in /tesseract-ocr/tessdata/ to /tesseract/tessdata/
DONT FORGET TO POINT OUT ‘TESSDATA_PREFIX’!
1teddy@teddy-K43SJ:~/Documents/cpp/tesseract$ export TESSDATA_PREFIX='/home/teddy/Documents/cpp/tesseract/tessdata/'
</OLD>
<NEW>It’d be much better to copy/move the ‘tessdata’ directory into /usr/local/share/tessdata/ than copy/move them into /cpp/tesseract/tessdata/ above (the OLD> because we dont have to type ‘export TESSDATA_PREFIX…’ everytime we need to scan an image. I did this after did the old one
1teddy@teddy-K43SJ:~/Documents/cpp/tesseract$ sudo cp tessdata/* /usr/local/share/tessdata/
</NEW>
AT FIRST I FORGOT ABOUT THIS. WHEN I DID A TEST, HERE IS THE MESSAGE
1234567teddy@teddy-K43SJ:~/Documents/cpp/tesseract$ tesseract testing/phototest.tif outputInfo in bmfCreate: Generating pixa of bitmap fonts from stringError opening data file /usr/local/share/tessdata/eng.traineddataPlease make sure the TESSDATA_PREFIX environment variable is set to the parent directory of your "tessdata" directory.Failed loading language 'eng'Tesseract couldn't load any languages!Could not initialize tesseract. - Check tesseract version (with -v or –version)
1234567teddy@teddy-K43SJ:~/Documents/cpp/tesseract$ tesseract --versiontesseract bd45b3aleptonica-1.74.1libgif 4.1.6(?) : libjpeg 8d (libjpeg-turbo 1.3.0) : libpng 1.2.50 : libtiff 4.0.3 : zlib 1.2.8 : libwebp 0.4.4Found AVXFound SSE
- Test!
1234teddy@teddy-K43SJ:~/Documents/cpp/tesseract$ tesseract testing/phototest.tif outputInfo in bmfCreate: Generating pixa of bitmap fonts from stringTesseract Open Source OCR Engine vbd45b3a with LeptonicaPage 1
Here is the image source (‘phototest.tif’)And here is the result in /tesseract/output.txt
123456789This is a lot of 12 point text to test theocr code and see if it works on all typesof file format.The quick brown dog jumped over thelazy fox. The quick brown dog jumpedover the lazy fox. The quick brown dogjumped over the lazy fox. The quickbrown dog jumped over the lazy fox.
NOTE : IT BETTER TO NOT USE FILENAME WITH HAS SPACE BECAUSE TESSERACT CAN’T FIND IT!
ALSO USE IMAGE WITH HIGH RESOLUTION! OR WE CAN DO THE TRAINING STUFF (IF WE HAVE PLENTY OF TIME!!!)
OTHER TESTS
12345678910111213teddy@teddy-K43SJ:~/Documents/cpp/tesseract$ tesseract testing/Screenshot.png outputInfo in bmfCreate: Generating pixa of bitmap fonts from stringTesseract Open Source OCR Engine vbd45b3a with LeptonicaWarning. Invalid resolution 0 dpi. Using 70 instead.teddy@teddy-K43SJ:~/Documents/cpp/tesseract$ tesseract testing/Screen2.png output2Info in bmfCreate: Generating pixa of bitmap fonts from stringTesseract Open Source OCR Engine vbd45b3a with LeptonicaWarning. Invalid resolution 0 dpi. Using 70 instead.teddy@teddy-K43SJ:~/Documents/cpp/tesseract$ tesseract testing/Screen3.png output3Info in bmfCreate: Generating pixa of bitmap fonts from stringTesseract Open Source OCR Engine vbd45b3a with LeptonicaWarning. Invalid resolution 0 dpi. Using 70 instead.Detected 61 diacritics
BUT I FOUND THE RESULT STILL NOT GOOD!!! MANY WEIRD CHARS, SPELLING MISTAKES,ETC
ANOTHER TEST WITH COMMAND TERMINAL:
1234teddy@teddy-K43SJ:~/Documents/cpp/tesseract/testing$ tesseract eurotext.tif out -l engInfo in bmfCreate: Generating pixa of bitmap fonts from stringTesseract Open Source OCR Engine vbd45b3a with LeptonicaPage 1
Display the result in the terminal:
12345678910111213teddy@teddy-K43SJ:~/Documents/cpp/tesseract/testing$ cat out.txtThe (quick) [brown] {fox} jumps!Over the $43,456.78 <lazy> #90 dog& duck/goose, as 12.5% of E-mailfrom aspammer@website.com is spam.Der ,,schnelle” braune Fuchs springtfiber den faulen Hund. Le renard brun«rapide» saute par-dessus le chienparesseux. La volpe marrone rapidasalta sopra i] cane pigro. El zorromarrén répido salta sobre el perroperezoso. A raposa marrom répidasalta sobre 0 C50 preguieoso.
open the original image so we can compare it
1teddy@teddy-K43SJ:~/Documents/cpp/tesseract/testing$ display eurotext.tif
- Question: Can we use tesseract to read/scan pdf file?
pls read: http://kiirani.com/2013/03/22/tesseract-pdf.html
http://www.barryhubbard.com/linux/converting-pdf-to-text-using-tesseract/
http://stackoverflow.com/questions/30925218/converting-a-pdf-to-text-using-tesseract-ocr
TESSERACT CAN’T DO THIS DIRECTLY. IT SAID TO CONVERT THE PDF TO TIFF IMAGE FIRST! ALSO THE MULTI PAGE PDF NEED TO BE CONVERTED TO MULTI TIFF FILES! READ http://www.barryhubbard.com/linux/converting-pdf-to-text-using-tesseract/ TO SEE THE SCRIPT TO DO THAT!
Installing Leptonica 1.74.1 on Ubuntu 14.04
Reference: http://hanzratech.in/2015/01/16/ocr-using-tesseract-on-ubuntu-14-04.html
http://www.leptonica.org/download.html
- Download the newest leptonica version (1.74.1) here : http://www.leptonica.org/source/leptonica-1.74.1.tar.gz
I use wget:
1teddy@teddy-K43SJ:~/Documents/cpp$ wget http://www.leptonica.org/source/leptonica-1.74.1.tar.gz
12345678910--2017-02-03 03:22:11-- http://www.leptonica.org/source/leptonica-1.74.1.tar.gzResolving www.leptonica.org (www.leptonica.org)... 208.67.207.65Connecting to www.leptonica.org (www.leptonica.org)|208.67.207.65|:80... connected.HTTP request sent, awaiting response... 200 OKLength: 11707064 (11M) [application/x-gzip]Saving to: ‘leptonica-1.74.1.tar.gz’100%[======================================>] 11.707.064 1,24MB/s in 12s2017-02-03 03:22:26 (978 KB/s) - ‘leptonica-1.74.1.tar.gz’ saved [11707064/11707064]
- Extract the zip file
123456teddy@teddy-K43SJ:~/Documents/cpp$ tar -zxvf leptonica-1.74.1.tar.gzleptonica-1.74.1/aclocal.m4leptonica-1.74.1/appveyor.yml...leptonica-1.74.1/style-guide.txtleptonica-1.74.1/version-notes.html - Go to the new created directory (leptonica-1.74.1) then configure
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108teddy@teddy-K43SJ:~/Documents/cpp/leptonica-1.74.1$ ./configurechecking build system type... x86_64-unknown-linux-gnuchecking host system type... x86_64-unknown-linux-gnuchecking how to print strings... printfchecking for gcc... gccchecking whether the C compiler works... yeschecking for C compiler default output file name... a.outchecking for suffix of executables...checking whether we are cross compiling... nochecking for suffix of object files... ochecking whether we are using the GNU C compiler... yeschecking whether gcc accepts -g... yeschecking for gcc option to accept ISO C89... none neededchecking whether gcc understands -c and -o together... yeschecking for a sed that does not truncate output... /bin/sedchecking for grep that handles long lines and -e... /bin/grepchecking for egrep... /bin/grep -Echecking for fgrep... /bin/grep -Fchecking for ld used by gcc... /usr/bin/ldchecking if the linker (/usr/bin/ld) is GNU ld... yeschecking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -Bchecking the name lister (/usr/bin/nm -B) interface... BSD nmchecking whether ln -s works... yeschecking the maximum length of command line arguments... 1572864checking whether the shell understands some XSI constructs... yeschecking whether the shell understands "+="... yeschecking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noopchecking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noopchecking for /usr/bin/ld option to reload object files... -rchecking for objdump... objdumpchecking how to recognize dependent libraries... pass_allchecking for dlltool... nochecking how to associate runtime and link libraries... printf %s\nchecking for ar... archecking for archiver @FILE support... @checking for strip... stripchecking for ranlib... ranlibchecking for gawk... gawkchecking command to parse /usr/bin/nm -B output from gcc object... okchecking for sysroot... nochecking for mt... mtchecking if mt is a manifest tool... nochecking how to run the C preprocessor... gcc -Echecking for ANSI C header files... yeschecking for sys/types.h... yeschecking for sys/stat.h... yeschecking for stdlib.h... yeschecking for string.h... yeschecking for memory.h... yeschecking for strings.h... yeschecking for inttypes.h... yeschecking for stdint.h... yeschecking for unistd.h... yeschecking for dlfcn.h... yeschecking for objdir... .libschecking if gcc supports -fno-rtti -fno-exceptions... nochecking for gcc option to produce PIC... -fPIC -DPICchecking if gcc PIC flag -fPIC -DPIC works... yeschecking if gcc static flag -static works... yeschecking if gcc supports -c -o file.o... yeschecking if gcc supports -c -o file.o... (cached) yeschecking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yeschecking whether -lc should be explicitly linked in... nochecking dynamic linker characteristics... GNU/Linux ld.sochecking how to hardcode library paths into programs... immediatechecking whether stripping libraries is possible... yeschecking if libtool supports shared libraries... yeschecking whether to build shared libraries... yeschecking whether to build static libraries... yeschecking for a BSD-compatible install... /usr/bin/install -cchecking whether build environment is sane... yeschecking for a thread-safe mkdir -p... /bin/mkdir -pchecking whether make sets $(MAKE)... yeschecking for style of include used by make... GNUchecking whether make supports nested variables... yeschecking dependency style of gcc... gcc3checking for gawk... (cached) gawkchecking for gcc... (cached) gccchecking whether we are using the GNU C compiler... (cached) yeschecking whether gcc accepts -g... (cached) yeschecking for gcc option to accept ISO C89... (cached) none neededchecking whether gcc understands -c and -o together... (cached) yeschecking how to run the C preprocessor... gcc -Echecking whether ln -s works... yeschecking whether make sets $(MAKE)... (cached) yeschecking for cos in -lm... yeschecking for deflate in -lz... yeschecking for png_read_png in -lpng... yeschecking for jpeg_read_scanlines in -ljpeg... yeschecking for DGifOpenFileHandle in -lgif... yeschecking for TIFFOpen in -ltiff... yeschecking for WebPGetInfo in -lwebp... yeschecking for opj_create_decompress in -lopenjp2... nochecking whether make supports nested variables... (cached) yeschecking for size_t... yeschecking whether byte ordering is bigendian... nochecking whether compiler supports -Wl,--as-needed... yeschecking for fmemopen... yeschecking that generated files are newer than configure... doneconfigure: creating ./config.statusconfig.status: creating Makefileconfig.status: creating src/endianness.hconfig.status: creating src/Makefileconfig.status: creating prog/Makefileconfig.status: creating lept.pcconfig.status: creating config_auto.hconfig.status: executing libtool commandsconfig.status: executing depfiles commands
- make
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710teddy@teddy-K43SJ:~/Documents/cpp/leptonica-1.74.1$ makemake all-recursivemake[1]: Entering directory `/home/teddy/Documents/cpp/leptonica-1.74.1'Making all in srcmake[2]: Entering directory `/home/teddy/Documents/cpp/leptonica-1.74.1/src'CC adaptmap.loCC affine.loCC affinecompose.loCC arrayaccess.loCC bardecode.loCC baseline.loCC bbuffer.loCC bilateral.loCC bilinear.loCC binarize.loCC binexpand.loCC binreduce.loCC blend.loCC bmf.loCC bmpio.loCC bmpiostub.loCC bootnumgen1.loCC bootnumgen2.loCC bootnumgen3.loCC boxbasic.loCC boxfunc1.loCC boxfunc2.loCC boxfunc3.loCC boxfunc4.loCC bytearray.loCC ccbord.loCC ccthin.loCC classapp.loCC colorcontent.loCC coloring.loCC colormap.loCC colormorph.loCC colorquant1.loCC colorquant2.loCC colorseg.loCC colorspace.loCC compare.loCC conncomp.loCC convertfiles.loCC convolve.loCC correlscore.loCC dewarp1.loCC dewarp2.loCC dewarp3.loCC dewarp4.loCC dnabasic.loCC dnafunc1.loCC dnahash.loCC dwacomb.2.loCC dwacomblow.2.loCC edge.loCC encoding.loCC enhance.loCC fhmtauto.loCC fhmtgen.1.loCC fhmtgenlow.1.loCC finditalic.loCC flipdetect.loCC fliphmtgen.loCC fmorphauto.loCC fmorphgen.1.loCC fmorphgenlow.1.loCC fpix1.loCC fpix2.loCC gifio.loCC gifiostub.loCC gplot.loCC graphics.loCC graymorph.loCC grayquant.loCC grayquantlow.loCC heap.loCC jbclass.loCC jp2kheader.loCC jp2kheaderstub.loCC jp2kio.loCC jp2kiostub.loCC jpegio.loCC jpegiostub.loCC kernel.loCC leptwin.loCC libversions.loCC list.loCC map.loCC maze.loCC morph.loCC morphapp.loCC morphdwa.loCC morphseq.loCC numabasic.loCC numafunc1.loCC numafunc2.loCC pageseg.loCC paintcmap.loCC parseprotos.loCC partition.loCC pdfio1.loCC pdfio1stub.loCC pdfio2.loCC pdfio2stub.loCC pix1.loCC pix2.loCC pix3.loCC pix4.loCC pix5.loCC pixabasic.loCC pixacc.loCC pixafunc1.loCC pixafunc2.loCC pixalloc.loCC pixarith.loCC pixcomp.loCC pixconv.loCC pixlabel.loCC pixtiling.loCC pngio.loCC pngiostub.loCC pnmio.loCC pnmiostub.loCC projective.loCC psio1.loCC psio1stub.loCC psio2.loCC psio2stub.loCC ptabasic.loCC ptafunc1.loCC ptafunc2.loCC ptra.loCC quadtree.loCC queue.loCC rank.loCC rbtree.loCC readbarcode.loCC readfile.loCC recogbasic.loCC recogdid.loCC recogident.loCC recogtrain.loCC regutils.loCC rop.loCC ropiplow.loCC roplow.loCC rotate.loCC rotateam.loCC rotateamlow.loCC rotateorth.loCC rotateshear.loCC runlength.loCC sarray1.loCC sarray2.loCC scale.loCC scalelow.loCC seedfill.loCC seedfilllow.loCC sel1.loCC sel2.loCC selgen.loCC shear.loCC skew.loCC spixio.loCC stack.loCC stringcode.loCC strokes.loCC sudoku.loCC textops.loCC tiffio.loCC tiffiostub.loCC utils1.loCC utils2.loCC warper.loCC watershed.loCC webpio.loCC webpiostub.loCC writefile.loCC zlibmem.loCC zlibmemstub.loCCLD liblept.lamake[2]: Leaving directory `/home/teddy/Documents/cpp/leptonica-1.74.1/src'Making all in progmake[2]: Entering directory `/home/teddy/Documents/cpp/leptonica-1.74.1/prog'CC convertfilestopdf.oCCLD convertfilestopdfCC convertfilestops.oCCLD convertfilestopsCC convertformat.oCCLD convertformatCC convertsegfilestopdf.oCCLD convertsegfilestopdfCC convertsegfilestops.oCCLD convertsegfilestopsCC converttopdf.oCCLD converttopdfCC converttops.oCCLD converttopsCC fileinfo.oCCLD fileinfoCC printimage.oCCLD printimageCC printsplitimage.oCCLD printsplitimageCC printtiff.oCCLD printtiffCC splitimage2pdf.oCCLD splitimage2pdfCC xtractprotos.oCCLD xtractprotosCC adaptmap_reg.oCCLD adaptmap_regCC affine_reg.oCCLD affine_regCC alphaops_reg.oCCLD alphaops_regCC alphaxform_reg.oCCLD alphaxform_regCC bilateral2_reg.oCCLD bilateral2_regCC bilinear_reg.oCCLD bilinear_regCC binarize_reg.oCCLD binarize_regCC blackwhite_reg.oCCLD blackwhite_regCC blend1_reg.oCCLD blend1_regCC blend2_reg.oCCLD blend2_regCC blend3_reg.oCCLD blend3_regCC blend4_reg.oCCLD blend4_regCC ccthin1_reg.oCCLD ccthin1_regCC ccthin2_reg.oCCLD ccthin2_regCC cmapquant_reg.oCCLD cmapquant_regCC colorcontent_reg.oCCLD colorcontent_regCC coloring_reg.oCCLD coloring_regCC colorize_reg.oCCLD colorize_regCC colormask_reg.oCCLD colormask_regCC colormorph_reg.oCCLD colormorph_regCC colorquant_reg.oCCLD colorquant_regCC colorseg_reg.oCCLD colorseg_regCC colorspace_reg.oCCLD colorspace_regCC compare_reg.oCCLD compare_regCC compfilter_reg.oCCLD compfilter_regCC conncomp_reg.oCCLD conncomp_regCC convolve_reg.oCCLD convolve_regCC dewarp_reg.oCCLD dewarp_regCC distance_reg.oCCLD distance_regCC dither_reg.oCCLD dither_regCC dna_reg.oCCLD dna_regCC dwamorph1_reg.oCC dwalinear.3.oCC dwalinearlow.3.oCCLD dwamorph1_regCC edge_reg.oCCLD edge_regCC enhance_reg.oCCLD enhance_regCC expand_reg.oCCLD expand_regCC findcorners_reg.oCCLD findcorners_regCC findpattern_reg.oCCLD findpattern_regCC fpix1_reg.oCCLD fpix1_regCC fpix2_reg.oCCLD fpix2_regCC genfonts_reg.oCCLD genfonts_regCC graymorph1_reg.oCCLD graymorph1_regCC graymorph2_reg.oCCLD graymorph2_regCC grayquant_reg.oCCLD grayquant_regCC hardlight_reg.oCCLD hardlight_regCC insert_reg.oCCLD insert_regCC ioformats_reg.oCCLD ioformats_regCC jbclass_reg.oCCLD jbclass_regCC jpegio_reg.oCCLD jpegio_regCC kernel_reg.oCCLD kernel_regCC label_reg.oCCLD label_regCC lineremoval_reg.oCCLD lineremoval_regCC logicops_reg.oCCLD logicops_regCC maze_reg.oCCLD maze_regCC multitype_reg.oCCLD multitype_regCC nearline_reg.oCCLD nearline_regCC newspaper_reg.oCCLD newspaper_regCC overlap_reg.oCCLD overlap_regCC pageseg_reg.oCCLD pageseg_regCC paint_reg.oCCLD paint_regCC paintmask_reg.oCCLD paintmask_regCC pdfseg_reg.oCCLD pdfseg_regCC pixa2_reg.oCCLD pixa2_regCC pixadisp_reg.oCCLD pixadisp_regCC pixserial_reg.oCCLD pixserial_regCC pngio_reg.oCCLD pngio_regCC pnmio_reg.oCCLD pnmio_regCC projection_reg.oCCLD projection_regCC projective_reg.oCCLD projective_regCC psio_reg.oCCLD psio_regCC psioseg_reg.oCCLD psioseg_regCC pta_reg.oCCLD pta_regCC rankbin_reg.oCCLD rankbin_regCC rankhisto_reg.oCCLD rankhisto_regCC rank_reg.oCCLD rank_regCC rasteropip_reg.oCCLD rasteropip_regCC rotate1_reg.oCCLD rotate1_regCC rotate2_reg.oCCLD rotate2_regCC rotateorth_reg.oCCLD rotateorth_regCC scale_reg.oCCLD scale_regCC seedspread_reg.oCCLD seedspread_regCC selio_reg.oCCLD selio_regCC shear1_reg.oCCLD shear1_regCC shear2_reg.oCCLD shear2_regCC skew_reg.oCCLD skew_regCC splitcomp_reg.oCCLD splitcomp_regCC subpixel_reg.oCCLD subpixel_regCC texturefill_reg.oCCLD texturefill_regCC threshnorm_reg.oCCLD threshnorm_regCC translate_reg.oCCLD translate_regCC warper_reg.oCCLD warper_regCC writetext_reg.oCCLD writetext_regCC xformbox_reg.oCCLD xformbox_regCC gifio_reg.oCCLD gifio_regCC webpio_reg.oCCLD webpio_regCC alltests_reg.oCCLD alltests_regCC adaptnorm_reg.oCCLD adaptnorm_regCC bilateral1_reg.oCCLD bilateral1_regCC binmorph1_reg.oCCLD binmorph1_regCC binmorph2_reg.oCCLD binmorph2_regCC binmorph3_reg.oCCLD binmorph3_regCC binmorph4_reg.oCCLD binmorph4_regCC binmorph5_reg.oCCLD binmorph5_regCC boxa1_reg.oCCLD boxa1_regCC boxa2_reg.oCCLD boxa2_regCC conversion_reg.oCCLD conversion_regCC dwamorph2_reg.oCCLD dwamorph2_regCC equal_reg.oCCLD equal_regCC extrema_reg.oCCLD extrema_regCC fhmtauto_reg.oCCLD fhmtauto_regCC files_reg.oCCLD files_regCC flipdetect_reg.oCCLD flipdetect_regCC fmorphauto_reg.oCCLD fmorphauto_regCC grayfill_reg.oCCLD grayfill_regCC heap_reg.oCCLD heap_regCC locminmax_reg.oCCLD locminmax_regCC lowaccess_reg.oCCLD lowaccess_regCC morphseq_reg.oCCLD morphseq_regCC numa1_reg.oCCLD numa1_regCC numa2_reg.oCCLD numa2_regCC pixa1_reg.oCCLD pixa1_regCC pixalloc_reg.oCCLD pixalloc_regCC pixcomp_reg.oCCLD pixcomp_regCC pixmem_reg.oCCLD pixmem_regCC pixtile_reg.oCCLD pixtile_regCC ptra1_reg.oCCLD ptra1_regCC ptra2_reg.oCCLD ptra2_regCC rasterop_reg.oCCLD rasterop_regCC smallpix_reg.oCCLD smallpix_regCC smoothedge_reg.oCCLD smoothedge_regCC string_reg.oCCLD string_regCC wordboxes_reg.oCCLD wordboxes_regCC adaptmap_dark.oCCLD adaptmap_darkCC arabic_lines.oCCLD arabic_linesCC arithtest.oCCLD arithtestCC autogentest1.oCCLD autogentest1CC autogentest2.oCC autogen.137.oCCLD autogentest2CC barcodetest.oCCLD barcodetestCC baselinetest.oCCLD baselinetestCC binarizefiles.oCCLD binarizefilesCC binarize_set.oCCLD binarize_setCC bincompare.oCCLD bincompareCC blendcmaptest.oCCLD blendcmaptestCC buffertest.oCCLD buffertestCC byteatest.oCCLD byteatestCC ccbordtest.oCCLD ccbordtestCC cctest1.oCCLD cctest1CC cleanpdf.oCCLD cleanpdfCC colorsegtest.oCCLD colorsegtestCC comparepages.oCCLD comparepagesCC comparepixa.oCCLD comparepixaCC comparetest.oCCLD comparetestCC concatpdf.oCCLD concatpdfCC contrasttest.oCCLD contrasttestCC converttogray.oCCLD converttograyCC cornertest.oCCLD cornertestCC croptest.oCCLD croptestCC croptext.oCCLD croptextCC dewarprules.oCCLD dewarprulesCC dewarptest1.oCCLD dewarptest1CC dewarptest2.oCCLD dewarptest2CC dewarptest3.oCCLD dewarptest3CC dewarptest4.oCCLD dewarptest4CC dewarptest5.oCCLD dewarptest5CC digitprep1.oCCLD digitprep1CC displayboxa.oCCLD displayboxaCC displayboxes_on_pixa.oCCLD displayboxes_on_pixaCC displaypix.oCCLD displaypixCC displaypixa.oCCLD displaypixaCC dwalineargen.oCCLD dwalineargenCC falsecolortest.oCCLD falsecolortestCC fcombautogen.oCCLD fcombautogenCC fhmtautogen.oCCLD fhmtautogenCC findbinding.oCCLD findbindingCC findpattern1.oCCLD findpattern1CC findpattern2.oCCLD findpattern2CC findpattern3.oCCLD findpattern3CC flipselgen.oCCLD flipselgenCC fmorphautogen.oCCLD fmorphautogenCC fpixcontours.oCCLD fpixcontoursCC gammatest.oCCLD gammatestCC gifio_leaktest.oCCLD gifio_leaktestCC graphicstest.oCCLD graphicstestCC graymorphtest.oCCLD graymorphtestCC hashtest.oCCLD hashtestCC histotest.oCCLD histotestCC htmlviewer.oCCLD htmlviewerCC iotest.oCCLD iotestCC italictest.oCCLD italictestCC jbcorrelation.oCCLD jbcorrelationCC jbrankhaus.oCCLD jbrankhausCC jbwords.oCCLD jbwordsCC listtest.oCCLD listtestCC livre_adapt.oCCLD livre_adaptCC livre_hmt.oCCLD livre_hmtCC livre_makefigs.oCCLD livre_makefigsCC livre_orient.oCCLD livre_orientCC livre_pageseg.oCCLD livre_pagesegCC livre_seedgen.oCCLD livre_seedgenCC livre_tophat.oCCLD livre_tophatCC maketile.oCCLD maketileCC maptest.oCCLD maptestCC misctest1.oCCLD misctest1CC modifyhuesat.oCCLD modifyhuesatCC morphtest1.oCCLD morphtest1CC mtifftest.oCCLD mtifftestCC numaranktest.oCCLD numaranktestCC otsutest1.oCCLD otsutest1CC otsutest2.oCCLD otsutest2CC pagesegtest1.oCCLD pagesegtest1CC pagesegtest2.oCCLD pagesegtest2CC partitiontest.oCCLD partitiontestCC pdfiotest.oCCLD pdfiotestCC percolatetest.oCCLD percolatetestCC pixaatest.oCCLD pixaatestCC pixafileinfo.oCCLD pixafileinfoCC plottest.oCCLD plottestCC quadtreetest.oCCLD quadtreetestCC rbtreetest.oCCLD rbtreetestCC recog_bootnum.oCCLD recog_bootnumCC recogsort.oCCLD recogsortCC recogtest1.oCCLD recogtest1CC reducetest.oCCLD reducetestCC removecmap.oCCLD removecmapCC renderfonts.oCCLD renderfontsCC rotatefastalt.oCCLD rotatefastaltCC rotateorthtest1.oCCLD rotateorthtest1CC rotatetest1.oCCLD rotatetest1CC runlengthtest.oCCLD runlengthtestCC scaleandtile.oCCLD scaleandtileCC scaletest1.oCCLD scaletest1CC scaletest2.oCCLD scaletest2CC seedfilltest.oCCLD seedfilltestCC settest.oCCLD settestCC sharptest.oCCLD sharptestCC sheartest.oCCLD sheartestCC showedges.oCCLD showedgesCC skewtest.oCCLD skewtestCC snapcolortest.oCCLD snapcolortestCC sorttest.oCCLD sorttestCC sudokutest.oCCLD sudokutestCC trctest.oCCLD trctestCC warpertest.oCCLD warpertestCC watershedtest.oCCLD watershedtestCC wordsinorder.oCCLD wordsinorderCC writemtiff.oCCLD writemtiffCC yuvtest.oCCLD yuvtestmake[2]: Leaving directory `/home/teddy/Documents/cpp/leptonica-1.74.1/prog'make[2]: Entering directory `/home/teddy/Documents/cpp/leptonica-1.74.1'make[2]: Leaving directory `/home/teddy/Documents/cpp/leptonica-1.74.1'make[1]: Leaving directory `/home/teddy/Documents/cpp/leptonica-1.74.1'
- Because my machine didn’t have ‘checkinstall’, install it first
1234567891011teddy@teddy-K43SJ:~/Documents/cpp/leptonica-1.74.1$ sudo checkinstall[sudo] password for teddy:sudo: checkinstall: command not foundteddy@teddy-K43SJ:~/Documents/cpp/leptonica-1.74.1$ sudo apt-get install autoconf automake libtool checkinstallReading package lists... DoneBuilding dependency treeReading state information... Doneautoconf is already the newest version.automake is already the newest version....Setting up checkinstall (1.6.2-4ubuntu1) ...
- Create the package with ‘checkinstall’
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143teddy@teddy-K43SJ:~/Documents/cpp/leptonica-1.74.1$ sudo checkinstallcheckinstall 1.6.2, Copyright 2009 Felipe Eduardo Sanchez Diaz DuranThis software is released under the GNU GPL.The package documentation directory ./doc-pak does not exist.Should I create a default set of package docs? [y]:Preparing package documentation...OKPlease write a description for the package.End your description with an empty line or EOF.>> leptonica>>********************************************* Debian package creation selected ********************************************This package will be built according to these values:0 - Maintainer: [ root@teddy-K43SJ ]1 - Summary: [ leptonica ]2 - Name: [ leptonica ]3 - Version: [ 1.74.1 ]4 - Release: [ 1 ]5 - License: [ GPL ]6 - Group: [ checkinstall ]7 - Architecture: [ amd64 ]8 - Source location: [ leptonica-1.74.1 ]9 - Alternate source location: [ ]10 - Requires: [ ]11 - Provides: [ leptonica ]12 - Conflicts: [ ]13 - Replaces: [ ]Enter a number to change any of them or press ENTER to continue:Installing with make install...========================= Installation results ===========================Making install in srcmake[1]: Entering directory `/home/teddy/Documents/cpp/leptonica-1.74.1/src'make[2]: Entering directory `/home/teddy/Documents/cpp/leptonica-1.74.1/src'/bin/mkdir -p '/usr/local/lib'/bin/bash ../libtool --mode=install /usr/bin/install -c liblept.la '/usr/local/lib'libtool: install: /usr/bin/install -c .libs/liblept.so.5.0.1 /usr/local/lib/liblept.so.5.0.1libtool: install: (cd /usr/local/lib && { ln -s -f liblept.so.5.0.1 liblept.so.5 || { rm -f liblept.so.5 && ln -s liblept.so.5.0.1 liblept.so.5; }; })libtool: install: (cd /usr/local/lib && { ln -s -f liblept.so.5.0.1 liblept.so || { rm -f liblept.so && ln -s liblept.so.5.0.1 liblept.so; }; })libtool: install: /usr/bin/install -c .libs/liblept.lai /usr/local/lib/liblept.lalibtool: install: /usr/bin/install -c .libs/liblept.a /usr/local/lib/liblept.alibtool: install: chmod 644 /usr/local/lib/liblept.alibtool: install: ranlib /usr/local/lib/liblept.alibtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/sbin" ldconfig -n /usr/local/lib----------------------------------------------------------------------Libraries have been installed in:/usr/local/libIf you ever happen to want to link against installed librariesin a given directory, LIBDIR, you must either use libtool, andspecify the full pathname of the library, or use the `-LLIBDIR'flag during linking and do at least one of the following:- add LIBDIR to the `LD_LIBRARY_PATH' environment variableduring execution- add LIBDIR to the `LD_RUN_PATH' environment variableduring linking- use the `-Wl,-rpath -Wl,LIBDIR' linker flag- have your system administrator add LIBDIR to `/etc/ld.so.conf'See any operating system documentation about shared libraries formore information, such as the ld(1) and ld.so(8) manual pages.----------------------------------------------------------------------/bin/mkdir -p '/usr/local/include/leptonica'/usr/bin/install -c -m 644 allheaders.h alltypes.h array.h arrayaccess.h bbuffer.h bilateral.h bmf.h bmfdata.h bmp.h ccbord.h dewarp.h endianness.h environ.h gplot.h heap.h imageio.h jbclass.h leptwin.h list.h morph.h pix.h ptra.h queue.h rbtree.h readbarcode.h recog.h regutils.h stack.h stringcode.h sudoku.h watershed.h '/usr/local/include/leptonica'make[2]: Leaving directory `/home/teddy/Documents/cpp/leptonica-1.74.1/src'make[1]: Leaving directory `/home/teddy/Documents/cpp/leptonica-1.74.1/src'Making install in progmake[1]: Entering directory `/home/teddy/Documents/cpp/leptonica-1.74.1/prog'make[2]: Entering directory `/home/teddy/Documents/cpp/leptonica-1.74.1/prog'/bin/mkdir -p '/usr/local/bin'/bin/bash ../libtool --mode=install /usr/bin/install -c convertfilestopdf convertfilestops convertformat convertsegfilestopdf convertsegfilestops converttopdf converttops fileinfo printimage printsplitimage printtiff splitimage2pdf xtractprotos '/usr/local/bin'libtool: install: /usr/bin/install -c .libs/convertfilestopdf /usr/local/bin/convertfilestopdflibtool: install: /usr/bin/install -c .libs/convertfilestops /usr/local/bin/convertfilestopslibtool: install: /usr/bin/install -c .libs/convertformat /usr/local/bin/convertformatlibtool: install: /usr/bin/install -c .libs/convertsegfilestopdf /usr/local/bin/convertsegfilestopdflibtool: install: /usr/bin/install -c .libs/convertsegfilestops /usr/local/bin/convertsegfilestopslibtool: install: /usr/bin/install -c .libs/converttopdf /usr/local/bin/converttopdflibtool: install: /usr/bin/install -c .libs/converttops /usr/local/bin/converttopslibtool: install: /usr/bin/install -c .libs/fileinfo /usr/local/bin/fileinfolibtool: install: /usr/bin/install -c .libs/printimage /usr/local/bin/printimagelibtool: install: /usr/bin/install -c .libs/printsplitimage /usr/local/bin/printsplitimagelibtool: install: /usr/bin/install -c .libs/printtiff /usr/local/bin/printtifflibtool: install: /usr/bin/install -c .libs/splitimage2pdf /usr/local/bin/splitimage2pdflibtool: install: /usr/bin/install -c .libs/xtractprotos /usr/local/bin/xtractprotosmake[2]: Nothing to be done for `install-data-am'.make[2]: Leaving directory `/home/teddy/Documents/cpp/leptonica-1.74.1/prog'make[1]: Leaving directory `/home/teddy/Documents/cpp/leptonica-1.74.1/prog'make[1]: Entering directory `/home/teddy/Documents/cpp/leptonica-1.74.1'make[2]: Entering directory `/home/teddy/Documents/cpp/leptonica-1.74.1'make[2]: Nothing to be done for `install-exec-am'./bin/mkdir -p '/usr/local/lib/pkgconfig'/usr/bin/install -c -m 644 lept.pc '/usr/local/lib/pkgconfig'make[2]: Leaving directory `/home/teddy/Documents/cpp/leptonica-1.74.1'make[1]: Leaving directory `/home/teddy/Documents/cpp/leptonica-1.74.1'======================== Installation successful ==========================Copying documentation directory...././README.md./README.htmlCopying files to the temporary directory...OKStripping ELF binaries and libraries...OKCompressing man pages...OKBuilding file list...OKBuilding Debian package...OKInstalling Debian package...OKErasing temporary files...OKWriting backup package...OKOKDeleting temp dir...OK**********************************************************************Done. The new package has been installed and saved to/home/teddy/Documents/cpp/leptonica-1.74.1/leptonica_1.74.1-1_amd64.debYou can remove it from your system anytime using:dpkg -r leptonica**********************************************************************
- Then execute ‘sudo ldconfig’
1teddy@teddy-K43SJ:~/Documents/cpp/leptonica-1.74.1$ sudo ldconfig
Git and Git Cola Tutorial
GIT TUTORIAL
ref: http://rogerdudler.github.io/git-guide/
1. Create a new repository
create a new directory, open it and perform a
git init
to create a new git repository.
2. checkout a repository
create a working copy of a local repository by running the command
git clone /path/to/repository
git clone https://github.com/balanced/balanced-php.git
when using a remote server, your command will be
git clone username@host:/path/to/repository
git clone advcha@yahoo.com:https://github.com/balanced/balanced-php.git
3. workflow
your local repository consists of three “trees” maintained by git. the first one is your “Working Directory” which holds the actual files. the second one is the “Index” which acts as a staging area and finally the “HEAD” which points to the last commit you’ve made.
4. add & commit
You can propose changes (add it to the Index) using
git add <filename>
git add *
This is the first step in the basic git workflow. To actually commit these changes use
git commit -m “Commit message”
Now the file is committed to the HEAD, but not in your remote repository yet.
5. pushing changes
Your changes are now in the “HEAD” of your local working copy. To send those changes to your remote repository, execute
git push origin master
Change master to whatever branch you want to push your changes to.
If you have not cloned an existing repository and want to connect your repository to a remote server, you need to add it with
git remote add origin <server>
Now you are able to push your changes to the selected remote server
6. branching
Branches are used to develop features isolated from each other. The master branch is the “default” branch when you create a repository. Use other branches for development and merge them back to the master branch upon completion.
create a new branch named “feature_x” and switch to it using
git checkout -b feature_x
switch back to master
git checkout master
and delete the branch again
git branch -d feature_x
a branch is not available to others unless you push the branch to your remote repository
git push origin <branch>
7. update & merge
to update your local repository to the newest commit, execute
git pull
in your working directory to fetch and merge remote changes.
to merge another branch into your active branch (e.g. master), use
git merge <branch>
in both cases git tries to auto-merge changes. Unfortunately, this is not always possible and results in conflicts. You are responsible to merge those conflicts manually by editing the files shown by git. After changing, you need to mark them as merged with
git add <filename>
before merging changes, you can also preview them by using
git diff <source_branch> <target_branch>
8. tagging
it’s recommended to create tags for software releases. this is a known concept, which also exists in SVN. You can create a new tag named 1.0.0 by executing
git tag 1.0.0 1b2e1d63ff
the 1b2e1d63ff stands for the first 10 characters of the commit id you want to reference with your tag. You can get the commit id by looking at the log
9. log
in its simplest form, you can study repository history using..
git log
You can add a lot of parameters to make the log look like what you want. To see only the commits of a certain author:
git log –author=bob
To see a very compressed log where each commit is one line:
git log –pretty=oneline
Or maybe you want to see an ASCII art tree of all the branches, decorated with the names of tags and branches:
git log –graph –oneline –decorate –all
See only which files have changed:
git log –name-status
These are just a few of the possible parameters you can use. For more, see
git log –help
10. replace local changes
In case you did something wrong, which for sure never happens ;), you can replace local changes using the command
git checkout — <filename>
this replaces the changes in your working tree with the last content in HEAD. Changes already added to the index, as well as new files, will be kept.
If you instead want to drop all your local changes and commits, fetch the latest history from the server and point your local master branch at it like this
git fetch origin
git reset –hard origin/master
11. useful hints
built-in git GUI
gitk
use colorful git output
git config color.ui true
show log on just one line per commit
git config format.pretty oneline
use interactive adding
git add -i
GIT COLA
tutorial: http://cerebrux.net/2013/02/07/github-git-cola-gui-step-by-step-management-of-your-code/
1) Install Git Cola GUI through Software Center or through terminal:
sudo apt-get install git-cola
2) Copy the repository link from the website then Launch Git Cola and paste the link. In terminal, it’s equivalent of
git clone /github/repo/link.git
Once you launch the Git Cola click «Clone» and paste the link you have copied from Github
Once you provided the link, select where to download the repository and click «Open»
This is the main window. It’s empty because we haven’t changed any code
3) You can edit your preferences by clicking Edit menu were you can customize your settings like email, username, prepared editor etc. In terminal it’s equivalent of:
git config –global user.name ‘John Doe’
git config –global user.email ‘johndoe@mail.com’
To edit your preferences, click on «Edit –> Preferences»
4) Now edit some files inside your local repository clone and the hit the refresh Rescan button on Git Cola. In terminal, it’s equivalent of:
git status
and
git diff
Open the file that you need to edit and start editing. Save and close the file
5) Now once you can hit Stage, Comment to add a message for the changes and the Commit these changes:
In terminal, it’s equivalent of
git add filename
git add README.md
and then
git commit -m ‘Commit message’
git commit -m ‘Update the README file for better description’
OR COMBINE ADD AND COMMIT LIKE THIS:
git commit -a -m ‘Update the README file for better description’
Click Stage, add some comment and then commit
6) You can also Tag your changes to create versions of your repo by clicking Actions menu –> Create Tag
In terminal, it’s equivalent of
git tag -a v4.5.6 -m ‘my version 4.5.6’
Create tag by clicking «Actions –> Add Tag»
7) Now you can upload (push) your changes and versions (tags) to your GitHub account.
In terminal, it’s equivalent of
git push origin master
and your tag with
git push origin v1.0.4
Click on «Push» on the main window, check that «Include tags» is activated and then click Push
Provide your Username and Password of your Github account
Check the commands tab to see the background messages
8) Now you can go to your Github page to see your changes and your tags
Refresh the GitHub page to see your comment and the commit history
I WANT TO UPDATE MY LOCAL REPOSITORY:
ref:http://stackoverflow.com/questions/1443210/updating-a-local-repository-with-changes-from-a-github-repository
teddy@teddy-K43SJ:~/Documents/java/processing-java-client$ git pull origin master
Username for ‘https://github.com’: advcha
Password for ‘https://advcha@github.com’:
From https://github.com/finix-payments/processing-java-client
* branch master -> FETCH_HEAD
Updating 79ff8fe..c52614a
error: Your local changes to the following files would be overwritten by merge:
src/main/java/com/finix/payments/processing/client/Configuration.java
src/main/java/com/finix/payments/processing/client/model/User.java
Please, commit your changes or stash them before you can merge.
Aborting
ref:http://stackoverflow.com/questions/15745045/how-do-i-resolve-git-saying-commit-your-changes-or-stash-them-before-you-can-me
https://git-scm.com/book/en/v1/Git-Tools-Stashing
so pls do:
git stash
then repeat:
git pull origin master
I ADDED A .gitignore FILE. I ALREADY ADD AND COMMIT THE FILE BUT THEN I GOT ERROR HERE WHEN TRYING TO PUSH A CHANGES:
! [rejected] master -> master (fetch first)
error: failed to push some refs to ‘https://github.com/advcha/persuratan.git’
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., ‘git pull …’) before pushing again.
hint: See the ‘Note about fast-forwards’ in ‘git push –help’ for details.
SO ACTUALLY I DELETED A FEW FILES (WITH ~) ON THE REMOTE REPO. I NEED TO UPDATE MY LOCAL REPO FIRST
git pull origin master
THEN PUSH AGAIN
git push origin master
IF WE DONT WANT TO UPLOAD/PUSH A FILE LIKE database.php
1. Create a new file .gitignore
here is the content:
app/config/database.php
2. type: git commit -a -m ‘add .gitignore file’
3. type: git push OR git push origin master
REMOTE, BRANCH, CHECKOUT
1. check our remote repo:
type: git remote OR MORE DETAIL git remote -v
teddy@teddy-K43SJ:~/Documents/works/persuratan$ git remote -v
origin https://github.com/advcha/persuratan.git (fetch)
origin https://github.com/advcha/persuratan.git (push)
2. We can add a branch in the remote repo.
on the remote repo website, just click the down arrow at Branch:master then type a branch we want like: addfeature
3. in local repo, check our branch
git branch
teddy@teddy-K43SJ:~/Documents/works/persuratan$ git branch
* master
WE ONLY HAVE ONE BRANCH ‘master’ YET
4. create a local repo:
git branch addfeature
teddy@teddy-K43SJ:~/Documents/works/persuratan$ git branch addfeature
THEN check again:
teddy@teddy-K43SJ:~/Documents/works/persuratan$ git branch
addfeature
* master
5. to switch to the new local repo:
git checkout addfeature
teddy@teddy-K43SJ:~/Documents/works/persuratan$ git checkout addfeature
Switched to branch ‘addfeature’
6. make a change in index.html file (AYNTHING) then check status:
teddy@teddy-K43SJ:~/Documents/works/persuratan$ git status
On branch addfeature
Changes not staged for commit:
(use “git add <file>…” to update what will be committed)
(use “git checkout — <file>…” to discard changes in working directory)
modified: index.html
no changes added to commit (use “git add” and/or “git commit -a”)
teddy@teddy-K43SJ:~/Documents/works/persuratan$ git commit -a -m ‘change index.php test’
[addfeature fc28a68] change index.php test
1 file changed, 103 insertions(+), 102 deletions(-)
rewrite index.html (97%)
7. commit the changes
teddy@teddy-K43SJ:~/Documents/works/persuratan$ git commit -a -m ‘change index.php test’
[addfeature fc28a68] change index.php test
1 file changed, 103 insertions(+), 102 deletions(-)
rewrite index.html (97%)
8. then push to the remote repo (branch ‘addfeature’)
teddy@teddy-K43SJ:~/Documents/works/persuratan$ git push addfeature
9. Check the remote repo
index.html in master branch not affected ONLY in addfeature branch
10. merge the branch to master(NOT WORKING!!!)
git merge master
git checkout master
git push
OK THIS HAS TO BE DONE IN github PAGE. FIRST CLICK ‘New Pull Request’
11. Click ‘Create Pull Request’ … THEN WE CAN MERGE IT
AT LAST WE CAN DELETE THE ‘addfeature’ BRANCH BECAUSE ITS ALREADY MERGED TO ‘master’ BRANCH!
WE CAN ALSO DELETE THE REMOTE BRANCH FROM TERMINAL WITH git push origin :addfeature (BE CAREFULL!!!)
teddy@teddy-K43SJ:~/Documents/works/persuratan$ git push origin :addfeature
Username for ‘https://github.com’: advcha
Password for ‘https://advcha@github.com’:
error: unable to delete ‘addfeature’: remote ref does not exist
error: failed to push some refs to ‘https://github.com/advcha/persuratan.git’
ref:http://makandracards.com/makandra/621-git-delete-a-branch-local-or-remote
http://stackoverflow.com/questions/2003505/delete-a-git-branch-both-locally-and-remotely
12. NOW WE NEED TO MERGE IT ALSO IN OUR LOCAL REPO
type: git checkout master
then: git pull
teddy@teddy-K43SJ:~/Documents/works/persuratan$ git checkout master
Already on ‘master’
Your branch is up-to-date with ‘origin/master’.
teddy@teddy-K43SJ:~/Documents/works/persuratan$ git pull
remote: Counting objects: 1, done.
remote: Total 1 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (1/1), done.
From https://github.com/advcha/persuratan
1d338b5..7cc859e master -> origin/master
Updating 1d338b5..7cc859e
Fast-forward
index.html | 187 +++++++++++++++++++++++++++++++——————————
1 file changed, 94 insertions(+), 93 deletions(-)
13. DELETE LOCAL BRANCH ‘addfeature’ (ref:http://makandracards.com/makandra/621-git-delete-a-branch-local-or-remote)
type: git branch -d addfeature
teddy@teddy-K43SJ:~/Documents/works/persuratan$ git branch -d addfeature
Deleted branch addfeature (was fc28a68).
14. Check the branch again
teddy@teddy-K43SJ:~/Documents/works/persuratan$ git branch
* master
15. SYNCHRONIZED THE BRANCHES (REMOTE & LOCAL)
teddy@teddy-K43SJ:~/Documents/works/persuratan$ git fetch -p
From https://github.com/advcha/persuratan
x [deleted] (none) -> origin/addfeature
MERGE TWO REPOSITORIES
re:http://saintgimp.org/2013/01/22/merging-two-git-repositories-into-one-repository-without-losing-file-history/
http://stackoverflow.com/questions/1425892/how-do-you-merge-two-git-repositories
REAL WORLD SAMPLE DEVELOPMENT WITH GITHUB:http://nvie.com/posts/a-successful-git-branching-model/
WORKING SAMPLE FROM SCRATCH
1. Create a new repository in my github account: OpenCV-python (https://github.com/advcha/OpenCV-Python.git)
2. in my terminal, clone it into /media/data/MASTER/opencv/
teddy@teddy-K43SJ:/media/data/MASTER/opencv$ git clone https://github.com/advcha/OpenCV-Python.git
Cloning into ‘OpenCV-Python’…
remote: Counting objects: 3, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), done.
Checking connectivity… done.
3. Add some files and directories in it like images/ and opencv_read_write.py (I copied them from /home/teddy/opencv/samples/python/) OR SEARCH THE FILENAME IN /media/data/MASTER/opencv/opencv_python_tutorial.txt
4. check the un-uploaded file and dir with ‘git status’:
teddy@teddy-K43SJ:/media/data/MASTER/opencv/OpenCV-Python$ git status
On branch master
Your branch is up-to-date with ‘origin/master’.
Untracked files:
(use “git add <file>…” to include in what will be committed)
images/
opencv_read_write.py
nothing added to commit but untracked files present (use “git add” to track)
5. Add the file and the dir to prepare for uploading with ‘git add *’:
teddy@teddy-K43SJ:/media/data/MASTER/opencv/OpenCV-Python$ git add *
6. Commit the file and dir and give it a tag ‘upload some python scripts’:
teddy@teddy-K43SJ:/media/data/MASTER/opencv/OpenCV-Python$ git commit -a -m ‘upload some python scripts’
[master 46abb81] upload some python scripts
28 files changed, 17 insertions(+)
create mode 100644 images/Temperate 09 – Small.png
create mode 100644 images/Temperate 09 – Small_clean.png
create mode 100644 images/approx.jpg
create mode 100644 images/bolt.png
create mode 100644 images/clahe.jpg
create mode 100644 images/dave.jpg
create mode 100644 images/dave.png
create mode 100644 images/fruits.jpg
create mode 100644 images/fruits_gray.jpg
create mode 100644 images/grass.png
create mode 100644 images/hand.jpg
create mode 100644 images/john_dory-zeus_faber.jpg
create mode 100644 images/mario.jpg
create mode 100644 images/mario_coin.png
create mode 100644 images/mario_coin1.png
create mode 100644 images/messi5.jpg
create mode 100644 images/messi_face.jpg
create mode 100644 images/more_coins.png
create mode 100644 images/my_family.jpg
create mode 100644 images/noisy2.png
create mode 100644 images/opencv_logo.png
create mode 100644 images/rect.jpg
create mode 100644 images/shapes.png
create mode 100644 images/star.jpg
create mode 100644 images/star2.jpg
create mode 100644 images/uss_arizona.jpg
create mode 100644 images/water_coins.jpg
create mode 100644 opencv_read_write.py
7. Push them to github account with ‘git push origin master’:
teddy@teddy-K43SJ:/media/data/MASTER/opencv/OpenCV-Python$ git push origin master
Username for ‘https://github.com’: advcha
Password for ‘https://advcha@github.com’:
Counting objects: 32, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (31/31), done.
Writing objects: 100% (31/31), 5.93 MiB | 1.10 MiB/s, done.
Total 31 (delta 0), reused 0 (delta 0)
To https://github.com/advcha/OpenCV-Python.git
330ef49..46abb81 master -> master
8. Check again my local repo with ‘git status’:
teddy@teddy-K43SJ:/media/data/MASTER/opencv/OpenCV-Python$ git status
On branch master
Your branch is up-to-date with ‘origin/master’.
nothing to commit, working directory clean
OK DONE
9. Add some python scripts from /home/teddy/opencv/samples/python/ (copy and paste them into /media/data/MASTER/opencv/OpenCV-Python)
10. check with ‘git status’:
teddy@teddy-K43SJ:/media/data/MASTER/opencv/OpenCV-Python$ git status
On branch master
Your branch is up-to-date with ‘origin/master’.
Untracked files:
(use “git add <file>…” to include in what will be committed)
drawing.py
mouse_draw.py
mouse_paint.py
mouse_paint_img.py
nothing added to commit but untracked files present (use “git add” to track)
11. add them with ‘git add *’:
teddy@teddy-K43SJ:/media/data/MASTER/opencv/OpenCV-Python$ git add *
12. commit them:
teddy@teddy-K43SJ:/media/data/MASTER/opencv/OpenCV-Python$ git commit -a -m ‘Upload some python scripts’
[master 567e4fd] Upload some python scripts
4 files changed, 165 insertions(+)
create mode 100644 drawing.py
create mode 100644 mouse_draw.py
create mode 100644 mouse_paint.py
create mode 100644 mouse_paint_img.py
13. The last, push them into my github account:
teddy@teddy-K43SJ:/media/data/MASTER/opencv/OpenCV-Python$ git push origin master
Username for ‘https://github.com’: advcha
Password for ‘https://advcha@github.com’:
Counting objects: 7, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 2.66 KiB | 0 bytes/s, done.
Total 6 (delta 0), reused 0 (delta 0)
To https://github.com/advcha/OpenCV-Python.git
46abb81..567e4fd master -> master
OK. DO IT OVER AND OVER AGAIN FOR THE OTHERS FILES AND DIRECTORIES!!!
HOW TO UPDATE FILE AND UPDATE THE CHANGES TO REMOTE REPO?
1. Modify README.md to
Some python scripts for practising OpenCV. Use Python 2.7 (some scripts works for Python 3.4) and OpenCV 3.1.0.
SAVE THE MODIFICATION (IT BETTER TO REMOVE THE TEMPORARY FILE LIKE README.md~)
2. check the status:
teddy@teddy-K43SJ:/media/data/MASTER/opencv/OpenCV-Python$ git status
On branch master
Your branch is up-to-date with ‘origin/master’.
Changes not staged for commit:
(use “git add <file>…” to update what will be committed)
(use “git checkout — <file>…” to discard changes in working directory)
modified: README.md
Untracked files:
(use “git add <file>…” to include in what will be committed)
README.md~
no changes added to commit (use “git add” and/or “git commit -a”)
3. use ‘git add *’
teddy@teddy-K43SJ:/media/data/MASTER/opencv/OpenCV-Python$ git add *
4. commit:
teddy@teddy-K43SJ:/media/data/MASTER/opencv/OpenCV-Python$ git commit -a -m ‘Update README’
[master c7ea471] Update README
2 files changed, 3 insertions(+), 1 deletion(-)
create mode 100644 README.md~
5. use ‘git push’:
teddy@teddy-K43SJ:/media/data/MASTER/opencv/OpenCV-Python$ git push origin master
Username for ‘https://github.com’: advcha
Password for ‘https://advcha@github.com’:
Counting objects: 5, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 367 bytes | 0 bytes/s, done.
Total 3 (delta 1), reused 0 (delta 0)
To https://github.com/advcha/OpenCV-Python.git
1f66fba..c7ea471 master -> master
LOCAL REPO DIRECTORY HAS DIFFERENT NAME WITH REMOTE REPO:
ref:http://stackoverflow.com/questions/8570636/change-name-of-folder-when-cloning-from-github
git clone https://github.com/sferik/sign-in-with-twitter.git signin
REMOTE REPO: sign-in-with-twitter
LOCAL REPO: signin
GITHUB GLOSSARY AND TERMINOLOGY
Source: https://help.github.com/articles/github-glossary/
Below are a list of some Git and GitHub specific terms we use across our sites and documentation.
If you see some Git-related terminology not listed here, you might find an explanation of it in Git Reference or our Git SCM book.
BLAME
The “blame” feature in Git describes the last modification to each line of a file, which generally displays the revision, author and time. This is helpful, for example, in tracking down when a feature was added, or which commit led to a particular bug.
BRANCH
A branch is a parallel version of a repository. It is contained within the repository, but does not affect the primary or master branch allowing you to work freely without disrupting the “live” version. When you’ve made the changes you want to make, you can merge your branch back into the master branch to publish your changes.
CLONE
A clone is a copy of a repository that lives on your computer instead of on a website’s server somewhere, or the act of making that copy. With your clone you can edit the files in your preferred editor and use Git to keep track of your changes without having to be online. It is, however, connected to the remote version so that changes can be synced between the two. You can push your local changes to the remote to keep them synced when you’re online.
COLLABORATOR
A collaborator is a person with read and write access to a repository who has been invited to contribute by the repository owner.
COMMIT
A commit, or “revision”, is an individual change to a file (or set of files). It’s like when you save a file, except with Git, every time you save it creates a unique ID (a.k.a. the “SHA” or “hash”) that allows you to keep record of what changes were made when and by who. Commits usually contain a commit message which is a brief description of what changes were made.
CONTRIBUTOR
A contributor is someone who has contributed to a project by having a pull request merged but does not have collaborator access.
DIFF
A diff is the difference in changes between two commits, or saved changes. The diff will visually describe what was added or removed from a file since its last commit.
FETCH
Fetching refers to getting the latest changes from an online repository (like GitHub.com) without merging them in. Once these changes are fetched you can compare them to your local branches (the code residing on your local machine).
FORK
A fork is a personal copy of another user’s repository that lives on your account. Forks allow you to freely make changes to a project without affecting the original. Forks remain attached to the original, allowing you to submit a pull request to the original’s author to update with your changes. You can also keep your fork up to date by pulling in updates from the original.
GIT
Git is an open source program for tracking changes in text files. It was written by the author of the Linux operating system, and is the core technology that GitHub, the social and user interface, is built on top of.
ISSUE
Issues are suggested improvements, tasks or questions related to the repository. Issues can be created by anyone (for public repositories), and are moderated by repository collaborators. Each issue contains its own discussion forum, can be labeled and assigned to a user.
MARKDOWN
Markdown is an incredibly simple semantic file format, not too dissimilar from .doc, .rtf and .txt. Markdown makes it easy for even those without a web-publishing background to write prose (including with links, lists, bullets, etc.) and have it displayed like a website. GitHub supports Markdown, and you can learn about the semantics here.
MERGE
Merging takes the changes from one branch (in the same repository or from a fork), and applies them into another. This often happens as a Pull Request (which can be thought of as a request to merge), or via the command line. A merge can be done automatically via a Pull Request via the GitHub.com web interface if there are no conflicting changes, or can always be done via the command line. See Merging a pull request.
OPEN SOURCE
Open source software is software that can be freely used, modified, and shared (in both modified and unmodified form) by anyone. Today the concept of “open source” is often extended beyond software, to represent a philosophy of collaboration in which working materials are made available online for anyone to fork, modify, discuss, and contribute to.
ORGANIZATIONS
Organizations are a group of two or more users that typically mirror real-world organizations. They are administered by users and can contain both repositories and teams.
PRIVATE REPOSITORY
Private repositories are repositories that can only be viewed or contributed to by their creator and collaborators the creator specified.
PULL
Pull refers to when you are fetching in changes and merging them. For instance, if someone has edited the remote file you’re both working on, you’ll want to pull in those changes to your local copy so that it’s up to date.
PULL REQUEST (PR)
Pull requests are proposed changes to a repository submitted by a user and accepted or rejected by a repository’s collaborators. Like issues, pull requests each have their own discussion forum. See Using Pull Requests.
PUSH
Pushing refers to sending your committed changes to a remote repository such as GitHub.com. For instance, if you change something locally, you’d want to then push those changes so that others may access them.
REMOTE
This is the version of something that is hosted on a server, most likely GitHub.com. It can be connected to local clones so that changes can be synced.
REPOSITORY
A repository is the most basic element of GitHub. They’re easiest to imagine as a project’s folder. A repository contains all of the project files (including documentation), and stores each file’s revision history. Repositories can have multiple collaborators and can be either public or private.
SSH KEY
SSH keys are a way to identify yourself to an online server, using an encrypted message. It’s as if your computer has its own unique password to another service. GitHub uses SSH keys to securely transfer information from GitHub.com to your computer.
UPSTREAM
When talking about a branch or a fork, the primary branch on the original repository is often referred to as the “upstream”, since that is the main place that other changes will come in from. The branch/fork you are working on is then called the “downstream”.
USER
Users are personal GitHub accounts. Each user has a personal profile, and can own multiple repositories, public or private. They can create or be invited to join organizations or collaborate on another user’s repository.
ref:https://www.kernel.org/pub/software/scm/git/docs/gitglossary.html
alternate object database
Via the alternates mechanism, a repository can inherit part of its object database from another object database, which is called an “alternate”.
bare repository
A bare repository is normally an appropriately named directory with a .git suffix that does not have a locally checked-out copy of any of the files under revision control. That is, all of the Git administrative and control files that would normally be present in the hidden .git sub-directory are directly present in the repository.git directory instead, and no other files are present and checked out. Usually publishers of public repositories make bare repositories available.
blob object
Untyped object, e.g. the contents of a file.
branch
A “branch” is an active line of development. The most recent commit on a branch is referred to as the tip of that branch. The tip of the branch is referenced by a branch head, which moves forward as additional development is done on the branch. A single Git repository can track an arbitrary number of branches, but your working tree is associated with just one of them (the “current” or “checked out” branch), and HEAD points to that branch.
cache
Obsolete for: index.
chain
A list of objects, where each object in the list contains a reference to its successor (for example, the successor of a commit could be one of its parents).
changeset
BitKeeper/cvsps speak for “commit”. Since Git does not store changes, but states, it really does not make sense to use the term “changesets” with Git.
checkout
The action of updating all or part of the working tree with a tree object or blob from the object database, and updating the index and HEAD if the whole working tree has been pointed at a new branch.
cherry-picking
In SCM jargon, “cherry pick” means to choose a subset of changes out of a series of changes (typically commits) and record them as a new series of changes on top of a different codebase. In Git, this is performed by the “git cherry-pick” command to extract the change introduced by an existing commit and to record it based on the tip of the current branch as a new commit.
clean
A working tree is clean, if it corresponds to the revision referenced by the current head. Also see “dirty”.
commit
As a noun: A single point in the Git history; the entire history of a project is represented as a set of interrelated commits. The word “commit” is often used by Git in the same places other revision control systems use the words “revision” or “version”. Also used as a short hand for commit object.
As a verb: The action of storing a new snapshot of the project’s state in the Git history, by creating a new commit representing the current state of the index and advancing HEAD to point at the new commit.
commit object
An object which contains the information about a particular revision, such as parents, committer, author, date and the tree object which corresponds to the top directory of the stored revision.
commit-ish (also committish)
A commit object or an object that can be recursively dereferenced to a commit object. The following are all commit-ishes: a commit object, a tag object that points to a commit object, a tag object that points to a tag object that points to a commit object, etc.
core Git
Fundamental data structures and utilities of Git. Exposes only limited source code management tools.
DAG
Directed acyclic graph. The commit objects form a directed acyclic graph, because they have parents (directed), and the graph of commit objects is acyclic (there is no chain which begins and ends with the same object).
dangling object
An unreachable object which is not reachable even from other unreachable objects; a dangling object has no references to it from any reference or object in the repository.
detached HEAD
Normally the HEAD stores the name of a branch, and commands that operate on the history HEAD represents operate on the history leading to the tip of the branch the HEAD points at. However, Git also allows you to check out an arbitrary commit that isn’t necessarily the tip of any particular branch. The HEAD in such a state is called “detached”.
Note that commands that operate on the history of the current branch (e.g. git commit to build a new history on top of it) still work while the HEAD is detached. They update the HEAD to point at the tip of the updated history without affecting any branch. Commands that update or inquire information about the current branch (e.g. git branch –set-upstream-to that sets what remote-tracking branch the current branch integrates with) obviously do not work, as there is no (real) current branch to ask about in this state.
directory
The list you get with “ls” 🙂
dirty
A working tree is said to be “dirty” if it contains modifications which have not been committed to the current branch.
evil merge
An evil merge is a merge that introduces changes that do not appear in any parent.
fast-forward
A fast-forward is a special type of merge where you have a revision and you are “merging” another branch’s changes that happen to be a descendant of what you have. In such these cases, you do not make a new merge commit but instead just update to his revision. This will happen frequently on a remote-tracking branch of a remote repository.
fetch
Fetching a branch means to get the branch’s head ref from a remote repository, to find out which objects are missing from the local object database, and to get them, too. See also git-fetch(1).
file system
Linus Torvalds originally designed Git to be a user space file system, i.e. the infrastructure to hold files and directories. That ensured the efficiency and speed of Git.
Git archive
Synonym for repository (for arch people).
gitfile
A plain file .git at the root of a working tree that points at the directory that is the real repository.
grafts
Grafts enables two otherwise different lines of development to be joined together by recording fake ancestry information for commits. This way you can make Git pretend the set of parents a commit has is different from what was recorded when the commit was created. Configured via the .git/info/grafts file.
Note that the grafts mechanism is outdated and can lead to problems transferring objects between repositories; see git-replace(1) for a more flexible and robust system to do the same thing.
hash
In Git’s context, synonym for object name.
head
A named reference to the commit at the tip of a branch. Heads are stored in a file in $GIT_DIR/refs/heads/ directory, except when using packed refs. (See git-pack-refs(1).)
HEAD
The current branch. In more detail: Your working tree is normally derived from the state of the tree referred to by HEAD. HEAD is a reference to one of the heads in your repository, except when using a detached HEAD, in which case it directly references an arbitrary commit.
head ref
A synonym for head.
hook
During the normal execution of several Git commands, call-outs are made to optional scripts that allow a developer to add functionality or checking. Typically, the hooks allow for a command to be pre-verified and potentially aborted, and allow for a post-notification after the operation is done. The hook scripts are found in the $GIT_DIR/hooks/ directory, and are enabled by simply removing the .sample suffix from the filename. In earlier versions of Git you had to make them executable.
index
A collection of files with stat information, whose contents are stored as objects. The index is a stored version of your working tree. Truth be told, it can also contain a second, and even a third version of a working tree, which are used when merging.
index entry
The information regarding a particular file, stored in the index. An index entry can be unmerged, if a merge was started, but not yet finished (i.e. if the index contains multiple versions of that file).
master
The default development branch. Whenever you create a Git repository, a branch named “master” is created, and becomes the active branch. In most cases, this contains the local development, though that is purely by convention and is not required.
merge
As a verb: To bring the contents of another branch (possibly from an external repository) into the current branch. In the case where the merged-in branch is from a different repository, this is done by first fetching the remote branch and then merging the result into the current branch. This combination of fetch and merge operations is called a pull. Merging is performed by an automatic process that identifies changes made since the branches diverged, and then applies all those changes together. In cases where changes conflict, manual intervention may be required to complete the merge.
As a noun: unless it is a fast-forward, a successful merge results in the creation of a new commit representing the result of the merge, and having as parents the tips of the merged branches. This commit is referred to as a “merge commit”, or sometimes just a “merge”.
object
The unit of storage in Git. It is uniquely identified by the SHA-1 of its contents. Consequently, an object can not be changed.
object database
Stores a set of “objects”, and an individual object is identified by its object name. The objects usually live in $GIT_DIR/objects/.
object identifier
Synonym for object name.
object name
The unique identifier of an object. The object name is usually represented by a 40 character hexadecimal string. Also colloquially called SHA-1.
object type
One of the identifiers “commit”, “tree”, “tag” or “blob” describing the type of an object.
octopus
To merge more than two branches.
origin
The default upstream repository. Most projects have at least one upstream project which they track. By default origin is used for that purpose. New upstream updates will be fetched into remote-tracking branches named origin/name-of-upstream-branch, which you can see using git branch -r.
pack
A set of objects which have been compressed into one file (to save space or to transmit them efficiently).
pack index
The list of identifiers, and other information, of the objects in a pack, to assist in efficiently accessing the contents of a pack.
pathspec
Pattern used to limit paths in Git commands.
Pathspecs are used on the command line of “git ls-files”, “git ls-tree”, “git add”, “git grep”, “git diff”, “git checkout”, and many other commands to limit the scope of operations to some subset of the tree or worktree. See the documentation of each command for whether paths are relative to the current directory or toplevel. The pathspec syntax is as follows:
any path matches itself
the pathspec up to the last slash represents a directory prefix. The scope of that pathspec is limited to that subtree.
the rest of the pathspec is a pattern for the remainder of the pathname. Paths relative to the directory prefix will be matched against that pattern using fnmatch(3); in particular, * and ? can match directory separators.
For example, Documentation/*.jpg will match all .jpg files in the Documentation subtree, including Documentation/chapter_1/figure_1.jpg.
A pathspec that begins with a colon : has special meaning. In the short form, the leading colon : is followed by zero or more “magic signature” letters (which optionally is terminated by another colon :), and the remainder is the pattern to match against the path. The “magic signature” consists of ASCII symbols that are neither alphanumeric, glob, regex special characters nor colon. The optional colon that terminates the “magic signature” can be omitted if the pattern begins with a character that does not belong to “magic signature” symbol set and is not a colon.
In the long form, the leading colon : is followed by a open parenthesis (, a comma-separated list of zero or more “magic words”, and a close parentheses ), and the remainder is the pattern to match against the path.
A pathspec with only a colon means “there is no pathspec”. This form should not be combined with other pathspec.
top
The magic word top (magic signature: /) makes the pattern match from the root of the working tree, even when you are running the command from inside a subdirectory.
literal
Wildcards in the pattern such as * or ? are treated as literal characters.
icase
Case insensitive match.
glob
Git treats the pattern as a shell glob suitable for consumption by fnmatch(3) with the FNM_PATHNAME flag: wildcards in the pattern will not match a / in the pathname. For example, “Documentation/*.html” matches “Documentation/git.html” but not “Documentation/ppc/ppc.html” or “tools/perf/Documentation/perf.html”.
Two consecutive asterisks (“**”) in patterns matched against full pathname may have special meaning:
A leading “**” followed by a slash means match in all directories. For example, “**/foo” matches file or directory “foo” anywhere, the same as pattern “foo”. “**/foo/bar” matches file or directory “bar” anywhere that is directly under directory “foo”.
A trailing “/**” matches everything inside. For example, “abc/**” matches all files inside directory “abc”, relative to the location of the .gitignore file, with infinite depth.
A slash followed by two consecutive asterisks then a slash matches zero or more directories. For example, “a/**/b” matches “a/b”, “a/x/b”, “a/x/y/b” and so on.
Other consecutive asterisks are considered invalid.
Glob magic is incompatible with literal magic.
exclude
After a path matches any non-exclude pathspec, it will be run through all exclude pathspec (magic signature: !). If it matches, the path is ignored.
parent
A commit object contains a (possibly empty) list of the logical predecessor(s) in the line of development, i.e. its parents.
pickaxe
The term pickaxe refers to an option to the diffcore routines that help select changes that add or delete a given text string. With the –pickaxe-all option, it can be used to view the full changeset that introduced or removed, say, a particular line of text. See git-diff(1).
plumbing
Cute name for core Git.
porcelain
Cute name for programs and program suites depending on core Git, presenting a high level access to core Git. Porcelains expose more of a SCM interface than the plumbing.
pull
Pulling a branch means to fetch it and merge it. See also git-pull(1).
push
Pushing a branch means to get the branch’s head ref from a remote repository, find out if it is a direct ancestor to the branch’s local head ref, and in that case, putting all objects, which are reachable from the local head ref, and which are missing from the remote repository, into the remote object database, and updating the remote head ref. If the remote head is not an ancestor to the local head, the push fails.
reachable
All of the ancestors of a given commit are said to be “reachable” from that commit. More generally, one object is reachable from another if we can reach the one from the other by a chain that follows tags to whatever they tag, commits to their parents or trees, and trees to the trees or blobs that they contain.
rebase
To reapply a series of changes from a branch to a different base, and reset the head of that branch to the result.
ref
A name that begins with refs/ (e.g. refs/heads/master) that points to an object name or another ref (the latter is called a symbolic ref). For convenience, a ref can sometimes be abbreviated when used as an argument to a Git command; see gitrevisions(7) for details. Refs are stored in the repository.
The ref namespace is hierarchical. Different subhierarchies are used for different purposes (e.g. the refs/heads/ hierarchy is used to represent local branches).
There are a few special-purpose refs that do not begin with refs/. The most notable example is HEAD.
reflog
A reflog shows the local “history” of a ref. In other words, it can tell you what the 3rd last revision in this repository was, and what was the current state in this repository, yesterday 9:14pm. See git-reflog(1) for details.
refspec
A “refspec” is used by fetch and push to describe the mapping between remote ref and local ref.
remote-tracking branch
A ref that is used to follow changes from another repository. It typically looks like refs/remotes/foo/bar (indicating that it tracks a branch named bar in a remote named foo), and matches the right-hand-side of a configured fetch refspec. A remote-tracking branch should not contain direct modifications or have local commits made to it.
repository
A collection of refs together with an object database containing all objects which are reachable from the refs, possibly accompanied by meta data from one or more porcelains. A repository can share an object database with other repositories via alternates mechanism.
resolve
The action of fixing up manually what a failed automatic merge left behind.
revision
Synonym for commit (the noun).
rewind
To throw away part of the development, i.e. to assign the head to an earlier revision.
SCM
Source code management (tool).
SHA-1
“Secure Hash Algorithm 1”; a cryptographic hash function. In the context of Git used as a synonym for object name.
shallow repository
A shallow repository has an incomplete history some of whose commits have parents cauterized away (in other words, Git is told to pretend that these commits do not have the parents, even though they are recorded in the commit object). This is sometimes useful when you are interested only in the recent history of a project even though the real history recorded in the upstream is much larger. A shallow repository is created by giving the –depth option to git-clone(1), and its history can be later deepened with git-fetch(1).
symref
Symbolic reference: instead of containing the SHA-1 id itself, it is of the format ref: refs/some/thing and when referenced, it recursively dereferences to this reference. HEAD is a prime example of a symref. Symbolic references are manipulated with the git-symbolic-ref(1) command.
tag
A ref under refs/tags/ namespace that points to an object of an arbitrary type (typically a tag points to either a tag or a commit object). In contrast to a head, a tag is not updated by the commit command. A Git tag has nothing to do with a Lisp tag (which would be called an object type in Git’s context). A tag is most typically used to mark a particular point in the commit ancestry chain.
tag object
An object containing a ref pointing to another object, which can contain a message just like a commit object. It can also contain a (PGP) signature, in which case it is called a “signed tag object”.
topic branch
A regular Git branch that is used by a developer to identify a conceptual line of development. Since branches are very easy and inexpensive, it is often desirable to have several small branches that each contain very well defined concepts or small incremental yet related changes.
tree
Either a working tree, or a tree object together with the dependent blob and tree objects (i.e. a stored representation of a working tree).
tree object
An object containing a list of file names and modes along with refs to the associated blob and/or tree objects. A tree is equivalent to a directory.
tree-ish (also treeish)
A tree object or an object that can be recursively dereferenced to a tree object. Dereferencing a commit object yields the tree object corresponding to the revision’s top directory. The following are all tree-ishes: a commit-ish, a tree object, a tag object that points to a tree object, a tag object that points to a tag object that points to a tree object, etc.
unmerged index
An index which contains unmerged index entries.
unreachable object
An object which is not reachable from a branch, tag, or any other reference.
upstream branch
The default branch that is merged into the branch in question (or the branch in question is rebased onto). It is configured via branch.<name>.remote and branch.<name>.merge. If the upstream branch of A is origin/B sometimes we say “A is tracking origin/B”.
working tree
The tree of actual checked out files. The working tree normally contains the contents of the HEAD commit’s tree, plus any local changes that you have made but not yet committed.