From unknown Sun Jun 22 07:49:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19569: Problem with line splitting output from func_emit_wrapper Resent-From: Aaron Burghardt Original-Sender: "Debbugs-submit" Resent-CC: bug-libtool@gnu.org Resent-Date: Sun, 11 Jan 2015 18:20:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 19569 X-GNU-PR-Package: libtool X-GNU-PR-Keywords: To: 19569@debbugs.gnu.org X-Debbugs-Original-To: bug-libtool@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.142100038111524 (code B ref -1); Sun, 11 Jan 2015 18:20:04 +0000 Received: (at submit) by debbugs.gnu.org; 11 Jan 2015 18:19:41 +0000 Received: from localhost ([127.0.0.1]:42855 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YAN6y-0002zi-3m for submit@debbugs.gnu.org; Sun, 11 Jan 2015 13:19:40 -0500 Received: from eggs.gnu.org ([208.118.235.92]:54081) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YAGTh-0006bM-UJ for submit@debbugs.gnu.org; Sun, 11 Jan 2015 06:14:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YAGTg-00085G-GT for submit@debbugs.gnu.org; Sun, 11 Jan 2015 06:14:41 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:40020) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YAGTg-00085C-D3 for submit@debbugs.gnu.org; Sun, 11 Jan 2015 06:14:40 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55796) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YAGTb-0008JC-PQ for bug-libtool@gnu.org; Sun, 11 Jan 2015 06:14:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YAGTU-00083M-Dh for bug-libtool@gnu.org; Sun, 11 Jan 2015 06:14:35 -0500 Received: from mail-qg0-x231.google.com ([2607:f8b0:400d:c04::231]:52818) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YAGTU-00083H-7y for bug-libtool@gnu.org; Sun, 11 Jan 2015 06:14:28 -0500 Received: by mail-qg0-f49.google.com with SMTP id f51so14504273qge.8 for ; Sun, 11 Jan 2015 03:14:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:subject:date:references:to:message-id :mime-version; bh=Dv/TB8wmv//NbzbdbMuc2X9Y+QnjdSc2ZAzk5vHepxs=; b=smZCcqLR2xPkm6eadfF3PAFpz+HfL/pTopgUQ8zYtEr6LVeR0I/ombLbQUq9/R53Qx Q5zD6gXP4o4KkVFBuXEI10XXa7FLSqKpQUURwC4Kx7rjC1lNHtdSS6nHc+a72zdfzS26 /zzOvRGhdUvMQ0YjWlLxPt14+cDH001wLwVskM9HkMOnfAo1TUKnUUCSLUFNL/o/nJKk /95uOkgNZzHCWeUNgGRRgouZgMeB43KL2wiPoleaW3ehBptoaq1js2PxLpQEna/t1Rh4 Yfa0ADcxcu/Y3KRdalxh8TVxIwEosQup4iC+ZN8/t8FtpOVeEiaO/IcepALrYTLxG52B Ow2Q== X-Received: by 10.140.31.36 with SMTP id e33mr38864555qge.36.1420974867424; Sun, 11 Jan 2015 03:14:27 -0800 (PST) Received: from [192.168.1.99] (pool-71-163-30-131.washdc.fios.verizon.net. [71.163.30.131]) by mx.google.com with ESMTPSA id 9sm12044264qam.9.2015.01.11.03.14.26 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 11 Jan 2015 03:14:26 -0800 (PST) From: Aaron Burghardt Content-Type: multipart/alternative; boundary="Apple-Mail=_50077D61-3F85-49F5-B45C-E6769555EDB2" Date: Sun, 11 Jan 2015 06:14:26 -0500 References: Message-Id: <2A827EE9-F951-4466-B9F4-6B2CC769AC01@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) X-Mailer: Apple Mail (2.1993) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Mailman-Approved-At: Sun, 11 Jan 2015 13:19:37 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --Apple-Mail=_50077D61-3F85-49F5-B45C-E6769555EDB2 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 I am attempting to cross-compile the standard jpeg source, = http://www.ijg.org , with mingw-w64 on OS X. The = build fails because executables wrapped by libtool do not compile. The = jpeg source comes with an ltmain.sh script produced by libtool version = 2.4.2 . I happen to have libtool 2.4 installed, and I was able to build = the project by running libtoolize, which generated an ltmain.sh from my = older version. I tracked the issue down to a change in a sed command in = ltmain.sh that splits long lines in the output of func_emit_wrapper() to = make the output suitable for all compilers. This list thread lead to the = following patch: http://lists.gnu.org/archive/html/bug-libtool/2010-10/msg00000.html = = http://git.savannah.gnu.org/cgit/libtool.git/commit/libltdl/config/ltmain.= m4sh?id=3Dc161010e9deec544410a3e91d105d07ed9ec9911 = To save having to click the link, the commit is: diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh index 0418007..1078e75 100644 --- a/libltdl/config/ltmain.m4sh +++ b/libltdl/config/ltmain.m4sh @@ -4268,9 +4268,15 @@ void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | - $SED -e 's/\([\\"]\)/\\\1/g' \ - -e 's/^/ fputs ("/' -e 's/$/\\n", f);/' - + $SED -n -e ' +s/^\(.\{79\}\)\(..*\)/\1\ +\2/ +h +s/\([\\"]\)/\\\1/g +s/$/\\n/ +s/\([^\n]*\).*/ fputs ("\1", f);/p +g +D' cat <<"EOF" } EOF OS X=E2=80=99s sed is not GNU sed, is older, and doesn=E2=80=99t support = many of GNU sed=E2=80=99s extensions. I could install GNU sed to resolve = this, but I=E2=80=99m curious, is the sed command not POSIX compliant, = or is OS X=E2=80=99s sed not POSIX compliant? Am I correct to think = POSIX compliance is a goal of autotools? Thanks, Aaron --Apple-Mail=_50077D61-3F85-49F5-B45C-E6769555EDB2 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
I am attempting to cross-compile the standard jpeg = source, http://www.ijg.org, with mingw-w64 on OS X. The build = fails because executables wrapped by libtool do not compile. The jpeg = source comes with an ltmain.sh script produced by libtool version = 2.4.2 . I happen to have libtool 2.4 installed, and I was able to build = the project by running libtoolize, which generated an ltmain.sh from my = older version. I tracked the issue down to a change in a sed command in = ltmain.sh that splits long lines in the output = of func_emit_wrapper() to make the output suitable for all = compilers. This list thread lead to the following patch:


To save having = to click the link, the commit is:


diff --git = a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh
index 0418007..1078e75 100644
--- = a/libltdl/config/ltmain.m4sh
+++ = b/libltdl/config/ltmain.m4sh
@@ -4268,9 +4268,15 @@ void = lt_dump_script (FILE* f)
 {
 EOF
 =    func_emit_wrapper yes |
- =              $SED -e = 's/\([\\"]\)/\\\1/g' \
-         =   -e 's/^/  fputs ("/' -e 's/$/\\n", f);/'
-
+ =      $SED -n -e '
+s/^\(.\{79\}\)\(..*\)/\1\
+\2/
+h
+s/\([\\"]\)/\\\1/g
+s/$/\\n/+s/\([^\n]*\).*/  fputs ("\1", f);/p
+g
+D'
            =  cat <<"EOF"
 }
 EOF

OS X=E2=80=99s sed is not GNU sed, is older, and doesn=E2=80=99= t support many of GNU sed=E2=80=99s extensions. I could install GNU sed = to resolve this, but I=E2=80=99m curious, is the sed command not POSIX = compliant, or is OS X=E2=80=99s sed not POSIX compliant? Am I correct to = think POSIX compliance is a goal of autotools?

Thanks,

Aaron


= --Apple-Mail=_50077D61-3F85-49F5-B45C-E6769555EDB2--