Apache POI 5.2.2 build issues with JDK11 - apache-poi

I'm running into these errors building Apache POI with JDK 11. Suggestions to overcome this greatly appreciated.
*[exec] [javac] Ignoring source, target and bootclasspath as release has been set
[exec] [javac] git/poi-5.2.2/poi-ooxml/src/main/java/org/apache/poi/xslf/draw/SVGUserAgent.java:66: error: cannot access ViewCSS
[exec] [javac] String viewBoxStr = el.getAttributeNS(null, SVGConstants.SVG_VIEW_BOX_ATTRIBUTE);
[exec] [javac] ^
[exec] [javac] class file for org.w3c.dom.css.ViewCSS not found
[exec] [javac] poi-5.2.2/poi-ooxml/src/main/java/org/apache/poi/xslf/draw/SVGUserAgent.java:81: error: cannot access DocumentCSS
[exec] [javac] String a = el.getAttributeNS(null, attr);
[exec] [javac] ^
[exec] [javac] class file for org.w3c.dom.css.DocumentCSS not found
[exec] [javac] Note: Some input files use or override a deprecated API.
[exec] [javac] Note: Recompile with -Xlint:deprecation for details.
[exec] [javac] 2 errors*

Related

pyinstaller: Multiple 'lib not found' warnings when compiling .py file

I wrote a program in python, and was trying to compile it into a .exe file using pyinstaller. It gets converted successfully, and I can run the exe file on my device. However, but during compilation, I get many 'lib not found' warnings.
They are as follows:
165185 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\lib\io\_pywrap_file_io.pyd
165210 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\framework\_op_def_util.pyd
165293 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\framework\_pywrap_python_api_dispatcher.pyd
165329 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\client\_pywrap_device_lib.pyd
165363 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\client\_pywrap_tf_session.pyd
165389 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\client\_pywrap_debug_events_writer.pyd
165603 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\saved_model\experimental\pywrap_libexport.pyd
165627 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\framework\_errors_test_helper.pyd
165674 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\profiler\internal\_pywrap_profiler.pyd
165699 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\grappler\_pywrap_tf_item.pyd
165727 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\util\_pywrap_checkpoint_reader.pyd
165772 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\util\_pywrap_nest.pyd
165832 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\util\_pywrap_tfprof.pyd
165856 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\util\_pywrap_utils.pyd
165881 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\util\_pywrap_kernel_registry.pyd
165992 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\util\_pywrap_stat_summarizer.pyd
166012 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\lib\io\_pywrap_record_io.pyd
166038 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\client\_pywrap_events_writer.pyd
166066 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\framework\_dtypes.pyd
166085 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\grappler\_pywrap_tf_cluster.pyd
166113 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\grappler\_pywrap_tf_optimizer.pyd
166156 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\framework\_pywrap_python_api_info.pyd
166183 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\framework\_op_def_registry.pyd
166211 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\framework\_pywrap_python_op_gen.pyd
166256 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\profiler\internal\_pywrap_traceme.pyd
166278 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\util\_pywrap_tensor_float_32_execution.pyd
166293 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\data\experimental\service\_pywrap_server_lib.pyd
166319 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\util\_pywrap_transform_graph.pyd
166448 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\framework\_pywrap_python_api_parameter_converter.pyd
166470 WARNING: lib not found: torch_python.dll dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\torch\_C.cp38-win_amd64.pyd
166546 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\lib\core\_pywrap_py_func.pyd
166557 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\lib\core\_pywrap_bfloat16.pyd
166568 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\platform\_pywrap_stacktrace_handler.pyd
All of them are related to tensorflow, except one which is torch_python.dll. The folder named tensorflow in site-packages exists, but the files are not there. Apart from this it shows warning for hidden imports for tensorflow again.
Following are the hidden import warnings:
130756 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v1.keras.initializers" not found!
130898 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v1.keras.layers.experimental.preprocessing" not found!
131048 WARNING: Hidden import "tensorflow._api.v2.compat.v1.compat.v2.keras.layers" not found!
131050 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v1.v1" not found!
131057 WARNING: Hidden import "tensorflow._api.v2.compat.v2.keras.backend" not found!
131057 WARNING: Hidden import "tensorflow._api.v2.compat.v1.compat.v2.keras.datasets.reuters" not found!
131144 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v2.keras.regularizers" not found!
131145 WARNING: Hidden import "tensorflow._api.v2.compat.v1.compat.v2.estimator.experimental" not found!
131146 WARNING: Hidden import "tensorflow._api.v2.compat.v2.keras.premade" not found!
131147 WARNING: Hidden import "tensorflow._api.v2.compat.v2.estimator" not found!
131407 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v2.keras.preprocessing.image" not found!
131456 WARNING: Hidden import "tensorflow._api.v2.compat.v1.compat.v1.keras.datasets" not found!
131456 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v2.keras.__internal__.backend" not found!
131458 WARNING: Hidden import "tensorflow._api.v2.compat.v1.compat.v2.keras.__internal__" not found!
131458 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v1.keras.losses" not found!
131464 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v2.keras.applications.inception_v3" not found!
131465 WARNING: Hidden import "tensorflow._api.v2.compat.v1.keras.callbacks" not found!
131468 WARNING: Hidden import "tensorflow._api.v2.compat.v2.keras.datasets.cifar100" not found!
131621 WARNING: Hidden import "tensorflow._api.v2.compat.v1.compat.v2.keras.applications.nasnet" not found!
131622 WARNING: Hidden import "tensorflow._api.v2.compat.v1.compat.v2.keras.activations" not found!
131631 WARNING: Hidden import "tensorflow._api.v2.compat.v1.keras.estimator" not found!
131631 WARNING: Hidden import "tensorflow._api.v2.compat.v1.compat.v2.keras.optimizers" not found!
131633 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v2.v2" not found!
131635 WARNING: Hidden import "tensorflow._api.v2.compat.v1.compat.v1.keras.applications.mobilenet_v2" not found!
131644 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v1.keras.datasets.reuters" not found!
131646 WARNING: Hidden import "tensorflow._api.v2.compat.v1.keras.optimizers" not found!
131647 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v1.keras.__internal__.legacy" not found!
131829 WARNING: Hidden import "tensorflow._api.v2.compat.v2.keras.callbacks.experimental" not found!
131830 WARNING: Hidden import "tensorflow._api.v2.compat.v1.compat.v1.keras.applications" not found!
131832 WARNING: Hidden import "tensorflow._api.v2.compat.v1.keras.applications.xception" not found!
131833 WARNING: Hidden import "tensorflow._api.v2.compat.v1.keras.utils" not found!
131905 WARNING: Hidden import "tensorflow._api.v2.compat.v1.compat.v1.keras.datasets.cifar100" not found!
131906 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v2.keras.experimental" not found!
131912 WARNING: Hidden import "tensorflow._api.v2.compat.v1.compat.v2.keras.layers.experimental.preprocessing" not found!
131962 WARNING: Hidden import "tensorflow._api.v2.compat.v1.compat.v2.keras.applications.inception_resnet_v2" not found!
132010 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v1.keras.optimizers.schedules" not found!
132101 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v1.keras.premade" not found!
132105 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v1.keras.__internal__.legacy.layers.experimental" not found!
132106 WARNING: Hidden import "tensorflow._api.v2.compat.v1.compat.v2.keras.applications.xception" not found!
132117 WARNING: Hidden import "tensorflow._api.v2.compat.v1.keras.__internal__.legacy.layers.experimental" not found!
132118 WARNING: Hidden import "tensorflow._api.v2.compat.v1.keras.__internal__" not found!
132126 WARNING: Hidden import "tensorflow._api.v2.compat.v1.keras.applications.vgg19" not found!
132214 WARNING: Hidden import "tensorflow._api.v2.compat.v1.keras.mixed_precision" not found!
132215 WARNING: Hidden import "tensorflow._api.v2.compat.v1.compat.v2.keras.applications.inception_v3" not found!
132227 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v2.keras.applications.vgg19" not found!
132280 WARNING: Hidden import "tensorflow._api.v2.compat.v1.compat.v1.keras.premade" not found!
132281 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v1.keras.applications.mobilenet_v2" not found!
132291 WARNING: Hidden import "tensorflow._api.v2.compat.v1.compat.v1.keras.preprocessing.image" not found!
132291 WARNING: Hidden import "tensorflow._api.v2.compat.v1.keras.applications.inception_resnet_v2" not found!
132292 WARNING: Hidden import "tensorflow._api.v2.compat.v1.keras.applications.imagenet_utils" not found!
132295 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v2.keras.datasets.imdb" not found!
132395 WARNING: Hidden import "tensorflow._api.v2.compat.v1.keras.datasets" not found!
132396 WARNING: Hidden import "tensorflow._api.v2.compat.v2.keras.__internal__.utils" not found!
132398 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v1.keras.utils" not found!
132404 WARNING: Hidden import "tensorflow._api.v2.compat.v2.keras.datasets.boston_housing" not found!
132405 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v2.keras.layers.experimental.preprocessing" not found!
132406 WARNING: Hidden import "tensorflow._api.v2.compat.v1.compat.v2.keras.premade" not found!
132408 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v1.estimator.tpu.experimental" not found!
132583 WARNING: Hidden import "tensorflow._api.v2.compat.v2.keras.callbacks" not found!
132584 WARNING: Hidden import "tensorflow._api.v2.compat.v2.keras.layers" not found!
132592 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v2.keras.mixed_precision" not found!
132637 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v1.keras.applications.resnet" not found!
132643 WARNING: Hidden import "tensorflow._api.v2.compat.v1.compat.v2.keras.datasets.cifar100" not found!
132643 WARNING: Hidden import "tensorflow._api.v2.compat.v1.keras.datasets.imdb" not found!
132646 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v1.keras.datasets.imdb" not found!
132647 WARNING: Hidden import "tensorflow._api.v2.compat.v1.compat.v1.estimator.tpu" not found!
132648 WARNING: Hidden import "tensorflow._api.v2.compat.v1.compat.v2.keras.wrappers" not found!
132649 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v2.keras.estimator" not found!
132650 WARNING: Hidden import "tensorflow._api.v2.compat.v2.v2" not found!
132661 WARNING: Hidden import "tensorflow._api.v2.compat.v1.compat.v2.keras.losses" not found!
132672 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v2.keras.applications.imagenet_utils" not found!
132672 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v2.keras.wrappers.scikit_learn" not found!
132674 WARNING: Hidden import "tensorflow._api.v2.compat.v2.keras.applications.imagenet_utils" not found!
132683 WARNING: Hidden import "tensorflow._api.v2.compat.v1.compat.v1.keras.preprocessing.text" not found!
132684 WARNING: Hidden import "tensorflow._api.v2.compat.v2.keras.losses" not found!
132777 WARNING: Hidden import "tensorflow._api.v2.compat.v1.keras.regularizers" not found!
132778 WARNING: Hidden import "tensorflow._api.v2.compat.v1.compat.v2.keras.applications.vgg19" not found!
132780 WARNING: Hidden import "tensorflow._api.v2.compat.v1.compat.v2.keras.applications.resnet_v2" not found!
Is there any way I can download them and paste them into the folder or if it can auto-download in any way? Will this create an issue when running the program on another device?
Yes, Add these two arguments in your pyinstaller command:
--add-data="c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow;."
--add-data="c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\torch\_C.cp38-win_amd64.pyd;."
I can run the exe file on my device
It means that you can run it on other devices without any issues
Is there anyway I can download them and paste them in the folder or if it can auto download in any way?
pip install tensorflow must work.
Update: Try building tensorflow manually. You can find full guides here. This will work for sure.

