Travis failures pybind11?

Having trouble installing or compiling FreeCAD? Get help here.
User avatar
sgrogan
Posts: 5473
Joined: Wed Oct 22, 2014 5:02 pm

Travis failures pybind11?

Postby sgrogan » Wed Oct 30, 2019 12:42 am

We are getting failures like this (Clang py3) https://travis-ci.org/FreeCAD/FreeCAD/j ... 4925#L4474
It's the same for gcc/py3
gcc/py2 passes because we are not -DBUILD_FEM_NETGEN=ON for this build
https://github.com/FreeCAD/FreeCAD/blob ... is.yml#L46

For Ubuntu 18.04 there is no netgen-headers package. https://packages.ubuntu.com/search?keyw ... en-headers

For Win it probably passes because pybind11 is available in the Libpack, I would bet it not actually used.

Anybody compiling themselves with 18.04?
User avatar
Kunda1
Posts: 5937
Joined: Thu Jan 05, 2017 9:03 pm

Re: Travis failures pybind11?

Postby Kunda1 » Wed Oct 30, 2019 1:21 am

thanks for tracking this
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
kkremitzki
Posts: 1796
Joined: Thu Mar 03, 2016 9:52 pm
Location: Texas

Re: Travis failures pybind11?

Postby kkremitzki » Wed Oct 30, 2019 3:21 am

I have gotten pybind11 + netgen builds working and tried turning them on for the daily builds today but forgot a few things, gonna trigger a new build soon.
Like my FreeCAD work? I'd appreciate any level of support via Patreon, Liberapay, or PayPal! Read more about what I do at my blog.
User avatar
sgrogan
Posts: 5473
Joined: Wed Oct 22, 2014 5:02 pm

Re: Travis failures pybind11?

Postby sgrogan » Wed Oct 30, 2019 8:54 pm

kkremitzki wrote:
Wed Oct 30, 2019 3:21 am
I have gotten pybind11 + netgen builds working and tried turning them on for the daily builds today but forgot a few things, gonna trigger a new build soon.
Thanks!
I just noticed that Travis is using the PPA so the missing netgen stuff for 18.04 (bionic) is not the problem. Do you know why no netgen in 18.04?
Do you know where the pybind11 dependency comes from? I can see that python3-netgen might need pybind11, but FreeCAD doesn't need python3-netgen.
User avatar
sgrogan
Posts: 5473
Joined: Wed Oct 22, 2014 5:02 pm

Re: Travis failures pybind11?

Postby sgrogan » Thu Oct 31, 2019 8:21 pm

OK, I see now
usr/include/netgen/core/archive.hpp has this

Code: Select all

#ifdef NETGEN_PYTHON
#include <pybind11/pybind11.h>
#endif // NETGEN_PYTHON
wmayer
Site Admin
Posts: 14999
Joined: Thu Feb 19, 2009 10:32 am

Re: Travis failures pybind11?

Postby wmayer » Sat Nov 02, 2019 10:38 am

Apparently there must have been changes on the netgen packages by adding the define NETGEN_PYTHON.
Yesterday I set-up a new native Xubuntu system where I ran exactly into the same issue.

To fix the build failure I have rejected the NETGEN_PYTHON define inside the salome netgen source files: git commit d276cc8d7a4f

While building the code (with clang) I got some further warnings that I haven't seen before:

Code: Select all

In file included from /usr/include/netgen/include/../general/../core/profiler.hpp:9:0,
                 from /usr/include/netgen/include/../general/../core/ngcore.hpp:7,
                 from /usr/include/netgen/include/../general/myadt.hpp:20,
                 from /usr/include/netgen/include/../meshing/../include/myadt.hpp:1,
                 from /usr/include/netgen/include/../meshing/meshing.hpp:6,
                 from /usr/include/netgen/include/meshing.hpp:1,
                 from /usr/include/netgen/include/../occ/occgeom.hpp:12,
                 from /usr/include/netgen/include/occgeom.hpp:1,
                 from /home/werner/Projects/FreeCAD/src/3rdParty/salomesmesh/src/NETGENPlugin/NETGENPlugin_Mesher.cpp:88:
