qpdfview on mac

Asked by Petr Vokac

Hi,
I am trying to install qpdfview on Mac.
I have macports installed.
I have qt4 installed.
I did steps "qmake qpdfview.pro" and "make".
For "make install" I have changed target directory from /usr to /opt/local.
That is all OK, but where is the executable?
I found /opt/local/bin/qpdfview.app,
but it does not work: "Could not load plug-in for file type 'PDF'!".

Thank you for any hint,
Petr

Question information

Language:
English Edit question
Status:
Answered
For:
qpdfview Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Adam Reichold (adamreichold) said :
#1

Hello Petr,

qpdfview has never been properly ported to and tested on Mac OS X and since I do not have access to a machine running it, I won't be able to really help you with this...

The concrete error in question looks like it searches for its plug-in libraries in the wrong places and you probably want to adjust the various paths in qpdfview.pri, e.g. PLUGIN_INSTALL_PATH. You probably also want to override the qmake variable PDF_PLUGIN_NAME which is assumed to be "libqpdfview_pdf.so" but will probably rather look like "libqpdfview_pdf.dylib" or something similar on Darwin.

In any case, if you run qpdfview from a terminal it should print out some diagnostic messages about where it is looking for the plug-ins. It usually begin in the same directory as the application binary itself and then try again in PLUGIN_INSTALL_PATH defined above.

Best regards, Adam.

Revision history for this message
Petr Vokac (petr-vokac-) said :
#2

Hello Adam,

thank you for answer.

I tried to run the code from the command line and I got:

pvmb:MacOS pet$ ./qpdfview &
pvmb:MacOS pet$ QSqlDatabase: QSQLITE driver not loaded
QSqlDatabase: available drivers:
QSqlError(-1, "Driver not loaded", "Driver not loaded")

So I installed some sqlite plugin:
sudo port install qt4-mac-sqlite3-plugin

And this error disappeared. I added PDF_PLUGIN_NAME to qpdfview.pri, which now contains:

isEmpty(APPLICATION_VERSION):APPLICATION_VERSION = 0.4.16

isEmpty(TARGET_INSTALL_PATH):TARGET_INSTALL_PATH = /opt/local/bin
isEmpty(PLUGIN_INSTALL_PATH):PLUGIN_INSTALL_PATH = /opt/local/lib/qpdfview
isEmpty(PDF_PLUGIN_NAME):PDF_PLUGIN_NAME = libqpdfview_pdf.dylib
isEmpty(DATA_INSTALL_PATH):DATA_INSTALL_PATH = /opt/local/share/qpdfview
isEmpty(MANUAL_INSTALL_PATH):MANUAL_INSTALL_PATH = /opt/local/share/man/man1
isEmpty(ICON_INSTALL_PATH):ICON_INSTALL_PATH = /opt/local/share/icons/hicolor/scalable/apps
isEmpty(LAUNCHER_INSTALL_PATH):LAUNCHER_INSTALL_PATH = /opt/local/share/applications
isEmpty(APPDATA_INSTALL_PATH):APPDATA_INSTALL_PATH = /opt/local/share/appdata

And I did qmake and make again.
Unfortunately qpdfview still does not work.
I got again the message box with "pdf plugin not found"

Here is the output from the commandline:

pvmb:MacOS pet$ ./qpdfview &
[1] 1321
pvmb:MacOS pet$
pvmb:MacOS pet$ filter:2:47: error: excess elements in vector initializer
  return img.a * mix(c0, c1, dot(img.rgb, vec3(0,000000e+00, 0,000000e+00, 0,000000e+00)));
                                              ^ ~~~~~~~~~~
filter:1:6: error: non-void function should return a value
vec4 _falseColor(vec4 img, vec4 c0, vec4 c1) {
     ^
** OpenCL Error Notification: [CL_DEVICE_NOT_AVAILABLE] : OpenCL Error : Error: build program driver returned (-3) **
** OpenCL Error Notification: OpenCL Warning : clBuildProgram failed: could not build program for 0xffffffff (Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz) (err:-3) **
** OpenCL Error Notification: [CL_BUILD_ERROR] : OpenCL Build Error : Compiler build log:
No kernels or only kernel prototypes found when build executable.
 **
Native OpenCL program build failed:
No kernels or only kernel prototypes found when build executable.Kernel source code =
#define premain__ci_unpremul__falseColor__sourceOut__ci_clamp_to_alpha_highp /**/
#define lowp /**/
#define sampler2D sampler2DRect
#define texture2D texture2DRect
// An error occurred, see stderr for the error message
Unable to compile kernel. Not rendering.
** OpenCL Error Notification: [CL_DEVICE_NOT_AVAILABLE] : OpenCL Error : Error: build program driver returned (-3) **
** OpenCL Error Notification: OpenCL Warning : clBuildProgram failed: could not build program for 0xffffffff (Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz) (err:-3) **
** OpenCL Error Notification: [CL_BUILD_ERROR] : OpenCL Build Error : Compiler build log:
No kernels or only kernel prototypes found when build executable.
 **
Native OpenCL program build failed:
No kernels or only kernel prototypes found when build executable.Kernel source code =
#define premain__ci_unpremul__falseColor__sourceOut__ci_clamp_to_alpha_highp /**/
#define lowp /**/
#define sampler2D sampler2DRect
#define texture2D texture2DRect
// An error occurred, see stderr for the error message
Unable to compile kernel. Not rendering.
** OpenCL Error Notification: [CL_DEVICE_NOT_AVAILABLE] : OpenCL Error : Error: build program driver returned (-3) **
** OpenCL Error Notification: OpenCL Warning : clBuildProgram failed: could not build program for 0xffffffff (Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz) (err:-3) **
** OpenCL Error Notification: [CL_BUILD_ERROR] : OpenCL Build Error : Compiler build log:
No kernels or only kernel prototypes found when build executable.
 **
Native OpenCL program build failed:
No kernels or only kernel prototypes found when build executable.Kernel source code =
#define premain__ci_unpremul__falseColor__sourceOut__ci_clamp_to_alpha_highp /**/
#define lowp /**/
#define sampler2D sampler2DRect
#define texture2D texture2DRect
// An error occurred, see stderr for the error message
Unable to compile kernel. Not rendering.
** OpenCL Error Notification: [CL_DEVICE_NOT_AVAILABLE] : OpenCL Error : Error: build program driver returned (-3) **
** OpenCL Error Notification: OpenCL Warning : clBuildProgram failed: could not build program for 0xffffffff (Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz) (err:-3) **
** OpenCL Error Notification: [CL_BUILD_ERROR] : OpenCL Build Error : Compiler build log:
No kernels or only kernel prototypes found when build executable.
 **
Native OpenCL program build failed:
No kernels or only kernel prototypes found when build executable.Kernel source code =
#define premain__ci_unpremul__falseColor__sourceOut__ci_clamp_to_alpha_highp /**/
#define lowp /**/
#define sampler2D sampler2DRect
#define texture2D texture2DRect
// An error occurred, see stderr for the error message
Unable to compile kernel. Not rendering.
filter:3:45: error: too many arguments, expecting 3
  return clamp(b.a / range, 0,000000e+00, 1,000000e+00) * color;
                                            ^
filter:1:6: error: non-void function should return a value
vec4 outerGorS(vec4 blur, vec4 color, float range) {
     ^
** OpenCL Error Notification: [CL_DEVICE_NOT_AVAILABLE] : OpenCL Error : Error: build program driver returned (-3) **
** OpenCL Error Notification: OpenCL Warning : clBuildProgram failed: could not build program for 0xffffffff (Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz) (err:-3) **
** OpenCL Error Notification: [CL_BUILD_ERROR] : OpenCL Build Error : Compiler build log:
No kernels or only kernel prototypes found when build executable.
 **
Native OpenCL program build failed:
No kernels or only kernel prototypes found when build executable.Kernel source code =
#define premain__ci_fill__ci_crop__ci_unpremul__ci_srgb_to_lin__ci_premul__ci_affine_outerGorS__ci_affine__blendWithAlphaMask__ci_clamp_to_alpha_highp /**/
#define lowp /**/
#define sampler2D sampler2DRect
#define texture2D texture2DRect
// An error occurred, see stderr for the error message
Unable to compile kernel. Not rendering.
** OpenCL Error Notification: [CL_DEVICE_NOT_AVAILABLE] : OpenCL Error : Error: build program driver returned (-3) **
** OpenCL Error Notification: OpenCL Warning : clBuildProgram failed: could not build program for 0xffffffff (Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz) (err:-3) **
** OpenCL Error Notification: [CL_BUILD_ERROR] : OpenCL Build Error : Compiler build log:
No kernels or only kernel prototypes found when build executable.
 **
Native OpenCL program build failed:
No kernels or only kernel prototypes found when build executable.Kernel source code =
#define premain__ci_fill__ci_crop__ci_unpremul__ci_srgb_to_lin__ci_premul__ci_affine_outerGorS__ci_affine__blendWithAlphaMask__ci_clamp_to_alpha_highp /**/
#define lowp /**/
#define sampler2D sampler2DRect
#define texture2D texture2DRect
// An error occurred, see stderr for the error message
Unable to compile kernel. Not rendering.
** OpenCL Error Notification: [CL_DEVICE_NOT_AVAILABLE] : OpenCL Error : Error: build program driver returned (-3) **
** OpenCL Error Notification: OpenCL Warning : clBuildProgram failed: could not build program for 0xffffffff (Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz) (err:-3) **
** OpenCL Error Notification: [CL_BUILD_ERROR] : OpenCL Build Error : Compiler build log:
No kernels or only kernel prototypes found when build executable.
 **
Native OpenCL program build failed:
No kernels or only kernel prototypes found when build executable.Kernel source code =
#define premain__ci_fill__ci_crop__ci_unpremul__ci_srgb_to_lin__ci_premul__ci_affine_outerGorS__ci_affine__blendWithAlphaMask__ci_clamp_to_alpha_highp /**/
#define lowp /**/
#define sampler2D sampler2DRect
#define texture2D texture2DRect
// An error occurred, see stderr for the error message
Unable to compile kernel. Not rendering.
** OpenCL Error Notification: [CL_DEVICE_NOT_AVAILABLE] : OpenCL Error : Error: build program driver returned (-3) **
** OpenCL Error Notification: OpenCL Warning : clBuildProgram failed: could not build program for 0xffffffff (Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz) (err:-3) **
** OpenCL Error Notification: [CL_BUILD_ERROR] : OpenCL Build Error : Compiler build log:
No kernels or only kernel prototypes found when build executable.
 **
Native OpenCL program build failed:
No kernels or only kernel prototypes found when build executable.Kernel source code =
#define premain__ci_fill__ci_crop__ci_unpremul__ci_srgb_to_lin__ci_premul__ci_affine_outerGorS__ci_affine__blendWithAlphaMask__ci_clamp_to_alpha_highp /**/
#define lowp /**/
#define sampler2D sampler2DRect
#define texture2D texture2DRect
// An error occurred, see stderr for the error message
Unable to compile kernel. Not rendering.
Could not load plug-in in first attempt: ""
"Nepodařilo se nalézt sdílenou knihovnu."
Could not load plug-in in second attempt: ""
"Nepodařilo se nalézt sdílenou knihovnu."
2016-02-27 19:00:44.401 qpdfview[1321:41652] modalSession has been exited prematurely - check for a reentrant call to endModalSession:
2016-02-27 19:00:48.989 qpdfview[1321:41652] modalSession has been exited prematurely - check for a reentrant call to endModalSession:

Revision history for this message
Adam Reichold (adamreichold) said :
#3

Hello again,

there is a problem in the error reporting of qpdfview here:

Could not load plug-in in first attempt: ""
"Nepodařilo se nalézt sdílenou knihovnu."
Could not load plug-in in second attempt: ""
"Nepodařilo se nalézt sdílenou knihovnu."

We try to print "QPluginLoader::fileName" which is not set if the library could not be loaded. Sorry about that, I will push a fix to trunk which will make the error messages more useful ASAP. Please try again with the latest code from trunk after that.

Best regards, Adam.

Can you help with this problem?

Provide an answer of your own, or ask Petr Vokac for more information if necessary.

To post a message you must log in.