[QGIS-Developer] Problems with building QGIS Server 3.6.x on Mac OS X

2019-04-11 Thread Lorenzo Moretti
Hi
I'm using QGIS Server version 2.18.17 and it works well on Mac OS X.I initially 
tested the official version of QGIS for Mac OS X from the qgis website but the 
server application immediately failed while the desktop part is working well.
So I tried to install QGIS 3.6.0 from MacPorts.org and the desktop part also 
works well here. The server option was included in the software, a first 
attempt to build the QGIS Server application.  The binary was built but 
unfortunately there are some errors difficult to understand.I have made some 
comparisons with the Ubuntu version and I would like to understand from you 
where the problems of compilation are assuming that the desktop version works 
well and all software dependencies are compiled.
The binary of QGIS Server 3.6.x is built within the application and if I start 
it from the terminal I have this information:

airml $ 
/Applications/MacPorts/Qgis3.app/Contents/MacOS/fcgi-bin/qgis_mapserv.fcgi
Initializing server modules from  
"/Applications/MacPorts/Qgis3.app/Contents/MacOS/fcgi-bin/lib/qgis/server"
"Checking 
/Applications/MacPorts/Qgis3.app/Contents/MacOS/fcgi-bin/lib/qgis/server for 
native services modules""Loading native module 
/Applications/MacPorts/Qgis3.app/Contents/MacOS/fcgi-bin/lib/qgis/server/libdummy.so""Loading
 native module 
/Applications/MacPorts/Qgis3.app/Contents/MacOS/fcgi-bin/lib/qgis/server/libwcs.so""Loading
 native module 
/Applications/MacPorts/Qgis3.app/Contents/MacOS/fcgi-bin/lib/qgis/server/libwfs.so""Loading
 native module 
/Applications/MacPorts/Qgis3.app/Contents/MacOS/fcgi-bin/lib/qgis/server/libwms.so""Loading
 native module 
/Applications/MacPorts/Qgis3.app/Contents/MacOS/fcgi-bin/lib/qgis/server/libwmts.so""Couldn't load SIP module.Python support will be 
disabled.Traceback (most recent call last): File 
\"\", line 1, in ModuleNotFoundError: No module named 
'qgis'Python version:3.6.8 (default, Dec 30 2018, 13:01:27) 
[GCC 4.2.1 Compatible Apple LLVM 10.0.0 (clang-1000.11.45.5)]QGIS 
version:3.6.0-Noosa 'Noosa', exportedPython 
path:['/Applications/MacPorts/Qgis3.app/Contents/MacOS/fcgi-bin/../Resources/python',
 '/Users/airml/Library/Application Support/QGIS/QGIS3/profiles/default/python', 
'/Users/airml/Library/Application 
Support/QGIS/QGIS3/profiles/default/python/plugins', 
'/Applications/MacPorts/Qgis3.app/Contents/MacOS/fcgi-bin/../Resources/python/plugins',
 
'/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python36.zip', 
'/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6', 
'/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload',
 
'/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages']""An error occurred during execution of following 
code:qgis.utils.uninstallErrorHook()Traceback 
(most recent call last): File \"\", line 1, in 
NameError: name 'qgis' is not definedPython 
version:3.6.8 (default, Dec 30 2018, 13:01:27) [GCC 4.2.1 Compatible 
Apple LLVM 10.0.0 (clang-1000.11.45.5)]QGIS version:3.6.0-Noosa 
'Noosa', exportedPython 
path:['/Applications/MacPorts/Qgis3.app/Contents/MacOS/fcgi-bin/../Resources/python',
 '/Users/airml/Library/Application Support/QGIS/QGIS3/profiles/default/python', 
'/Users/airml/Library/Application 
Support/QGIS/QGIS3/profiles/default/python/plugins', 
'/Applications/MacPorts/Qgis3.app/Contents/MacOS/fcgi-bin/../Resources/python/plugins',
 
'/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python36.zip', 
'/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6', 
'/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload',
 
'/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages']"QFSFileEngine::open:
 No file name specifiedContent-Length: 54Content-Type: text/xml; 
charset=utf-8Server:  Qgis FCGI server - QGis version 3.6.0-NoosaStatus:  500
Project file errorairml $airml $ 
/Applications/MacPorts/Qgis3.app/Contents/MacOS/fcgi-bin/qgis_mapserv.fcgiInitializing
 server modules from  
"/Applications/MacPorts/Qgis3.app/Contents/MacOS/fcgi-bin/lib/qgis/server"
"Checking 
/Applications/MacPorts/Qgis3.app/Contents/MacOS/fcgi-bin/lib/qgis/server for 
native services modules""Loading native module 
/Applications/MacPorts/Qgis3.app/Contents/MacOS/fcgi-bin/lib/qgis/server/libdummy.so""Loading
 native module 
/Applications/MacPorts/Qgis3.app/Contents/MacOS/fcgi-bin/lib/qgis/server/libwcs.so""Loading
 native module 
/Applications/MacPorts/Qgis3.app/Contents/MacOS/fcgi-bin/lib/qgis/server/libwfs.so""Loading
 native module 
/Applications/MacPorts/Qgis3.app/Contents/MacOS/fcgi-bin/lib/qgis/server/libwms.so""Loading
 native module 
/Applications/MacPorts/Qgis3.app/Contents/MacOS/fcgi-bin/lib/qgis/server/libwmts.so""Couldn't load SIP module.Python support will be 
disabled.Traceback (most recent call last): File 
\"\", line 1, in ModuleNotFoundError: No module named 
'qgis'Python version:3.6.8 

Re: [QGIS-Developer] issues in QGIS Server 2,18

2018-04-17 Thread Lorenzo Moretti
Hi

In addition to the problem described in GetPrint I have a problem related to 
the legend in QGIS 2.18.
If the "Show Feature Count" function is enabled my QGIS Server crashes and part 
of the qgs file is also compromised. The legend is no longer displayed. Even if 
disabled "Show Feature Count" the qgs file is damaged. I've seen that this code 
in the qgs file crashes it:
  

  
This is also the case in GetPrint with dynamic texts in the legend (object 
counting). I have to remove all references in the qgs file but not always 
enough to avoid the crash. Sometimes I have to recreate the file from the 
beginning without this option and without the same option in the print.
QGIS server is installed on an OS Desktop (Mac OS X). X11 is not enabled and 
therefore I cannot use the fake-server.
The other options in QGIS Server work well.
All this in version 2.14 did not happen.

Thanks

cheers

Lorenzo

> 
> 
> *) Crashes on GetPrint: adding some type of elements in print
> composers (like html text boxes) caused QGIS Server to crash when
> doing a GetPrint *if* the *headless* server didn't had a fake xserver
> installed. Now in 2.18 this happens even if QGIS Server is installed
> on a Desktop OS, unless installing the fake x server. Not sure is
> related but this now affects also Windows machines where a GetPrint
> requests (of a layout with one of this problematic elements) make
> always QGIS Server crash. This was not the case for 2.14.
> 


___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer