Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Receiving 'vfork' is deprecated: warnings while compiling Kakoune from source #5170

Closed
VKondakoff opened this issue May 9, 2024 · 2 comments
Labels

Comments

@VKondakoff
Copy link

Version of Kakoune

2024.05.09

Reproducer

  1. Clone https://github.com/mawww/kakoune.git
  2. cd to kakoune
  3. sudo make install

Outcome

c++   -I/opt/local/include  -std=c++2a -Wall -Wextra -pedantic -Wno-unused-parameter -Wno-sign-compare -O3 -g3  -fsized-deallocation  -MD -MP -MF src/.shell_manager.opt.d -c -o src/shell_manager.opt.o src/shell_manager.cc
src/shell_manager.cc:118:21: warning: 'vfork' is deprecated: Use posix_spawn or fork [-Wdeprecated-declarations]
    if (pid_t pid = vfork())
                    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h:604:1: note: 'vfork' has been explicitly marked deprecated here
__deprecated_msg("Use posix_spawn or fork")
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
        #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                      ^
1 warning generated.
Снимок экрана 2024-05-09 в 13 45 03

Expectations

No warnings (in an ideal world). ;)

Additional information

MacOS 12.7.4, zsh,
Apple clang version 14.0.0 (clang-1400.0.29.202)
Target: x86_64-apple-darwin21.6.0
Thread model: posix

@VKondakoff VKondakoff added the bug label May 9, 2024
@mawww
Copy link
Owner

mawww commented May 10, 2024

vfork is indeed deprecated according to POSIX but is a nice performance optimization on most platforms and the posix_spawn family of function is pretty bad as it enforces dynamic allocations for the file actions even though their number is statically known as compile time.

There might be a way to silence the warning but at the moment I do not intend to replace the uses of vfork.

@VKondakoff
Copy link
Author

Thanks for the info. Closing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants