libQGLViewer problems while running yade

Asked by Anton Vereshchagin on 2019-05-16

I'm trying to compile Yade on Gentoo but faced the same bug described by Gary in https://answers.launchpad.net/yade/+question/661824 (answer #6)

> running the GUI will result in a Segmentation Fault after throwing the following error "The constructor with a shareWidget is
> deprecated, use the regular contructor instead."

So I'm able to run scripts but I've got segfault when trying to call qt.View() like described above.

I'm building Yade against libQGLViewer-2.7.1. Since prior versions to 2.7.0 of libQGLViewer are built against Qt4 so it's not an option for me.

Was this issue solved or may be there is a solution?

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
2019-05-16
Last reply:
2019-05-20
Janek Kozicki (cosurgi) said : #1

I have recently fixed a but regarding versions > 2.7.0. https://gitlab.com/yade-dev/trunk/commit/7bb5232765e10573629eb6e1086dd822027a936b

Please try compiling latest master.

I pulled the latest version. Some things changed in configuration of CMake.

1) On my system I have python versions 2.7, 3.6 and 3.7. But mostly for the system I use 3.6. Cmake searches for all versions and chooses 3.7. So I had to modify a little CMakeLists.txt for a proper python version 3.6

2) The compilation stops with error for all constants METIS_VER_MAJOR, METIS_VER_MINOR, METIS_VER_SUBMINOR like

In function «boost::python::list metisVer()»:
trunk/py/_libVersions.cpp:206:31: error: no declaration «METIS_VER_MAJOR»
   ret.append( py::make_tuple( METIS_VER_MAJOR , METIS_VER_MINOR , METIS_VER_SUBMINOR));
                               ^~~~~~~~~~~~~~~

So I cannot continue.

3) Concerning libQGLViewer i will try to recompile Qt library maybe it'll change anything

By the way, thank you for a good piece of software.

Janek Kozicki (cosurgi) said : #3

Is there also an  #include <metis.h> error?
On 17 May 2019, 11:17 +0200, Anton Vereshchagin <email address hidden>, wrote:
> Question #680867 on Yade changed:
> https://answers.launchpad.net/yade/+question/680867
>
> Anton Vereshchagin posted a new comment:
> I pulled the latest version. Some things changed in configuration of
> CMake.
>
> 1) On my system I have python versions 2.7, 3.6 and 3.7. But mostly for
> the system I use 3.6. Cmake searches for all versions and chooses 3.7.
> So I had to modify a little CMakeLists.txt for a proper python version
> 3.6
>
> 2) The compilation stops with error for all constants METIS_VER_MAJOR,
> METIS_VER_MINOR, METIS_VER_SUBMINOR like
>
> In function «boost::python::list metisVer()»:
> trunk/py/_libVersions.cpp:206:31: error: no declaration «METIS_VER_MAJOR»
> ret.append( py::make_tuple( METIS_VER_MAJOR , METIS_VER_MINOR , METIS_VER_SUBMINOR));
> ^~~~~~~~~~~~~~~
>
> So I cannot continue.
>
> 3) Concerning libQGLViewer i will try to recompile Qt library maybe
> it'll change anything
>
>
> By the way, thank you for a good piece of software.
>
> --
> You received this question notification because your team yade-users is
> an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp

Janek Kozicki (cosurgi) said : #4

Also: Can you find where metis.h is on your system. It's a part of libmetis-dev package. I think i have to update CmakeLists.txt file to fix this

$ cat /usr/include/metis/metis.h
/*
 * Copyright 1997, Regents of the University of Minnesota
 *
 * metis.h
 *
 * This file includes all necessary header files
 *
 * Started 8/27/94
 * George
 *
 * $Id: metis.h,v 1.1 1998/11/27 17:59:21 karypis Exp $
 */

#include <stdio.h>
#ifdef __STDC__
#include <stdlib.h>
#else
#include <malloc.h>
#endif
#include <strings.h>
#include <string.h>
#include <ctype.h>
#include <math.h>
#include <stdarg.h>
#include <time.h>

#ifdef DMALLOC
#include <dmalloc.h>
#endif

#include <defs.h>
#include <struct.h>
#include <macros.h>
#include <rename.h>
#include <proto.h>

Also I didn't find any of these constants definitions in all metis header files.

> #include <defs.h>
> #include <struct.h>
> #include <macros.h>
> #include <rename.h
> #include <proto.h>

Janek Kozicki (cosurgi) said : #7

Interesting, what is your libmetis version? Maybe they changed API.

It seems that there are two versions of metis library in Gentoo both are 4.0.3

$ qsearch -v metis
sci-libs/metis A package for unstructured serial graph partitioning
sci-libs/parmetis Parallel (MPI) unstructured graph partitioning library

I installed the latter and now it compiles sweetly :)

Can you help with this problem?

Provide an answer of your own, or ask Anton Vereshchagin for more information if necessary.

To post a message you must log in.