Python installation : fatal error: CSXCAD/ParameterObjects.h

Install support for openEMS

Moderators: thorsten, sebastian

Post Reply
doom
Posts: 5
Joined: Sun 23 Apr 2017, 16:21

Python installation : fatal error: CSXCAD/ParameterObjects.h

Post by doom » Tue 27 Jun 2017, 23:52

Hi,

I try to install Python interface and I have the following problem.

Seems that one file is missing ...

Code: Select all

python setup.py install
Compiling CSXCAD/CSPrimitives.pyx because it changed.
Compiling CSXCAD/CSProperties.pyx because it changed.
Compiling CSXCAD/CSRectGrid.pyx because it changed.
Compiling CSXCAD/CSTransform.pyx because it changed.
Compiling CSXCAD/CSXCAD.pyx because it changed.
Compiling CSXCAD/ParameterObjects.pyx because it changed.
Compiling CSXCAD/Utilities.pyx because it changed.
[1/7] Cythonizing CSXCAD/CSPrimitives.pyx
[2/7] Cythonizing CSXCAD/CSProperties.pyx
[3/7] Cythonizing CSXCAD/CSRectGrid.pyx
[4/7] Cythonizing CSXCAD/CSTransform.pyx
[5/7] Cythonizing CSXCAD/CSXCAD.pyx
[6/7] Cythonizing CSXCAD/ParameterObjects.pyx
[7/7] Cythonizing CSXCAD/Utilities.pyx
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/CSXCAD
copying CSXCAD/__init__.py -> build/lib.linux-x86_64-2.7/CSXCAD
copying CSXCAD/SmoothMeshLines.py -> build/lib.linux-x86_64-2.7/CSXCAD
copying CSXCAD/CSXCAD.pxd -> build/lib.linux-x86_64-2.7/CSXCAD
copying CSXCAD/CSProperties.pxd -> build/lib.linux-x86_64-2.7/CSXCAD
copying CSXCAD/CSTransform.pxd -> build/lib.linux-x86_64-2.7/CSXCAD
copying CSXCAD/CSRectGrid.pxd -> build/lib.linux-x86_64-2.7/CSXCAD
copying CSXCAD/ParameterObjects.pxd -> build/lib.linux-x86_64-2.7/CSXCAD
copying CSXCAD/CSPrimitives.pxd -> build/lib.linux-x86_64-2.7/CSXCAD
running build_ext
building 'CSXCAD.CSPrimitives' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/CSXCAD
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c CSXCAD/CSPrimitives.cpp -o build/temp.linux-x86_64-2.7/CSXCAD/CSPrimitives.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
CSXCAD/CSPrimitives.cpp:266:37: fatal error: CSXCAD/ParameterObjects.h: Aucun fichier ou dossier de ce type
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

So I tried to copy from src

Code: Select all

cp ../../src/ParameterObjects.h . 
but same error :

Code: Select all

python setup.py install
running install
running build
running build_py
running build_ext
building 'CSXCAD.CSPrimitives' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c CSXCAD/CSPrimitives.cpp -o build/temp.linux-x86_64-2.7/CSXCAD/CSPrimitives.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
CSXCAD/CSPrimitives.cpp:266:37: fatal error: CSXCAD/ParameterObjects.h: Aucun fichier ou dossier de ce type
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Thanks for your help !!

D.

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

Re: Python installation : fatal error: CSXCAD/ParameterObjec

Post by thorsten » Wed 28 Jun 2017, 07:01

I think you have to specify where to find the header? Because I think this one was just the first. The compiler is not finding any I guess...

try:

Code: Select all

python setup.py build_ext -I/opt/openEMS/include -L/opt/openEMS/lib -R/opt/openEMS/lib"
pyhton setup.py install
Where "/opt/openEMS" is obviously where you installed openEMS by the usual means...

regards
Thorsten

doom
Posts: 5
Joined: Sun 23 Apr 2017, 16:21

Re: Python installation : fatal error: CSXCAD/ParameterObjec

Post by doom » Wed 28 Jun 2017, 23:58

Hi,

Thanks for your answer, but it seems that there's another problem

Code: Select all

python setup.py build_ext -I/home/nana/opt/openEMS/include -L/home/nana/opt/openEMS/lib -R/home/nana/opt/openEMS/lib
running build_ext
building 'CSXCAD.CSPrimitives' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/home/nana/opt/openEMS/include -I/usr/include/python2.7 -c CSXCAD/CSPrimitives.cpp -o build/temp.linux-x86_64-2.7/CSXCAD/CSPrimitives.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
c++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/CSXCAD/CSPrimitives.o -L/home/nana/opt/openEMS/lib -Wl,-R/home/nana/opt/openEMS/lib -lCSXCAD -o build/lib.linux-x86_64-2.7/CSXCAD/CSPrimitives.so
building 'CSXCAD.CSProperties' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/home/nana/opt/openEMS/include -I/usr/include/python2.7 -c CSXCAD/CSProperties.cpp -o build/temp.linux-x86_64-2.7/CSXCAD/CSProperties.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
CSXCAD/CSProperties.cpp: In function ‘int __pyx_pf_6CSXCAD_12CSProperties_12CSProperties_4__init__(__pyx_obj_6CSXCAD_12CSProperties_CSProperties*, __pyx_obj_6CSXCAD_16ParameterObjects_ParameterSet*, PyObject*, PyObject*, PyObject*)’:
CSXCAD/CSProperties.cpp:3622:61: error: ‘class CSProperties’ has no member named ‘GetParameterSet’
   __pyx_v_self->__paraset->thisptr = __pyx_v_self->thisptr->GetParameterSet();
                                                             ^
CSXCAD/CSProperties.cpp: In function ‘PyObject* __pyx_pf_6CSXCAD_12CSProperties_12CSProperties_24SetFillColor(__pyx_obj_6CSXCAD_12CSProperties_CSProperties*, PyObject*, PyObject*)’:
CSXCAD/CSProperties.cpp:4926:81: error: no matching function for call to ‘CSProperties::SetFillColor(unsigned char&, unsigned char&, unsigned char&, unsigned char&)’
 _pyx_v_self->thisptr->SetFillColor(__pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8);
                                                                              ^
In file included from /home/nana/opt/openEMS/include/CSXCAD/ContinuousStructure.h:32:0,
                 from CSXCAD/CSProperties.cpp:285:
/home/nana/opt/openEMS/include/CSXCAD/CSProperties.h:140:7: note: candidate: void CSProperties::SetFillColor(RGBa)
  void SetFillColor(RGBa color);
       ^
/home/nana/opt/openEMS/include/CSXCAD/CSProperties.h:140:7: note:   candidate expects 1 argument, 4 provided
CSXCAD/CSProperties.cpp: In function ‘PyObject* __pyx_pf_6CSXCAD_12CSProperties_12CSProperties_26SetEdgeColor(__pyx_obj_6CSXCAD_12CSProperties_CSProperties*, PyObject*, PyObject*)’:
CSXCAD/CSProperties.cpp:5100:81: error: no matching function for call to ‘CSProperties::SetEdgeColor(unsigned char&, unsigned char&, unsigned char&, unsigned char&)’
 _pyx_v_self->thisptr->SetEdgeColor(__pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8);
                                                                              ^
In file included from /home/nana/opt/openEMS/include/CSXCAD/ContinuousStructure.h:32:0,
                 from CSXCAD/CSProperties.cpp:285:
/home/nana/opt/openEMS/include/CSXCAD/CSProperties.h:145:7: note: candidate: void CSProperties::SetEdgeColor(RGBa)
  void SetEdgeColor(RGBa color);
       ^
/home/nana/opt/openEMS/include/CSXCAD/CSProperties.h:145:7: note:   candidate expects 1 argument, 4 provided
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
D.

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

Re: Python installation : fatal error: CSXCAD/ParameterObjec

Post by thorsten » Thu 29 Jun 2017, 17:52

I assume the installed version of openEMS is the latest version from master branch as well? Not the last released version?

Post Reply