[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#24505: getprogname vs. AIX [was: new snapshot available: grep-2.25.9

From: Assaf Gordon
Subject: bug#24505: getprogname vs. AIX [was: new snapshot available: grep-2.25.92-f3e9
Date: Thu, 22 Sep 2016 10:49:20 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

Hello Jim,

On 09/22/2016 12:25 AM, Jim Meyering wrote:
Gordon reported this off-list:

On AIX-7.1 32bit, compilation fails due to gnulib's new 'getprogname'
 CC       getprogname.o
 getprogname.c: In function 'getprogname':
 getprogname.c:45:4: error: #error "getprogname module not ported to this
 #  error "getprogname module not ported to this OS"

Thanks again for that report.
Here is a tentative patch (let's call it "pragmatic" -- it tests
explicitly for _AIX rather than a feature-test macro like
HAVE_GETPROCS64 and an additional macro from an autoconf test for the
existence of the procinfo.h header).

Can someone let me know if this solves the problem?

Sorry for not following up on that...

The patch does not apply cleanly, I suspect you have a newer gnulib version 
than what's in
grep's git repo (the patch's ChangeLog has an entry from Sep 16):

  $ git id
  $ cd gnulib
  $ git id
  $ git am < ~/Downloads/gnulib-AIX-getprogname.diff
  Applying: getprogname: port to AIX
  error: patch failed: ChangeLog:1
  error: ChangeLog: patch does not apply
  Patch failed at 0001 getprogname: port to AIX
  The copy of the patch that failed is found in: 
  When you have resolved this problem, run "git am --continue".
  If you prefer to skip this patch, run "git am --skip" instead.

I patched 'lib/getprogname.c' directly, and compilation (on AIX) fails with:

    CC       getprogname.o
  getprogname.c:74:1: error: expected identifier or '(' before '}' token
  make: 1254-004 The error code from the last command is 1.

Indeed there's an extra closing braces in line 74.
After removing it, compilation succeeds with AIX 32bit (haven't been able to 
compile in 64bit yet, but that's not due to grep's code. I'll try again later 

 - assaf

reply via email to

[Prev in Thread] Current Thread [Next in Thread]