OS X 10.8.4 compiling CSXCAD error

Install support for openEMS

Moderators: thorsten, sebastian

Post Reply
erik
Posts: 3
Joined: Sun 30 Jun 2013, 15:03

OS X 10.8.4 compiling CSXCAD error

Post by erik » Fri 05 Jul 2013, 02:36

I'm trying to install on OS X 10.8.4. I had to edit the Makefile to include vtk-6.1 as thats the version that I have installed. I installed CGAL and got the following error when compiling CSXCAD. I'm not sure what to make of it. Any help is much appreciated.
Thanks


clang: warning: argument unused during compilation: '-frounding-math'
In file included from src/CSPrimPolyhedron.cpp:25:
src/CSPrimPolyhedron_p.h:33:1: warning: 'CSPrimPolyhedronPrivate' defined as a struct here but previously declared as a class [-Wmismatched-tags]
struct CSPrimPolyhedronPrivate
^
src/CSPrimPolyhedron.h:22:1: note: did you mean struct here?
class CSPrimPolyhedronPrivate;
^~~~~
struct
1 warning generated.
clang++ -c -pipe -Wno-deprecated -frounding-math -O2 -arch x86_64 -Wall -W -fPIC -DGIT_VERSION=\"v0.4.0\" -DTIXML_USE_STL -I/usr/local/Cellar/qt/4.8.4/mkspecs/unsupported/macx-clang -I. -I. -I/usr/local/include/vtk-6.1 -I/usr/include/vtk-5.2 -I/usr/include/vtk-5.4 -I/usr/include/vtk-5.6 -I/usr/include/vtk-5.8 -I/usr/include/vtk-5.10 -I/usr/include/vtk -I/usr/include/mpi -o obj/CSPrimPolyhedronReader.o src/CSPrimPolyhedronReader.cpp
clang: warning: argument unused during compilation: '-frounding-math'
src/CSPrimPolyhedronReader.cpp:145:12: error: no member named 'Update' in 'vtkPolyData'
polydata->Update();
~~~~~~~~ ^
1 error generated.
make: *** [obj/CSPrimPolyhedronReader.o] Error 1

thorsten
Posts: 1438
Joined: Mon 27 Jun 2011, 12:26

Re: OS X 10.8.4 compiling CSXCAD error

Post by thorsten » Fri 05 Jul 2013, 08:14

Hi,

I guess we can ignore the warnings for now, but vtkPolyData seems to have changed from 5.x to 6.y:
src/CSPrimPolyhedronReader.cpp:145:12: error: no member named 'Update' in 'vtkPolyData'
I will have a closer look why I need this update and how this is supposed to be done in 6.1

EDIT: Why do you have vtk 6.1, as far as I can see 6.0 is the current release version??

regards
Thorsten

erik
Posts: 3
Joined: Sun 30 Jun 2013, 15:03

Re: OS X 10.8.4 compiling CSXCAD error

Post by erik » Fri 05 Jul 2013, 13:55

I used the vtk git repository instructions found here http://www.vtk.org/Wiki/VTK/Git. I just put the command "git clone git://vtk.org/VTK.git" then compiled. After all finished I found /usr/local/include/vtk-6.1.
Thanks for the quick response.
erik

thorsten
Posts: 1438
Joined: Mon 27 Jun 2011, 12:26

Re: OS X 10.8.4 compiling CSXCAD error

Post by thorsten » Fri 05 Jul 2013, 14:27

I would recommend that you should use the latest 5.x version instead of the unstable development version,
e.g.: http://www.vtk.org/VTK/resources/software.html#previous

It seems there are a few changes in vtk 6 that are not dealt with yet. Don't make this more complicated as necessary ;)

regards
Thorsten

erik
Posts: 3
Joined: Sun 30 Jun 2013, 15:03

Re: OS X 10.8.4 compiling CSXCAD error

Post by erik » Fri 05 Jul 2013, 15:21

So I installed vtk-5.10 and changed the CSXCAD Makefile to look in /usr/local/include/vtk-5.10. I still get the struct error and another new error. Its not finding libraries to link.

src/CSPrimPolyhedron_p.h:33:1: warning: 'CSPrimPolyhedronPrivate' defined as a struct here but previously declared as a class [-Wmismatched-tags]
struct CSPrimPolyhedronPrivate
^
src/CSPrimPolyhedron.h:22:1: note: did you mean struct here?
class CSPrimPolyhedronPrivate;
^~~~~
struct

rm -f libCSXCAD.0.4.0.dylib libCSXCAD.dylib libCSXCAD.0.dylib libCSXCAD.0.4.dylib
clang++ -headerpad_max_install_names -arch x86_64 -single_module -dynamiclib -compatibility_version 0.4 -current_version 0.4.0 -install_name libCSXCAD.0.dylib -o libCSXCAD.0.4.0.dylib obj/ContinuousStructure.o obj/CSPrimitives.o obj/CSProperties.o obj/CSRectGrid.o obj/ParameterObjects.o obj/CSFunctionParser.o obj/CSUseful.o obj/ParameterCoord.o obj/CSTransform.o obj/CSPrimPoint.o obj/CSPrimBox.o obj/CSPrimMultiBox.o obj/CSPrimSphere.o obj/CSPrimSphericalShell.o obj/CSPrimCylinder.o obj/CSPrimCylindricalShell.o obj/CSPrimPolygon.o obj/CSPrimLinPoly.o obj/CSPrimRotPoly.o obj/CSPrimPolyhedron.o obj/CSPrimPolyhedronReader.o obj/CSPrimCurve.o obj/CSPrimWire.o obj/CSPrimUserDefined.o obj/CSPropUnknown.o obj/CSPropMaterial.o obj/CSPropDispersiveMaterial.o obj/CSPropLorentzMaterial.o obj/CSPropDiscMaterial.o obj/CSPropLumpedElement.o obj/CSPropMetal.o obj/CSPropConductingSheet.o obj/CSPropExcitation.o obj/CSPropProbeBox.o obj/CSPropDumpBox.o obj/CSPropResBox.o -lfparser -ltinyxml -lhdf5_hl -lhdf5 -lCGAL
ld: library not found for -lfparser
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [libCSXCAD.0.4.0.dylib] Error 1

thorsten
Posts: 1438
Joined: Mon 27 Jun 2011, 12:26

Re: OS X 10.8.4 compiling CSXCAD error

Post by thorsten » Fri 05 Jul 2013, 17:20

The struct are only warnings I currently don't know what they mean.

The error is not finding the fparser lib. Did you compile it ?

You can get it e.g. here:
http://warp.povusers.org/FunctionParser/

regards
Thorsten

sebastian
Posts: 114
Joined: Mon 27 Jun 2011, 12:36
Contact:

Re: OS X 10.8.4 compiling CSXCAD error

Post by sebastian » Sun 07 Jul 2013, 20:17

According to the standard, struct and class are equivalent (minor difference in default access rights). Clang produces a warning, while gcc does not.
Here is a quick fix to silence the warning.

Sebastian

@Thorsten: why is the extension .patch not allowed to upload?
@Thorsten: why is the extension .diff not allowed to upload?

Ok I will commit it directly.

thorsten
Posts: 1438
Joined: Mon 27 Jun 2011, 12:26

Re: OS X 10.8.4 compiling CSXCAD error

Post by thorsten » Sun 07 Jul 2013, 22:09

Ok I will commit it directly.
Exactly for that reason :D
@Thorsten: why is the extension .patch not allowed to upload?
@Thorsten: why is the extension .diff not allowed to upload?
Well I fixed it, I hope ;)

regards
Thorsten

thorsten
Posts: 1438
Joined: Mon 27 Jun 2011, 12:26

Re: OS X 10.8.4 compiling CSXCAD error

Post by thorsten » Sun 07 Jul 2013, 22:19

I pulled your commit. https://github.com/thliebig/CSXCAD/comm ... 8fc9f4d5a6

Btw, I think we don't need the "hd5 Ubuntu Precise bugifx", I think with this commit
https://github.com/thliebig/CSXCAD/comm ... e9e979c850
I fixed it pretty much at the same time...

regards
Thorsten

Post Reply