Which compiler in RHEL 7 are you using? I don't believe I ran into this issue when using devtoolset-9.
- Peter Lai
---
This communication represents the author's opinion alone and
does not constitute an official statement by Pratt & Whitney or Raytheon Technologies unless otherwise explicitly declared.
From: pkgsrc-users-owner%NetBSD.org@localhost <pkgsrc-users-owner%NetBSD.org@localhost> on behalf of J. Lewis Muir <jlmuir%imca-cat.org@localhost>
Sent: Wednesday, May 3, 2023 12:33 AM To: pkgsrc Users <pkgsrc-users%NetBSD.org@localhost> Subject: [External] databases/py-sqlite3 build on RHEL 7 fails without C99 Hi!
On RHEL 7 with stable pkgsrc-2023Q1 and the default Python version for that pkgsrc branch (3.10), an unprivileged build of databases/py-sqlite3 fails as follows with a compiler error saying that it needs C99 mode: ---- ===> Building for py310-sqlite3-3.10.10nb23 Modules/_sqlite/statement.c: In function 'lstrip_sql': Modules/_sqlite/statement.c:429:5: error: 'for' loop initial declarations are only allowed in C99 mode for (const char *pos = sql; *pos; pos++) { ^ Modules/_sqlite/statement.c:429:5: note: use option -std=c99 or -std=gnu99 to compile your code error: command '/tmp/pkgsrc/databases/py-sqlite3/work/.cwrapper/bin/cc' failed with exit code 1 *** Error code 1 Stop. bmake[1]: stopped in /tmp/pkgsrc/databases/py-sqlite3 *** Error code 1 Stop. bmake: stopped in /tmp/pkgsrc/databases/py-sqlite3 ---- I added the following to Makefile, and then it built successfully: USE_LANGUAGES= c99 Patch below. Regards, Lewis --- databases/py-sqlite3/Makefile.orig 2022-11-23 10:19:43.000000000 -0600 +++ databases/py-sqlite3/Makefile 2023-05-02 23:08:07.171422496 -0500 @@ -9,6 +9,7 @@ COMMENT= Built-in sqlite support for Python 2.5 and up USE_GCC_RUNTIME= yes +USE_LANGUAGES= c99 # part of python itself; using egg.mk will install a useless egg PYDISTUTILSPKG= yes |