[Solved] Compilation fails on Debian.

Having trouble installing or compiling FreeCAD? Get help here.
wmayer
Site Admin
Posts: 15471
Joined: Thu Feb 19, 2009 10:32 am

Re: Compilation fails on Debian.

Postby wmayer » Tue Aug 20, 2019 10:07 pm

What do you think of this ? :
As long as it compiles it's OK. In C++ you have several ways to use a class of a name space. Either you write the name space as prefix to the class name (e.g. std::istream) or you write "using std::istream" or "using namespace std" after the include statements.
fcaduser
Posts: 240
Joined: Wed Feb 19, 2014 6:53 pm
Location: Near Paris, France

Re: Compilation fails on Debian.

Postby fcaduser » Tue Aug 20, 2019 10:20 pm

OK. So should I proceed step by step and report ? And each stop pointed will necessarily need the modification of the code by you (name space clarification) ?
reox
Posts: 761
Joined: Sat Aug 13, 2016 10:06 am
Contact:

Re: Compilation fails on Debian.

Postby reox » Wed Aug 21, 2019 5:26 am

wmayer wrote:
Tue Aug 20, 2019 7:02 pm
reox wrote:
Tue Aug 20, 2019 6:17 pm
There is only the "issue" that gcc9 in sid produces thousands more warnings when compiling.
Could you at some point provide a log file with all these warnings, please?
sure!
freecad-daily_2019-08-21_0013.build.txt.gz
gcc9
(640.04 KiB) Downloaded 9 times
Note, it is 15MB in size after unpacking! And just ignore the first 4287 lines, it is the output of pbuilder.
As a reference, here is the last log which ran with gcc8:
freecad-daily_2019-08-15_0013.build.txt.gz
gcc8
(276.43 KiB) Downloaded 8 times
Some statistics:

Code: Select all

      1 [-Wformat=]
      2 [-Wredundant-move]
      2 [-Wstringop-truncation]
      4 [-Wdeprecated-declarations]
      5 [-Wnonnull-compare]
      5 [-Wunused-but-set-variable]
     10 [-Wimplicit-fallthrough=]
     10 [-Wstrict-aliasing]
     21 [-Wcatch-value=]
     21 [-Wclass-memaccess]
     29 [-Wcast-function-type]
     36 [-Wunused-result]
     59 [-Wmaybe-uninitialized]
    234 [-Wunused-variable]
   2007 [-Wdeprecated-copy]
So I think it is nothing of real concern, but a friend of mine already had some troubles with the new gcc9 and segfaults, as the compiler does things differently
wmayer
Site Admin
Posts: 15471
Joined: Thu Feb 19, 2009 10:32 am

Re: Compilation fails on Debian.

Postby wmayer » Wed Aug 21, 2019 8:33 am

Note, it is 15MB in size after unpacking! And just ignore the first 4287 lines, it is the output of pbuilder.
As a reference, here is the last log which ran with gcc8:
Thanks a lot! When I recently built the code with clang my log file had a size of 120 MB but it could be reduced to around 50 files that needed to be fixed.
fcaduser
Posts: 240
Joined: Wed Feb 19, 2014 6:53 pm
Location: Near Paris, France

Re: Compilation fails on Debian.

Postby fcaduser » Wed Aug 21, 2019 9:16 am

@wmayer

Did you see my question ? My point was : should I systematically report to you the recurrent problem with the lack of std:: ? I mean, you have to alter the code, I suppose ?

The previous achieved compilation I did was on 30 July. I don't know why all these stumbles appear now (no modification between of my gcc, environment, etc.)
wmayer
Site Admin
Posts: 15471
Joined: Thu Feb 19, 2009 10:32 am

Re: Compilation fails on Debian.

Postby wmayer » Wed Aug 21, 2019 11:32 am

fcaduser wrote:
Wed Aug 21, 2019 9:16 am
@wmayer

Did you see my question ? My point was : should I systematically report to you the recurrent problem with the lack of std:: ? I mean, you have to alter the code, I suppose ?

The previous achieved compilation I did was on 30 July. I don't know why all these stumbles appear now (no modification between of my gcc, environment, etc.)
Yesterday I pushed some fixes to the repo. So, update your local repo and then build FreeCAD again. And yes, report all errors you encounter to this thread.

The previous achieved compilation I did was on 30 July. I don't know why all these stumbles appear now (no modification between of my gcc, environment, etc.)
There are so many reasons why this can have changed. So, it's useless to try to find the root cause of it.
fcaduser
Posts: 240
Joined: Wed Feb 19, 2014 6:53 pm
Location: Near Paris, France

Re: Compilation fails on Debian.

Postby fcaduser » Wed Aug 21, 2019 11:49 am

@wmayer

OK, so I resume the process.
fcaduser
Posts: 240
Joined: Wed Feb 19, 2014 6:53 pm
Location: Near Paris, France

Re: Compilation fails on Debian.

Postby fcaduser » Wed Aug 21, 2019 2:05 pm

OK, so I've just clone again the repo.
Here is the last cmake output :
[ 0%] Built target Driver
[ 1%] Built target SMDS
[ 1%] Built target SMESHDS
[ 1%] Built target DriverUNV
[ 2%] Built target DriverDAT
[ 2%] Built target DriverSTL
[ 4%] Built target SMESH
[ 4%] Built target MEFISTO2
[ 6%] Built target StdMeshers
[ 9%] Built target FreeCADBase
[ 9%] Generating version_check
git
/home/mainuser/softwares/freecad_source/built_2019-08-21/src/Build/Version.h.out written
[ 9%] Generating Version.h
[ 9%] Built target fc_version
[ 12%] Built target FreeCADApp
[ 27%] Built target FreeCADGui
[ 27%] Built target FreeCADMain
[ 27%] Built target FreeCADGuiPy
[ 27%] Built target FreeCADMainCmd
[ 27%] Built target FreeCADMainPy
[ 27%] Built target Points
[ 28%] Built target PointsGui
[ 28%] Built target Complete
[ 28%] Built target CompleteGui
[ 29%] Built target Test
[ 29%] Built target QtUnitGui
[ 29%] Built target ImageScripts
[ 29%] Built target Image
[ 30%] Built target ImageGui
[ 30%] Built target MeshScripts
[ 34%] Built target Mesh
[ 35%] Built target MeshGui
[ 36%] Built target PartScripts
[ 36%] Building CXX object src/Mod/Part/App/CMakeFiles/Part.dir/PropertyTopoShape.cpp.o
/home/mainuser/softwares/freecad_source/src/Mod/Part/App/PropertyTopoShape.cpp: In function ‘Standard_Boolean BRepTools_Write(const TopoDS_Shape&, Standard_CString)’:
/home/mainuser/softwares/freecad_source/src/Mod/Part/App/PropertyTopoShape.cpp:287:28: error: ‘ios’ has not been declared
OSD_OpenStream(os, File, ios::out);
^~~
src/Mod/Part/App/CMakeFiles/Part.dir/build.make:1445 : la recette pour la cible « src/Mod/Part/App/CMakeFiles/Part.dir/PropertyTopoShape.cpp.o » a échouée
make[2]: *** [src/Mod/Part/App/CMakeFiles/Part.dir/PropertyTopoShape.cpp.o] Erreur 1
CMakeFiles/Makefile2:1877 : la recette pour la cible « src/Mod/Part/App/CMakeFiles/Part.dir/all » a échouée
make[1]: *** [src/Mod/Part/App/CMakeFiles/Part.dir/all] Erreur 2
Makefile:127 : la recette pour la cible « all » a échouée
make: *** [all] Erreur 2
wmayer
Site Admin
Posts: 15471
Joined: Thu Feb 19, 2009 10:32 am

Re: Compilation fails on Debian.

Postby wmayer » Wed Aug 21, 2019 2:32 pm

Fixed. Next attempt.
fcaduser
Posts: 240
Joined: Wed Feb 19, 2014 6:53 pm
Location: Near Paris, France

Re: Compilation fails on Debian.

Postby fcaduser » Wed Aug 21, 2019 2:37 pm

Testing...