Rate This Document
Findability
Accuracy
Completeness
Readability

LASTZ Compilation Error

Symptom

An error is reported during LASTZ compilation. The error information is similar to "lastz.c:450:9: error: variable 'freeTargetRev' set but not used [-Werror=unused-but-set-variable]".

Key Process and Cause Analysis

During GCC compilation, if the -Werror parameter is configured in Makefile, all warnings are processed as errors.

Conclusion and Solution

  1. Run the following command to open Makefile:

    vim src/Makefile

  2. Press i to enter the insert mode and change the values of CC, definedForAll, and CFLAGS.
    CC=/path/to/GNU/bin/gcc
    definedForAll = -Wall -Wextra -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
    CFLAGS = -O3 -march=armv8.2-a -mtune=tsv110 -flto ${definedForAll} ${VERSION_FLAGS}
  3. Press Esc, type :wq!, and press Enter to save the settings and exit.