Travis failures pybind11?

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Travis failures pybind11?

Post by sgrogan »

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?
"fight the good fight"
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Travis failures pybind11?

Post by Kunda1 »

thanks for tracking this
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
kkremitzki
Veteran
Posts: 2511
Joined: Thu Mar 03, 2016 9:52 pm
Location: Illinois

Re: Travis failures pybind11?

Post by kkremitzki »

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
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: Travis failures pybind11?

Post by sgrogan »

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.
"fight the good fight"
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: Travis failures pybind11?

Post by sgrogan »

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
"fight the good fight"
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Travis failures pybind11?

Post by wmayer »

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: 227
Joined: Tue Sep 22, 2015 1:47 pm
Location: Oxford UK/Shenzhen China
Contact:

Re: Travis failures pybind11?

Post by qingfeng.xia »

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 18.04 LTS 64bit, python3, always work with latest FreeCAD daily build
Working on Cfd module for FreeCAD, FreeCAD_Module_Develop_Guide
https://github.com/ukaea/parallel-preprocessor/
https://github.com/qingfengxia/Cfd
User avatar
kkremitzki
Veteran
Posts: 2511
Joined: Thu Mar 03, 2016 9:52 pm
Location: Illinois

Re: Travis failures pybind11?

Post by kkremitzki »

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.
Post Reply