gcc : unknown type name - gcc

I am trying to install a linear solver called PDSLin on ubuntu16.04 LTS machine. I installed all the dependencies but when running make for PDSLin I got those warnings and errors. I do not understand from where -c in gcc -c come from and whether it is the reason of not identifying "superlu_options_t" variable.
(cd src; make lib;)
make[1]: Entering directory '/home/afrah/pdslin/src'
(make all; cd slu; make lib)
make[2]: Entering directory '/home/afrah/pdslin/src'
gcc -c -I/home/afrah/pdslin/include -I/home/afrah/SuperLU_5.2.0/SRC -I/usr/include -DDEBUGlevel=0 -DPRNTlevel=0 -DAdd_ -DUSE_VENDOR_BLAS -I/home/afrah/SuperLU_DIST_5.1.2/SRC -DSCOTCH_ORDER -I/usr/local/include -I/usr/share/parmetis/include -I/usr/share/mpich-install/include -I/home/afrah/petsc/include -I/home/afrah/petsc/arch-linux2-c-debug/include -Wall -DWITH_HIPS -DWITH_PETSC pdslin_graph.c
pdslin_graph.c: In function ‘a_plus_at_CompRow_loc_with_diag’:
pdslin_graph.c:51:26: warning: variable ‘sz_tcolind_loc’ set but not used [-Wunused-but-set-variable]
int_t sz_tcolind_send, sz_tcolind_loc, sz_tcolind_recv;
^
pdslin_graph.c: In function ‘perm_snodes’:
pdslin_graph.c:898:22: warning: passing argument 1 of ‘ParMETIS_V3_NodeND’ from incompatible pointer type [-Wincompatible-pointer-types]
ParMETIS_V3_NodeND(disp, m_rowptr, m_colind, &numflag, options,
^
// similar warnings
pdslin_graph.c:1034:9: warning: variable ‘numflag’ set but not used [-Wunused-but-set-variable]
int numflag;
^
gcc -c -I/home/afrah/pdslin/include -I/home/afrah/SuperLU_5.2.0/SRC -I/usr/include -DDEBUGlevel=0 -DPRNTlevel=0 -DAdd_ -DUSE_VENDOR_BLAS -I/home/afrah/SuperLU_DIST_5.1.2/SRC -DSCOTCH_ORDER -I/usr/local/include -I/usr/share/parmetis/include -I/usr/share/mpich-install/include -I/home/afrah/petsc/include -I/home/afrah/petsc/arch-linux2-c-debug/include -Wall -DWITH_HIPS -DWITH_PETSC pdslin_wrapper.c
gcc -c -I/home/afrah/pdslin/include -I/home/afrah/SuperLU_5.2.0/SRC -I/usr/include -DDEBUGlevel=0 -DPRNTlevel=0 -DAdd_ -DUSE_VENDOR_BLAS -I/home/afrah/SuperLU_DIST_5.1.2/SRC -DSCOTCH_ORDER -I/usr/local/include -I/usr/share/parmetis/include -I/usr/share/mpich-install/include -I/home/afrah/petsc/include -I/home/afrah/petsc/arch-linux2-c-debug/include -Wall -DWITH_HIPS -DWITH_PETSC pdslin_perm.c
pdslin_perm.c: In function ‘comp_perm’:
pdslin_perm.c:113:24: warning: passing argument 1 of ‘ParMETIS_V3_NodeND’ from incompatible pointer type [-Wincompatible-pointer-types]
ParMETIS_V3_NodeND(disp, rowptr_l, colind_l, &numflag, options,
^
In file included from pdslin_perm.c:14:0:
/home/afrah/SuperLU_DIST_5.1.2/SRC/parmetis.h:102:13: note: expected ‘idx_t * {aka long int *}’ but argument is of type ‘int *’
int __cdecl ParMETIS_V3_NodeND(
^
pdslin_perm.c:113:30: warning: passing argument 2 of ‘ParMETIS_V3_NodeND’ from incompatible pointer type [-Wincompatible-pointer-types]
ParMETIS_V3_NodeND(disp, rowptr_l, colind_l, &numflag, options,
^
In file included from pdslin_perm.c:14:0:
/home/afrah/SuperLU_DIST_5.1.2/SRC/parmetis.h:102:13: note: expected ‘idx_t * {aka long int *}’ but argument is of type ‘int *’
int __cdecl ParMETIS_V3_NodeND(
^
pdslin_perm.c:113:40: warning: passing argument 3 of ‘ParMETIS_V3_NodeND’ from incompatible pointer type [-Wincompatible-pointer-types]
ParMETIS_V3_NodeND(disp, rowptr_l, colind_l, &numflag, options,
^
// warnings
gcc -c -I/home/afrah/pdslin/include -I/home/afrah/SuperLU_5.2.0/SRC -I/usr/include -DDEBUGlevel=0 -DPRNTlevel=0 -DAdd_ -DUSE_VENDOR_BLAS -I/home/afrah/SuperLU_DIST_5.1.2/SRC -DSCOTCH_ORDER -I/usr/local/include -I/usr/share/parmetis/include -I/usr/share/mpich-install/include -I/home/afrah/petsc/include -I/home/afrah/petsc/arch-linux2-c-debug/include -Wall -DWITH_HIPS -DWITH_PETSC pdslin_util.c
In file included from pdslin_util.c:11:0:
/home/afrah/pdslin/include/pdslin_slu.h:49:24: error: unknown type name ‘superlu_options_t’
void get_perm_c_dist_t(superlu_options_t *options, int_t pnum, int_t ispec, S
^
/home/afrah/pdslin/include/pdslin_slu.h:70:24: error: unknown type name ‘superlu_options_t’
int_t pdslin_symbfact( superlu_options_t *options, /* input options */
^
pdslin_util.c: In function ‘a_plus_at’:
pdslin_util.c:116:9: warning: variable ‘nnz_loc’ set but not used [-Wunused-but-set-variable]
int_t nnz_loc; /* number of local nonzeros in matrix A */
^
pdslin_util.c:107:26: warning: variable ‘sz_tcolind_loc’ set but not used [-Wunused-but-set-variable]
int_t sz_tcolind_send, sz_tcolind_loc, sz_tcolind_recv;
^
pdslin_util.c: In function ‘pdslin_print_stat’:
pdslin_util.c:1047:13: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘long long int’ [-Wformat=]
printf( " domain dim : (%.2lf, %.2lf ) %ld / %ld, %ld\n",
^
pdslin_util.c:1047:13: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 5 has type ‘long long int’ [-Wformat=]
pdslin_util.c:1047:13: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 6 has type ‘long long int’ [-Wformat=]
pdslin_util.c:1049:13: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘long long int’ [-Wformat=]
printf( " domain nnz : (%.2lf, %.2lf ) %ld / %ld, %ld\n",
^
// warnings
makefile:103: recipe for target 'pdslin_util.o' failed
make[2]: *** [pdslin_util.o] Error 1
make[2]: Leaving directory '/home/afrah/pdslin/src'
make[2]: Entering directory '/home/afrah/pdslin/src/slu'
gcc -c -I/home/afrah/pdslin/include -I/home/afrah/SuperLU_5.2.0/SRC -I/usr/include -DDEBUGlevel=0 -DPRNTlevel=0 -DAdd_ -DUSE_VENDOR_BLAS -I/home/afrah/SuperLU_DIST_5.1.2/SRC -DSCOTCH_ORDER -I/usr/local/include -I/usr/share/parmetis/include -I/usr/share/mpich-install/include -I/home/afrah/petsc/include -I/home/afrah/petsc/arch-linux2-c-debug/include -Wall -DWITH_HIPS -DWITH_PETSC get_perm_c.c
get_perm_c.c:49:11: error: unknown type name ‘superlu_options_t’
superlu_options_t *options,
^
get_perm_c.c:167:19: error: unknown type name ‘superlu_options_t’
get_perm_c_dist_t(superlu_options_t *options, int_t pnum, int_t ispec, SuperM
^
makefile:41: recipe for target 'get_perm_c.o' failed
make[2]: *** [get_perm_c.o] Error 1
make[2]: Leaving directory '/home/afrah/pdslin/src/slu'
makefile:46: recipe for target 'lib' failed
make[1]: *** [lib] Error 2
make[1]: Leaving directory '/home/afrah/pdslin/src'
makefile:8: recipe for target 'all' failed
make: *** [all] Error 2
This is my makefile:
#
# top directory make.inc
#
# on hopper: % module load cray-petsc which also loads cray-tpsl, including pt-schotch and parmetis.
########################################################################
# home directory, where the software is located
TOP = /home/afrah/pdslin
INCLUDEDIR =/usr/include
########################################################################
# hybrid solver library name
LIB = $(TOP)/lib/libhybrid.a
########################################################################
# Libraries:
#
# MPI/BLAS libraries
L_MPI = /usr/share/mpich-install/lib/libmpi.a -llibmpi
I_MPI = -I/usr/share/mpich-install/include
L_BLAS = -llibblas -lliblapack
########################################################################
# make utility
MAKE = make
########################################################################
# archiver and flags to build the library
ARCH = /usr/bin/ar
ARCHFLAGS = -cr
RANLIB = /usr/bin/ranlib
########################################################################
# C compiler and flags
CC = gcc
FLAGS = -Wall -DWITH_HIPS -DWITH_PETSC
FLAGS = -Wall -DWITH_HIPS -DWITH_PETSC
########################################################################
# fortran compiler and flags
FC = mpif90
FLIB = -pgf90libs
FFLAGS = -fast
FFLAGS = -g
########################################################################
# linker used to link example program with the library
#LINKER = /usr/share/mpich-install/bin/mpicc -Wl,--allow-multiple-definition
LINKER = CC -Wl,--allow-multiple-definition
########################################################################
# C++ compiler (this is not needed for your standard compilation)
CPP = mpicxx
####################################################################
#L_PPART = -L/usr/share/parmetis/lib/libparmetis -lparmetis
#I_PPART = -I/usr/local/include
L_PPART = -L/usr/local/lib -llibscotch -llibptscotch \
-L/usr/local/lib -lptscotcherr -llibscotchmetis -lptscotchparmetis
I_PPART = -DSCOTCH_ORDER -I/usr/local/include
#------------------------------------------------------#
# Metis Library, and its header files
L_METIS = -L/usr/share/parmetis/lib/libmetis -lmetis
I_METIS = -I/usr/share/parmetis/include
#------------------------------------------------------#
# SuperLU_DIST library, and its header files (hopper: module load superlu_dist)
# SLUDIST = /global/common/hopper2/acts/SuperLU/SuperLU_DIST/2.5
# L_SLUDIST = -L$(SLUDIST)/craypgi-xe6_O/lib -lsuperlu_dist_2.5
# I_SLUDIST = -DDEBUGlevel=0 -DPRNTlevel=1 -DAdd_ -DUSE_VENDOR_BLAS -I$(SLUDIST)/SRC
SLUDIST = /home/afrah/SuperLU_DIST_5.1.2
I_SLUDIST = -DDEBUGlevel=0 -DPRNTlevel=0 -DAdd_ -DUSE_VENDOR_BLAS -I$(SLUDIST)/SRC
L_SLUDIST = -L$(SLUDIST)/lib -llibsuperlu_dist.so
#------------------------------------------------------#
# Petsc library, and its header files
# double version
I_PETSC = -I/home/afrah/petsc/include \
-I/home/afrah/petsc/arch-linux2-c-debug/include
L_PETSC = -L/home/afrah/petsc/arch-linux2-c-debug/lib -llibpetsc
#------------------------------------------------------#
# Other optional libraries
# serial SuperLU
L_SLU = -L/home/afrah/SuperLU_5.2.0/lib -llibsuperlu_5.2.a
I_SLU = -I/home/afrah/SuperLU_5.2.0/SRC
########################################################################
########################################################################
# accumulate all includes and libraries
INC = -I$(TOP)/include $(I_SLU) -I$(INCLUDEDIR) $(I_SLUDIST) $(I_PPART) $(I_METIS) $(I_MPI) $(I_PETSC)
LIBS = $(LIB) $(L_SLU) $(L_SLUDIST) $(L_PPART) $(L_METIS) $(L_BLAS) $(L_MPI) $
(L_PETSC)
ZLIBS = $(LIB) $(L_SLUDIST) $(L_PPART) $(L_METIS) $(L_BLAS) $(L_MPI) $(L_SLU) $(L_PETSC)

Related

run.do_compile error on poky-dunfell release

When I am bitbaking my custom image recipe for STM32MP1 based Avenger96 board I am facing some errors related to analyze.l:466:19: error: format not a string literal and no format arguments [-Werror=format-security]. I don't understand why I am getting this error as this is the first I am facing it. Please find the below complete log:
DEBUG: Executing python function autotools_aclocals
DEBUG: SITE files ['endian-little', 'bit-32', 'arm-common', 'arm-32', 'common-linux', 'common-glibc', 'arm-linux', 'arm-linux-gnueabi', 'common']
DEBUG: Python function autotools_aclocals finished
DEBUG: Executing shell function do_compile
NOTE: make -j 8
make all-recursive
make[1]: Entering directory '/root/build-swu-v2/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/kbd/2.2.0-r0/build'
Making all in src
make[2]: Entering directory '/root/build-swu-v2/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/kbd/2.2.0-r0/build/src'
Making all in libcommon
make[3]: Entering directory '/root/build-swu-v2/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/kbd/2.2.0-r0/build/src/libcommon'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/root/build-swu-v2/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/kbd/2.2.0-r0/build/src/libcommon'
Making all in libkbdfile
make[3]: Entering directory '/root/build-swu-v2/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/kbd/2.2.0-r0/build/src/libkbdfile'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/root/build-swu-v2/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/kbd/2.2.0-r0/build/src/libkbdfile'
Making all in libkeymap
make[3]: Entering directory '/root/build-swu-v2/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/kbd/2.2.0-r0/build/src/libkeymap'
make all-am
make[4]: Entering directory '/root/build-swu-v2/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/kbd/2.2.0-r0/build/src/libkeymap'
../../arm-poky-linux-gnueabi-libtool --tag=CC --mode=compile arm-poky-linux-gnueabi-gcc -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/root/build-swu-v2/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/kbd/2.2.0-r0/recipe-sysroot -DHAVE_CONFIG_H -I. -I../../../kbd-2.2.0/src/libkeymap -I../.. -I../../../kbd-2.2.0/src/libkeymap -I. -I../../../kbd-2.2.0/src/libkeymap/.. -I./.. -I../../../kbd-2.2.0/src/libkeymap/../libcommon -I./../libcommon -I../../../kbd-2.2.0/src/libkeymap/../libkbdfile -I./../libkbdfile -DDATADIR=\"/usr/share\" -DLOCALEDIR=\"/usr/share/locale\" -U_GNU_SOURCE -funit-at-a-time -g -O2 -D_FORTIFY_SOURCE=2 -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=/root/build-swu-v2/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/kbd/2.2.0-r0=/usr/src/debug/kbd/2.2.0-r0 -fdebug-prefix-map=/root/build-swu-v2/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/kbd/2.2.0-r0=/usr/src/debug/kbd/2.2.0-r0 -fdebug-prefix-map=/root/build-swu-v2/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/kbd/2.2.0-r0/recipe-sysroot= -fdebug-prefix-map=/root/build-swu-v2/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/kbd/2.2.0-r0/recipe-sysroot-native= -Waggregate-return -Wall -Wcast-align -Wconversion -Wdisabled-optimization -Wextra -Wmissing-declarations -Wmissing-format-attribute -Wmissing-noreturn -Wmissing-prototypes -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wwrite-strings -c -o analyze.lo ../../../kbd-2.2.0/src/libkeymap/analyze.c
arm-poky-linux-gnueabi-libtool: compile: arm-poky-linux-gnueabi-gcc -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/root/build-swu-v2/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/kbd/2.2.0-r0/recipe-sysroot -DHAVE_CONFIG_H -I. -I../../../kbd-2.2.0/src/libkeymap -I../.. -I../../../kbd-2.2.0/src/libkeymap -I. -I../../../kbd-2.2.0/src/libkeymap/.. -I./.. -I../../../kbd-2.2.0/src/libkeymap/../libcommon -I./../libcommon -I../../../kbd-2.2.0/src/libkeymap/../libkbdfile -I./../libkbdfile -DDATADIR=\"/usr/share\" -DLOCALEDIR=\"/usr/share/locale\" -U_GNU_SOURCE -funit-at-a-time -g -O2 -D_FORTIFY_SOURCE=2 -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=/root/build-swu-v2/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/kbd/2.2.0-r0=/usr/src/debug/kbd/2.2.0-r0 -fdebug-prefix-map=/root/build-swu-v2/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/kbd/2.2.0-r0=/usr/src/debug/kbd/2.2.0-r0 -fdebug-prefix-map=/root/build-swu-v2/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/kbd/2.2.0-r0/recipe-sysroot= -fdebug-prefix-map=/root/build-swu-v2/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/kbd/2.2.0-r0/recipe-sysroot-native= -Waggregate-return -Wall -Wcast-align -Wconversion -Wdisabled-optimization -Wextra -Wmissing-declarations -Wmissing-format-attribute -Wmissing-noreturn -Wmissing-prototypes -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wwrite-strings -c ../../../kbd-2.2.0/src/libkeymap/analyze.c -fPIC -DPIC -o .libs/analyze.o
analyze.l: In function 'find_incl_file_near_fn':
analyze.l:141:24: warning: passing argument 2 of 'kbdfile_find' from incompatible pointer type [-Wincompatible-pointer-types]
In file included from ../../../kbd-2.2.0/src/libkeymap/keymap/kmap.h:36,
from ../../../kbd-2.2.0/src/libkeymap/keymap.h:8,
from ../../../kbd-2.2.0/src/libkeymap/analyze.c:1:
../../../kbd-2.2.0/src/libkeymap/../libkbdfile/kbdfile.h:40:37: note: expected 'char **' but argument is of type 'const char **'
40 | int kbdfile_find(char *fnam, char **dirpath, char **suffixes, struct kbdfile *fp);
| ~~~~~~~^~~~~~~
analyze.l:141:42: warning: passing argument 3 of 'kbdfile_find' from incompatible pointer type [-Wincompatible-pointer-types]
In file included from ../../../kbd-2.2.0/src/libkeymap/keymap/kmap.h:36,
from ../../../kbd-2.2.0/src/libkeymap/keymap.h:8,
from ../../../kbd-2.2.0/src/libkeymap/analyze.c:1:
../../../kbd-2.2.0/src/libkeymap/../libkbdfile/kbdfile.h:40:53: note: expected 'char **' but argument is of type 'const char * const*'
40 | int kbdfile_find(char *fnam, char **dirpath, char **suffixes, struct kbdfile *fp);
| ~~~~~~~^~~~~~~~
analyze.l: In function 'find_standard_incl_file':
analyze.l:168:22: warning: passing argument 2 of 'kbdfile_find' from incompatible pointer type [-Wincompatible-pointer-types]
In file included from ../../../kbd-2.2.0/src/libkeymap/keymap/kmap.h:36,
from ../../../kbd-2.2.0/src/libkeymap/keymap.h:8,
from ../../../kbd-2.2.0/src/libkeymap/analyze.c:1:
../../../kbd-2.2.0/src/libkeymap/../libkbdfile/kbdfile.h:40:37: note: expected 'char **' but argument is of type 'const char * const*'
40 | int kbdfile_find(char *fnam, char **dirpath, char **suffixes, struct kbdfile *fp);
| ~~~~~~~^~~~~~~
analyze.l:168:40: warning: passing argument 3 of 'kbdfile_find' from incompatible pointer type [-Wincompatible-pointer-types]
In file included from ../../../kbd-2.2.0/src/libkeymap/keymap/kmap.h:36,
from ../../../kbd-2.2.0/src/libkeymap/keymap.h:8,
from ../../../kbd-2.2.0/src/libkeymap/analyze.c:1:
../../../kbd-2.2.0/src/libkeymap/../libkbdfile/kbdfile.h:40:53: note: expected 'char **' but argument is of type 'const char * const*'
40 | int kbdfile_find(char *fnam, char **dirpath, char **suffixes, struct kbdfile *fp);
| ~~~~~~~^~~~~~~~
analyze.l:197:24: warning: passing argument 2 of 'kbdfile_find' from incompatible pointer type [-Wincompatible-pointer-types]
In file included from ../../../kbd-2.2.0/src/libkeymap/keymap/kmap.h:36,
from ../../../kbd-2.2.0/src/libkeymap/keymap.h:8,
from ../../../kbd-2.2.0/src/libkeymap/analyze.c:1:
../../../kbd-2.2.0/src/libkeymap/../libkbdfile/kbdfile.h:40:37: note: expected 'char **' but argument is of type 'const char * const*'
40 | int kbdfile_find(char *fnam, char **dirpath, char **suffixes, struct kbdfile *fp);
| ~~~~~~~^~~~~~~
analyze.l:197:42: warning: passing argument 3 of 'kbdfile_find' from incompatible pointer type [-Wincompatible-pointer-types]
In file included from ../../../kbd-2.2.0/src/libkeymap/keymap/kmap.h:36,
from ../../../kbd-2.2.0/src/libkeymap/keymap.h:8,
from ../../../kbd-2.2.0/src/libkeymap/analyze.c:1:
../../../kbd-2.2.0/src/libkeymap/../libkbdfile/kbdfile.h:40:53: note: expected 'char **' but argument is of type 'const char * const*'
40 | int kbdfile_find(char *fnam, char **dirpath, char **suffixes, struct kbdfile *fp);
| ~~~~~~~^~~~~~~~
analyze.l: In function 'find_incl_file':
analyze.l:210:27: warning: passing argument 2 of 'kbdfile_find' from incompatible pointer type [-Wincompatible-pointer-types]
In file included from ../../../kbd-2.2.0/src/libkeymap/keymap/kmap.h:36,
from ../../../kbd-2.2.0/src/libkeymap/keymap.h:8,
from ../../../kbd-2.2.0/src/libkeymap/analyze.c:1:
../../../kbd-2.2.0/src/libkeymap/../libkbdfile/kbdfile.h:40:37: note: expected 'char **' but argument is of type 'const char * const*'
40 | int kbdfile_find(char *fnam, char **dirpath, char **suffixes, struct kbdfile *fp);
| ~~~~~~~^~~~~~~
analyze.l:210:45: warning: passing argument 3 of 'kbdfile_find' from incompatible pointer type [-Wincompatible-pointer-types]
In file included from ../../../kbd-2.2.0/src/libkeymap/keymap/kmap.h:36,
from ../../../kbd-2.2.0/src/libkeymap/keymap.h:8,
from ../../../kbd-2.2.0/src/libkeymap/analyze.c:1:
../../../kbd-2.2.0/src/libkeymap/../libkbdfile/kbdfile.h:40:53: note: expected 'char **' but argument is of type 'const char * const*'
40 | int kbdfile_find(char *fnam, char **dirpath, char **suffixes, struct kbdfile *fp);
| ~~~~~~~^~~~~~~~
analyze.l:225:26: warning: passing argument 2 of 'kbdfile_find' from incompatible pointer type [-Wincompatible-pointer-types]
In file included from ../../../kbd-2.2.0/src/libkeymap/keymap/kmap.h:36,
from ../../../kbd-2.2.0/src/libkeymap/keymap.h:8,
from ../../../kbd-2.2.0/src/libkeymap/analyze.c:1:
../../../kbd-2.2.0/src/libkeymap/../libkbdfile/kbdfile.h:40:37: note: expected 'char **' but argument is of type 'const char **'
40 | int kbdfile_find(char *fnam, char **dirpath, char **suffixes, struct kbdfile *fp);
| ~~~~~~~^~~~~~~
analyze.l:225:36: warning: passing argument 3 of 'kbdfile_find' from incompatible pointer type [-Wincompatible-pointer-types]
In file included from ../../../kbd-2.2.0/src/libkeymap/keymap/kmap.h:36,
from ../../../kbd-2.2.0/src/libkeymap/keymap.h:8,
from ../../../kbd-2.2.0/src/libkeymap/analyze.c:1:
../../../kbd-2.2.0/src/libkeymap/../libkbdfile/kbdfile.h:40:53: note: expected 'char **' but argument is of type 'const char * const*'
40 | int kbdfile_find(char *fnam, char **dirpath, char **suffixes, struct kbdfile *fp);
| ~~~~~~~^~~~~~~~
In file included from analyze.l:10:
analyze.l: In function 'yylex':
analyze.l:466:19: error: format not a string literal and no format arguments [-Werror=format-security]
../../../kbd-2.2.0/src/libkeymap/contextP.h:79:55: note: in definition of macro 'lk_log_cond'
79 | lk_log(ctx, level, __FILE__, __LINE__, __func__, ##arg); \
| ^~~
analyze.l:466:6: note: in expansion of macro 'ERR'
cc1: some warnings being treated as errors
make[4]: *** [Makefile:604: analyze.lo] Error 1
make[4]: Leaving directory '/root/build-swu-v2/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/kbd/2.2.0-r0/build/src/libkeymap'
make[3]: *** [Makefile:476: all] Error 2
make[3]: Leaving directory '/root/build-swu-v2/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/kbd/2.2.0-r0/build/src/libkeymap'
make[2]: *** [Makefile:1083: all-recursive] Error 1
make[2]: Leaving directory '/root/build-swu-v2/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/kbd/2.2.0-r0/build/src'
make[1]: *** [Makefile:471: all-recursive] Error 1
make[1]: Leaving directory '/root/build-swu-v2/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/kbd/2.2.0-r0/build'
ERROR: oe_runmake failed
make: *** [Makefile:402: all] Error 2
WARNING: exit code 1 from a shell command.
ERROR: Execution of '/root/build-swu-v2/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/kbd/2.2.0-r0/temp/run.do_compile.380' failed with exit code 1
When I checked the sources/poky/meta/recipes-core/kbd, add missing string format patch patch is already available and included in kbd_2.2.0.bb recipe. And same patch is also present in build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/kbd/2.2.0-r0. But still I am getting above error.
I have no idea what this error means and why am I getting this all of a sudden.
Can anyone please let me know how to fix this issue?
Your help will be much appreciated.
Thanks in advance.
You should NOT do the following, its likely your code compiles just fine on an older version of GCC, but GCC adds new warnings and errors for security purposes, you should really look at the code and fix it properly, it is also very likely you just need to use a newer version of kbd that builds contains these fixes (kbd is at 2.4.0 in the latest branch: https://git.yoctoproject.org/poky/tree/meta/recipes-core/kbd/kbd_2.4.0.bb).
But if you want to temporarily disable the GCC error to check if your build works while you either fix the kbd code or upgrade to a new version of kbd, you could set:
CFLAGS += "-Wno-error=format-security"
Which will suppress the compilation error, I cannot stress this enough, the fix is to actually fix the kbd code.
quick fix, thanks to aehs29:
copy file
https://git.yoctoproject.org/poky/tree/meta/recipes-core/kbd/kbd_2.4.0.bb
to the folder .../poky/meta/recipes-core/kbd/
remove file .../poky/meta/recipes-core/kbd/kbd_2.2.0.bb
and rebuild
bitbake -k radxa-minimal-image

make: *** [Makefile:223: v8js_array_access.lo] Error 1

I followed this link to compile v8 and v8js but when I executed make to compile v8js it showed this log and this error:
/bin/bash /tmp/v8js/libtool --mode=compile g++ -I. -I/tmp/v8js -I/tmp/v8js/include -I/tmp/v8js/main -I/tmp/v8js -I/usr/include/php/20200930 -I/usr/include/php/20200930/main -I/usr/include/php/20200930/TSRM -I/usr/include/php/20200930/Zend -I/usr/include/php/20200930/ext -I/usr/include/php/20200930/ext/date/lib -I/opt/v8/include -I/opt/v8 -DV8_COMPRESS_POINTERS -DHAVE_CONFIG_H -g -O2 -Wno-narrowing -std=c++14 -c /tmp/v8js/v8js_array_access.cc -o v8js_array_access.lo
libtool: compile: g++ -I. -I/tmp/v8js -I/tmp/v8js/include -I/tmp/v8js/main -I/tmp/v8js -I/usr/include/php/20200930 -I/usr/include/php/20200930/main -I/usr/include/php/20200930/TSRM -I/usr/include/php/20200930/Zend -I/usr/include/php/20200930/ext -I/usr/include/php/20200930/ext/date/lib -I/opt/v8/include -I/opt/v8 -DV8_COMPRESS_POINTERS -DHAVE_CONFIG_H -g -O2 -Wno-narrowing -std=c++14 -c /tmp/v8js/v8js_array_access.cc -fPIC -DPIC -o .libs/v8js_array_access.o
In file included from /usr/include/dirent.h:245,
from /usr/include/php/20200930/Zend/zend_virtual_cwd.h:89,
from /usr/include/php/20200930/main/php.h:437,
from /tmp/v8js/php_v8js_macros.h:45,
from /tmp/v8js/v8js_array_access.cc:17:
/tmp/v8js/v8js_class.h: In function ‘v8js_ctx* v8js_ctx_fetch_object(zend_object*)’:
/tmp/v8js/v8js_class.h:83:54: warning: ‘offsetof’ within non-standard-layout type ‘v8js_ctx’ is conditionally-supported [-Winvalid-offsetof]
83 | return (struct v8js_ctx *)((char *)obj - XtOffsetOf(struct v8js_ctx, std));
/tmp/v8js/v8js_class.h:83:43: note: in expansion of macro ‘XtOffsetOf’
83 | return (struct v8js_ctx *)((char *)obj - XtOffsetOf(struct v8js_ctx, std));
| ^~~~~~~~~~
/tmp/v8js/v8js_array_access.cc: In function ‘zval v8js_array_access_dispatch(zend_object*, const char*, int, uint32_t, zval)’:
/tmp/v8js/v8js_array_access.cc:53:6: error: ‘zend_fcall_info’ {aka ‘struct _zend_fcall_info’} has no member named ‘no_separation’
53 | fci.no_separation = 0;
| ^~~~~~~~~~~~~
/tmp/v8js/v8js_array_access.cc: In function ‘void v8js_array_access_enumerator(const v8::PropertyCallbackInfo<v8::Array>&)’:
/tmp/v8js/v8js_array_access.cc:213:74: warning: ignoring return value of ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’, declared with attribute ‘warn_unused_result’ [-Wunused-result]
213 | esult->Set(isolate->GetEnteredOrMicrotaskContext(), i ++, V8JS_INT(j));
| ^
In file included from /tmp/v8js/php_v8js_macros.h:55,
from /tmp/v8js/v8js_array_access.cc:17:
/opt/v8/include/v8.h:3943:37: note: declared here
3943 | V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
| ^~~
/tmp/v8js/v8js_array_access.cc:217:86: warning: ignoring return value of ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’, declared with attribute ‘warn_unused_result’ [-Wunused-result]
217 | late->GetEnteredOrMicrotaskContext(), V8JS_SYM("length"), V8JS_INT(i));
| ^
In file included from /tmp/v8js/php_v8js_macros.h:55,
from /tmp/v8js/v8js_array_access.cc:17:
/opt/v8/include/v8.h:3940:37: note: declared here
3940 | V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
| ^~~
/tmp/v8js/v8js_array_access.cc: In function ‘void v8js_array_access_named_getter(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>&)’:
/tmp/v8js/v8js_array_access.cc:253:83: warning: ignoring return value of ‘bool v8::MaybeLocal<T>::ToLocal(v8::Local<S>*) const [with S = v8::Value; T = v8::Value]’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
253 | t(isolate->GetEnteredOrMicrotaskContext(), property).ToLocal(&ret_value);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
make: *** [Makefile:223: v8js_array_access.lo] Error 1
My PHP version: 8.0.5

Issue with zlib while running makefile MacOS sierra

I am trying to run a make file in MacOS sierra, but it seems to have trouble with the header of the Zlib (see below).
I have tried to install a separate version with brew and pass the directory of the brew zlib installation in the configure file.
./configure --prefix=/usr/local/etherlab --with-xml-prefix=/usr/local/opt/libxml2 --with-zlib-dir=/usr/local/opt/zlib CXXFLAGS=-std=c++11
However, when I run make I got the error
$ make
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-recursive
Making all in proto
make[2]: Nothing to be done for `all'.
Making all in lib
Making all in LibDLS
make[3]: Nothing to be done for `all'.
/bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/local/etherlab/include -Wall -I/usr/local/include -I/usr/local/opt/zlib/include -I/usr/local/opt/libxml2/include/libxml2 -std=c++11 -MT libdls_la-ZLib.lo -MD -MP -MF .deps/libdls_la-ZLib.Tpo -c -o libdls_la-ZLib.lo `test -f 'ZLib.cpp' || echo './'`ZLib.cpp
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/local/etherlab/include -Wall -I/usr/local/include -I/usr/local/opt/zlib/include -I/usr/local/opt/libxml2/include/libxml2 -std=c++11 -MT libdls_la-ZLib.lo -MD -MP -MF .deps/libdls_la-ZLib.Tpo -c ZLib.cpp -fno-common -DPIC -o .libs/libdls_la-ZLib.o
ZLib.cpp:22:10: warning: non-portable path to file '<ZLib.h>'; specified path differs in case from file name on disk
[-Wnonportable-include-path]
#include <zlib.h>
^~~~~~~~
<ZLib.h>
In file included from ZLib.cpp:22:
./zlib.h:42:17: error: unknown type name 'string'; did you mean 'std::string'?
EZLib(const string &pmsg) : Exception(pmsg) {};
^~~~~~
std::string
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iosfwd:194:65: note:
'std::string' declared here
typedef basic_string<char, char_traits<char>, allocator<char> > string;
^
ZLib.cpp:90:5: error: unknown type name 'uLongf'
uLongf out_size;
^
ZLib.cpp:104:17: error: use of undeclared identifier 'uLongf'
out_size = (uLongf) (src_size * 1.01 + 12 + 0.5);
^
ZLib.cpp:117:28: error: use of undeclared identifier 'Bytef'
comp_ret = ::compress((Bytef *) _out_buf, &out_size,
^
ZLib.cpp:117:35: error: expected expression
comp_ret = ::compress((Bytef *) _out_buf, &out_size,
^
ZLib.cpp:118:34: error: unknown type name 'Bytef'
(const Bytef *) src, src_size);
^
ZLib.cpp:117:16: error: no member named 'compress' in the global namespace; did you mean simply 'compress'?
comp_ret = ::compress((Bytef *) _out_buf, &out_size,
^~~~~~~~~~
compress
ZLib.cpp:88:12: note: 'compress' declared here
void ZLib::compress(const char *src, unsigned int src_size)
^
ZLib.cpp:120:21: error: use of undeclared identifier 'Z_OK'
if (comp_ret != Z_OK) // Fehler beim Komprimieren
^
ZLib.cpp:123:25: error: use of undeclared identifier 'Z_BUF_ERROR'
if (comp_ret == Z_BUF_ERROR) err << " (BUFFER ERROR)";
^
ZLib.cpp:155:5: error: unknown type name 'uLongf'
uLongf zlib_out_size = out_size;
^
ZLib.cpp:173:32: error: use of undeclared identifier 'Bytef'
uncomp_ret = ::uncompress((Bytef *) _out_buf, &zlib_out_size,
^
ZLib.cpp:173:39: error: expected expression
uncomp_ret = ::uncompress((Bytef *) _out_buf, &zlib_out_size,
^
ZLib.cpp:174:38: error: unknown type name 'Bytef'
(const Bytef *) src, src_size);
^
ZLib.cpp:173:18: error: no member named 'uncompress' in the global namespace; did you mean simply 'uncompress'?
uncomp_ret = ::uncompress((Bytef *) _out_buf, &zlib_out_size,
^~~~~~~~~~~~
uncompress
ZLib.cpp:150:12: note: 'uncompress' declared here
void ZLib::uncompress(const char *src, unsigned int src_size,
^
ZLib.cpp:176:23: error: use of undeclared identifier 'Z_OK'
if (uncomp_ret != Z_OK) // Fehler beim Dekomprimieren
^
ZLib.cpp:179:27: error: use of undeclared identifier 'Z_BUF_ERROR'
if (uncomp_ret == Z_BUF_ERROR) {
^
1 warning and 16 errors generated.
make[3]: *** [libdls_la-ZLib.lo] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Digging a bit more I found that I could try to add
#include <string>
#include <cstring>
to the header zlib.h but this does not work either.
What else can I do to solve this issue?.

can't install postgis on mac

I am trying to install postgis from here
I run the following commands
cd /Downloads/postgis-2.3.1
configure
make
and the error was
postgis_topology.c:1427:13: warning: format specifies type 'unsigned int' but the argument has type 'uint64' (aka 'unsigned long') [-Wformat]
SPI_processed, numelems);
^~~~~~~~~~~~~
postgis_topology.c:1484:13: warning: format specifies type 'unsigned int' but the argument has type 'uint64' (aka 'unsigned long') [-Wformat]
SPI_processed, numelems);
^~~~~~~~~~~~~
postgis_topology.c:1542:13: warning: format specifies type 'unsigned int' but the argument has type 'uint64' (aka 'unsigned long') [-Wformat]
SPI_processed, numelems);
^~~~~~~~~~~~~
postgis_topology.c:1907:59: warning: format specifies type 'int' but the argument has type 'uint64' (aka 'unsigned long') [-Wformat]
cberror(topo->be_data, "processed %d rows, expected 1", SPI_processed);
~~ ^~~~~~~~~~~~~
%lu
4 warnings generated.
clang -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2 -bundle -multiply_defined suppress -Wl,-undefined,dynamic_lookup -o postgis_topology-2.3.so postgis_topology.o -L/usr/local/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/readline/lib -Wl,-dead_strip_dylibs ../libpgcommon/libpgcommon.a ../liblwgeom/.libs/liblwgeom.a -L/opt/local/lib -lgeos_c -lproj -ljson-c -L/opt/local/lib -lxml2 -lz -lpthread -liconv -lm -L/usr/local/Cellar/sfcgal/1.3.0_2/lib -lSFCGAL -L/usr/local/Cellar/sfcgal/1.3.0_2/lib -lSFCGAL -bundle_loader /usr/local/Cellar/postgresql/9.6.2/bin/postgres
---- Making all in loader
/bin/sh ../libtool --mode=link \
gcc -I ../liblwgeom -g -O2 -fno-common -DPIC -Wall -Wmissing-prototypes shpopen.o dbfopen.o getopt.o shpcommon.o safileio.o shp2pgsql-core.o shp2pgsql-cli.o ../liblwgeom/liblwgeom.la -o shp2pgsql -L/usr/local/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/readline/lib -Wl,-dead_strip_dylibs -liconv
libtool: link: gcc -I ../liblwgeom -g -O2 -fno-common -DPIC -Wall -Wmissing-prototypes shpopen.o dbfopen.o getopt.o shpcommon.o safileio.o shp2pgsql-core.o shp2pgsql-cli.o -o .libs/shp2pgsql -Wl,-dead_strip_dylibs ../liblwgeom/.libs/liblwgeom.dylib -L/opt/local/lib -lgeos_c -lproj -ljson-c -L/usr/local/Cellar/sfcgal/1.3.0_2/lib -lSFCGAL -L/usr/local/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/readline/lib -liconv
Undefined symbols for architecture x86_64:
"_iconv", referenced from:
_utf8 in shp2pgsql-core.o
"_iconv_close", referenced from:
_utf8 in shp2pgsql-core.o
"_iconv_open", referenced from:
_utf8 in shp2pgsql-core.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [shp2pgsql] Error 1
make: *** [all] Error 1
How to fix this error ?

Error installing pygraphviz 1.2 on Mac OS X 10.9 (missing library)

I'm using Mac OS X 10.9. I have already installed graphviz 2.36.0.
After downloading pygraphviz 1.2, I modified in setup.py the variables "library_path" and "include_path":
library_path='/usr/local/lib/graphviz'
include_path='/usr/local/include/graphviz'
When I try to install graphviz with python setup.py install, I get the following message:
library_path=/usr/local/lib/graphviz
include_path=/usr/local/include/graphviz
running install
running build
running build_py
running build_ext
building 'pygraphviz._graphviz' extension
cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -I/usr/local/include/graphviz -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c pygraphviz/graphviz_wrap.c -o build/temp.macosx-10.9-intel-2.7/pygraphviz/graphviz_wrap.o
pygraphviz/graphviz_wrap.c:2040:11: warning: explicitly assigning a variable of type 'int' to itself [-Wself-assign]
res = SWIG_AddCast(res);
~~~ ^ ~~~
pygraphviz/graphviz_wrap.c:2043:11: warning: explicitly assigning a variable of type 'int' to itself [-Wself-assign]
res = SWIG_AddCast(res);
~~~ ^ ~~~
pygraphviz/graphviz_wrap.c:2829:15: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
len = strlen(val);
~ ^~~~~~~~~~~
pygraphviz/graphviz_wrap.c:2855:12: warning: incompatible pointer to integer conversion returning 'Agsym_t *' (aka 'struct Agsym_s *') from a function with result type 'int' [-Wint-conversion]
return agattr(g, kind, name, val);
^~~~~~~~~~~~~~~~~~~~~~~~~~
pygraphviz/graphviz_wrap.c:2847:15: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
len = strlen(val);
~ ^~~~~~~~~~~
pygraphviz/graphviz_wrap.c:4806:14: warning: explicitly assigning a variable of type 'void *' to itself [-Wself-assign]
clientdata = clientdata;
~~~~~~~~~~ ^ ~~~~~~~~~~
6 warnings generated.
pygraphviz/graphviz_wrap.c:2040:11: warning: explicitly assigning a variable of type 'int' to itself [-Wself-assign]
res = SWIG_AddCast(res);
~~~ ^ ~~~
pygraphviz/graphviz_wrap.c:2043:11: warning: explicitly assigning a variable of type 'int' to itself [-Wself-assign]
res = SWIG_AddCast(res);
~~~ ^ ~~~
pygraphviz/graphviz_wrap.c:2855:12: warning: incompatible pointer to integer conversion returning 'Agsym_t *' (aka 'struct Agsym_s *') from a function with result type 'int' [-Wint-conversion]
return agattr(g, kind, name, val);
^~~~~~~~~~~~~~~~~~~~~~~~~~
pygraphviz/graphviz_wrap.c:4806:14: warning: explicitly assigning a variable of type 'void *' to itself [-Wself-assign]
clientdata = clientdata;
~~~~~~~~~~ ^ ~~~~~~~~~~
4 warnings generated.
cc -bundle -undefined dynamic_lookup -arch x86_64 -arch i386 -Wl,-F. build/temp.macosx-10.9-intel-2.7/pygraphviz/graphviz_wrap.o -L/usr/local/lib/graphviz -L/usr/local/lib/graphviz -lcgraph -lcdt -o build/lib.macosx-10.9-intel-2.7/pygraphviz/_graphviz.so
ld: library not found for -lcgraph
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'cc' failed with exit status 1
Does anybody know how I can fix this?
Make sure your XCode is updated to the latest version and then try this:
xcode-select --install
When prompted install the command line tools. Then try rebuilding.

Resources