Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
problem with Libreoffice-bin pdf read in in Draw SOLVED
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
mikefot
Guru
Guru


Joined: 19 Nov 2014
Posts: 397

PostPosted: Mon Nov 06, 2017 8:34 am    Post subject: problem with Libreoffice-bin pdf read in in Draw SOLVED Reply with quote

Dear Folks,

Is this the correct part of Gentoo forum site to discuss a problem I am having with libreoffice-bin?

Please direct me elsewhere if this is the case.

I am running gentoo stable (amd64 version) on an amd kaveri box.

I am currently using libreoffice-bin 5.2.72r1 - the standard version for the gentoo stable install.

I also run Debian 9 (stretch) and Windows 10 on my pc.


I use libreoffice on both Debian and Windows as well as on Gentoo.

I have tried reading in and editing text in pdf files in libreoffice on all three OSes.

In Windows 10, Libreoffice reads in the pdf files very competently and displays their contents clearly and reliably.

Editing is quite easy.

In Debian stretch, sometimes libreoffice reads the pdf files in correctly and sometimes it doesn't.

In Gentoo it reads them in and the resulting file is then filled with pages of gobbledygook ie it is useless.

The other functions of libreoffice seem to be working OK on Gentoo.

Does anyone have any suggestions as to what might be causing this problem and what I could do to fix it?

Regards and thanks

Michael Fothergill


Last edited by mikefot on Fri Dec 15, 2017 9:14 pm; edited 1 time in total
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 21357
Location: here

PostPosted: Tue Nov 07, 2017 7:24 am    Post subject: Reply with quote

Try to install libreoffice 5.2.72 also in windows and then make a comparision.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
mikefot
Guru
Guru


Joined: 19 Nov 2014
Posts: 397

PostPosted: Fri Dec 08, 2017 12:04 pm    Post subject: I got some input from the libreoffice maintainer on this.... Reply with quote

Dear All,

I filed a bug report on the pdf reading problem in libreoffice.

The gentoo maintainer explained a few things and made a suggestion.

Libreoffice-bin is apparently built without poppler support.

So the pdf reader does not work.

The solution is to compile libreoffice from scratch which I think was suggested in the thread here.

I tried this using ccache to help speed things up as suggested by the maintainer.

This worked well but the pdf reader still doesn't work.

Do I need to emerge poppler separately or issue some other command to get it included in a standard libreoffice compilation?

ie am I missing something here...?

Comments appreciated.

Regards

MF
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 6828
Location: Austria

PostPosted: Fri Dec 08, 2017 12:54 pm    Post subject: Reply with quote

Did you take a look at the use flags before you emerged libreoffice?
_________________
backend.cpp:92:2: warning: #warning TODO - this error message is about as useful as a cooling unit in the arctic
Back to top
View user's profile Send private message
gerard27
Advocate
Advocate


Joined: 04 Jan 2004
Posts: 2377
Location: Netherlands

PostPosted: Fri Dec 08, 2017 2:49 pm    Post subject: Reply with quote

You need to compile it with the "pdfimport" flag enabled.
If poppler hasn't been installed yet it'll be pulled in automatically.
A compiled version of libreoffice runs much faster than the bin version!
Gerard.
_________________
To install Gentoo I use sysrescuecd.Based on Gentoo,has firefox to browse Gentoo docs and mc to browse (and edit) files.
The same disk can be used for 32 and 64 bit installs.
You can follow the Handbook verbatim.
http://www.sysresccd.org/Download
Back to top
View user's profile Send private message
mikefot
Guru
Guru


Joined: 19 Nov 2014
Posts: 397

PostPosted: Fri Dec 08, 2017 4:24 pm    Post subject: compiling libreoffice flag problem Reply with quote

Dear All,

I ran emerge libreoffice in Porthole and as well as turning on the pdfimport flag I also checked a number of other flags that i thought might be useful but now I wish I had not. See below:


Code:
djt /home/mikef # emerge libreoffice
Calculating dependencies -

!!! Problem resolving dependencies for app-office/libreoffice
... done!

!!! The ebuild selected to satisfy "libreoffice" has unmet requirements.
- app-office/libreoffice-5.4.2.2::gentoo USE="branding dbus gltf gstreamer gtk gtk3 java kde libressl mysql pdfimport postgres quickstarter vlc -bluetooth (-coinmp) -collada -cups -debug -eds (-firebird) -gnome -googledrive -jemalloc -odk -test" ABI_X86="(64)" LIBREOFFICE_EXTENSIONS="nlpsolver -scripting-beanshell -scripting-javascript -wiki-publisher" PYTHON_SINGLE_TARGET="python2_7 python3_4 -python3_5 (-python3_6)" PYTHON_TARGETS="python2_7 python3_4 -python3_5 (-python3_6)"

  The following REQUIRED_USE flag constraints are unsatisfied:
    exactly-one-of ( python_single_target_python2_7 python_single_target_python3_4 python_single_target_python3_5 python_single_target_python3_6 )

  The above constraints are a subset of the following complete expression:
    exactly-one-of ( python_single_target_python2_7 python_single_target_python3_4 python_single_target_python3_5 python_single_target_python3_6 ) python_single_target_python2_7? ( python_targets_python2_7 ) python_single_target_python3_4? ( python_targets_python3_4 ) python_single_target_python3_5? ( python_targets_python3_5 ) python_single_target_python3_6? ( python_targets_python3_6 ) bluetooth? ( dbus ) collada? ( gltf ) eds? ( gnome ) gnome? ( gtk ) libreoffice_extensions_nlpsolver? ( java ) libreoffice_extensions_scripting-beanshell? ( java ) libreoffice_extensions_scripting-javascript? ( java ) libreoffice_extensions_wiki-publisher? ( java )

djt /home/mikef #


My make.conf file looks like this:

Code:
djt /etc/portage # more make.conf
# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
CFLAGS="-O2 -pipe"
CXXFLAGS="${CFLAGS}"
# WARNING: Changing your CHOST is not something that should be done lightly.
# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.
CHOST="x86_64-pc-linux-gnu"
# These are the USE and USE_EXPAND flags that were used for
# buidling in addition to what is provided by the profile.
USE="X alsa alsa-plugin aqua arping asyncns blender bluetooth bmp
     branding bullet bzip2 classic colorio consolekit crypt cycles css dds dbus djvu dri3 eet egl
     elbeem examples fbcondecor ffmpeg fftw fontconfig gallium game-engine gbm glamor gles glib
     gpl grub gtk gtk3 gui handbook hardcoded-tables hardened ico iconv icu
     imx introspection jack jit jpeg kde latex ldap legacy-systray
     libkms llvm lock mmap network networkmanager ndof nls npm nptl nss openal
     openimageio openmp orc pam pcre pdf pie plasma plymouth png policykit polkit
     postproc postscript ppm psd pulseaudio qtmedia readline recursion-limit
     sctp sdl session snapshot sndfile sound ssl startup-notification suid symlink
     tcpd test threads thunar tiff truetype udev udisks unicode upower vanilla
     wayland webrtc-aec xcb xv zlib -caps -clang -clockdiff -doc -dot
     -doxysearch -drm -fbcon -filecaps -fribidi -gif -gles2 -gnome -gpm
     -gstreamer -harfbuzz -ibus -idn -libressl -minimal -oldlua -opencv -oss
     -physics -pim -qt4 -qt5 -rarpd -raw -rdisc -scim -sdk -sdl -static -tdb
     -tftpd -tga -tracepath -tslib -v4l -valgrind -vivante -xim -xine -xpm
     -zip"
FEATURES="buildpkg"
FEATURES="ccache"
CCACHE_SIZE="4G"
MAKEOPTS="-j5"
CPU_FLAGS_X86="mmx sse sse2 3dnow 3dnowext aes avx avx2 fma3 fma4 mmx mmxext sse3 sse4_1 sse4_2 ssse3 xop"
FFTOOLS="aviocat cws2fws ffescape ffeval ffhash fourcc2pixfmt graph2dot ismindex pktdumper qt-faststart sidxindex trasher"
ABI_X86="32 64 x32"
#PYTHON_TARGETS="(jython2_7) (pypy) (pypy3) (python2_7) (python3_4) (python3_5) (python3_6)"
PORTAGE_BINHOST="http://binhost.genfic.com/packages"
PORTDIR="/usr/portage"
DISTDIR="${PORTDIR}/distfiles"
PKGDIR="${PORTDIR}/packages"
VIDEO_CARDS="amdgpu radeonsi radeon"
#ACCEPT_KEYWORDS="~x86"

# (For mouse, keyboard, and Synaptics touchpad support)
INPUT_DEVICES="evdev synaptics"
GENTOO_MIRRORS="http://mirror.bytemark.co.uk/gentoo/"

#SYNC="rsync://rsync.uk.gentoo.org/gentoo-portage"
djt /etc/portage #



Comments appreciated

MF
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 21357
Location: here

PostPosted: Fri Dec 08, 2017 5:21 pm    Post subject: Reply with quote

PYTHON_SINGLE_TARGET must have only one entry, you have python2_7 and python3_4.
I think you setted this in package.use.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
mikefot
Guru
Guru


Joined: 19 Nov 2014
Posts: 397

PostPosted: Fri Dec 08, 2017 7:43 pm    Post subject: correct wat to put python single target in package.use file Reply with quote

I entered the following line

Code:
PYTHON_SINGLE_TARGET python3_4


at the end of my package.use file:

Code:
djt /etc/portage/package.use # tail -10 package.use
>=dev-python/packaging-16.8 python_targets_python3_4
# Enabling additional implementation in addition to the profile default
*/* PYTHON_TARGETS: python3_6
# Enabling additional implementation in addition to the profile default
*/* PYTHON_TARGETS: python3_4
# Enabling additional implementation in addition to the profile default
*/* PYTHON_TARGETS: python2_7
# Enabling additional implementation in addition to the profile default
*/* PYTHON_TARGETS: python3_5
PYTHON_SINGLE_TARGET python3_4


When I ran emerge I got the following error:

Code:
Invalid atom in /etc/portage/package.use/package.use: PYTHON_SINGLE_TARGET


My make.conf file now looks like this:

Code:
djt /etc/portage # more make.conf
# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
CFLAGS="-O2 -pipe"
CXXFLAGS="${CFLAGS}"
# WARNING: Changing your CHOST is not something that should be done lightly.
# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.
CHOST="x86_64-pc-linux-gnu"
# These are the USE and USE_EXPAND flags that were used for
# buidling in addition to what is provided by the profile.
USE="X alsa alsa-plugin aqua arping asyncns blender bluetooth bmp branding
     bullet bzip2 classic colorio consolekit crypt css cycles dbus dds djvu
     dri3 eet egl elbeem examples fbcondecor ffmpeg fftw fontconfig gallium
     game-engine gbm glamor gles glib gpl grub gtk gtk3 gui handbook
     hardcoded-tables hardened ico iconv icu imx introspection jack jit jpeg
     kde latex ldap legacy-systray libkms llvm lock mmap ndof network
     networkmanager nls npm nptl nss openal openimageio openmp orc pam pcre
     pdf pie plasma plymouth png policykit polkit postproc postscript ppm psd
     pulseaudio qtmedia readline recursion-limit sctp session snapshot sndfile
     sound ssl startup-notification suid symlink tcpd test threads thunar tiff
     truetype udev udisks unicode upower vanilla wayland webrtc-aec xcb xv
     zlib -caps -clang -clockdiff -doc -dot -doxysearch -drm -fbcon -filecaps
     -fribidi -gif -gles2 -gnome -gpm -gstreamer -harfbuzz -ibus -idn
     -libressl -minimal -oldlua -opencv -oss -physics -pim -qt4 -qt5 -rarpd
     -raw -rdisc -scim -sdk -sdl -static -tdb -tftpd -tga -tracepath -tslib
     -v4l -valgrind -vivante -xim -xine -xpm -zip"
FEATURES="buildpkg"
FEATURES="ccache"
CCACHE_SIZE="30G"
MAKEOPTS="-j5"
CPU_FLAGS_X86="mmx sse sse2 3dnow 3dnowext aes avx avx2 fma3 fma4 mmx mmxext sse3 sse4_1 sse4_2 ssse3 xop"
FFTOOLS="aviocat cws2fws ffescape ffeval ffhash fourcc2pixfmt graph2dot ismindex pktdumper qt-faststart sidxindex trasher"
ABI_X86="32 64 x32"
PYTHON_TARGETS="(python2_7)(python3_4)(python3_5)(python3_6)"
PYTHON_SINGLE_TARGET ="(python3_4)"
PORTAGE_BINHOST="http://binhost.genfic.com/packages"
PORTDIR="/usr/portage"
DISTDIR="${PORTDIR}/distfiles"
PKGDIR="${PORTDIR}/packages"
VIDEO_CARDS="amdgpu radeonsi radeon"
#ACCEPT_KEYWORDS="~x86"

