Thread: [pgadmin-support] Cannot compile pgadmin4 mainline

[pgadmin-support] Cannot compile pgadmin4 mainline

From
Mark Murawski
Date:
(pgadmin4)markm {~/download/pgadmin4/runtime} kobaz$ git pull
Already up-to-date.
(pgadmin4)markm {~/download/pgadmin4/runtime} kobaz$ git log | head -n 1
commit 4a280b251755091af9bf56bcdee964601df104ae

(pgadmin4)markm {~/download/pgadmin4/runtime} kobaz$ qmake
Project MESSAGE: Building for QT5+...
Project MESSAGE: Using QWebKit...
Project MESSAGE:
Project MESSAGE: ************************************** WARNING 
**************************************
Project MESSAGE: * It is strongly advised that Qt 5.5.0 or later is used 
to build the pgAdmin runtime.
Project MESSAGE: 
*************************************************************************************
Project MESSAGE:
Project MESSAGE: Building for Linux/Mac...
Project MESSAGE: Using /usr/bin/python-config
Project MESSAGE: Python3 detected.

(pgadmin4)markm {~/download/pgadmin4/runtime} kobaz$ make
g++ -c -m64 -pipe -I/usr/include/python3.4m -I/usr/include/python3.4m 
-O2 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_WEBKITWIDGETS_LIB 
-DQT_WEBKIT_LIB -DQT_WIDGETS_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB 
-DQT_CORE_LIB -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -I. 
-isystem /usr/include/x86_64-linux-gnu/qt5 -isystem 
/usr/include/x86_64-linux-gnu/qt5/QtWebKitWidgets -isystem 
/usr/include/x86_64-linux-gnu/qt5/QtWebKit -isystem 
/usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem 
/usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem 
/usr/include/x86_64-linux-gnu/qt5/QtGui -isystem 
/usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I. -o pgAdmin4.o pgAdmin4.cpp
In file included from pgAdmin4.cpp:29:0:
BrowserWindow.h:131:37: error: 'QWebEnginePage' has not been declared     void
triggerWebViewWindowEvents(QWebEnginePage::WebActionaction);                                     ^
 
BrowserWindow.h:131:63: error: expected ',' or '...' before 'action'     void
triggerWebViewWindowEvents(QWebEnginePage::WebActionaction);
  ^
 
Makefile:398: recipe for target 'pgAdmin4.o' failed
make: *** [pgAdmin4.o] Error 1



Re: [pgadmin-support] Cannot compile pgadmin4 mainline

From
Dave Page
Date:
Hi

On Mon, Dec 12, 2016 at 1:04 AM, Mark Murawski
<markm-lists@intellasoft.net> wrote:
> (pgadmin4)markm {~/download/pgadmin4/runtime} kobaz$ git pull
> Already up-to-date.
> (pgadmin4)markm {~/download/pgadmin4/runtime} kobaz$ git log | head -n 1
> commit 4a280b251755091af9bf56bcdee964601df104ae
>
> (pgadmin4)markm {~/download/pgadmin4/runtime} kobaz$ qmake
> Project MESSAGE: Building for QT5+...
> Project MESSAGE: Using QWebKit...
> Project MESSAGE:
> Project MESSAGE: ************************************** WARNING
> **************************************
> Project MESSAGE: * It is strongly advised that Qt 5.5.0 or later is used to
> build the pgAdmin runtime.
> Project MESSAGE:
> *************************************************************************************
> Project MESSAGE:
> Project MESSAGE: Building for Linux/Mac...
> Project MESSAGE: Using /usr/bin/python-config
> Project MESSAGE: Python3 detected.
>
> (pgadmin4)markm {~/download/pgadmin4/runtime} kobaz$ make
> g++ -c -m64 -pipe -I/usr/include/python3.4m -I/usr/include/python3.4m -O2
> -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_WEBKITWIDGETS_LIB
> -DQT_WEBKIT_LIB -DQT_WIDGETS_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB
> -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -I. -isystem
> /usr/include/x86_64-linux-gnu/qt5 -isystem
> /usr/include/x86_64-linux-gnu/qt5/QtWebKitWidgets -isystem
> /usr/include/x86_64-linux-gnu/qt5/QtWebKit -isystem
> /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem
> /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem
> /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem
> /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I. -o pgAdmin4.o pgAdmin4.cpp
> In file included from pgAdmin4.cpp:29:0:
> BrowserWindow.h:131:37: error: 'QWebEnginePage' has not been declared
>      void triggerWebViewWindowEvents(QWebEnginePage::WebAction action);
>                                      ^
> BrowserWindow.h:131:63: error: expected ',' or '...' before 'action'
>      void triggerWebViewWindowEvents(QWebEnginePage::WebAction action);
>                                                                ^
> Makefile:398: recipe for target 'pgAdmin4.o' failed
> make: *** [pgAdmin4.o] Error 1

