From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Bruno Barbier Newsgroups: gmane.emacs.help Subject: Re: Why is this not working (apply + call-process + list of string args)? Date: Thu, 15 Sep 2022 19:00:44 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13000"; mail-complaints-to="usenet@ciao.gmane.io" To: Arthur Miller , gnu-emacs-help@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 15 18:57:40 2022 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oYsBI-0003Cl-Dy for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 15 Sep 2022 18:57:40 +0200 Original-Received: from localhost ([::1]:40020 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oYsBH-0006h9-H4 for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 15 Sep 2022 12:57:39 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42910) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYsAh-0006gM-NL for help-gnu-emacs@gnu.org; Thu, 15 Sep 2022 12:57:04 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:58116) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYsAh-0007kF-C9 for help-gnu-emacs@gnu.org; Thu, 15 Sep 2022 12:57:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56464) by fencepost.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYsAg-0005Ob-KB for gnu-emacs-help@gnu.org; Thu, 15 Sep 2022 12:57:02 -0400 Original-Received: from smtp6-g21.free.fr ([2a01:e0c:1:1599::15]:63254) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYsAe-0007go-8Q for gnu-emacs-help@gnu.org; Thu, 15 Sep 2022 12:57:02 -0400 Original-Received: from tosh-laptop (unknown [IPv6:2a01:e0a:505:3460:1a16:a0c4:3f89:c0d9]) by smtp6-g21.free.fr (Postfix) with ESMTPS id C0BAF78035B; Thu, 15 Sep 2022 18:56:55 +0200 (CEST) Original-Received: by tosh-laptop (sSMTP sendmail emulation); Thu, 15 Sep 2022 19:00:44 +0200 In-Reply-To: Received-SPF: softfail client-ip=2a01:e0c:1:1599::15; envelope-from=brubar.cs@gmail.com; helo=smtp6-g21.free.fr X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FROM=0.001, MISSING_MID=0.497, NML_ADSP_CUSTOM_MED=0.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:139491 Archived-At: Arthur Miller writes: > I just wonder if someone can explain exact what is going on here: > > I have a list of strings of arruments I try to pass to configure script. It > looks something like this: > > #+begin_src emacs-lisp > (defvar args > '("--with-native-compilation " > "--with-x " > "--with-x-toolkit=no " > "--without-gconf " > "--without-gsettings " > "--with-cairo " > "--without-toolkit-scroll-bars " > "--with-xinput2 " > "--without-included-regex " > "--without-compress-install ")) > > (defun configure (&rest args) > (apply #'call-process > (expand-file-name "./configure") > nil build-log nil args)) > > (apply #'configure args) > #end_src > > However it does not work, configure script seems to see wrong arguments. Why do you have a space after each option ? In my case, configure sees "--with-native-compilation ", not "--with-native-compilation" and complains: configure: error: invalid package name: `native-compilation ' ^ Note that you should use a prefix for your own variables/commands names to not break your emacs (replace existing ones). Bruno