Community Packages

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#67790 - [zsh-theme-powerlevel10k] internal libgit2 fork built with debug configuration

Attached to Project: Community Packages
Opened by Robert Cegliński (codicodi) - Tuesday, 01 September 2020, 11:19 GMT
Last edited by freswa (frederik) - Tuesday, 01 September 2020, 23:03 GMT
Task Type Bug Report
Category Packages
Status Assigned
Assigned To Christian Rebischke (Shibumi)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 1
Private No


When compiling package, one encounters a wall of warnings like:

/usr/include/features.h:397:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
397 | # warning _FORTIFY_SOURCE requires compiling with optimization (-O)

This is because default configuration in CMakeLists.txt[1] is Debug and Arch's -O2 gets overriden with -O0. Attached patch fixes this issue by passing -DCMAKE_BUILD_TYPE=None to CMake invocation.

Package version: 1.12.0-3

This task depends upon

Comment by Christian Rebischke (Shibumi) - Friday, 02 July 2021, 13:48 GMT
Doesn't this interfere with FFY00's comment about using the correct CMAKE_BUILD_TYPE? See also:
Comment by Robert Cegliński (codicodi) - Friday, 02 July 2021, 15:44 GMT
FFY00 is right that ideally CMakeLists.txt shouldn't touch that variable at all. However, since it does, that variable needs to be overridden in PKGBUILD. Note that currently (with Debug configuration) both optimizations and hardening options are disabled (as indicated in warning message in my report).

Wiki explains all the details pretty well:
Comment by Filipe Laíns (FFY00) - Friday, 02 July 2021, 17:45 GMT
I think the best fix is as proposed in the bug, passing -DCMAKE_BUILD_TYPE=None.
Comment by Buggy McBugFace (bugbot) - Tuesday, 08 August 2023, 19:11 GMT
This is an automated comment as this bug is open for more then 2 years. Please reply if you still experience this bug otherwise this issue will be closed after 1 month.