[QGIS-Developer] Problems compiling QGIS 3.0: no matching function for call to QgsLayerTreeLayer::connect

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[QGIS-Developer] Problems compiling QGIS 3.0: no matching function for call to QgsLayerTreeLayer::connect

Hernán De Angelis-3
Hi

I am trying to build QGIS 3.0 in openSUSE Leap 42.3. I went through all requirements and as far as I understand I have all the requirements properly installed.

I nevertheless get this error consistently:

Building CXX object src/core/CMakeFiles/qgis_core.dir/layertree/qgslayertreelayer.cpp.o
/usr/local/src/qgis-3.0.0/src/core/layertree/qgslayertreelayer.cpp: In member function ‘void QgsLayerTreeLayer::attachToLayer()’:
/usr/local/src/qgis-3.0.0/src/core/layertree/qgslayertreelayer.cpp:72:94: error: no matching function for call to ‘QgsLayerTreeLayer::connect(QPointer<QgsMapLayer>&, void (QgsMapLayer::*)(), QgsLayerTreeLayer* const, void (QgsLayerTreeLayer::*)())’
   connect( mRef.layer, &QgsMapLayer::nameChanged, this, &QgsLayerTreeLayer::layerNameChanged );

What could possibly be the source of this? I will be grateful if someone can help pinpoint the cause.

The code I am trying to build is the latest source package (2018-02-23).

Thanks in advance

H.


_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: Problems compiling QGIS 3.0: no matching function for call to QgsLayerTreeLayer::connect

ginetto
that code lines are unchanged since (at least) 1yr. Can you check if a
clean build can solve the problem?
Luigi Pirelli

**************************************************************************************************
* LinkedIn: https://www.linkedin.com/in/luigipirelli
* Stackexchange: http://gis.stackexchange.com/users/19667/luigi-pirelli
* GitHub: https://github.com/luipir
* Mastering QGIS 2nd Edition:
* https://www.packtpub.com/big-data-and-business-intelligence/mastering-qgis-second-edition
* Hire me: http://goo.gl/BYRQKg
**************************************************************************************************


On 6 March 2018 at 10:28, Hernán De Angelis <[hidden email]> wrote:

> Hi
>
> I am trying to build QGIS 3.0 in openSUSE Leap 42.3. I went through all
> requirements and as far as I understand I have all the requirements properly
> installed.
>
> I nevertheless get this error consistently:
>
> Building CXX object
> src/core/CMakeFiles/qgis_core.dir/layertree/qgslayertreelayer.cpp.o
> /usr/local/src/qgis-3.0.0/src/core/layertree/qgslayertreelayer.cpp: In
> member function ‘void QgsLayerTreeLayer::attachToLayer()’:
> /usr/local/src/qgis-3.0.0/src/core/layertree/qgslayertreelayer.cpp:72:94:
> error: no matching function for call to
> ‘QgsLayerTreeLayer::connect(QPointer<QgsMapLayer>&, void (QgsMapLayer::*)(),
> QgsLayerTreeLayer* const, void (QgsLayerTreeLayer::*)())’
>    connect( mRef.layer, &QgsMapLayer::nameChanged, this,
> &QgsLayerTreeLayer::layerNameChanged );
>
> What could possibly be the source of this? I will be grateful if someone can
> help pinpoint the cause.
>
> The code I am trying to build is the latest source package (2018-02-23).
>
> Thanks in advance
>
> H.
>
>
> _______________________________________________
> QGIS-Developer mailing list
> [hidden email]
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: Problems compiling QGIS 3.0: no matching function for call to QgsLayerTreeLayer::connect

ceholden
Hi

I encountered this same error trying to compile and package QGIS 3.0 within
the "conda-forge" community channel of the Anaconda Python distribution, but
only when using GCC 4.8 (4.8.5, specifically). Pretty sure I have to stick
with GCC 4.8 for now within this build environment, but I did not encounter
this issue when using GCC 7.2 or 7.3. I switched out to gcc 7.2, keeping all
the other dependencies/etc the same, and can compile and run QGIS without
issue.

I don't know my way around SUSE, but it looks like the "gcc" package for
openSUSE Leap 42.3 is version 4.8
(https://software.opensuse.org/package/gcc). Assuming Hernán is using the
"gcc" package (and not "gcc6" or "gcc7", and thus would be using gcc 4.8.x),
then this could narrow down the issue and help explain why it hasn't come up
elsewhere. I'm unfortunately clueless about the GCC history and not much of
a C++ person, so I'm not sure where to go from here, beyond eventually
upgrading gcc, but would be happy to test patches/compilation options/etc.

Here's a link to a Gist with the output from cmake and the failed make step,
either using Make and Ninja (Ninja shows

Make:
https://gist.github.com/ceholden/b6179d58e17f983ce6f29b32531bb4fa#file-qgis3-0_gcc4-8_make_fail
Ninja:
https://gist.github.com/ceholden/b6179d58e17f983ce6f29b32531bb4fa#file-qgis3-0_gcc4-8_ninja_fail

Best,
Chris



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-Developer-f4099106.html
_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: Problems compiling QGIS 3.0: no matching function for call to QgsLayerTreeLayer::connect

Hernán De Angelis-3
Thanks for the pointer, Chris. Indeed:

~> gcc --version
gcc (SUSE Linux) 4.8.5

I will chack again in two months with the new version (openSUSE 15). For now I will live with QGIS 2.18.17 just fine.

Best,

H.

On Fri, Mar 9, 2018 at 7:32 PM, ceholden <[hidden email]> wrote:
Hi

I encountered this same error trying to compile and package QGIS 3.0 within
the "conda-forge" community channel of the Anaconda Python distribution, but
only when using GCC 4.8 (4.8.5, specifically). Pretty sure I have to stick
with GCC 4.8 for now within this build environment, but I did not encounter
this issue when using GCC 7.2 or 7.3. I switched out to gcc 7.2, keeping all
the other dependencies/etc the same, and can compile and run QGIS without
issue.

I don't know my way around SUSE, but it looks like the "gcc" package for
openSUSE Leap 42.3 is version 4.8
(https://software.opensuse.org/package/gcc). Assuming Hernán is using the
"gcc" package (and not "gcc6" or "gcc7", and thus would be using gcc 4.8.x),
then this could narrow down the issue and help explain why it hasn't come up
elsewhere. I'm unfortunately clueless about the GCC history and not much of
a C++ person, so I'm not sure where to go from here, beyond eventually
upgrading gcc, but would be happy to test patches/compilation options/etc.

Here's a link to a Gist with the output from cmake and the failed make step,
either using Make and Ninja (Ninja shows

Make:
https://gist.github.com/ceholden/b6179d58e17f983ce6f29b32531bb4fa#file-qgis3-0_gcc4-8_make_fail
Ninja:
https://gist.github.com/ceholden/b6179d58e17f983ce6f29b32531bb4fa#file-qgis3-0_gcc4-8_ninja_fail

Best,
Chris



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-Developer-f4099106.html
_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: Problems compiling QGIS 3.0: no matching function for call to QgsLayerTreeLayer::connect

dsegerss
Hi,
I just encountered the same issue trying to build QGIS 3.2 using gcc 4.8.5
on RHEL 7. Has there been any progress on solving this? I really need to get
QGIS 3 running on RHEL7...

Regards,
David





--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-Developer-f4099106.html
_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer