From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: poffice@blade.nagaokaut.ac.jp Delivered-To: poffice@blade.nagaokaut.ac.jp Received: from kankan.nagaokaut.ac.jp (kankan.nagaokaut.ac.jp [133.44.2.24]) by blade.nagaokaut.ac.jp (Postfix) with ESMTP id 3808417D688C for ; Mon, 1 Jun 2015 17:44:00 +0900 (JST) Received: from funfun.nagaokaut.ac.jp (funfun.nagaokaut.ac.jp [133.44.2.201]) by kankan.nagaokaut.ac.jp (Postfix) with ESMTP id E02C0B5D8C9 for ; Mon, 1 Jun 2015 18:03:02 +0900 (JST) Received: from funfun.nagaokaut.ac.jp (localhost.nagaokaut.ac.jp [127.0.0.1]) by funfun.nagaokaut.ac.jp (Postfix) with ESMTP id 0144897A832 for ; Mon, 1 Jun 2015 18:03:05 +0900 (JST) X-Virus-Scanned: amavisd-new at nagaokaut.ac.jp Authentication-Results: funfun.nagaokaut.ac.jp (amavisd-new); dkim=fail (1024-bit key) reason="fail (message has been altered)" header.d=sendgrid.me Received: from funfun.nagaokaut.ac.jp ([127.0.0.1]) by funfun.nagaokaut.ac.jp (funfun.nagaokaut.ac.jp [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id X6t21NxavO_4 for ; Mon, 1 Jun 2015 18:03:04 +0900 (JST) Received: from voscc.nagaokaut.ac.jp (voscc.nagaokaut.ac.jp [133.44.1.100]) by funfun.nagaokaut.ac.jp (Postfix) with ESMTP id B97BF97A82C for ; Mon, 1 Jun 2015 18:03:04 +0900 (JST) Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by voscc.nagaokaut.ac.jp (Postfix) with ESMTP id 8EC0A95241B for ; Mon, 1 Jun 2015 18:03:02 +0900 (JST) Received: from [221.186.184.76] (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id E26B4120433; Mon, 1 Jun 2015 18:03:00 +0900 (JST) X-Original-To: ruby-core@ruby-lang.org Delivered-To: ruby-core@ruby-lang.org Received: from o2.heroku.sendgrid.net (o2.heroku.sendgrid.net [67.228.50.55]) by neon.ruby-lang.org (Postfix) with ESMTPS id 86B64120411 for ; Mon, 1 Jun 2015 18:02:46 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.me; h=from:to:references:subject:mime-version:content-type:content-transfer-encoding:list-id; s=smtpapi; bh=OGfV8iEG5ypPA5Gvwu0YnZ9FT9k=; b=VLqOVWerUxTvPsu9ci 0aaUD2cIKbCHtGdN5ULrwJZ6rr8RDb1yJF75XX6rPHvd8I7be9FWZp09mCLMYhQz ridZCW3F4QAJEkVY/1obNOkOVA5wnhF9Bd/hDNUi9MX2YEiUMDyTwFAEX54Kd9Qo ijgXxvk4X2eL5G7z0Qvpr5glk= Received: by filter0441p1mdw1.sendgrid.net with SMTP id filter0441p1mdw1.8192.556C1F1517 2015-06-01 09:00:05.579822196 +0000 UTC Received: from herokuapp.com (ec2-54-234-200-248.compute-1.amazonaws.com [54.234.200.248]) by ismtpd-027 (SG) with ESMTP id 14dae596bed.1af5.25cd1e for ; Mon, 01 Jun 2015 09:00:05 +0000 (UTC) Date: Mon, 01 Jun 2015 09:00:05 +0000 From: hanmac@gmx.de To: ruby-core@ruby-lang.org Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Redmine-MailingListIntegration-Message-Ids: 43874 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 11201 X-Redmine-Issue-Author: Hanmac X-Redmine-Sender: Hanmac 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: ync6xU2WACa70kv/Ymy4QrNMhiuLXJG8OTL2vJD1yS6CTEglXin4332pxze3EmDLIvTd0qcUEqIVMh CFwD2ZY6iS4/0McvHbiblD4MyoaJpTHNi+WyfhEhhAZVhCl4ytWCnedpz+VXZb38E7Vd1UUdxxEQlF uWKmdTrxi+llxiXsqIjblo/ex/e9fGx7H8Ll X-ML-Name: ruby-core X-Mail-Count: 69423 Subject: [ruby-core:69423] [Ruby trunk - Bug #11201] pkg_config NoMethodError when finding other -config program 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: , Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #11201 has been updated by Hans Mackowiak. wx from wxWidgets does have its own wx-config script with does have other flags than pkg-config (pkg-config in its second version can call (pkg)-config scripts) thats why: wx-config --libs-only-l *** Error: Unrecognised option: '--libs-only-l' imo it would be nice if it would have checked if that libs-only-l returns something/a string before shellsplit does try to cut it. i am okay with it that pkg_config("wx") might not be able to get something but imo it would be better if it does return nil instead of NoMethodError PS: but i think it still would have been nice if it would have been able to return something meaningful. another sample would be xml2-config from libxml2 PS: i might try to fix that on my own and then i will add a patch ---------------------------------------- Bug #11201: pkg_config NoMethodError when finding other -config program https://bugs.ruby-lang.org/issues/11201#change-52695 * Author: Hans Mackowiak * Status: Feedback * Priority: Normal * Assignee: * ruby -v: ruby 2.3.0dev (2015-05-28 trunk 50658) [x86_64-linux] * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN ---------------------------------------- where it does work (existing package) ~~~ruby pkg_config("gtk+-x11-2.0") # => ["-pthread", "", "-lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig -lfreetype"] pkg_config("gtk+-x11-2.0", "version") # => "0.28" ~~~ where it does work (non-existing package) ~~~ruby pkg_config("wx-bla", "version") # => nil pkg_config("wx-bla") # => nil ~~~ where it maybe not work (other (pkg)-config program) ~~~ruby pkg_config("wx", "version") # => "3.1.0" pkg_config("wx") #either should try to return the same stuff as pkg_config("gtk+-x11-2.0") if possible, or if not return nil ~~~ ~~~ NoMethodError: undefined method `scan' for nil:NilClass from /usr/local/rvm/rubies/ruby-head/lib/ruby/2.3.0/shellwords.rb:73:in `shellsplit' from /usr/local/rvm/rubies/ruby-head/lib/ruby/2.3.0/mkmf.rb:1819:in `pkg_config' from (irb):11 from /usr/local/rvm/rubies/ruby-head/bin/irb:11:in `
' ~~~ -- https://bugs.ruby-lang.org/