[Getdp] Compilation Error on archlinux

Christophe Geuzaine cgeuzaine at ulg.ac.be
Mon Oct 3 18:46:11 CEST 2016


Hi Alexander - This should be fixed in SVN.
Thanks!
Christophe

> On 2 Oct 2016, at 22:43, Alexander Krimm <alex at wirew0rm.de> wrote:
> 
> Hello,
> 
> if I compile the latest release (2.9.2) of getdp on my archlinux machine, I have to apply the following patch to the source to get it to compile:
> 
>> --- ./Common/Message.cpp
>> +++ ./Common/Message.cpp
>> @@ -126,7 +126,7 @@
>>   std::vector<wchar_t*> wargv(argc ? argc : 1);
>>   for(int i = 0; i < argc; i++)
>>     wargv[i] = Py_DecodeLocale(argv[i], NULL);
>> -  Py_SetProgramName(wargv[0], NULL);
>> +  Py_SetProgramName(wargv[0]);
>>   Py_InitializeEx(0);
>>   PySys_SetArgv(argc, &wargv[0]);
> 
> Error message:
> 
>> /home/wirew0rm/build/getdp/src/getdp-2.9.2-source/Common/Message.cpp: In static member function ‘static void Message::Initialize(int, char**)’:
>> /home/wirew0rm/build/getdp/src/getdp-2.9.2-source/Common/Message.cpp:129:35: error: too many arguments to function ‘void Py_SetProgramName(wchar_t*)’
>>   Py_SetProgramName(wargv[0], NULL);
>>                                   ^
>> In file included from /usr/include/python3.5m/Python.h:116:0,
>>                 from /home/wirew0rm/build/getdp/src/getdp-2.9.2-source/Common/Message.cpp:55:
>> /usr/include/python3.5m/pylifecycle.h:10:18: note: declared here
>> PyAPI_FUNC(void) Py_SetProgramName(wchar_t *);
> 
> The python documentation [1,2] does not mention the second parameter. Is it safe to remove it?
> I think I am missing something here as there are linux binaries available for this version that must have been compiled somehow.
> 
> To start the build I use the following commands (in an archlinux PKGBUILD script):
> 
>>  cd build
>>  cmake .. -DCMAKE_INSTALL_PREFIX=${pkgdir}/usr
>>  make
>>  make bindir="${pkgdir}/usr/bin" \
>>       mandir="${pkgdir}/usr/share/man" install
> 
> By applying the beforementioned patch I am able to get a working version of getdp, but as I would like to supply the buildscript to the arch user repository I don't want to do changes to the code that I don't fully understand and which might have unintended consequences for other users.
> 
> 
> Best regards,
> 
> Alexander Krimm
> 
> 
> [1] https://docs.python.org/3.5/c-api/init.html#c.Py_SetProgramName
> [2] https://docs.python.org/2.7/c-api/init.html#c.Py_SetProgramName
> 
> 
> _______________________________________________
> getdp mailing list
> getdp at onelab.info
> http://onelab.info/mailman/listinfo/getdp

-- 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://www.montefiore.ulg.ac.be/~geuzaine

Free software: http://gmsh.info | http://getdp.info | http://onelab.info




More information about the getdp mailing list