packages icon indicating copy to clipboard operation
packages copied to clipboard

grep: update to 3.12

Open Yang-Wei-Ting opened this issue 2 months ago • 2 comments

📦 Package Details

Maintainer: @Zokormazo

Description: Update grep to version 3.12. Also skip building doc, tests, and gnulib-tests.


🧪 Run Testing Details

  • OpenWrt Version: OpenWrt 24.10
  • OpenWrt Target/Subtarget: NXP Layerscape / ARMv8 64-bit based boards
  • OpenWrt Device:

✅ Formalities

  • [x] I have reviewed the CONTRIBUTING.md file for detailed contributing guidelines.

If your PR contains a patch:

  • [ ] It can be applied using git am
  • [x] It has been refreshed to avoid offsets, fuzzes, etc., using
    make package/<your-package>/refresh V=s
    
  • [ ] It is structured in a way that it is potentially upstreamable (e.g., subject line, commit description, etc.) We must try to upstream patches to reduce maintenance burden.

Yang-Wei-Ting avatar Dec 17 '25 15:12 Yang-Wei-Ting

Added

TARGET_CFLAGS += -std=c17

because

exclude.c: In function 'new_exclude_segment':
exclude.c:267:41: error: 'nullptr' undeclared (first use in this function); did you mean 'nullptr_t'?
  267 |       sp->v.table = hash_initialize (0, nullptr,
      |                                         ^~~~~~~
      |                                         nullptr_t
exclude.c:267:41: note: each undeclared identifier is reported only once for each function it appears in
exclude.c: In function 'exclude_patopts':
exclude.c:393:41: error: 'nullptr' undeclared (first use in this function); did you mean 'nullptr_t'?
  393 |           ? regexec (&opts->v.re, f, 0, nullptr, 0) == 0
      |                                         ^~~~~~~
      |                                         nullptr_t
exclude.c: In function 'excluded_file_name':
exclude.c:466:20: error: 'nullptr' undeclared (first use in this function); did you mean 'nullptr_t'?
  466 |   char *filename = nullptr;
      |                    ^~~~~~~
      |                    nullptr_t
exclude.c: In function 'add_exclude_fp':
exclude.c:596:15: error: 'nullptr' undeclared (first use in this function); did you mean 'nullptr_t'?
  596 |   char *buf = nullptr;
      |               ^~~~~~~
      |               nullptr_t
make[6]: *** [Makefile:4290: libgreputils_a-exclude.o] Error 1
make[6]: *** Waiting for unfinished jobs....
make[6]: Leaving directory '/home/william/Downloads/openwrt/build_dir/target-aarch64_generic_musl/grep-3.12/lib'

Yang-Wei-Ting avatar Dec 17 '25 15:12 Yang-Wei-Ting

Skipped gnulib-tests due to

pthread-rwlock.c: In function 'rpl_pthread_rwlockattr_init':
pthread-rwlock.c:65:9: error: implicit declaration of function 'pthread_rwlockattr_setkind_np'; did you mean 'pthread_rwlockattr_setpshared'? [-Wimplicit-function-declaration]
   65 |   err = pthread_rwlockattr_setkind_np (attr,
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |         pthread_rwlockattr_setpshared
pthread-rwlock.c:66:40: error: 'PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP' undeclared (first use in this function)
   66 |                                        PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP);
      |                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pthread-rwlock.c:66:40: note: each undeclared identifier is reported only once for each function it appears in
pthread-rwlock.c: In function 'rpl_pthread_rwlock_init':
pthread-rwlock.c:412:44: error: 'PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP' undeclared (first use in this function)
  412 |                                            PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP);
      |                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[7]: *** [Makefile:6774: pthread-rwlock.o] Error 1
make[7]: *** Waiting for unfinished jobs....
make[7]: Leaving directory '/home/william/Downloads/openwrt/build_dir/target-aarch64_generic_musl/grep-3.12/gnulib-tests'

Then I thought why not also skip doc and tests

Yang-Wei-Ting avatar Dec 17 '25 15:12 Yang-Wei-Ting