# (For mouse, keyboard, and Synaptics touchpad support)
INPUT_DEVICES="evdev synaptics"
GENTOO_MIRRORS="http://mirror.bytemark.co.uk/gentoo/"

#SYNC="rsync://rsync.uk.gentoo.org/gentoo-portage"


Suggestions on modifying the package.use file to choose one python target file are appreciated.

The full package.use file can be seen below:

Code:
djt /etc/portage # wgetpaste /etc/portage/package.use/package.use
Your paste can be seen here:


https://paste.pound-python.org/show/H68UMr1wHIWMtQHfkgGt/
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 21357
Location: here

PostPosted: Fri Dec 08, 2017 8:41 pm    Post subject: Reply with quote

Why you have these entries?
Code:
# Enabling additional implementation in addition to the profile default
*/* PYTHON_TARGETS: python3_6
# Enabling additional implementation in addition to the profile default
*/* PYTHON_TARGETS: python3_4
# Enabling additional implementation in addition to the profile default
*/* PYTHON_TARGETS: python2_7
# Enabling additional implementation in addition to the profile default
*/* PYTHON_TARGETS: python3_5

python_targest and python_single_target are provided by profile.
Anyway for disable one single target correct syntax is
Code:
app-office/libreoffice -python_single_target_python2_7

or
Code:
app-office/libreoffice -python_single_target_python3_4

depend on what you want
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
mikefot
Guru
Guru


Joined: 19 Nov 2014
Posts: 397

PostPosted: Fri Dec 08, 2017 9:06 pm    Post subject: fixing python problems etc Reply with quote

Many thanks for your help here.

I have removed the four lines from the package use file and added three new ones based on your app office suggestion:


Code:
djt /etc/portage/package.use # tail -20 package.use
>=dev-python/setuptools-34.0.2-r1 python_targets_python3_4
# required by dev-python/setuptools-34.0.2-r1::gentoo
# required by dev-python/certifi-2017.4.17::gentoo
# required by dev-python/requests-2.18.2-r1::gentoo
# required by dev-python/ssl-fetch-0.4::gentoo
# required by app-portage/mirrorselect-2.2.3::gentoo
# required by @selected
# required by @world (argument)
>=dev-python/appdirs-1.4.3 python_targets_python3_4
# required by dev-python/setuptools-34.0.2-r1::gentoo
# required by dev-python/certifi-2017.4.17::gentoo
# required by dev-python/requests-2.18.2-r1::gentoo
# required by dev-python/ssl-fetch-0.4::gentoo
# required by app-portage/mirrorselect-2.2.3::gentoo
# required by @selected
# required by @world (argument)
>=dev-python/packaging-16.8 python_targets_python3_4
app-office/libreoffice -python_single_target_python2_7
app-office/libreoffice -python_single_target_python3_5
app-office/libreoffice -python_single_target_python3_6


The idea is to remove python 2_7 and python3_5 and python3_6 targets, assuming that the - before -python in
the command app-office/libreoffice -python_single_target_python3_6 is meant to remove that particular single python target.

Thus by default the target python3_4 would be used in my case here.

If the logic I have got here is wrong please can you advise me and then I can change it accordingly.

Also, in the make.conf file

I now have the two lines

PYTHON_TARGETS="(python2_7)(python3_4)(python3_5)(python3_6)"
PYTHON_SINGLE_TARGET ="(python3_4)"

in my make.conf file.

Should I remove them?

Running emerge libreoffice still gives error messages:

Code:
djt /etc/portage/package.use # emerge libreoffice
Calculating dependencies \

!!! Problem resolving dependencies for app-office/libreoffice
... done!

