Fwd: Fwd: Python freeze fails with warning: the use of `tempnam' is dangerous, better use `mkstemp'

Alexander N. Moibenko moibenko at fnal.gov
Thu Sep 8 10:48:08 EDT 2016


In fact I tried issuing commands manually, but they did not give me any 
hint more than I already had.

In python 2.6 this all works with the same libc, of course (because I 
tried to compile on the same machine).

Thanks anyway.



On 09/08/2016 01:22 AM, dieter wrote:
> "Alexander N. Moibenko" <moibenko at fnal.gov> writes:
>> when I build a binary with python 2.6 it builds without any problem.
>> When I build with python 2.7 the build fails after warnings like:
>> /opt/python/Python-2.7.12/Modules/posixmodule.o: In function
>> `posix_tempnam':
>> /opt/python/Python-2.7.12/./Modules/posixmodule.c:7578: warning: the
>> use of `tempnam' is dangerous, better use `mkstemp'
>> collect2: ld returned 1 exit status
>>
>> How this can be fixed?
> I doubt that the (compiler) warning is responsible for the (linker) failure.
>
> When I am faced with problems like this (usually during extension building;
> I have never encountered a problem during a Python built), I try
> to find out what (OS level) commands are executed by the build machinery
> and then issue them manually on the command line: the build machinery
> often hides error details revealed by executing the commands
> directly on the command line.
>
>
> What I can imagine is that your (OS level installed) C libraries (i.e. "libc"
> and friends) no longer contain a "tempnam", letting the linker fail.
> Thus, maybe, the compiler still warns about "tempnam" but the linker
> already considers it as an error.
>




More information about the Python-list mailing list