/usr/include/netgen/include/../general/../core/paje_trace.hpp: In member function ‘void ngcore::PajeTrace::StartTimer(int)’:
/usr/include/netgen/include/../general/../core/paje_trace.hpp:121:77: warning: missing initializer for member ‘ngcore::PajeTrace::TimerEvent::thread_id’ [-Wmissing-field-initializers]
           timer_events.push_back(TimerEvent{timer_id, GetTimeCounter(), true});
                                                                             ^
/usr/include/netgen/include/../general/../core/paje_trace.hpp: In member function ‘void ngcore::PajeTrace::StopTimer(int)’:
/usr/include/netgen/include/../general/../core/paje_trace.hpp:129:78: warning: missing initializer for member ‘ngcore::PajeTrace::TimerEvent::thread_id’ [-Wmissing-field-initializers]
           timer_events.push_back(TimerEvent{timer_id, GetTimeCounter(), false});
                                                                              ^
/usr/include/netgen/include/../general/../core/paje_trace.hpp: In member function ‘int ngcore::PajeTrace::StartTask(int, int, int, int)’:
/usr/include/netgen/include/../general/../core/paje_trace.hpp:139:102: warning: missing initializer for member ‘ngcore::PajeTrace::Task::stop_time’ [-Wmissing-field-initializers]
           tasks[thread_id].push_back( Task{thread_id, id, id_type, additional_value, GetTimeCounter()} );
                                                                                                      ^
/usr/include/netgen/include/../general/../core/paje_trace.hpp: In member function ‘void ngcore::PajeTrace::StartJob(int, const std::type_info&)’:
/usr/include/netgen/include/../general/../core/paje_trace.hpp:161:62: warning: missing initializer for member ‘ngcore::PajeTrace::Job::stop_time’ [-Wmissing-field-initializers]
           jobs.push_back( Job{job_id, &type, GetTimeCounter()} );

Then there is still this nasty warning about DLL_HEADER. In most of the netgen headers it's defined as:

Code: Select all

#ifdef WIN32
   #if NGINTERFACE_EXPORTS || NGLIB_EXPORTS || nglib_EXPORTS
      #define DLL_HEADER   __declspec(dllexport)
   #else
      #define DLL_HEADER   __declspec(dllimport)
   #endif
#else
   #if __GNUC__ >= 4
      #define DLL_HEADER __attribute__ ((visibility ("default")))
   #else
      #define DLL_HEADER
   #endif
#endif
but in nglib.h the definition slightly differs:

Code: Select all

#ifdef WIN32
   #ifdef NGLIB_EXPORTS || nglib_EXPORTS
      #define DLL_HEADER   __declspec(dllexport)
   #else
      #define DLL_HEADER   __declspec(dllimport)
   #endif
#else
   #define DLL_HEADER 
#endif
Can these warning be fixed so that -- at least locally -- I can enable -Wpedantic -Werror ?
qingfeng.xia
Posts: 172
Joined: Tue Sep 22, 2015 1:47 pm
Location: Oxford Uk
Contact:

Re: Travis failures pybind11?

Postby qingfeng.xia » Sat Nov 09, 2019 12:05 pm

I have updated salomemesh from 7.7 to 8.3, tetgen 6.2 has change that break smesh code in freecad. like excpetion and pybind11 macro, I fixed it by 2 latest commits.
https://github.com/qingfengxia/SMESH

further discussion on smesh is in another thread. https://forum.freecadweb.org/viewtopic. ... 17#p346117
how about keep salomemesh as a git submodule of freecad, perhaps it is not freecad's way
Ubuntu LTS 64bit in virtualbox, always work with latest FreeCAD git version
Mainly work on OpenFOAM + Fenics for CFD, FSI
User avatar
kkremitzki
Posts: 1796
Joined: Thu Mar 03, 2016 9:52 pm
Location: Texas

Re: Travis failures pybind11?

Postby kkremitzki » Sat Nov 09, 2019 3:15 pm

Git submodules can be quite a pain, I'm not sure moving it to that instead of simply a directory inside the master tree would have much benefit. (Especially from a packaging perspective.)
Like my FreeCAD work? I'd appreciate any level of support via Patreon, Liberapay, or PayPal! Read more about what I do at my blog.