gavajc / LibFprint

Portable version of libfprint library v1.92.0 (Linux & Windows)
0 stars 0 forks source link

Meson Compile Error #1

Closed hafedh-trimeche closed 3 years ago

hafedh-trimeche commented 3 years ago

Hello,

Please note that meson compile generated an error even the previous command meson build && cd build successed

# meson build && cd build
The Meson build system
Version: 0.57.2
Source dir: D:/DevStudio/LibFprint/libfprint-v1.90.7
Build dir: D:/DevStudio/LibFprint/libfprint-v1.90.7/build
Build type: native build
Project name: libfprint
Project version: 1.90.7
C compiler for the host machine: cc (gcc 10.2.0 "cc (Rev10, Built by MSYS2 project) 10.2.0")
C linker for the host machine: cc ld.bfd 2.36.1
C++ compiler for the host machine: c++ (gcc 10.2.0 "c++ (Rev10, Built by MSYS2 project) 10.2.0")
C++ linker for the host machine: c++ ld.bfd 2.36.1
Host machine cpu family: x86_64
Host machine cpu: x86_64
Compiler for C supports arguments -Wall: YES
Compiler for C supports arguments -Wcast-align: YES
Compiler for C supports arguments -Wformat-nonliteral: YES
Compiler for C supports arguments -Wformat-security: YES
Compiler for C supports arguments -Wformat=2: YES
Compiler for C supports arguments -Wignored-qualifiers: YES
Compiler for C supports arguments -Wlogical-op: YES
Compiler for C supports arguments -Wmissing-declarations: YES
Compiler for C supports arguments -Wmissing-format-attribute: YES
Compiler for C supports arguments -Wmissing-include-dirs: YES
Compiler for C supports arguments -Wmissing-noreturn: YES
Compiler for C supports arguments -Wpointer-arith: YES
Compiler for C supports arguments -Wshadow: YES
Compiler for C supports arguments -Wtype-limits: YES
Compiler for C supports arguments -Wundef: YES
Compiler for C supports arguments -Wunused: YES
Compiler for C supports arguments -Werror=address: YES
Compiler for C supports arguments -Werror=array-bounds: YES
Compiler for C supports arguments -Werror=empty-body: YES
Compiler for C supports arguments -Werror=init-self: YES
Compiler for C supports arguments -Werror=int-to-pointer-cast: YES
Compiler for C supports arguments -Werror=main: YES
Compiler for C supports arguments -Werror=missing-braces: YES
Compiler for C supports arguments -Werror=nonnull: YES
Compiler for C supports arguments -Werror=redundant-decls: YES
Compiler for C supports arguments -Werror=return-type: YES
Compiler for C supports arguments -Werror=sequence-point: YES
Compiler for C supports arguments -Werror=trigraphs: YES
Compiler for C supports arguments -Werror=write-strings: YES
Compiler for C supports arguments -fno-strict-aliasing: YES
Compiler for C supports arguments -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_56: YES
Compiler for C supports arguments -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_56: YES
Compiler for C supports arguments -D_DEFAULT_SOURCE: YES
Compiler for C supports arguments -D_XOPEN_SOURCE=700: YES
Compiler for C supports arguments -D__MSYS__: YES
Compiler for C supports arguments -DG_LOG_DOMAIN="libfprint": YES
Compiler for C supports arguments -Wimplicit-function-declaration: YES
Compiler for C supports arguments -Wmissing-prototypes: YES
Compiler for C supports arguments -Wnested-externs: YES
Compiler for C supports arguments -Wold-style-definition: YES
Compiler for C supports arguments -Wstrict-prototypes: YES
Compiler for C supports arguments -Werror=implicit: YES
Compiler for C supports arguments -Werror=pointer-to-int-cast: YES
meson.build:70: WARNING: Consider using the built-in warning_level option instead of using "-Wall".
meson.build:71: WARNING: Consider using the built-in warning_level option instead of using "-Wall".
Found pkg-config: D:\msys\mingw64\bin/pkg-config.EXE (1.7.4)
Run-time dependency glib-2.0 found: YES 2.68.1
Run-time dependency gobject-2.0 found: YES 2.68.1
Run-time dependency gusb found: YES 0.3.5
Library m found: YES
Dependency glib-2.0 found: YES 2.68.1 (cached)
Run-time dependency cairo found: YES 1.17.4
Run-time dependency pixman-1 found: YES 0.40.0
Dependency pixman-1 found: YES 0.40.0 (cached)
Run-time dependency nss found: YES 3.52.1
Configuring config.h using configuration
Program glib-mkenums found: YES (D:\msys\mingw64\bin/glib-mkenums.EXE)
Program glib-mkenums found: YES (D:\msys\mingw64\bin/glib-mkenums.EXE)
Program glib-mkenums found: YES (D:\msys\mingw64\bin/glib-mkenums.EXE)
Program glib-mkenums found: YES (D:\msys\mingw64\bin/glib-mkenums.EXE)
Configuring fpi-drivers.c with command
Compiler for C supports arguments -Wno-error=redundant-decls: YES
Compiler for C supports arguments -Wno-redundant-decls: YES
Compiler for C supports arguments -Wno-discarded-qualifiers: YES
Compiler for C supports arguments -Wno-array-bounds: YES
Compiler for C supports arguments -Wno-array-parameter: NO
Found pkg-config: D:\msys\mingw64\bin/pkg-config.EXE (1.7.4)
Build-time dependency gobject-introspection-1.0 found: YES 1.66.1
Dependency gobject-introspection-1.0 found: YES 1.66.1 (cached)
Program g-ir-scanner found: YES (D:/msys/mingw64/bin/g-ir-scanner.exe)
Dependency gobject-introspection-1.0 found: YES 1.66.1 (cached)
Program g-ir-compiler found: YES (D:/msys/mingw64/bin/g-ir-compiler.exe)
Configuring gtkdocentities.ent using configuration
Dependency glib-2.0 found: YES 2.68.1 (cached)
Program gtkdoc-scan found: YES (D:\msys\mingw64\bin/gtkdoc-scan.EXE)
Program gtkdoc-scangobj found: YES (D:\msys\mingw64\bin/gtkdoc-scangobj.EXE)
Program gtkdoc-mkdb found: YES (D:\msys\mingw64\bin/gtkdoc-mkdb.EXE)
Program gtkdoc-mkhtml found: YES (D:\msys\mingw64\bin/gtkdoc-mkhtml.EXE)
Program gtkdoc-fixxref found: YES (D:\msys\mingw64\bin/gtkdoc-fixxref.EXE)
Build targets in project: 20

Found ninja-1.10.2 at D:\msys\mingw64\bin/ninja.EXE
# meson compile
ninja: Entering directory `.'
[1/112] Generating fp-enums.c with a custom command (wrapped by meson because command contains newlines, to capture output)
[2/112] Generating fpi-enums.c with a custom command (wrapped by meson because command contains newlines, to capture output)
[3/112] Generating fpi-enums.h with a custom command (wrapped by meson because command contains newlines, to capture output)
[4/112] Generating fp-enums.h with a custom command (wrapped by meson because command contains newlines, to capture output)
[5/112] Compiling C object libfprint/libnbis.a.p/nbis_bozorth3_bz_gbls.c.obj
[6/112] Compiling C object libfprint/libnbis.a.p/nbis_bozorth3_bz_alloc.c.obj
[7/112] Compiling C object libfprint/libnbis.a.p/nbis_bozorth3_bz_drvrs.c.obj
[8/112] Compiling C object libfprint/libnbis.a.p/nbis_bozorth3_bozorth3.c.obj
[9/112] Compiling C object libfprint/libnbis.a.p/nbis_bozorth3_bz_sort.c.obj
[10/112] Compiling C object libfprint/libnbis.a.p/nbis_bozorth3_bz_io.c.obj
[11/112] Compiling C object libfprint/libnbis.a.p/nbis_mindtct_chaincod.c.obj
[12/112] Compiling C object libfprint/libnbis.a.p/nbis_mindtct_binar.c.obj
[13/112] Compiling C object libfprint/libnbis.a.p/nbis_mindtct_contour.c.obj
[14/112] Compiling C object libfprint/libnbis.a.p/nbis_mindtct_imgutil.c.obj
[15/112] Compiling C object libfprint/libnbis.a.p/nbis_mindtct_block.c.obj
[16/112] Compiling C object libfprint/libnbis.a.p/nbis_mindtct_globals.c.obj
[17/112] Compiling C object libfprint/libnbis.a.p/nbis_mindtct_free.c.obj
[18/112] Compiling C object libfprint/libnbis.a.p/nbis_mindtct_getmin.c.obj
[19/112] Compiling C object libfprint/libnbis.a.p/nbis_mindtct_detect.c.obj
[20/112] Compiling C object libfprint/libnbis.a.p/nbis_mindtct_log.c.obj
[21/112] Compiling C object libfprint/libnbis.a.p/nbis_mindtct_dft.c.obj
[22/112] Compiling C object libfprint/libnbis.a.p/nbis_mindtct_init.c.obj
[23/112] Compiling C object libfprint/libnbis.a.p/nbis_mindtct_link.c.obj
[24/112] Compiling C object libfprint/libnbis.a.p/nbis_mindtct_line.c.obj
[25/112] Compiling C object libfprint/libnbis.a.p/nbis_mindtct_loop.c.obj
[26/112] Compiling C object libfprint/libnbis.a.p/nbis_mindtct_ridges.c.obj
[27/112] Compiling C object libfprint/libnbis.a.p/nbis_mindtct_maps.c.obj
[28/112] Compiling C object libfprint/libnbis.a.p/nbis_mindtct_morph.c.obj
[29/112] Compiling C object libfprint/libnbis.a.p/nbis_mindtct_remove.c.obj
[30/112] Compiling C object libfprint/libnbis.a.p/nbis_mindtct_quality.c.obj
[31/112] Compiling C object libfprint/libnbis.a.p/nbis_mindtct_matchpat.c.obj
[32/112] Compiling C object libfprint/libnbis.a.p/nbis_mindtct_shape.c.obj
[33/112] Compiling C object libfprint/libnbis.a.p/nbis_mindtct_minutia.c.obj
[34/112] Compiling C object libfprint/libnbis.a.p/nbis_mindtct_sort.c.obj
[35/112] Compiling C object libfprint/libnbis.a.p/nbis_mindtct_util.c.obj
[36/112] Compiling C object libfprint/libnbis.a.p/nbis_mindtct_xytreps.c.obj
[37/112] Linking static target libfprint/libnbis.a
[38/112] Compiling C object libfprint/libfprint-private.a.p/fpi-byte-reader.c.obj
[39/112] Compiling C object libfprint/libfprint-private.a.p/meson-generated_.._fpi-enums.c.obj
[40/112] Compiling C object libfprint/libfprint-private.a.p/fpi-assembling.c.obj
[41/112] Compiling C object libfprint/libfprint-private.a.p/fpi-device.c.obj
[42/112] Compiling C object libfprint/libfprint-private.a.p/fpi-image-device.c.obj
[43/112] Compiling C object libfprint/libfprint-private.a.p/fpi-byte-writer.c.obj
[44/112] Compiling C object libfprint/libfprint-private.a.p/fpi-image.c.obj
[45/112] Compiling C object libfprint/libfprint-drivers.a.p/drivers_upektc_img.c.obj
[46/112] Compiling C object libfprint/libfprint-private.a.p/fpi-ssm.c.obj
[47/112] Compiling C object libfprint/libfprint-private.a.p/fpi-print.c.obj
[48/112] Compiling C object libfprint/libfprint-drivers.a.p/drivers_upek_proto.c.obj
[49/112] Compiling C object libfprint/libfprint-private.a.p/fpi-usb-transfer.c.obj
[50/112] Compiling C object libfprint/libfprint-drivers.a.p/drivers_aes3500.c.obj
[51/112] Linking static target libfprint/libfprint-private.a
[52/112] Compiling C object libfprint/libfprint-drivers.a.p/drivers_vfs101.c.obj
[53/112] Compiling C object libfprint/libfprint-drivers.a.p/drivers_aes1660.c.obj
[54/112] Compiling C object libfprint/libfprint-drivers.a.p/drivers_aes4000.c.obj
[55/112] Compiling C object libfprint/libfprint-drivers.a.p/drivers_aes2501.c.obj
[56/112] Compiling C object libfprint/libfprint-drivers.a.p/drivers_vfs301.c.obj
[57/112] Compiling C object libfprint/libfprint-drivers.a.p/drivers_aes2660.c.obj
[58/112] Compiling C object libfprint/libfprint-drivers.a.p/drivers_vfs301_proto.c.obj
[59/112] Compiling C object libfprint/libfprint-drivers.a.p/drivers_aes2550.c.obj
[60/112] Compiling C object libfprint/libfprint-drivers.a.p/drivers_vfs5011.c.obj
[61/112] Compiling C object libfprint/libfprint-drivers.a.p/drivers_aes1610.c.obj
[62/112] Compiling C object libfprint/libfprint-drivers.a.p/drivers_vfs0050.c.obj
[63/112] Compiling C object libfprint/libfprint-drivers.a.p/drivers_goodixmoc_goodix_proto.c.obj
[64/112] Compiling C object libfprint/libfprint-drivers.a.p/drivers_upektc.c.obj
[65/112] Compiling C object libfprint/libfprint-drivers.a.p/drivers_vcom5s.c.obj
[66/112] Compiling C object libfprint/libfprint-drivers.a.p/drivers_synaptics_synaptics.c.obj
[67/112] Compiling C object libfprint/libfprint-drivers.a.p/drivers_etes603.c.obj
[68/112] Compiling C object libfprint/libfprint-drivers.a.p/drivers_synaptics_bmkt_message.c.obj
[69/112] Compiling C object libfprint/libfprint-drivers.a.p/drivers_uru4000.c.obj
[70/112] Compiling C object libfprint/libfprint-drivers.a.p/drivers_upeksonly.c.obj
[71/112] Compiling C object libfprint/libfprint-drivers.a.p/drivers_upekts.c.obj
[72/112] Compiling C object libfprint/libfprint-drivers.a.p/drivers_goodixmoc_goodix.c.obj
[73/112] Compiling C object libfprint/libfprint-drivers.a.p/drivers_aeslib.c.obj
[74/112] Compiling C object libfprint/libfprint-drivers.a.p/drivers_elan.c.obj
[75/112] Compiling C object libfprint/libfprint-drivers.a.p/drivers_aes3k.c.obj
[76/112] Compiling C object libfprint/libfprint-2.dll.p/fp-image-device.c.obj
[77/112] Compiling C object libfprint/libfprint-drivers.a.p/meson-generated_.._fpi-drivers.c.obj
[78/112] Compiling C object libfprint/libfprint-drivers.a.p/drivers_aesx660.c.obj
[79/112] Compiling C object libfprint/libfprint-2.dll.p/fp-boz-algm.c.obj
[80/112] Compiling C object libfprint/libfprint-2.dll.p/fp-print.c.obj
[81/112] Linking static target libfprint/libfprint-drivers.a
[82/112] Compiling C object libfprint/libfprint-2.dll.p/meson-generated_.._fp-enums.c.obj
[83/112] Compiling C object libfprint/libfprint-2.dll.p/fp-context.c.obj
[84/112] Compiling C object libfprint/libfprint-2.dll.p/fp-image.c.obj
[85/112] Compiling C object libfprint/libfprint-2.dll.p/fp-device.c.obj
[86/112] Compiling C object libfprint/fprint-list-supported-devices.exe.p/fprint-list-supported-devices.c.obj
[87/112] Compiling C object examples/enroll.exe.p/enroll.c.obj
[88/112] Compiling C object libfprint/fprint-list-udev-rules.exe.p/fprint-list-udev-rules.c.obj
[89/112] Compiling C object examples/enroll.exe.p/utilities.c.obj
FAILED: examples/enroll.exe.p/utilities.c.obj
"cc" "-Iexamples/enroll.exe.p" "-Iexamples" "-I../examples" "-I." "-I.." "-Ilibfprint" "-ID:/msys/mingw64/include/glib-2.0" "-ID:/msys/mingw64/lib/glib-2.0/include" "-ID:/msys/mingw64/include" "-ID:/msys/mingw64/include/gusb-1" "-ID:/msys/mingw64/include/libusb-1.0" "-fdiagnostics-color=always" "-pipe" "-D_FILE_OFFSET_BITS=64" "-Wall" "-Winvalid-pch" "-std=gnu99" "-O3" "-Wall" "-Wcast-align" "-Wformat-nonliteral" "-Wformat-security" "-Wformat=2" "-Wignored-qualifiers" "-Wlogical-op" "-Wmissing-declarations" "-Wmissing-format-attribute" "-Wmissing-include-dirs" "-Wmissing-noreturn" "-Wpointer-arith" "-Wshadow" "-Wtype-limits" "-Wundef" "-Wunused" "-Werror=address" "-Werror=array-bounds" "-Werror=empty-body" "-Werror=init-self" "-Werror=int-to-pointer-cast" "-Werror=main" "-Werror=missing-braces" "-Werror=nonnull" "-Werror=redundant-decls" "-Werror=return-type" "-Werror=sequence-point" "-Werror=trigraphs" "-Werror=write-strings" "-fno-strict-aliasing" "-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_56" "-DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_56" "-D_DEFAULT_SOURCE" "-D_XOPEN_SOURCE=700" "-D__MSYS__" "-DG_LOG_DOMAIN=\"libfprint\"" "-Wimplicit-function-declaration" "-Wmissing-prototypes" "-Wnested-externs" "-Wold-style-definition" "-Wstrict-prototypes" "-Werror=implicit" "-Werror=pointer-to-int-cast" "-pthread" "-mms-bitfields" "-mms-bitfields" "-mms-bitfields" "-mms-bitfields" -MD -MQ examples/enroll.exe.p/utilities.c.obj -MF "examples/enroll.exe.p/utilities.c.obj.d" -o examples/enroll.exe.p/utilities.c.obj "-c" ../examples/utilities.c
../examples/utilities.c:136:9: error: redundant redeclaration of 'getenv_s' [-Werror=redundant-decls]
  136 | errno_t getenv_s(
      |         ^~~~~~~~
In file included from D:/msys/mingw64/x86_64-w64-mingw32/include/stdlib.h:759,
                 from ../examples/utilities.h:23,
                 from ../examples/utilities.c:26:
D:/msys/mingw64/x86_64-w64-mingw32/include/sec_api/stdlib_s.h:17:27: note: previous declaration of 'getenv_s' was here
   17 |   _CRTIMP errno_t __cdecl getenv_s(size_t *_ReturnSize,char *_DstBuf,rsize_t _DstSize,const char *_VarName);
      |                           ^~~~~~~~
../examples/utilities.c:136:9: warning: 'getenv_s' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
  136 | errno_t getenv_s(
      |         ^~~~~~~~
cc1.exe: some warnings being treated as errors
[90/112] Linking target libfprint/libfprint-2.dll
[91/112] Compiling C object examples/enroll.exe.p/storage.c.obj
ninja: build stopped: subcommand failed.
gavajc commented 3 years ago

I have seen that the new version of MSYS2 does the inclusion of getenv_s by including which is not done with old versions (it is declared in <sec_api/stdlib_s.h>). I have removed the inclusion of from utilities.h and added them to the other example code. Please try again with the changes I have added.

Greetings

hafedh-trimeche commented 3 years ago

Hi,

Version updated & patches applied but same errors:

mys version: msys2-x86_64-20210105

FAILED: examples/enroll.exe.p/utilities.c.obj
"cc" "-Iexamples/enroll.exe.p" "-Iexamples" "-I../examples" "-I." "-I.." "-Ilibfprint" "-ID:/msys/mingw64/include/glib-2.0" "-ID:/msys/mingw64/lib/glib-2.0/include" "-ID:/msys/mingw64/include" "-ID:/msys/mingw64/include/gusb-1" "-ID:/msys/mingw64/include/libusb-1.0" "-fdiagnostics-color=always" "-pipe" "-D_FILE_OFFSET_BITS=64" "-Wall" "-Winvalid-pch" "-std=gnu99" "-O3" "-Wall" "-Wcast-align" "-Wformat-nonliteral" "-Wformat-security" "-Wformat=2" "-Wignored-qualifiers" "-Wlogical-op" "-Wmissing-declarations" "-Wmissing-format-attribute" "-Wmissing-include-dirs" "-Wmissing-noreturn" "-Wpointer-arith" "-Wshadow" "-Wtype-limits" "-Wundef" "-Wunused" "-Werror=address" "-Werror=array-bounds" "-Werror=empty-body" "-Werror=init-self" "-Werror=int-to-pointer-cast" "-Werror=main" "-Werror=missing-braces" "-Werror=nonnull" "-Werror=redundant-decls" "-Werror=return-type" "-Werror=sequence-point" "-Werror=trigraphs" "-Werror=write-strings" "-fno-strict-aliasing" "-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_56" "-DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_56" "-D_DEFAULT_SOURCE" "-D_XOPEN_SOURCE=700" "-D__MSYS__" "-DG_LOG_DOMAIN=\"libfprint\"" "-Wimplicit-function-declaration" "-Wmissing-prototypes" "-Wnested-externs" "-Wold-style-definition" "-Wstrict-prototypes" "-Werror=implicit" "-Werror=pointer-to-int-cast" "-pthread" "-mms-bitfields" "-mms-bitfields" "-mms-bitfields" "-mms-bitfields" -MD -MQ examples/enroll.exe.p/utilities.c.obj -MF "examples/enroll.exe.p/utilities.c.obj.d" -o examples/enroll.exe.p/utilities.c.obj "-c" ../examples/utilities.c
../examples/utilities.c:136:9: error: redundant redeclaration of 'getenv_s' [-Werror=redundant-decls]
  136 | errno_t getenv_s(
      |         ^~~~~~~~
In file included from ../examples/utilities.c:134:
D:/msys/mingw64/x86_64-w64-mingw32/include/sec_api/stdlib_s.h:17:27: note: previous declaration of 'getenv_s' was here
   17 |   _CRTIMP errno_t __cdecl getenv_s(size_t *_ReturnSize,char *_DstBuf,rsize_t _DstSize,const char *_VarName);
      |                           ^~~~~~~~
../examples/utilities.c:136:9: warning: 'getenv_s' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
  136 | errno_t getenv_s(
      |         ^~~~~~~~
cc1.exe: some warnings being treated as errors
[92/112] Compiling C object examples/img-capture.exe.p/img-capture.c.obj
[93/112] Generating symbol file libfprint/libfprint-2.dll.p/libfprint-2.dll.symbols
ninja: build stopped: subcommand failed.
gavajc commented 3 years ago

Hi. Compatibility problem between MSYS2 versions solved.

Because older versions of MSYS don't include a definition of getenv_s and newer versions do, I changed it to the legacy function getenv. Perhaps future versions will specify the use of a certain version of MSYS2 to maintain compatibility.

Problem solved and tested with the latest version of MSYS2 (msys2-x86_64-20210419.exe) Please check again to close this issue.

Greetings.

hafedh-trimeche commented 3 years ago

Hello,

Verified OK!

Thanks.