Hmm, seems we missed a macro around that declaration. I've pushed a
fix for that - can you try again please?


-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



Re: [pgadmin-support] Cannot compile pgadmin4 mainline

From
Mark Murawski
Date:
Thanks, That worked.

Now I'm back to this again:

markm {~} markm$ source /usr/share/virtualenvwrapper/virtualenvwrapper.sh
markm {~} markm$ workon pgadmin4
(pgadmin4)markm {~} markm$


(pgadmin4)markm {~} markm$ download/pgadmin4/runtime/pgAdmin4
Python path:  "/usr/bin/python3.4"
Python Home:  ""
Webapp path:  "/home/markm/download/pgadmin4/web/pgAdmin4.py"
Traceback (most recent call last):  File "/home/markm/download/pgadmin4/web/pgAdmin4.py", line 24, in 
<module>    from pgadmin import create_app  File "/home/markm/download/pgadmin4/web/pgadmin/__init__.py", line 
17, in <module>    from flask import Flask, abort, request, current_app
ImportError: No module named 'flask'
"Failed to launch the application server, server thread exiting."

Python Path: /usr/bin/python3.4
Application Path: 
/home/markm/.virtualenvs/pgadmin4/lib/python3.4/site-packages
ls -al /home/markm/.virtualenvs/pgadmin4/lib/python3.4/site-packages | 
grep flask
drwxr-xr-x 1 markm markm  422 Nov  1 13:11 flask
drwxr-xr-x 1 markm markm   90 Nov  1 13:11 flask_babel
drwxr-xr-x 1 markm markm   64 Nov  1 13:11 flask_gravatar
-rw-r--r-- 1 markm markm  881 Dec 11 20:02 flask_htmlmin.py
-rw-r--r-- 1 markm markm  33K Nov  1 13:11 flask_login.py
-rw-r--r-- 1 markm markm  18K Nov  1 13:11 flask_mail.py
-rw-r--r-- 1 markm markm  14K Nov  1 13:11 flask_principal.py
drwxr-xr-x 1 markm markm  354 Nov  1 13:11 flask_security
drwxr-xr-x 1 markm markm   64 Nov  1 13:11 flask_sqlalchemy
drwxr-xr-x 1 markm markm  154 Nov  1 13:11 flask_wtf


I'm using the same path as last time, but it cannot find what it needs...


On 12/12/16 04:41, Dave Page wrote:
> Hi
>
> On Mon, Dec 12, 2016 at 1:04 AM, Mark Murawski
> <markm-lists@intellasoft.net> wrote:
>> (pgadmin4)markm {~/download/pgadmin4/runtime} markm$ git pull
>> Already up-to-date.
>> (pgadmin4)markm {~/download/pgadmin4/runtime} markm$ git log | head -n 1
>> commit 4a280b251755091af9bf56bcdee964601df104ae
>>
>> (pgadmin4)markm {~/download/pgadmin4/runtime} markm$ qmake
>> Project MESSAGE: Building for QT5+...
>> Project MESSAGE: Using QWebKit...
>> Project MESSAGE:
>> Project MESSAGE: ************************************** WARNING
>> **************************************
>> Project MESSAGE: * It is strongly advised that Qt 5.5.0 or later is used to
>> build the pgAdmin runtime.
>> Project MESSAGE:
>> *************************************************************************************
>> Project MESSAGE:
>> Project MESSAGE: Building for Linux/Mac...
>> Project MESSAGE: Using /usr/bin/python-config
>> Project MESSAGE: Python3 detected.
>>
>> (pgadmin4)markm {~/download/pgadmin4/runtime} markm$ make
>> g++ -c -m64 -pipe -I/usr/include/python3.4m -I/usr/include/python3.4m -O2
>> -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_WEBKITWIDGETS_LIB
>> -DQT_WEBKIT_LIB -DQT_WIDGETS_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB
>> -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -I. -isystem
>> /usr/include/x86_64-linux-gnu/qt5 -isystem
>> /usr/include/x86_64-linux-gnu/qt5/QtWebKitWidgets -isystem
>> /usr/include/x86_64-linux-gnu/qt5/QtWebKit -isystem
>> /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem
>> /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem
>> /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem
>> /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I. -o pgAdmin4.o pgAdmin4.cpp
>> In file included from pgAdmin4.cpp:29:0:
>> BrowserWindow.h:131:37: error: 'QWebEnginePage' has not been declared
>>      void triggerWebViewWindowEvents(QWebEnginePage::WebAction action);
>>                                      ^
>> BrowserWindow.h:131:63: error: expected ',' or '...' before 'action'
>>      void triggerWebViewWindowEvents(QWebEnginePage::WebAction action);
>>                                                                ^
>> Makefile:398: recipe for target 'pgAdmin4.o' failed
>> make: *** [pgAdmin4.o] Error 1
>
> Hmm, seems we missed a macro around that declaration. I've pushed a
> fix for that - can you try again please?
>
>




Re: [pgadmin-support] Cannot compile pgadmin4 mainline

From
Dave Page
Date:
On Mon, Dec 12, 2016 at 9:17 PM, Mark Murawski
<markm-lists@intellasoft.net> wrote:
> Thanks, That worked.
>
> Now I'm back to this again:
>
> markm {~} markm$ source /usr/share/virtualenvwrapper/virtualenvwrapper.sh
> markm {~} markm$ workon pgadmin4
> (pgadmin4)markm {~} markm$
>
>
> (pgadmin4)markm {~} markm$ download/pgadmin4/runtime/pgAdmin4
> Python path:  "/usr/bin/python3.4"
> Python Home:  ""
> Webapp path:  "/home/markm/download/pgadmin4/web/pgAdmin4.py"
> Traceback (most recent call last):
>   File "/home/markm/download/pgadmin4/web/pgAdmin4.py", line 24, in <module>
>     from pgadmin import create_app
>   File "/home/markm/download/pgadmin4/web/pgadmin/__init__.py", line 17, in
> <module>
>     from flask import Flask, abort, request, current_app
> ImportError: No module named 'flask'
> "Failed to launch the application server, server thread exiting."
>
> Python Path: /usr/bin/python3.4
> Application Path:
> /home/markm/.virtualenvs/pgadmin4/lib/python3.4/site-packages
> ls -al /home/markm/.virtualenvs/pgadmin4/lib/python3.4/site-packages | grep
> flask
> drwxr-xr-x 1 markm markm  422 Nov  1 13:11 flask
> drwxr-xr-x 1 markm markm   90 Nov  1 13:11 flask_babel
> drwxr-xr-x 1 markm markm   64 Nov  1 13:11 flask_gravatar
> -rw-r--r-- 1 markm markm  881 Dec 11 20:02 flask_htmlmin.py
> -rw-r--r-- 1 markm markm  33K Nov  1 13:11 flask_login.py
> -rw-r--r-- 1 markm markm  18K Nov  1 13:11 flask_mail.py
> -rw-r--r-- 1 markm markm  14K Nov  1 13:11 flask_principal.py
> drwxr-xr-x 1 markm markm  354 Nov  1 13:11 flask_security
> drwxr-xr-x 1 markm markm   64 Nov  1 13:11 flask_sqlalchemy
> drwxr-xr-x 1 markm markm  154 Nov  1 13:11 flask_wtf
>
>
> I'm using the same path as last time, but it cannot find what it needs...