!!! The ebuild selected to satisfy "libreoffice" has unmet requirements.
- app-office/libreoffice-5.4.2.2::gentoo USE="bluetooth branding cups dbus gtk gtk3 kde (-coinmp) -collada -debug -eds (-firebird) -gltf -gnome -googledrive -gstreamer -java -jemalloc -libressl -mysql -odk -pdfimport -postgres -quickstarter -test -vlc" ABI_X86="(64)" LIBREOFFICE_EXTENSIONS="-nlpsolver -scripting-beanshell -scripting-javascript -wiki-publisher" PYTHON_SINGLE_TARGET="-python2_7 -python3_4 -python3_5 -python3_6" PYTHON_TARGETS="-python2_7 -python3_4 -python3_5 -python3_6"

  The following REQUIRED_USE flag constraints are unsatisfied:
    exactly-one-of ( python_single_target_python2_7 python_single_target_python3_4 python_single_target_python3_5 python_single_target_python3_6 )

  The above constraints are a subset of the following complete expression:
    exactly-one-of ( python_single_target_python2_7 python_single_target_python3_4 python_single_target_python3_5 python_single_target_python3_6 ) python_single_target_python2_7? ( python_targets_python2_7 ) python_single_target_python3_4? ( python_targets_python3_4 ) python_single_target_python3_5? ( python_targets_python3_5 ) python_single_target_python3_6? ( python_targets_python3_6 ) bluetooth? ( dbus ) collada? ( gltf ) eds? ( gnome ) gnome? ( gtk ) libreoffice_extensions_nlpsolver? ( java ) libreoffice_extensions_scripting-beanshell? ( java ) libreoffice_extensions_scripting-javascript? ( java ) libreoffice_extensions_wiki-publisher? ( java )



Comments appreciated.

Regards

MF
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 21357
Location: here

PostPosted: Fri Dec 08, 2017 9:32 pm    Post subject: Reply with quote

By default now profile provide (python3_5 are recently marked stable)
Code:
PYTHON_SINGLE_TARGET="python3_5"
PYTHON_TARGETS="python2_7 python3_5"


You can remove lines
Code:
PYTHON_TARGETS="(python2_7)(python3_4)(python3_5)(python3_6)"
PYTHON_SINGLE_TARGET ="(python3_4)"

from your make.conf also because parenthesis are syntactically wrong.

If you use settings provided by profile you can also remove libreoffice entry in package.use
Code:
app-office/libreoffice -python_single_target_python2_7
app-office/libreoffice -python_single_target_python3_5
app-office/libreoffice -python_single_target_python3_6

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
mikefot
Guru
Guru


Joined: 19 Nov 2014
Posts: 397

PostPosted: Fri Dec 08, 2017 10:00 pm    Post subject: /usr/portage/profile defaults for python.... Reply with quote

Many thanks for your help again.

If I understand you correctly, one of the files in /usr/portage/profiles should automatically set which version of python I am using here.

The gentoo web page on this is here:

https://wiki.gentoo.org/wiki//usr/portage/profiles

I looked at the directory on my machine here:

Code:
djt /usr/portage/profiles # ls
arch       categories  eapi      hardened   license_groups  prefix         repo_name          uclibc    use.local.desc
arch.list  default     embedded  info_pkgs  Manifest.gz     profiles.desc  targets            updates
base       desc        features  info_vars  package.mask    releases       thirdpartymirrors  use.desc
djt /usr/portage/profiles # pwd


Am I correct in assuming that if I delete or comment out the extra three lines I added to the package.use file that the
/usr/portage/profile defaults should automatically take over or do I need to type in a command of some kind at the terminal to
make that happen?

Comments appreciated.

MF
Back to top
View user's profile Send private message
mikefot
Guru
Guru


Joined: 19 Nov 2014
Posts: 397

PostPosted: Sat Dec 09, 2017 9:46 am    Post subject: I have installed libreoffice with the pdf reader working OK Reply with quote

Dear All,

I have successfully fooled python into working properly and have compiled a version of libreoffice that has a functional pdfreader on board.

The compilation was speeded up by ccache too.

I can now sing the climb every mountain song.

Many thanks to everyone who helped here.

MF :)
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 21357
Location: here

PostPosted: Sat Dec 09, 2017 11:38 am    Post subject: Re: /usr/portage/profile defaults for python.... Reply with quote

mikefot wrote:
If I understand you correctly, one of the files in /usr/portage/profiles should automatically set which version of python I am using here.

Exactly
/usr/portage/profiles/base/make.defaults:
...
# Mike Gilbert <floppym@gentoo.org> (15 May 2012)
# Default target(s) for python-r1.eclass
# Updated to python3_5 on 28 Nov 2017
PYTHON_TARGETS="python2_7 python3_5"
PYTHON_SINGLE_TARGET="python3_5"
...

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
mikefot
Guru
Guru


Joined: 19 Nov 2014
Posts: 397

PostPosted: Fri Dec 15, 2017 9:13 pm    Post subject: Solved Reply with quote

SOLVED
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum