[PPL-devel] PPL, Windows, MinGW

Roberto Bagnara bagnara at cs.unipr.it
Mon Nov 23 21:58:50 CET 2009


Krzysztof Jakubczyk wrote:
> On 2009-11-23 21:37, Roberto Bagnara wrote:
>> Krzysztof Jakubczyk wrote:
>>> On 2009-11-23 14:47, Roberto Bagnara wrote:
>>>> Krzysztof Jakubczyk wrote:
>>>>> On 2009-11-23 11:54, Roberto Bagnara wrote:
>>>>>> Krzysztof Jakubczyk wrote:
>>>>>>> I get following error when trying to compile PPL under MinGW:
>>>>>>>
>>>>>>> make[4]: Entering directory `/c/ppl-0.10.2/demos/ppl_lcdd/examples'
>>>>>>>
>>>>>>> make[4]: Nothing to be done for `all'.
>>>>>>> make[4]: Leaving directory `/c/ppl-0.10.2/demos/ppl_lcdd/examples'
>>>>>>> make[4]: Entering directory `/c/ppl-0.10.2/demos/ppl_lcdd'
>>>>>>> g++ -DHAVE_CONFIG_H -I. -I../..  -I../.. -I../../src 
>>>>>>> -I../../utils  -I/usr/local
>>>>>>> /include  -g -O2 -frounding-math  -W -Wall -MT ppl_lcdd.o -MD -MP 
>>>>>>> -MF .deps/ppl_
>>>>>>> lcdd.Tpo -c -o ppl_lcdd.o ppl_lcdd.cc
>>>>>>> ppl_lcdd.cc:138:27: error: sys/resource.h: No such file or directory
>>>>>>> ppl_lcdd.cc: In function 
>>>>>>> 'void<unnamed>::limit_virtual_memory(unsigned int)':
>>>>>>> ppl_lcdd.cc:336: error: aggregate '<unnamed>::rlimit t' has 
>>>>>>> incomplete type and
>>>>>>> cannot be defined
>>>>>>> ppl_lcdd.cc:338: error: 'RLIMIT_AS' was not declared in this scope
>>>>>>> ppl_lcdd.cc:338: error: 'getrlimit' was not declared in this scope
>>>>>>> ppl_lcdd.cc:343: error: 'RLIMIT_AS' was not declared in this scope
>>>>>>> ppl_lcdd.cc:343: error: 'setrlimit' was not declared in this scope
>>>>>>> make[4]: *** [ppl_lcdd.o] Error 1
>>>>>>
>>>>>> Hi Krzysztof,
>>>>>>
>>>>>> this is strange, because in ppl_lcdd.cc I see
>>>>>>
>>>>>> #ifdef PPL_HAVE_SYS_RESOURCE_H
>>>>>> // This should be included after <time.h> and <sys/time.h> so as 
>>>>>> to make
>>>>>> // sure we have the definitions for, e.g., `ru_utime'.
>>>>>> # include <sys/resource.h>
>>>>>> #endif
>>>>>>
>>>>>> which should meand that <sys/resource.h> is included only if 
>>>>>> configure
>>>>>> determined that that header file is present.  Can you please check
>>>>>> in the config.log and ppl-config.h?
>>>>
>>>>> this is part of my ppl_config.h:
>>>>>
>>>>> /* Define to 1 if you have the <string.h> header file. */
>>>>> #define PPL_HAVE_STRING_H 1
>>>>>
>>>>> /* Define to 1 if you have the <sys/resource.h> header file. */
>>>>> /* #undef PPL_HAVE_SYS_RESOURCE_H */
>>>>>
>>>>> /* Define to 1 if you have the <sys/stat.h> header file. */
>>>>> #define PPL_HAVE_SYS_STAT_H 1
>>>>>
>>>>> Also attached ppl_config.h and config.log
>>>>
>>>> Hi Krzyszof,
>>>>
>>>> I can confirm something strange is happening.  Your ppl-config.h
>>>> and config.log are as expected.  Given that PPL_HAVE_SYS_RESOURCE_H
>>>> is not defined by ppl-config.h, who is defining it so that
>>>> at line 138 of ppl_lcdd.cc inclusion of <sys/resource.h>
>>>> is attempted?  This is the question.
>>>> All the best,
>>>>
>>>>    Roberto
>>>>
>>> Hi Roberto,
>>> I've investigated a little ant it seems the define comes from 
>>> src/ppl.hh file.
>>
>> Can you show me the portion of src/ppl.hh defining that?
>> Say, from 20 lines before the definition to 20 lines after it.
>> Thanks,
>>
>>    Roberto
>>
>  From src/Makefile I can see that ppl.hh is generated from ppl.hh.dist 
> (just a copy?), which is present in the sources - seems not to be 
> generated.
> This is the part responsible:
> 
> /* Define to 1 if you have the <signal.h> header file. */
> #define PPL_HAVE_SIGNAL_H 1
> 
> /* Define to 1 if you have the <stdint.h> header file. */
> #define PPL_HAVE_STDINT_H 1
> 
> /* Define to 1 if you have the <stdlib.h> header file. */
> #define PPL_HAVE_STDLIB_H 1
> 
> /* Define to 1 if you have the <strings.h> header file. */
> #define PPL_HAVE_STRINGS_H 1
> 
> /* Define to 1 if you have the <string.h> header file. */
> #define PPL_HAVE_STRING_H 1
> 
> /* Define to 1 if you have the <sys/resource.h> header file. */
> #define PPL_HAVE_SYS_RESOURCE_H 1
> 
> /* Define to 1 if you have the <sys/stat.h> header file. */
> #define PPL_HAVE_SYS_STAT_H 1
> 
> /* Define to 1 if you have the <sys/time.h> header file. */
> #define PPL_HAVE_SYS_TIME_H 1
> 
> /* Define to 1 if you have the <sys/types.h> header file. */
> #define PPL_HAVE_SYS_TYPES_H 1
> 
> /* Define to 1 if the system has the type `timeval'. */
> #define PPL_HAVE_TIMEVAL 1
> 
> /* Define to 1 if typeof works with your compiler. */
> #define PPL_HAVE_TYPEOF 1

Hmmm, so you don't have perl, right?
If you cannot install perl then I am afraid you have to manually
edit ppl.hh.dist.

-- 
Prof. Roberto Bagnara
Applied Formal Methods Laboratory
Department of Mathematics, University of Parma, Italy
http://www.cs.unipr.it/~bagnara/
mailto:bagnara at cs.unipr.it



More information about the PPL-devel mailing list