digitalmars.D.learn - Unused mmap library comes as deprecation warning on compile
- Tolga Cakiroglu (24/24) Feb 24 2014 I have about 12 different separate programmes. While compiling
- =?UTF-8?B?QWxpIMOHZWhyZWxp?= (12/17) Feb 24 2014 It is a compilation message generated by
I have about 12 different separate programmes. While compiling only one of them, it gives as warning as below: /usr/include/dmd/phobos/std/mmfile.d(344): Deprecation: alias core.sys.posix.sys.mman.MAP_ANON is deprecated - Please use core.sys.linux.sys.mman for non-POSIX extensions I used `grep` tool to see any of my library files or programme code have any use of this library. grep mmap -r Result is that binary files of all 12 different programmes have mmap in them. I wondered maybe a Phobos or druntime uses it. Used grep in `/usr/include/dmd` folder as well. As far as I see in the file list, unless mmap is directly imported, no other file uses it. The only thing different about that specific programme is that it uses "curl". Does anyone know why that deprecation message is seen while it is not used anywhere? Because that executable gives following error on GDB, and I am thinking that maybe that is its problem. Program received signal SIGUSR1, User defined signal 1. [Switching to Thread 0x2aaab1387700 (LWP 3418)] 0x00002aaaab97df7d in poll () at ../sysdeps/unix/syscall-template.S:81 81 ../sysdeps/unix/syscall-template.S: No such file or directory. (gdb) quit
Feb 24 2014
On 02/24/2014 12:20 PM, Tolga Cakiroglu wrote:I have about 12 different separate programmes. While compiling only one of them, it gives as warning as below: /usr/include/dmd/phobos/std/mmfile.d(344): Deprecation: alias core.sys.posix.sys.mman.MAP_ANON is deprecated - Please use core.sys.linux.sys.mman for non-POSIX extensionsIt is a compilation message generated by druntime/src/core/sys/posix/sys/mman.d: static import core.sys.linux.sys.mman; deprecated("Please use core.sys.linux.sys.mman for non-POSIX extensions") alias MAP_ANON = core.sys.linux.sys.mman.MAP_ANON; So, phobos/std/mmfile.d imports a module that has been deprecated by druntime: private import core.sys.posix.sys.mman; Create a bug report or pull request ;) so that it imports the correct mman. Ali
Feb 24 2014