Error while creating wheel while installing packages in Mac

This is the error I receive while installing packages from a file using pip install -r req.txt
Then it tried building wheels for collected packages: blis; cytoolz; murmurhash; preshed; regex, and I got a long error list.
typedef __uint32_t __darwin_useconds_t; /* [???] microseconds */
^
note: '__uint128_t' declared here
In file included from Python3/_regex.c:46:
In file included from /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/Python.h:25:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:64:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio.h:71:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h:43:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
typedef __uint32_t __darwin_wctype_t;
^
note: '__uint128_t' declared here
In file included from Python3/_regex.c:46:
In file included from /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/Python.h:25:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:64:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio.h:75:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_va_list.h:31:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/types.h:37:2: error: architecture not supported
#error architecture not supported
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
error: command 'xcrun' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for regex```
Is something wrong with MacOS side because it is giving me bizarre errors.
Any leads appreciated.

getting error on build in package name.ratson.cordova.admob;

I created new project using ionic capacitor sync android and was trying to sign apk key for the app
After running build I'm getting below error in package name.ratson.cordova.admob; inside capacitor-cordova-android-plugins.
Can someone please guide me on where am I going wrong?
> Task :capacitor-cordova-android-plugins:compileReleaseJavaWithJavac
D:\app\android\capacitor-cordova-android-plugins\src\main\java\name\ratson\cordova\admob\AbstractExecutor.java:3: error: package com.google.android.gms.ads does not exist
import com.google.android.gms.ads.AdRequest;
^
D:\app\android\capacitor-cordova-android-plugins\src\main\java\name\ratson\cordova\admob\AdMob.java:5: error: package android.support.annotation does not exist
import android.support.annotation.NonNull;
^
D:\app\android\capacitor-cordova-android-plugins\src\main\java\name\ratson\cordova\admob\AdMob.java:8: error: package com.google.ads.mediation.admob does not exist
import com.google.ads.mediation.admob.AdMobAdapter;
^
D:\app\android\capacitor-cordova-android-plugins\src\main\java\name\ratson\cordova\admob\AdMob.java:9: error: package com.google.android.gms.ads does not exist
import com.google.android.gms.ads.AdRequest;
.
.
.
.
D:\app\android\capacitor-cordova-android-plugins\src\main\java\org\apache\cordova\camera\CameraLauncher.java:800: error: cannot find symbol
Uri tmpFile = FileProvider.getUriForFile(cordova.getActivity(),
^
symbol: variable FileProvider
location: class CameraLauncher
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
86 errors
> Task :capacitor-cordova-android-plugins:compileReleaseJavaWithJavac FAILED
Thanks in advance.

Issue installing pdftotext in Python 3.6 on CentOS due to poppler

I'm having some issues getting installing pdftotext in Python 3.6 (Anaconda 5.1.0) on CentOS.
Some quick notes first:
I'm using CentOS 6.7 on VirtualBox
I know it can work because my IT group has it installed on our server. NOTE: I found that our server did have the C++ wrapper installed and I'm trying to figure out how the got it.
I'm trying to get an existing application to work, so I'm not looking for an alternative to pdftotext the library at this time.
I followed the instructions from the github repo and already tried this step:
Fedora, Red Hat, and friends:
sudo yum install gcc-c++ pkgconfig poppler-cpp-devel python-devel redhat-rpm-config
But the problem seems to be around poppler-cpp-devel. I don't see that package within yum search poppler:
============================= N/S Matched: poppler =============================
poppler-devel.i686 : Libraries and headers for poppler
poppler-devel.x86_64 : Libraries and headers for poppler
poppler-glib.i686 : Glib wrapper for poppler
poppler-glib.x86_64 : Glib wrapper for poppler
poppler-qt.i686 : Qt3 wrapper for poppler
poppler-qt.x86_64 : Qt3 wrapper for poppler
poppler-qt4.i686 : Qt4 wrapper for poppler
poppler-qt4.x86_64 : Qt4 wrapper for poppler
poppler.i686 : PDF rendering library
poppler.x86_64 : PDF rendering library
poppler-data.noarch : Encoding files
poppler-glib-devel.i686 : Development files for glib wrapper
poppler-glib-devel.x86_64 : Development files for glib wrapper
poppler-qt-devel.i686 : Development files for Qt3 wrapper
poppler-qt-devel.x86_64 : Development files for Qt3 wrapper
poppler-qt4-devel.i686 : Development files for Qt4 wrapper
poppler-qt4-devel.x86_64 : Development files for Qt4 wrapper
poppler-utils.x86_64 : Command line utilities for converting PDF files
My IT group gave me the instructions of what they had attempted and I tried installing poppler-devel and poppler-glib. But every time I try pip install pdftotext I'm getting the following output:
[root#localhost stack]# pip install pdftotext
Collecting pdftotext
Using cached https://files.pythonhosted.org/packages/21/35/60094dbadd9de2035873390b1cac25e01da605844eba6a07a53a82fa4adc/pdftotext-2.1.1.tar.gz
Building wheels for collected packages: pdftotext
Building wheel for pdftotext (setup.py) ... error
Complete output from command /root/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-1mu2f1n2/pdftotext/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-khm9zova --python-tag cp36:
/root/anaconda3/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type'
warnings.warn(msg)
running bdist_wheel
running build
running build_ext
building 'pdftotext' extension
creating build
creating build/temp.linux-x86_64-3.6
gcc -pthread -B /root/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPOPPLER_CPP_AT_LEAST_0_30_0=0 -I/root/anaconda3/include/python3.6m -c pdftotext.cpp -o build/temp.linux-x86_64-3.6/pdftotext.o -Wall
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
pdftotext.cpp:3:42: error: poppler/cpp/poppler-document.h: No such file or directory
pdftotext.cpp:4:40: error: poppler/cpp/poppler-global.h: No such file or directory
pdftotext.cpp:5:38: error: poppler/cpp/poppler-page.h: No such file or directory
pdftotext.cpp:20: error: ‘poppler’ has not been declared
pdftotext.cpp:20: error: ISO C++ forbids declaration of ‘document’ with no type
pdftotext.cpp:20: error: expected ‘;’ before ‘*’ token
pdftotext.cpp: In function ‘void PDF_clear(PDF*)’:
pdftotext.cpp:26: error: ‘struct PDF’ has no member named ‘doc’
pdftotext.cpp:27: error: ‘struct PDF’ has no member named ‘doc’
pdftotext.cpp: In function ‘int PDF_create_doc(PDF*)’:
pdftotext.cpp:66: error: ‘struct PDF’ has no member named ‘doc’
pdftotext.cpp:66: error: ‘poppler’ has not been declared
pdftotext.cpp:67: error: ‘struct PDF’ has no member named ‘doc’
pdftotext.cpp: In function ‘int PDF_unlock(PDF*, char*)’:
pdftotext.cpp:75: error: ‘struct PDF’ has no member named ‘doc’
pdftotext.cpp: In function ‘int PDF_init(PDF*, PyObject*, PyObject*)’:
pdftotext.cpp:105: error: ‘struct PDF’ has no member named ‘doc’
pdftotext.cpp: In function ‘PyObject* PDF_read_page(PDF*, int)’:
pdftotext.cpp:119: error: ‘poppler’ has not been declared
pdftotext.cpp:119: error: expected initializer before ‘*’ token
pdftotext.cpp:120: error: ‘poppler’ has not been declared
pdftotext.cpp:120: error: expected ‘;’ before ‘layout_mode’
pdftotext.cpp:123: error: ‘page’ was not declared in this scope
pdftotext.cpp:123: error: ‘struct PDF’ has no member named ‘doc’
pdftotext.cpp:129: error: ‘poppler’ has not been declared
pdftotext.cpp:129: error: expected initializer before ‘rect’
pdftotext.cpp:130: error: ‘rect’ was not declared in this scope
pdftotext.cpp:133: error: ‘layout_mode’ was not declared in this scope
pdftotext.cpp:133: error: ‘poppler’ has not been declared
pdftotext.cpp:135: error: ‘poppler’ has not been declared
pdftotext.cpp:137: error: ‘poppler’ has not been declared
pdftotext.cpp:138: error: type ‘<type error>’ argument given to ‘delete’, expected pointer
error: command 'gcc' failed with exit status 1
----------------------------------------
Failed building wheel for pdftotext
Running setup.py clean for pdftotext
Failed to build pdftotext
Installing collected packages: pdftotext
Running setup.py install for pdftotext ... error
Complete output from command /root/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-1mu2f1n2/pdftotext/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-ghuhvuhl/install-record.txt --single-version-externally-managed --compile:
/root/anaconda3/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type'
warnings.warn(msg)
running install
running build
running build_ext
building 'pdftotext' extension
creating build
creating build/temp.linux-x86_64-3.6
gcc -pthread -B /root/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPOPPLER_CPP_AT_LEAST_0_30_0=0 -I/root/anaconda3/include/python3.6m -c pdftotext.cpp -o build/temp.linux-x86_64-3.6/pdftotext.o -Wall
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
pdftotext.cpp:3:42: error: poppler/cpp/poppler-document.h: No such file or directory
pdftotext.cpp:4:40: error: poppler/cpp/poppler-global.h: No such file or directory
pdftotext.cpp:5:38: error: poppler/cpp/poppler-page.h: No such file or directory
pdftotext.cpp:20: error: ‘poppler’ has not been declared
pdftotext.cpp:20: error: ISO C++ forbids declaration of ‘document’ with no type
pdftotext.cpp:20: error: expected ‘;’ before ‘*’ token
pdftotext.cpp: In function ‘void PDF_clear(PDF*)’:
pdftotext.cpp:26: error: ‘struct PDF’ has no member named ‘doc’
pdftotext.cpp:27: error: ‘struct PDF’ has no member named ‘doc’
pdftotext.cpp: In function ‘int PDF_create_doc(PDF*)’:
pdftotext.cpp:66: error: ‘struct PDF’ has no member named ‘doc’
pdftotext.cpp:66: error: ‘poppler’ has not been declared
pdftotext.cpp:67: error: ‘struct PDF’ has no member named ‘doc’
pdftotext.cpp: In function ‘int PDF_unlock(PDF*, char*)’:
pdftotext.cpp:75: error: ‘struct PDF’ has no member named ‘doc’
pdftotext.cpp: In function ‘int PDF_init(PDF*, PyObject*, PyObject*)’:
pdftotext.cpp:105: error: ‘struct PDF’ has no member named ‘doc’
pdftotext.cpp: In function ‘PyObject* PDF_read_page(PDF*, int)’:
pdftotext.cpp:119: error: ‘poppler’ has not been declared
pdftotext.cpp:119: error: expected initializer before ‘*’ token
pdftotext.cpp:120: error: ‘poppler’ has not been declared
pdftotext.cpp:120: error: expected ‘;’ before ‘layout_mode’
pdftotext.cpp:123: error: ‘page’ was not declared in this scope
pdftotext.cpp:123: error: ‘struct PDF’ has no member named ‘doc’
pdftotext.cpp:129: error: ‘poppler’ has not been declared
pdftotext.cpp:129: error: expected initializer before ‘rect’
pdftotext.cpp:130: error: ‘rect’ was not declared in this scope
pdftotext.cpp:133: error: ‘layout_mode’ was not declared in this scope
pdftotext.cpp:133: error: ‘poppler’ has not been declared
pdftotext.cpp:135: error: ‘poppler’ has not been declared
pdftotext.cpp:137: error: ‘poppler’ has not been declared
pdftotext.cpp:138: error: type ‘<type error>’ argument given to ‘delete’, expected pointer
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/root/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-1mu2f1n2/pdftotext/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-ghuhvuhl/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-1mu2f1n2/pdftotext/
I'm assuming the problem here is that it's looking for the C++ compiled files and I could only get the glib?
What I can look into?
pdftotext should be in poppler-utils, so try yum install poppler-utils
EDIT: Hmm. There's a package called pypoppler available for CentOS 6 in the EPEL repository, which describes itself as "Python bindings for the Poppler PDF rendering library." I see no indication that it includes poppler/cpp/{anything}, but you can give it a try. (You may need to install pycairo first.)
Failing that, you might try installing an earlier version of pdftotext (e.g. pip install pdftotext==1.0.0) to find one compatible with CentOS 6. The earliest version came out in June of 2017, though, so that may not help.
I don't suppose you're interested in upgrading to CentOS 7?
There actually is a proper CentOS 7 package. It is not enough to install the poppler-devel package as it does not include the CPP header files that is required and you simply need to install the poppler-cpp and poppler-cpp-devel packages:
yum install poppler-cpp poppler-cpp-devel
After this you can pip/pip3 install the pdftotext package without custom compiling and setting environment path variables.
I found the solution to this. By following the instructions for installing libpoppler-cpp from this link, I was able to successfully install the pdftotext.
Following the instructions from this repo:
On CentOS
On CentOS the libpoppler-cpp library is not included with the system so we need to build from source. Note that recent versions of poppler require C++11 which is not available on CentOS, so we build a slightly older version of libpoppler.
# Build dependencies
yum install wget xz libjpeg-devel openjpeg2-devel
# Download and extract
wget https://poppler.freedesktop.org/poppler-0.47.0.tar.xz
tar -Jxvf poppler-0.47.0.tar.xz
cd poppler-0.47.0
# Build and install
./configure
make
sudo make install
By default libraries get installed in /usr/local/lib and /usr/local/include. On CentOS this is not a default search path so we need to set PKG_CONFIG_PATH and LD_LIBRARY_PATH to point R to the right directory:
export LD_LIBRARY_PATH="/usr/local/lib"
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig"

Installing kaleo-web source code in liferay

I have to deploy kaleo-web plugin from eclipse,it is showing invalid location, I have placed kaleo-web plugin in webs folder as it is after downloading, alternatively I have tried with deploying it from cmd prompt.As kaleo-web contains service.xml, so I have done ant build-service,it is showing build failed, can any one help regarding this?
D:\Migration-work-for_Liferay62\one-click62\plugins\webs\kaleo-web>ant build-ser
vice
Buildfile: D:\Migration-work-for_Liferay62\one-click62\plugins\webs\kaleo-web\bu
ild.xml
build-service:
[mkdir] Created dir: D:\Migration-work-for_Liferay62\one-click62\plugins\web
s\kaleo-web\docroot\WEB-INF\classes
[copy] Copying 24 files to D:\Migration-work-for_Liferay62\one-click62\plug
ins\webs\kaleo-web\docroot\WEB-INF\classes
[copy] Copied 45 empty directories to 35 empty directories under D:\Migrati
on-work-for_Liferay62\one-click62\plugins\webs\kaleo-web\docroot\WEB-INF\classes
[jar] Building MANIFEST-only jar: D:\Migration-work-for_Liferay62\one-clic
k62\plugins\webs\kaleo-web\build-service-classpath.jar
[delete] Deleting: D:\Migration-work-for_Liferay62\one-click62\plugins\webs\k
aleo-web\build-service-classpath.jar.manifest
[delete] Deleting: D:\Migration-work-for_Liferay62\one-click62\plugins\webs\k
aleo-web\build-service-classpath.jar
[echo] Loading jar:file:/D:/Migration-work-for_Liferay62/one-click62/bundle
s/tomcat-7.0.42/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
[echo] Loading jar:file:/D:/Migration-work-for_Liferay62/one-click62/bundle
s/tomcat-7.0.42/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
[echo] Loading file:/D:/Migration-work-for_Liferay62/one-click62/bundles/to
mcat-7.0.42/webapps/ROOT/WEB-INF/classes/portal-ext.properties
[echo] Loading jar:file:/D:/Migration-work-for_Liferay62/one-click62/bundle
s/tomcat-7.0.42/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/com/liferay/portal/too
ls/dependencies/portal-tools.properties
[echo] Building KaleoAction
[echo] Building KaleoCondition
[echo] Building KaleoDefinition
[echo] Building KaleoInstance
[echo] Building KaleoInstanceToken
[echo] Building KaleoLog
[echo] Building KaleoNode
[echo] Building KaleoNotification
[echo] Building KaleoNotificationRecipient
[echo] Building KaleoTask
[echo] Building KaleoTaskAssignment
[echo] Building KaleoTaskAssignmentInstance
[echo] Building KaleoTaskInstanceToken
[echo] Building KaleoTimer
[echo] Building KaleoTimerInstanceToken
[echo] Building KaleoTransition
[javac] Compiling 1 source file to D:\Migration-work-for_Liferay62\one-click
62\plugins\webs\kaleo-web\docroot\WEB-INF\service-classes
[javac] ----------
[javac] 1. ERROR in D:\Migration-work-for_Liferay62\one-click62\plugins\webs
\kaleo-web\docroot\WEB-INF\service\com\liferay\portal\workflow\kaleo\definition\
DurationScale.java (at line 17)
[javac] import com.liferay.compat.portal.kernel.scheduler.CronText;
[javac] ^^^^^^^^^^^^^^^^^^
[javac] The import com.liferay.compat cannot be resolved
[javac] ----------
[javac] 2. ERROR in D:\Migration-work-for_Liferay62\one-click62\plugins\webs
\kaleo-web\docroot\WEB-INF\service\com\liferay\portal\workflow\kaleo\definition\
DurationScale.java (at line 25)
[javac] DAY("day", CronText.DAILY_FREQUENCY),
[javac] ^^^^^^^^
[javac] CronText cannot be resolved to a variable
[javac] ----------
[javac] 3. ERROR in D:\Migration-work-for_Liferay62\one-click62\plugins\webs
\kaleo-web\docroot\WEB-INF\service\com\liferay\portal\workflow\kaleo\definition\
DurationScale.java (at line 26)
[javac] HOUR("hour", CronText.HOURLY_FREQUENCY),
[javac] ^^^^^^^^
[javac] CronText cannot be resolved to a variable
[javac] ----------
[javac] 4. ERROR in D:\Migration-work-for_Liferay62\one-click62\plugins\webs
\kaleo-web\docroot\WEB-INF\service\com\liferay\portal\workflow\kaleo\definition\
DurationScale.java (at line 27)
[javac] MINUTE("minute", CronText.MINUTELY_FREQUENCY),
[javac] ^^^^^^^^
[javac] CronText cannot be resolved to a variable
[javac] ----------
[javac] 5. ERROR in D:\Migration-work-for_Liferay62\one-click62\plugins\webs
\kaleo-web\docroot\WEB-INF\service\com\liferay\portal\workflow\kaleo\definition\
DurationScale.java (at line 28)
[javac] MONTH("month", CronText.MONTHLY_FREQUENCY),
[javac] ^^^^^^^^
[javac] CronText cannot be resolved to a variable
[javac] ----------
[javac] 6. ERROR in D:\Migration-work-for_Liferay62\one-click62\plugins\webs
\kaleo-web\docroot\WEB-INF\service\com\liferay\portal\workflow\kaleo\definition\
DurationScale.java (at line 29)
[javac] SECOND("second", CronText.SECONDLY_FREQUENCY),
[javac] ^^^^^^^^
[javac] CronText cannot be resolved to a variable
[javac] ----------
[javac] 7. ERROR in D:\Migration-work-for_Liferay62\one-click62\plugins\webs
\kaleo-web\docroot\WEB-INF\service\com\liferay\portal\workflow\kaleo\definition\
DurationScale.java (at line 30)
[javac] WEEK("week", CronText.WEEKLY_FREQUENCY),
[javac] ^^^^^^^^
[javac] CronText cannot be resolved to a variable
[javac] ----------
[javac] 8. ERROR in D:\Migration-work-for_Liferay62\one-click62\plugins\webs
\kaleo-web\docroot\WEB-INF\service\com\liferay\portal\workflow\kaleo\definition\
DurationScale.java (at line 31)
[javac] YEAR("year", CronText.YEARLY_FREQUENCY);
[javac] ^^^^^^^^
[javac] CronText cannot be resolved to a variable
[javac] ----------
[javac] 8 problems (8 errors)
BUILD FAILED
D:\Migration-work-for_Liferay62\one-click62\plugins\build-common-plugin.xml:262:
The following error occurred while executing this line:
D:\Migration-work-for_Liferay62\one-click62\plugins\build-common.xml:634: Compil
e failed; see the compiler error output for details.
Total time: 42 seconds
I have changed the package in the class
D:\Migration-work-for_Liferay62\one-click62\plugins\webs
\kaleo-web\docroot\WEB-INF\service\com\liferay\portal\workflow\kaleo\definition\
DurationScale.java
From com.liferay.compat.portal.kernel.scheduler.CronText to com.liferay.portal.kernel.scheduler.CronText and then performed ant build-service and the ant deploy, then kaleo-web successfully deployed.
Reference: https://www.liferay.com/community/forums/-/message_boards/message/58130766

Resources