Project

General

Profile

Actions

Bug #13069

closed

mkmf: ignore linker warnings on OpenBSD

Added by Anonymous almost 8 years ago. Updated about 6 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-linux]
[ruby-core:78827]

Description

Installing gems with native extensions fails on my OpenBSD machine since
the linker emits warnings causing stderr to not be empty as expected.
The warnings are security recommendations that does not affect the
linked binary. See examples below from my mkmf.log caused by libruby:

warning: warning: strcpy() is almost always misused, please use strlcpy()
warning: warning: strcat() is almost always misused, please use strlcat()
warning: warning: sprintf() is often misused, please use snprintf()
warning: warning: vsprintf() is often misused, please use vsnprintf()

Attached is patch that checks the output for such harmless warnings. Not
sure if this exception should be allowed on all platforms, but instead
wrapped in a RUBY_PLATFORM =~ /openbsd/ conditional or something
similar.


Files

ruby-mkmf_openbsd.diff (880 Bytes) ruby-mkmf_openbsd.diff Anonymous, 12/25/2016 09:05 AM
mkmf.patch (4.19 KB) mkmf.patch Test link result by executing the output akihikodaki (Akihiko Odaki), 01/22/2018 10:19 AM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0