Is there something in the Python build log 
(logs/pkgs/python2-2.7.13.p1.log) that would explain the issue with 
semaphores?


On Thursday, May 11, 2017 at 7:50:33 PM UTC+2, Kamil Pliszka wrote:
>
> Hi,
> I have problem when compiling sage7.6:
>
> ...
> [sagelib-7.6] building 'sage.tests.stl_vector' extension
> [sagelib-7.6] building 'sage.tests.cython' extension
> [sagelib-7.6] Executing 454 commands (using 1 thread)
> [sagelib-7.6] 
> ************************************************************************
> [sagelib-7.6] Traceback (most recent call last):
> [sagelib-7.6]   File "setup.py", line 768, in <module>
> [sagelib-7.6]     ext_modules = ext_modules)
> [sagelib-7.6]   File 
> "/usr/local/src/sage-7.6/local/lib/python/distutils/core.py", line 151, in 
> setup
> [sagelib-7.6]     dist.run_commands()
> [sagelib-7.6]   File 
> "/usr/local/src/sage-7.6/local/lib/python/distutils/dist.py", line 953, in 
> run_commands
> [sagelib-7.6]     self.run_command(cmd)
> [sagelib-7.6]   File 
> "/usr/local/src/sage-7.6/local/lib/python/distutils/dist.py", line 972, in 
> run_command
> [sagelib-7.6]     cmd_obj.run()
> [sagelib-7.6]   File 
> "/usr/local/src/sage-7.6/local/lib/python/distutils/command/build.py", line 
> 127, in run
> [sagelib-7.6]     self.run_command(cmd_name)
> [sagelib-7.6]   File 
> "/usr/local/src/sage-7.6/local/lib/python/distutils/cmd.py", line 326, in 
> run_command
> [sagelib-7.6]     self.distribution.run_command(command)
> [sagelib-7.6]   File 
> "/usr/local/src/sage-7.6/local/lib/python/distutils/dist.py", line 972, in 
> run_command
> [sagelib-7.6]     cmd_obj.run()
> [sagelib-7.6]   File 
> "/usr/local/src/sage-7.6/local/lib/python/distutils/command/build_ext.py", 
> line 340, in run
> [sagelib-7.6]     self.build_extensions()
> [sagelib-7.6]   File "setup.py", line 514, in build_extensions
> [sagelib-7.6]     execute_list_of_commands(compile_commands)
> [sagelib-7.6]   File "setup.py", line 316, in execute_list_of_commands
> [sagelib-7.6]     execute_list_of_commands_in_parallel(command_list, 
> nthreads)
> [sagelib-7.6]   File "setup.py", line 263, in 
> execute_list_of_commands_in_parallel
> [sagelib-7.6]     pool = Pool(nthreads)
> [sagelib-7.6]   File 
> "/usr/local/src/sage-7.6/local/lib/python/multiprocessing/__init__.py", 
> line 232, in Pool
> [sagelib-7.6]     return Pool(processes, initializer, initargs, 
> maxtasksperchild)
> [sagelib-7.6]   File 
> "/usr/local/src/sage-7.6/local/lib/python/multiprocessing/pool.py", line 
> 138, in __init__
> [sagelib-7.6]     self._setup_queues()
> [sagelib-7.6]   File 
> "/usr/local/src/sage-7.6/local/lib/python/multiprocessing/pool.py", line 
> 233, in _setup_queues
> [sagelib-7.6]     from .queues import SimpleQueue
> [sagelib-7.6]   File 
> "/usr/local/src/sage-7.6/local/lib/python/multiprocessing/queues.py", line 
> 48, in <module>
> [sagelib-7.6]     from .synchronize import Lock, BoundedSemaphore, 
> Semaphore, Condition
> [sagelib-7.6]   File 
> "/usr/local/src/sage-7.6/local/lib/python/multiprocessing/synchronize.py", 
> line 59, in <module>
> [sagelib-7.6]     " function, see issue 3770.")
> [sagelib-7.6] ImportError: This platform lacks a functioning sem_open 
> implementation, therefore, the required synchronization primitives needed 
> will not function, see issue 3770.
> [sagelib-7.6] 
> ************************************************************************
> [sagelib-7.6] Error building the Sage library
> [sagelib-7.6] 
> ************************************************************************
> [sagelib-7.6] Please email sage-devel (
> http://groups.google.com/group/sage-devel)
> [sagelib-7.6] explaining the problem and including the relevant part of 
> the log file
> [sagelib-7.6]   /usr/local/src/sage-7.6/logs/pkgs/sagelib-7.6.log
> [sagelib-7.6] Describe your computer, operating system, etc.
> [sagelib-7.6] 
> ************************************************************************
> [sagelib-7.6] make[3]: *** [Makefile:34: sage] Error 1
> [sagelib-7.6] make[3]: Leaving directory '/usr/local/src/sage-7.6/src'
> [sagelib-7.6] 
> [sagelib-7.6] real      0m2.641s
> [sagelib-7.6] user      0m2.474s
> [sagelib-7.6] sys       0m0.150s
> make[2]: *** [Makefile:1040: sagelib] Error 2
> make[2]: Leaving directory '/usr/local/src/sage-7.6/build/make'
> make[1]: *** [Makefile:912: all] Error 2
> make[1]: Leaving directory '/usr/local/src/sage-7.6/build/make'
>
> real    0m3.087s
> user    0m2.863s
> sys     0m0.192s
> ***************************************************************
> Error building Sage.
>
> The following package(s) may have failed to build (not necessarily
> during this run of 'make all'):
>
> * package: sagelib-7.6
>   log file: /usr/local/src/sage-7.6/logs/pkgs/sagelib-7.6.log
>   build directory: 
> /usr/local/src/sage-7.6/local/var/tmp/sage/build/sagelib-7.6
>
> The build directory may contain configuration files and other potentially
> helpful information. WARNING: if you now run 'make' again, the build
> directory will, by default, be deleted. Set the environment variable
> SAGE_KEEP_BUILT_SPKGS to 'yes' to prevent this.
> -----
>
>
> seems my semaphores works ok
> (read https://groups.google.com/forum/#!topic/sage-devel/uPqvQQ9GzNE)
>
> bash-4.4$ mount | grep shm
> tmpfs on /run/shm type tmpfs (rw,nosuid,nodev)
>
> bash-4.4$ cat sem.c                                                       
>                                                                             
>                                                                           
> #include <unistd.h>                                                       
>                                                                             
>                                                                           
> #include <fcntl.h>                                                         
>                                                                             
>                                                                          
> #include <stdio.h>                                                         
>                                                                             
>                                                                          
> #include <semaphore.h>                                                     
>                                                                             
>                                                                          
> #include <sys/stat.h>                                                     
>                                                                             
>                                                                           
>                                                                           
>                                                                             
>                                                                           
> //bash-4.4$ gcc sem.c -lpthread -o sem                                     
>                                                                             
>                                                                          
>                                                                           
>                                                                             
>                                                                           
> int main(void) {                                                           
>                                                                             
>                                                                          
>   sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);           
>                                                                             
>                                                                          
>   if (a == SEM_FAILED) {                                                   
>                                                                             
>                                                                          
>     perror("sem_open");                                                   
>                                                                             
>                                                                           
>     return 1;                                                             
>                                                                             
>                                                                           
>   }                                                                       
>                                                                             
>                                                                           
>   printf("All OK!");                                                       
>                                                                             
>                                                                          
>   sem_close(a); 
>   sem_unlink("/autoconf"); 
>   return 0; 
> } 
>
> bash-4.4$ ./sem 
> All OK!
>
> bash-4.4$ uname -a
> Linux xxx 4.9.26 #2 SMP Thu May 4 03:46:26 CDT 2017 x86_64 Intel(R) 
> Core(TM) i5-3570K CPU @ 3.40GHz GenuineIntel GNU/Linux
>
> distro: slackware 14.2 (current)
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to