[Gmsh] gmsh 2.12.0 : gmshpy : installation directory

Fabien Rozar fabien.rozar at umontpellier.fr
Thu Apr 28 10:42:45 CEST 2016


Unfortunately, after these commands : 
$ cd /usr/local/gmshpy 
$ sudo python setup.py install 

I got a compilation error as follows: 
running install 
running build 
running build_py 
running build_ext 
building 'gmshpy._gmshCommon' extension 
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DSWIG=1 -I./extra_include/ -I../include/gmsh/ -I/usr/include/python2.7 -c src/gmshCommonPYTHON_wrap.cxx -o build/temp.linux-x86_64-2.7/src/gmshCommonPYTHON_wrap.o 
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default] 
src/gmshCommonPYTHON_wrap.cxx:3466:26: fatal error: GmshConfig.h: Aucun fichier ou dossier de ce type 
#include "GmshConfig.h" 
^ 
compilation terminated. 
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 

Do you know what's wrong ? 

Fabien 

> De: "G. D. McBain" <gdmcbain at protonmail.com>
> À: "Fabien Rozar" <fabien.rozar at umontpellier.fr>
> Cc: gmsh at onelab.info, "Rémy Mozul" <remy.mozul at umontpellier.fr>
> Envoyé: Jeudi 28 Avril 2016 03:43:42
> Objet: Re: [Gmsh] gmsh 2.12.0 : gmshpy : installation directory

>> -------- Original Message --------
>> Subject: [Gmsh] gmsh 2.12.0 : gmshpy : installation directory
>> Local Time: 27 avril 2016 7:02 PM
>> UTC Time: 27 avril 2016 09:02
>> From: fabien.rozar at umontpellier.fr
>> To: gmsh at onelab.info
>> CC: remy.mozul at umontpellier.fr

>> Hello,

>> I am a postdoc at LMGC in Montpellier with Frédéric Dubois as advisor. For
>> some user case of our software, LMGC90, we use the python module 'gmshpy'.

>> In order to use it on a new computer, I need to install it. I downloaded the
>> source of gmsh 2.12.0 from the web page :
>> http://gmsh.info/

>> Before the compilation, I configured the generation of 'gmshpy' with :
>> $ cd build
>> $ cmake -DENABLE_WRAP_PYTHON=ON .../gmsh-2.12.0-source
>> $ make

>> The module 'gmshpy' is well build under 'build/wrappers/gmshpy'.

>> The point is that, after the installation step :
>> $ sudo make install

>> the directory 'build/wrappers/gmshpy' is copied in '/usr/local' whereas
>> this directory is not part of python default search directories :
>> $ python -c "import sys; print '\n'.join(sys.path)"
>> /usr/lib/python2.7
>> /usr/lib/python2.7/plat-x86_64-linux-gnu
>> /usr/lib/python2.7/lib-tk
>> /usr/lib/python2.7/lib-old
>> /usr/lib/python2.7/lib-dynload
>> /usr/local/lib/python2.7/dist-packages
>> /usr/lib/python2.7/dist-packages
>> /usr/lib/pymodules/python2.7

>> Question : Could you provide a release where the directory
>> 'build/wrappers/gmshpy' is installed (copied)
>> in one of the python default search directories?

>> (the directory '/usr/local/lib/python2.7/dist-packages' seems to be the more
>> suitable)

> Hello. That might be a good idea (I dont' know how "make install" works in
> Gmsh), but in the meantime a workaround is:

> $ cd /usr/local/gmshpy
> $ sudo python setup.py install
> $ ldconfig

> That puts gmshpy in /usr/local/lib/python2.7/dist-packages, as requested.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20160428/8205b6d4/attachment.html>


More information about the gmsh mailing list