From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS4713 221.184.0.0/13 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by dcvr.yhbt.net (Postfix) with ESMTP id 1EE311F466 for ; Sun, 19 Jan 2020 12:47:42 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 2210E1209C3; Sun, 19 Jan 2020 21:47:26 +0900 (JST) Received: from o1678948x4.outbound-mail.sendgrid.net (o1678948x4.outbound-mail.sendgrid.net [167.89.48.4]) by neon.ruby-lang.org (Postfix) with ESMTPS id B7961120999 for ; Sun, 19 Jan 2020 21:47:21 +0900 (JST) Received: by filterdrecv-p3iad2-57f487d66-l92zz with SMTP id filterdrecv-p3iad2-57f487d66-l92zz-17-5E244FDC-2B 2020-01-19 12:47:24.66089163 +0000 UTC m=+2894446.073463778 Received: from herokuapp.com (unknown [3.81.21.207]) by ismtpd0031p1iad2.sendgrid.net (SG) with ESMTP id I4ZOaq3ESsKo2VaJ97fGRw for ; Sun, 19 Jan 2020 12:47:24.639 +0000 (UTC) Date: Sun, 19 Jan 2020 12:47:24 +0000 (UTC) From: nobu@ruby-lang.org Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 72610 X-Redmine-Project: ruby-master X-Redmine-Issue-Id: 16517 X-Redmine-Issue-Author: MSP-Greg X-Redmine-Sender: nobu X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-SG-EID: =?us-ascii?Q?q8Dly+pU2+3ektTtZVXgZtbJPXwqo7p86jCsvYTW4BzZuTw7Nx3QJB+jzlTdxR?= =?us-ascii?Q?ggAGSY4AQVElMA6CSMfg5FveW5dYJvFg5WwUgjF?= =?us-ascii?Q?z3nb8zOU98etfWF79K0evRbGBCy0j7Yj7OJxHm0?= =?us-ascii?Q?wDRYcV0bKcROtmSzGe0T2KYz7+uaYolbf0l7wvM?= =?us-ascii?Q?nYxskHFET6FLwZioE5PgyGC+kqH3zlUKmLm2zF7?= =?us-ascii?Q?ogI5tqQ5EngSiKfDY=3D?= To: ruby-core@ruby-lang.org X-ML-Name: ruby-core X-Mail-Count: 96945 Subject: [ruby-core:96945] [Ruby master Feature#16517] mkmf.rb - changes for Windows ? X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #16517 has been updated by nobu (Nobuyoshi Nakada). duerst (Martin D=FCrst) wrote: > I don't think so. Please have a look at https://github.com/oneclick/rubyi= nstaller/wiki/Development-Kit. Thank you, I thought it might be one of RubyInstaller but couldn't find out. If so, it sounds a RubyInstaller specific file. If it is required always, non-RubyInstaller mingw build can't compile exten= sions anymore. And, as the name conflicts with the above gem, it is unable to install with= rubygems. I think this part is unacceptable. ---------------------------------------- Feature #16517: mkmf.rb - changes for Windows ? https://bugs.ruby-lang.org/issues/16517#change-83972 * Author: MSP-Greg (Greg L) * Status: Open * Priority: Normal * Assignee: = * Target version: = ---------------------------------------- I propose two changes to mkmf.rb to make it more Windows friendly. 1) mingw - `devkit` has been the standard for 'enabling' compile tools in p= ublicly available MinGW builds for quite a while. Could something like the= following be added? Not sure whether to rescue on LoadError or not, or wh= ether to output anything if it doesn't load. ```ruby if $mingw begin require 'devkit' rescue end end ``` 2) mswin - most compile tools other than msvc will find libraries without a= lib prefix. Note the following code in extconf.rb for OpenSSL: ```ruby ret =3D have_library("crypto", "CRYPTO_malloc") && have_library("ssl", "SSL_new") return ret if ret if $mswin # OpenSSL >=3D 1.1.0: libcrypto.lib and libssl.lib. if have_library("libcrypto", "CRYPTO_malloc") && have_library("libssl", "SSL_new") return true end ``` If something like the following was added, the above wouldn't be needed: ```ruby if $mswin alias_method :orig_find_library, :find_library = def find_library(lib, func, *paths, &b) orig_find_library(lib, func, *paths, b) || orig_find_library("lib#{lib}= ", func, *paths, b) end alias_method :orig_have_library, :have_library def have_library(lib, func =3D nil, headers =3D nil, opt =3D "", &b) orig_have_library(lib, func, headers, opt, b) || orig_have_library("lib= #{lib}", func, headers, opt, b) end end ``` Adding something similar to above two items would remove the need for Windo= ws specific build code in many extension gems. -- = https://bugs.ruby-lang.org/ Unsubscribe: