cppcms icon indicating copy to clipboard operation
cppcms copied to clipboard

Deprecated warning

Open hellow554 opened this issue 8 years ago • 9 comments
trafficstars

/tmp/cppcms-1.1.0/src/aes.cpp:103:4: warning: 'gcry_thread_cbs' is deprecated [-Wdeprecated-declarations] GCRY_THREAD_OPTION_PTHREAD_IMPL;

/usr/include/gcrypt.h:225:17: note: expanded from macro 'GCRY_THREAD_OPTION_PTHREAD_IMPL' static struct gcry_thread_cbs gcry_threads_pthread = { \

/usr/include/gcrypt.h:211:8: note: 'gcry_thread_cbs' has been explicitly marked deprecated here struct gcry_thread_cbs

1 warning generated.

hellow554 avatar Jul 12 '17 09:07 hellow554

Also,

/tmp/cppcms-1.1.0/private/dir.h:176:9: warning: 'readdir_r' is deprecated [-Wdeprecated-declarations] return readdir_r(dir_,d,&entry_p_) == 0 && entry_p_ != 0;

/usr/include/dirent.h:183:12: note: 'readdir_r' has been explicitly marked deprecated here extern int readdir_r (DIR *__restrict __dirp,

1 warning generated.

as well as in /tmp/cppcms-1.1.0/src/session_posix_file_storage.cpp:339:11 and /tmp/cppcms-1.1.0/private/dir.h:176:9

hellow554 avatar Jul 12 '17 09:07 hellow554

Ok please give some more information:

  1. What OS are you using? What compiler and standard library.
  2. Regarding grcypt - what version are you using?
  3. readdir_r is deprecated? WTF? I need to investigate this since readdir isn't thread safe on most platforms.

artyom-beilis avatar Jul 12 '17 09:07 artyom-beilis

I'm using Arch Linux with a gcc 7.1.1/clang 4.0.1 I'm using libgcrypt in the version 1.7.8

http://man7.org/linux/man-pages/man3/readdir_r.3.html https://lwn.net/Articles/696474/

hellow554 avatar Jul 12 '17 09:07 hellow554

readdir is now threadsafe so it seems.

man7.org/linux/man-pages/man3/readdir_r.3.html

On Wed, Jul 12, 2017 at 2:43 PM, Marcel Hellwig [email protected] wrote:

I'm using Arch Linux with a gcc 7.1.1/clang 4.0.1 I'm using libgcrypt in the version 1.7.8

http://man7.org/linux/man-pages/man3/readdir_r.3.html https://lwn.net/Articles/696474/

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/artyom-beilis/cppcms/issues/8#issuecomment-314703902, or mute the thread https://github.com/notifications/unsubscribe-auth/AATrk_ttngvvSBhn1WjyANS2GSYGTVj8ks5sNI4cgaJpZM4OVVAz .

-- Respect, Shiv Shankar Dayal

shivshankardayal avatar Jul 12 '17 09:07 shivshankardayal

readdir is only thread-safe on Glibc, and after some version (I can't remember exact version). In all other platforms, thread-safe version would be readdir_r.

Maybe we may just ignore "readdir_r deprecated" warning? (It's kinda false-positive anyway)

ghost avatar Jan 13 '18 20:01 ghost

Since cppcms goal is to support multiple platforms we can close this deprecated warning.

shivshankardayal avatar Feb 18 '18 15:02 shivshankardayal

The issue is that readdir_r is POSIX compatible way to do it.

Also it is deprecated it is still 100% ok to use one. So I don't see it as an urgent issue. Because to fix one I need to check first which OS provide thread safe readdir and which don't..

artyom-beilis avatar Feb 19 '18 08:02 artyom-beilis

I'm not quiet sure what deprecated means in glibc and I can't find any information (in my two minutes of using google). I am concerned, that the function will be deleted in the future (maybe in 10 releases, but you'll never know). I totaly understand the technical discussion about the MT-safeness but this is my concern for the (far) future

hellow554 avatar Feb 19 '18 12:02 hellow554

Well, considering deletion of the function; I don't think any of us should worry about it. readdir function is part of Posix standard, so removing that function from glibc would mean "not supporting Posix standard".15:47, 19 February 2018, Marcel Hellwig [email protected]:I'm not quiet sure what deprecated means in glibc and I can't find any information (in my two minutes of using google). I am concerned, that the function will be deleted in the future (maybe in 10 releases, but you'll never know). I totaly understand the technical discussion about the MT-safeness but this is my concern for the (far) future

—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or mute the thread.

ghost avatar Feb 19 '18 12:02 ghost