GNU bug report logs - #24505
getprogname vs. AIX [was: new snapshot available: grep-2.25.92-f3e9

Previous Next

Package: grep;

Reported by: Jim Meyering <jim <at> meyering.net>

Date: Thu, 22 Sep 2016 04:26:01 UTC

Severity: normal

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 24505 in the body.
You can then email your comments to 24505 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-grep <at> gnu.org:
bug#24505; Package grep. (Thu, 22 Sep 2016 04:26:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jim Meyering <jim <at> meyering.net>:
New bug report received and forwarded. Copy sent to bug-grep <at> gnu.org. (Thu, 22 Sep 2016 04:26:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jim Meyering <jim <at> meyering.net>
To: bug-grep <at> gnu.org, Assaf Gordon <assafgordon <at> gmail.com>
Subject: getprogname vs. AIX [was: new snapshot available: grep-2.25.92-f3e9
Date: Wed, 21 Sep 2016 21:25:19 -0700
[Message part 1 (text/plain, inline)]
Gordon reported this off-list:

>>>> On AIX-7.1 32bit, compilation fails due to gnulib's new 'getprogname'
>>>> module:
>>>>  CC       getprogname.o
>>>>  getprogname.c: In function 'getprogname':
>>>>  getprogname.c:45:4: error: #error "getprogname module not ported to this
>>>> OS"
>>>>  #  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?
[gnulib-AIX-getprogname.diff (application/octet-stream, attachment)]

Information forwarded to bug-grep <at> gnu.org:
bug#24505; Package grep. (Thu, 22 Sep 2016 14:50:02 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Assaf Gordon <assafgordon <at> gmail.com>
To: Jim Meyering <jim <at> meyering.net>, bug-grep <at> gnu.org
Subject: Re: getprogname vs. AIX [was: new snapshot available:
 grep-2.25.92-f3e9
Date: Thu, 22 Sep 2016 10:49:20 -0400
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'
>>>>> module:
>>>>>  CC       getprogname.o
>>>>>  getprogname.c: In function 'getprogname':
>>>>>  getprogname.c:45:4: error: #error "getprogname module not ported to this
>>>>> OS"
>>>>>  #  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
  v2.25-93-gdd6936c
  $ cd gnulib
  $ git id
  v0.1-880-ga512e04
  $ 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: /home/gordon/projects/grep/.git/modules/gnulib/rebase-apply/patch
  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 tonight).

regards,
 - assaf

 





Information forwarded to bug-grep <at> gnu.org:
bug#24505; Package grep. (Thu, 22 Sep 2016 16:16:02 GMT) Full text and rfc822 format available.

Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jim Meyering <jim <at> meyering.net>
To: Assaf Gordon <assafgordon <at> gmail.com>
Cc: bug-grep <at> gnu.org
Subject: Re: getprogname vs. AIX [was: new snapshot available:
 grep-2.25.92-f3e9
Date: Thu, 22 Sep 2016 09:14:39 -0700
On Thu, Sep 22, 2016 at 7:49 AM, Assaf Gordon <assafgordon <at> gmail.com> wrote:
> 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'
>>>>>> module:
>>>>>>  CC       getprogname.o
>>>>>>  getprogname.c: In function 'getprogname':
>>>>>>  getprogname.c:45:4: error: #error "getprogname module not ported to
>>>>>> this
>>>>>> OS"
>>>>>>  #  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
>   v2.25-93-gdd6936c
>   $ cd gnulib
>   $ git id
>   v0.1-880-ga512e04
>   $ 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:
> /home/gordon/projects/grep/.git/modules/gnulib/rebase-apply/patch
>   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 tonight).

Thank you, Assaf.
Good catch. I've made that correction and pushed to gnulib.




Reply sent to Jim Meyering <jim <at> meyering.net>:
You have taken responsibility. (Thu, 22 Sep 2016 19:18:02 GMT) Full text and rfc822 format available.

Notification sent to Jim Meyering <jim <at> meyering.net>:
bug acknowledged by developer. (Thu, 22 Sep 2016 19:18:02 GMT) Full text and rfc822 format available.

Message #16 received at 24505-done <at> debbugs.gnu.org (full text, mbox):

From: Jim Meyering <jim <at> meyering.net>
To: Assaf Gordon <assafgordon <at> gmail.com>
Cc: 24505-done <at> debbugs.gnu.org
Subject: Re: bug#24505: getprogname vs. AIX [was: new snapshot available:
 grep-2.25.92-f3e9
Date: Thu, 22 Sep 2016 12:17:12 -0700
On Thu, Sep 22, 2016 at 9:14 AM, Jim Meyering <jim <at> meyering.net> wrote:
> On Thu, Sep 22, 2016 at 7:49 AM, Assaf Gordon <assafgordon <at> gmail.com> wrote:
...
> Thank you, Assaf.
> Good catch. I've made that correction and pushed to gnulib.

I have also pushed a grep commit to make it use the latest from gnulib:

  http://git.savannah.gnu.org/cgit/grep.git/commit/?id=4a86a5e728ae0152048dd9a65d681f324c8aea17

With that, building on AIX should at least get past that compilation failure.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 21 Oct 2016 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 301 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.