The Python Path setting should include all directories that have the
Python components in them. From what I can see above, shouldn't it be
set to /home/markm/.virtualenvs/pgadmin4/lib/python3.4/site-packages
instead of /usr/bin/python3.4 (which I assume is the Python command
line interpreter, which pgAdmin doesn't care much about)?

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



Re: [pgadmin-support] Cannot compile pgadmin4 mainline

From
Mark Murawski
Date:
Ah thanks.  It was just odd it didn't keep the settings from before i 
upped my local git.

I searched my email history left and right trying to find where you had 
helped me previously, but I couldn't find anything and got stuck.  A 
user not knowing anything beforehand, seeing 'Python Path' is a bit 
misleading without knowing the internals and how this parameter gets used.

I'll make some notes in my local README on this so I don't have to fight 
this next time.

It would be really great if some sort of automatic virtualenv was set up 
and used as part of the startup.  It's pretty easy to auto detect where 
the virtualenv tools are located on major distros, and worst-case, it 
can always fall back to spit out a note saying 'here's how you do it 
manually'.



On 12/13/2016 04:05 AM, Dave Page wrote:
> On Mon, Dec 12, 2016 at 9:17 PM, Mark Murawski
> <markm-lists@intellasoft.net> wrote:
>> Thanks, That worked.
>>
>> Now I'm back to this again:
>>
>> markm {~} markm$ source /usr/share/virtualenvwrapper/virtualenvwrapper.sh
>> markm {~} markm$ workon pgadmin4
>> (pgadmin4)markm {~} markm$
>>
>>
>> (pgadmin4)markm {~} markm$ download/pgadmin4/runtime/pgAdmin4
>> Python path:  "/usr/bin/python3.4"
>> Python Home:  ""
>> Webapp path:  "/home/markm/download/pgadmin4/web/pgAdmin4.py"
>> Traceback (most recent call last):
>>    File "/home/markm/download/pgadmin4/web/pgAdmin4.py", line 24, in <module>
>>      from pgadmin import create_app
>>    File "/home/markm/download/pgadmin4/web/pgadmin/__init__.py", line 17, in
>> <module>
>>      from flask import Flask, abort, request, current_app
>> ImportError: No module named 'flask'
>> "Failed to launch the application server, server thread exiting."
>>
>> Python Path: /usr/bin/python3.4
>> Application Path:
>> /home/markm/.virtualenvs/pgadmin4/lib/python3.4/site-packages
>> ls -al /home/markm/.virtualenvs/pgadmin4/lib/python3.4/site-packages | grep
>> flask
>> drwxr-xr-x 1 markm markm  422 Nov  1 13:11 flask
>> drwxr-xr-x 1 markm markm   90 Nov  1 13:11 flask_babel
>> drwxr-xr-x 1 markm markm   64 Nov  1 13:11 flask_gravatar
>> -rw-r--r-- 1 markm markm  881 Dec 11 20:02 flask_htmlmin.py
>> -rw-r--r-- 1 markm markm  33K Nov  1 13:11 flask_login.py
>> -rw-r--r-- 1 markm markm  18K Nov  1 13:11 flask_mail.py
>> -rw-r--r-- 1 markm markm  14K Nov  1 13:11 flask_principal.py
>> drwxr-xr-x 1 markm markm  354 Nov  1 13:11 flask_security
>> drwxr-xr-x 1 markm markm   64 Nov  1 13:11 flask_sqlalchemy
>> drwxr-xr-x 1 markm markm  154 Nov  1 13:11 flask_wtf
>>
>>
>> I'm using the same path as last time, but it cannot find what it needs...
> The Python Path setting should include all directories that have the
> Python components in them. From what I can see above, shouldn't it be
> set to /home/markm/.virtualenvs/pgadmin4/lib/python3.4/site-packages
> instead of /usr/bin/python3.4 (which I assume is the Python command
> line interpreter, which pgAdmin doesn't care much about)?
>




Re: [pgadmin-support] Cannot compile pgadmin4 mainline

From
Dave Page
Date:
Hi

On Fri, Dec 16, 2016 at 1:21 AM, Mark Murawski
<markm-lists@intellasoft.net> wrote:
> Ah thanks.  It was just odd it didn't keep the settings from before i upped
> my local git.

It should - it stores that in your home directory by default. My only
guess is that it was working with the previous default search paths,
and we changed something in the code that caused that to no longer
work for you. I don't recall any changes in that area though.

> I searched my email history left and right trying to find where you had
> helped me previously, but I couldn't find anything and got stuck.  A user
> not knowing anything beforehand, seeing 'Python Path' is a bit misleading
> without knowing the internals and how this parameter gets used.

True, but we don't expect most users to build their own copy. We
expect them to be using prebuilt/configured packages instead.

> I'll make some notes in my local README on this so I don't have to fight
> this next time.
>
> It would be really great if some sort of automatic virtualenv was set up and
> used as part of the startup.  It's pretty easy to auto detect where the
> virtualenv tools are located on major distros, and worst-case, it can always
> fall back to spit out a note saying 'here's how you do it manually'.

Is the info in the existing README enough? If you can suggest
improvements I'd be happy to look at them.

Trying to handle auto-setup on a distro by distro basis is almost
certainly a non-starter. There are so many different ways things could
be setup, that vary even between different versions of distros that I
wouldn't be practical for us to deal with. That's why we try to leave
those details up to the packagers.

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company