Problem compiling emacs 23.4.1 on Ubuntu 20.0.4.2 LTS - emacs

I followed the instructions in INSTALL for dependency installation and configuration. Then, after make, I get these errors:
In file included from ./config.h:1074,
from dispnew.c:21:
dispnew.c: In function ‘update_frame_1’:
./s/gnu-linux.h:164:10: error: ‘FILE’ {aka ‘struct _IO_FILE’} has no member named ‘_pptr’
164 | ((FILE)->_pptr - (FILE)->_pbase)
| ^~
dispnew.c:89:30: note: in expansion of macro ‘GNU_LIBRARY_PENDING_OUTPUT_COUNT’
89 | #define PENDING_OUTPUT_COUNT GNU_LIBRARY_PENDING_OUTPUT_COUNT
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dispnew.c:5384:16: note: in expansion of macro ‘PENDING_OUTPUT_COUNT’
5384 | int outq = PENDING_OUTPUT_COUNT (display_output);
| ^~~~~~~~~~~~~~~~~~~~
./s/gnu-linux.h:164:26: error: ‘FILE’ {aka ‘struct _IO_FILE’} has no member named ‘_pbase’
164 | ((FILE)->_pptr - (FILE)->_pbase)
| ^~
dispnew.c:89:30: note: in expansion of macro ‘GNU_LIBRARY_PENDING_OUTPUT_COUNT’
89 | #define PENDING_OUTPUT_COUNT GNU_LIBRARY_PENDING_OUTPUT_COUNT
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dispnew.c:5384:16: note: in expansion of macro ‘PENDING_OUTPUT_COUNT’
5384 | int outq = PENDING_OUTPUT_COUNT (display_output);
How do I get past these errors?

Related

Cygwin install scipy error on compilation

I am trying to install scipy under cygwin with pip, unfortunately I have some compilation errors! I attach log files. I have searched on web but have found nothing.
thanks
2023-02-11T17:48:15,190 [250/1620] Compiling C++ object scipy/special/_ufuncs_cxx.cpython-39-x86_64-cygwin.dll.p/_faddeeva.cxx.o
2023-02-11T17:48:15,191 FAILED: scipy/special/_ufuncs_cxx.cpython-39-x86_64-cygwin.dll.p/_faddeeva.cxx.o
2023-02-11T17:48:15,192 c++ -Iscipy/special/_ufuncs_cxx.cpython-39-x86_64-cygwin.dll.p -Iscipy/special -I../../scipy/special -I/tmp/pip-build-env-m1hcjhav/overlay/lib/python3.9/site-packages/numpy/core/include -I../../scipy/_lib/boost -Iscipy/_lib -I../../scipy/_lib -I../../scipy/_build_utils/src -I/usr/include/python3.9 -fvisibility=hidden -fvisibility-inlines-hidden -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++14 -O2 -Wno-cpp -MD -MQ scipy/special/_ufuncs_cxx.cpython-39-x86_64-cygwin.dll.p/_faddeeva.cxx.o -MF scipy/special/_ufuncs_cxx.cpython-39-x86_64-cygwin.dll.p/_faddeeva.cxx.o.d -o scipy/special/_ufuncs_cxx.cpython-39-x86_64-cygwin.dll.p/_faddeeva.cxx.o -c ../../scipy/special/_faddeeva.cxx
2023-02-11T17:48:15,193 ../../scipy/special/_faddeeva.cxx: In function ‘npy_cdouble faddeeva_ndtr(npy_cdouble)’:
2023-02-11T17:48:15,194 ../../scipy/special/_faddeeva.cxx:79:10: error: ‘M_SQRT1_2’ was not declared in this scope; did you mean ‘NPY_SQRT1_2’?
2023-02-11T17:48:15,196 79 | z *= M_SQRT1_2;
2023-02-11T17:48:15,199 | ^~~~~~~~~
2023-02-11T17:48:15,200 | NPY_SQRT1_2
2023-02-11T17:48:15,201 ../../scipy/special/_faddeeva.cxx: In function ‘double faddeeva_log_ndtr(double)’:
2023-02-11T17:48:15,202 ../../scipy/special/_faddeeva.cxx:108:18: error: ‘M_SQRT1_2’ was not declared in this scope; did you mean ‘NPY_SQRT1_2’?
2023-02-11T17:48:15,203 108 | double t = x*M_SQRT1_2;
2023-02-11T17:48:15,204 | ^~~~~~~~~
2023-02-11T17:48:15,205 | NPY_SQRT1_2
2023-02-11T17:48:15,206 ../../scipy/special/_faddeeva.cxx: In function ‘npy_cdouble faddeeva_log_ndtr_complex(npy_cdouble)’:
2023-02-11T17:48:15,207 ../../scipy/special/_faddeeva.cxx:130:53: error: ‘M_SQRT1_2’ was not declared in this scope; did you mean ‘NPY_SQRT1_2’?
2023-02-11T17:48:15,208 130 | complex<double> w = -0.5 * Faddeeva::erfc(z*M_SQRT1_2);
2023-02-11T17:48:15,209 | ^~~~~~~~~
2023-02-11T17:48:15,210 | NPY_SQRT1_2
2023-02-11T17:48:15,211 ../../scipy/special/_faddeeva.cxx:136:11: error: ‘M_SQRT1_2’ was not declared in this scope; did you mean ‘NPY_SQRT1_2’?
2023-02-11T17:48:15,212 136 | z *= -M_SQRT1_2;
2023-02-11T17:48:15,218 | ^~~~~~~~~
2023-02-11T17:48:15,219 | NPY_SQRT1_2
2023-02-11T17:48:15,220 ../../scipy/special/_faddeeva.cxx:146:34: error: ‘M_PI’ was not declared in this scope
2023-02-11T17:48:15,221 146 | double im = fmod(mIm_z2, 2.0*M_PI);
2023-02-11T17:48:15,223 | ^~~~
2023-02-11T17:48:15,224 ../../scipy/special/_faddeeva.cxx: In function ‘double faddeeva_voigt_profile(double, double, double)’:
2023-02-11T17:48:15,225 ../../scipy/special/_faddeeva.cxx:177:24: error: ‘M_PI’ was not declared in this scope
2023-02-11T17:48:15,226 177 | return gamma / M_PI / (x*x + gamma*gamma);
2023-02-11T17:48:15,227 | ^~~~
I expect to find a solution to this compilation problem! Since I cannot intervene in the code, I don't have much room for action.

My GPIOs in the overlay file are not defined in devicetree_generated.h, zephyr fails

I am trying to use Zephyr (v.3.2.99) for a small application on the nRF52840 Dev Kit. I set up an overlay file nrf52840dk_nrf52840.overlay that is being read and processed by cmake. I get the devicetree_generated.h but it lacks the definition of the nodes.
Here is my overlay:
/ {
aliases {
pwr0 = &pinpwr0;
eu0 = &pineu0;
psw0 = &pinsw0;
};
pinpwr0: pin_pwr_0 {
gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
label = "power";
};
pineu0: pin_eu_0 {
gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>;
label = "eu";
};
pinsw0: pin_sw_0 {
gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
label = "switch";
};
chosen {
nordic,nus-uart = &uart0;
};
};
My c file:
...
#define PWR_IO DT_ALIAS(pwr0)
#if DT_NODE_HAS_STATUS(PWR_IO, okay)
#define PWR_IO_PIN DT_GPIO_PIN(PWR_IO, gpios)
#else
#error "Cannot find the board"
#define PWR_IO_PIN 0
#endif
static const struct gpio_dt_spec pwr = GPIO_DT_SPEC_GET(PWR_IO, gpios);
...
The error:
zephyr/include/generated/devicetree_generated.h:701:32: error:
'DT_N_S_pin_pwr_0_P_gpios_IDX_0_VAL_pin' undeclared here (not in a
function); did you mean 'DT_N_S_leds_S_led_0_P_gpios_IDX_0_VAL_pin'?
701 | #define DT_N_ALIAS_pwr0 DT_N_S_pin_pwr_0
| ^~~~~~~~~~~~~~~~ F:/ncs/v2.2.0/zephyr/include/zephyr/devicetree.h:3901:9: note: in
definition of macro 'DT_CAT7' 3901 | a1 ## a2 ## a3 ## a4 ##
a5 ## a6 ## a7
| ^~ F:/ncs/v2.2.0/zephyr/include/zephyr/devicetree/gpio.h:164:9: note: in
expansion of macro 'DT_PHA_BY_IDX' 164 |
DT_PHA_BY_IDX(node_id, gpio_pha, idx, pin)
| ^~~~~~~~~~~~~ F:/ncs/v2.2.0/zephyr/include/zephyr/drivers/gpio.h:341:24: note: in
expansion of macro 'DT_GPIO_PIN_BY_IDX' 341 | .pin =
DT_GPIO_PIN_BY_IDX(node_id, prop, idx),
| ^~~~~~~~~~~~~~~~~~ F:/ncs/v2.2.0/zephyr/include/zephyr/drivers/gpio.h:376:9: note: in
expansion of macro 'GPIO_DT_SPEC_GET_BY_IDX' 376 |
GPIO_DT_SPEC_GET_BY_IDX(node_id, prop, 0)
| ^~~~~~~~~~~~~~~~~~~~~~~ ../src/tvunit.c:25:40: note: in expansion of macro 'GPIO_DT_SPEC_GET' 25 | static const struct
gpio_dt_spec pwr = GPIO_DT_SPEC_GET(PWR_IO, gpios);
If I look into the file devicetree_generated.h, the token DT_N_S_pin_pwr_0 is never defined (only referred to in the comments).
What am I doing wrong?
Zephyr's build system is not properly processing the pin_pwr_0 and like nodes as they don't have bindings. Generally, nodes in the devicetree also need bindings to be processed correctly. Since the nodes you are using are just pins/buttons; you should be able to use the generic gpio-keys compatible by adding this to each node: compatible = "gpio-keys"; More on Zephyr's devicetree binding rules can be found here: https://docs.zephyrproject.org/3.2.0/build/dts/bindings.html

Cant install Net::Pcap with cpan/cpanm on Linux

I am trying to install the module Net::Pcap. Here is what I have done:
[nick#void ~]$ cpanm Net::Pcap
--> Working on Net::Pcap
Fetching http://www.cpan.org/authors/id/S/SA/SAPER/Net-Pcap-0.18.tar.gz ... OK
Configuring Net-Pcap-0.18 ... OK
Building and testing Net-Pcap-0.18 ... FAIL
! Installing Net::Pcap failed. See /home/nick/.cpanm/work/1612889779.12603/build.log for details. Retry with --force to force install it.
Here is the build.log file:
[nick#void ~]$ cat /home/nick/.cpanm/work/1612889779.12603/build.log
cpanm (App::cpanminus) 1.7044 on perl 5.032001 built for x86_64-linux
Work directory is /home/nick/.cpanm/work/1612889779.12603
You have make /usr/bin/make
You have /usr/bin/curl
You have /usr/bin/tar: tar (GNU tar) 1.32
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by John Gilmore and Jay Fenlason.
You have /usr/bin/unzip
Searching Net::Pcap () on cpanmetadb ...
--> Working on Net::Pcap
Fetching http://www.cpan.org/authors/id/S/SA/SAPER/Net-Pcap-0.18.tar.gz
-> OK
Unpacking Net-Pcap-0.18.tar.gz
Entering Net-Pcap-0.18
Checking configure dependencies from META.json
Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (7.44)
Configuring Net-Pcap-0.18
Running Makefile.PL
looking for -lpcap... yes
checking for pcap_lib_version() in -lpcap... yes
detecting available functions... ok
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for Net::Pcap
Writing MYMETA.yml and MYMETA.json
-> OK
Checking dependencies from MYMETA.json ...
Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.44)
Checking if you have Test::More 0.45 ... Yes (1.302175)
Checking if you have Socket 0 ... Yes (2.029)
Checking if you have XSLoader 0 ... Yes (0.30)
Checking if you have Carp 0 ... Yes (1.50)
Checking if you have Sys::Hostname 0 ... Yes (1.23)
Building and testing Net-Pcap-0.18
cp Pcap.pm blib/lib/Net/Pcap.pm
Running Mkbootstrap for Pcap ()
chmod 644 "Pcap.bs"
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Pcap.bs blib/arch/auto/Net/Pcap/Pcap.bs 644
"/usr/bin/perl" "/usr/share/perl5/core_perl/ExtUtils/xsubpp" -typemap '/usr/share/perl5/core_perl/ExtUtils/typemap' -typemap '/home/nick/.cpanm/work/1612889779.12603/Net-Pcap-0.18/typemap' Pcap.xs > Pcap.xsc
mv Pcap.xsc Pcap.c
cc -c -fstack-clash-protection -D_FORTIFY_SOURCE=2 -mtune=generic -O2 -pipe -g -D_FILE_OFFSET_BITS=64 -DLARGE_FILE_SUPPORT64 -Wall -fstack-clash-protection -D_FORTIFY_SOURCE=2 -mtune=generic -O2 -pipe -g -D_FILE_OFFSET_BITS=64 -DLARGE_FILE_SUPPORT64 -DVERSION=\"0.18\" -DXS_VERSION=\"0.18\" -fPIC "-I/usr/lib/perl5/core_perl/CORE" -DHAVE_BLANK -DHAVE_PCAP_LIB_VERSION -DHAVE_PCAP_BREAKLOOP -DHAVE_PCAP_COMPILE_NOPCAP -DHAVE_PCAP_DATALINK_NAME_TO_VAL -DHAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION -DHAVE_PCAP_DATALINK_VAL_TO_NAME -DHAVE_PCAP_DUMP_FILE -DHAVE_PCAP_DUMP_FLUSH -DHAVE_PCAP_FINDALLDEVS -DHAVE_PCAP_GETNONBLOCK -DHAVE_PCAP_GET_SELECTABLE_FD -DHAVE_PCAP_LIB_VERSION -DHAVE_PCAP_NEXT_EX -DHAVE_PCAP_OFFLINE_FILTER -DHAVE_PCAP_OPEN_DEAD -DHAVE_PCAP_SENDPACKET -DHAVE_PCAP_SETNONBLOCK -DHAVE_PCAP_SET_DATALINK Pcap.c
In file included from Pcap.xs:43:
stubs.inc:187:2: warning: #warning "the function pcap_list_datalinks() is not available" [-Wcpp]
187 | #warning "the function pcap_list_datalinks() is not available"
| ^~~~~~~
stubs.inc:322:2: warning: #warning "the function pcap_createsrcstr() is not available" [-Wcpp]
322 | #warning "the function pcap_createsrcstr() is not available"
| ^~~~~~~
stubs.inc:337:2: warning: #warning "the function pcap_parsesrcstr() is not available" [-Wcpp]
337 | #warning "the function pcap_parsesrcstr() is not available"
| ^~~~~~~
stubs.inc:352:2: warning: #warning "the function pcap_open() is not available" [-Wcpp]
352 | #warning "the function pcap_open() is not available"
| ^~~~~~~
stubs.inc:357:8: error: redefinition of 'struct pcap_rmtauth'
357 | struct pcap_rmtauth {
| ^~~~~~~~~~~~
In file included from /usr/include/pcap.h:43,
from Pcap.xs:32:
/usr/include/pcap/pcap.h:1036:8: note: originally defined here
1036 | struct pcap_rmtauth
| ^~~~~~~~~~~~
In file included from Pcap.xs:43:
stubs.inc:363:10: error: conflicting types for 'pcap_open'
363 | pcap_t * pcap_open(const char *source, int snaplen, int flags, int read_timeout, struct pcap_rmtauth *auth, char *err);
| ^~~~~~~~~
In file included from /usr/include/pcap.h:43,
from Pcap.xs:32:
/usr/include/pcap/pcap.h:1084:18: note: previous declaration of 'pcap_open' was here
1084 | PCAP_API pcap_t *pcap_open(const char *source, int snaplen, int flags,
| ^~~~~~~~~
In file included from Pcap.xs:43:
stubs.inc:364:10: error: conflicting types for 'pcap_open'
364 | pcap_t * pcap_open(const char *source, int snaplen, int flags, int read_timeout, struct pcap_rmtauth *auth, char *err) {
| ^~~~~~~~~
In file included from /usr/include/pcap.h:43,
from Pcap.xs:32:
/usr/include/pcap/pcap.h:1084:18: note: previous declaration of 'pcap_open' was here
1084 | PCAP_API pcap_t *pcap_open(const char *source, int snaplen, int flags,
| ^~~~~~~~~
In file included from Pcap.xs:43:
stubs.inc:373:2: warning: #warning "the function pcap_setbuff() is not available" [-Wcpp]
373 | #warning "the function pcap_setbuff() is not available"
| ^~~~~~~
stubs.inc:388:2: warning: #warning "the function pcap_setuserbuffer() is not available" [-Wcpp]
388 | #warning "the function pcap_setuserbuffer() is not available"
| ^~~~~~~
stubs.inc:403:2: warning: #warning "the function pcap_setmode() is not available" [-Wcpp]
403 | #warning "the function pcap_setmode() is not available"
| ^~~~~~~
stubs.inc:418:2: warning: #warning "the function pcap_setmintocopy() is not available" [-Wcpp]
418 | #warning "the function pcap_setmintocopy() is not available"
| ^~~~~~~
stubs.inc:433:2: warning: #warning "the function pcap_sendqueue_alloc() is not available" [-Wcpp]
433 | #warning "the function pcap_sendqueue_alloc() is not available"
| ^~~~~~~
stubs.inc:455:2: warning: #warning "the function pcap_sendqueue_destroy() is not available" [-Wcpp]
455 | #warning "the function pcap_sendqueue_destroy() is not available"
| ^~~~~~~
stubs.inc:469:2: warning: #warning "the function pcap_sendqueue_queue() is not available" [-Wcpp]
469 | #warning "the function pcap_sendqueue_queue() is not available"
| ^~~~~~~
stubs.inc:484:2: warning: #warning "the function pcap_sendqueue_transmit() is not available" [-Wcpp]
484 | #warning "the function pcap_sendqueue_transmit() is not available"
| ^~~~~~~
stubs.inc:499:2: warning: #warning "the function pcap_event() is not available" [-Wcpp]
499 | #warning "the function pcap_event() is not available"
| ^~~~~~~
stubs.inc:514:2: warning: #warning "the function pcap_setsampling() is not available" [-Wcpp]
514 | #warning "the function pcap_setsampling() is not available"
| ^~~~~~~
stubs.inc:519:8: error: redefinition of 'struct pcap_samp'
519 | struct pcap_samp {
| ^~~~~~~~~
In file included from /usr/include/pcap.h:43,
from Pcap.xs:32:
/usr/include/pcap/pcap.h:1168:8: note: originally defined here
1168 | struct pcap_samp
| ^~~~~~~~~
In file included from Pcap.xs:43:
stubs.inc:524:19: error: conflicting types for 'pcap_setsampling'
524 | struct pcap_samp *pcap_setsampling(pcap_t *p);
| ^~~~~~~~~~~~~~~~
In file included from /usr/include/pcap.h:43,
from Pcap.xs:32:
/usr/include/pcap/pcap.h:1186:28: note: previous declaration of 'pcap_setsampling' was here
1186 | PCAP_API struct pcap_samp *pcap_setsampling(pcap_t *p);
| ^~~~~~~~~~~~~~~~
In file included from Pcap.xs:43:
stubs.inc:525:19: error: conflicting types for 'pcap_setsampling'
525 | struct pcap_samp *pcap_setsampling(pcap_t *p) {
| ^~~~~~~~~~~~~~~~
In file included from /usr/include/pcap.h:43,
from Pcap.xs:32:
/usr/include/pcap/pcap.h:1186:28: note: previous declaration of 'pcap_setsampling' was here
1186 | PCAP_API struct pcap_samp *pcap_setsampling(pcap_t *p);
| ^~~~~~~~~~~~~~~~
Pcap.xs: In function 'XS_Net__Pcap_lookupdev':
Pcap.xs:108:4: warning: 'pcap_lookupdev' is deprecated: use 'pcap_findalldevs' and use the first device [-Wdeprecated-declarations]
108 | RETVAL = pcap_lookupdev(errbuf);
| ^~~~~~
In file included from /usr/include/pcap.h:43,
from Pcap.xs:32:
/usr/include/pcap/pcap.h:394:16: note: declared here
394 | PCAP_API char *pcap_lookupdev(char *)
| ^~~~~~~~~~~~~~
Pcap.xs: In function 'XS_Net__Pcap_findalldevs_xs':
Pcap.xs:222:21: warning: 'pcap_lookupdev' is deprecated: use 'pcap_findalldevs' and use the first device [-Wdeprecated-declarations]
222 | char *dev = pcap_lookupdev(errbuf);
| ^~~~
In file included from /usr/include/pcap.h:43,
from Pcap.xs:32:
/usr/include/pcap/pcap.h:394:16: note: declared here
394 | PCAP_API char *pcap_lookupdev(char *)
| ^~~~~~~~~~~~~~
Pcap.c: In function 'XS_Net__Pcap_strerror':
Pcap.c:1703:9: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
1703 | RETVAL = pcap_strerror(error);
| ^
Pcap.xs: In function 'XS_Net__Pcap_getevent':
Pcap.xs:1038:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1038 | h = (unsigned int) pcap_getevent(p);
| ^
make: *** [Makefile:344: Pcap.o] Error 1
-> FAIL Installing Net::Pcap failed. See /home/nick/.cpanm/work/1612889779.12603/build.log for details. Retry with --force to force install it.
Ok, maybe regular cpan will work.
[nick#void ~]$ cpan Net::Pcap
Loading internal logger. Log::Log4perl recommended for better logging
Reading '/home/nick/.cpan/Metadata'
Database was generated on Tue, 09 Feb 2021 14:56:08 GMT
Running install for module 'Net::Pcap'
Checksum for /home/nick/.cpan/sources/authors/id/S/SA/SAPER/Net-Pcap-0.18.tar.gz ok
'YAML' not installed, will not store persistent state
Configuring S/SA/SAPER/Net-Pcap-0.18.tar.gz with Makefile.PL
looking for -lpcap... yes
checking for pcap_lib_version() in -lpcap... yes
detecting available functions... ok
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for Net::Pcap
Writing MYMETA.yml and MYMETA.json
SAPER/Net-Pcap-0.18.tar.gz
/usr/bin/perl Makefile.PL INSTALLDIRS=site -- OK
Running make for S/SA/SAPER/Net-Pcap-0.18.tar.gz
cp Pcap.pm blib/lib/Net/Pcap.pm
Running Mkbootstrap for Pcap ()
chmod 644 "Pcap.bs"
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Pcap.bs blib/arch/auto/Net/Pcap/Pcap.bs 644
"/usr/bin/perl" "/usr/share/perl5/core_perl/ExtUtils/xsubpp" -typemap '/usr/share/perl5/core_perl/ExtUtils/typemap' -typemap '/home/nick/.cpan/build/Net-Pcap-0.18-7/typemap' Pcap.xs > Pcap.xsc
mv Pcap.xsc Pcap.c
cc -c -fstack-clash-protection -D_FORTIFY_SOURCE=2 -mtune=generic -O2 -pipe -g -D_FILE_OFFSET_BITS=64 -DLARGE_FILE_SUPPORT64 -Wall -fstack-clash-protection -D_FORTIFY_SOURCE=2 -mtune=generic -O2 -pipe -g -D_FILE_OFFSET_BITS=64 -DLARGE_FILE_SUPPORT64 -DVERSION=\"0.18\" -DXS_VERSION=\"0.18\" -fPIC "-I/usr/lib/perl5/core_perl/CORE" -DHAVE_BLANK -DHAVE_PCAP_LIB_VERSION -DHAVE_PCAP_BREAKLOOP -DHAVE_PCAP_COMPILE_NOPCAP -DHAVE_PCAP_DATALINK_NAME_TO_VAL -DHAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION -DHAVE_PCAP_DATALINK_VAL_TO_NAME -DHAVE_PCAP_DUMP_FILE -DHAVE_PCAP_DUMP_FLUSH -DHAVE_PCAP_FINDALLDEVS -DHAVE_PCAP_GETNONBLOCK -DHAVE_PCAP_GET_SELECTABLE_FD -DHAVE_PCAP_LIB_VERSION -DHAVE_PCAP_NEXT_EX -DHAVE_PCAP_OFFLINE_FILTER -DHAVE_PCAP_OPEN_DEAD -DHAVE_PCAP_SENDPACKET -DHAVE_PCAP_SETNONBLOCK -DHAVE_PCAP_SET_DATALINK Pcap.c
In file included from Pcap.xs:43:
stubs.inc:187:2: warning: #warning "the function pcap_list_datalinks() is not available" [-Wcpp]
187 | #warning "the function pcap_list_datalinks() is not available"
| ^~~~~~~
stubs.inc:322:2: warning: #warning "the function pcap_createsrcstr() is not available" [-Wcpp]
322 | #warning "the function pcap_createsrcstr() is not available"
| ^~~~~~~
stubs.inc:337:2: warning: #warning "the function pcap_parsesrcstr() is not available" [-Wcpp]
337 | #warning "the function pcap_parsesrcstr() is not available"
| ^~~~~~~
stubs.inc:352:2: warning: #warning "the function pcap_open() is not available" [-Wcpp]
352 | #warning "the function pcap_open() is not available"
| ^~~~~~~
stubs.inc:357:8: error: redefinition of 'struct pcap_rmtauth'
357 | struct pcap_rmtauth {
| ^~~~~~~~~~~~
In file included from /usr/include/pcap.h:43,
from Pcap.xs:32:
/usr/include/pcap/pcap.h:1036:8: note: originally defined here
1036 | struct pcap_rmtauth
| ^~~~~~~~~~~~
In file included from Pcap.xs:43:
stubs.inc:363:10: error: conflicting types for 'pcap_open'
363 | pcap_t * pcap_open(const char *source, int snaplen, int flags, int read_timeout, struct pcap_rmtauth *auth, char *err);
| ^~~~~~~~~
In file included from /usr/include/pcap.h:43,
from Pcap.xs:32:
/usr/include/pcap/pcap.h:1084:18: note: previous declaration of 'pcap_open' was here
1084 | PCAP_API pcap_t *pcap_open(const char *source, int snaplen, int flags,
| ^~~~~~~~~
In file included from Pcap.xs:43:
stubs.inc:364:10: error: conflicting types for 'pcap_open'
364 | pcap_t * pcap_open(const char *source, int snaplen, int flags, int read_timeout, struct pcap_rmtauth *auth, char *err) {
| ^~~~~~~~~
In file included from /usr/include/pcap.h:43,
from Pcap.xs:32:
/usr/include/pcap/pcap.h:1084:18: note: previous declaration of 'pcap_open' was here
1084 | PCAP_API pcap_t *pcap_open(const char *source, int snaplen, int flags,
| ^~~~~~~~~
In file included from Pcap.xs:43:
stubs.inc:373:2: warning: #warning "the function pcap_setbuff() is not available" [-Wcpp]
373 | #warning "the function pcap_setbuff() is not available"
| ^~~~~~~
stubs.inc:388:2: warning: #warning "the function pcap_setuserbuffer() is not available" [-Wcpp]
388 | #warning "the function pcap_setuserbuffer() is not available"
| ^~~~~~~
stubs.inc:403:2: warning: #warning "the function pcap_setmode() is not available" [-Wcpp]
403 | #warning "the function pcap_setmode() is not available"
| ^~~~~~~
stubs.inc:418:2: warning: #warning "the function pcap_setmintocopy() is not available" [-Wcpp]
418 | #warning "the function pcap_setmintocopy() is not available"
| ^~~~~~~
stubs.inc:433:2: warning: #warning "the function pcap_sendqueue_alloc() is not available" [-Wcpp]
433 | #warning "the function pcap_sendqueue_alloc() is not available"
| ^~~~~~~
stubs.inc:455:2: warning: #warning "the function pcap_sendqueue_destroy() is not available" [-Wcpp]
455 | #warning "the function pcap_sendqueue_destroy() is not available"
| ^~~~~~~
stubs.inc:469:2: warning: #warning "the function pcap_sendqueue_queue() is not available" [-Wcpp]
469 | #warning "the function pcap_sendqueue_queue() is not available"
| ^~~~~~~
stubs.inc:484:2: warning: #warning "the function pcap_sendqueue_transmit() is not available" [-Wcpp]
484 | #warning "the function pcap_sendqueue_transmit() is not available"
| ^~~~~~~
stubs.inc:499:2: warning: #warning "the function pcap_event() is not available" [-Wcpp]
499 | #warning "the function pcap_event() is not available"
| ^~~~~~~
stubs.inc:514:2: warning: #warning "the function pcap_setsampling() is not available" [-Wcpp]
514 | #warning "the function pcap_setsampling() is not available"
| ^~~~~~~
stubs.inc:519:8: error: redefinition of 'struct pcap_samp'
519 | struct pcap_samp {
| ^~~~~~~~~
In file included from /usr/include/pcap.h:43,
from Pcap.xs:32:
/usr/include/pcap/pcap.h:1168:8: note: originally defined here
1168 | struct pcap_samp
| ^~~~~~~~~
In file included from Pcap.xs:43:
stubs.inc:524:19: error: conflicting types for 'pcap_setsampling'
524 | struct pcap_samp *pcap_setsampling(pcap_t *p);
| ^~~~~~~~~~~~~~~~
In file included from /usr/include/pcap.h:43,
from Pcap.xs:32:
/usr/include/pcap/pcap.h:1186:28: note: previous declaration of 'pcap_setsampling' was here
1186 | PCAP_API struct pcap_samp *pcap_setsampling(pcap_t *p);
| ^~~~~~~~~~~~~~~~
In file included from Pcap.xs:43:
stubs.inc:525:19: error: conflicting types for 'pcap_setsampling'
525 | struct pcap_samp *pcap_setsampling(pcap_t *p) {
| ^~~~~~~~~~~~~~~~
In file included from /usr/include/pcap.h:43,
from Pcap.xs:32:
/usr/include/pcap/pcap.h:1186:28: note: previous declaration of 'pcap_setsampling' was here
1186 | PCAP_API struct pcap_samp *pcap_setsampling(pcap_t *p);
| ^~~~~~~~~~~~~~~~
Pcap.xs: In function 'XS_Net__Pcap_lookupdev':
Pcap.xs:108:4: warning: 'pcap_lookupdev' is deprecated: use 'pcap_findalldevs' and use the first device [-Wdeprecated-declarations]
108 | RETVAL = pcap_lookupdev(errbuf);
| ^~~~~~
In file included from /usr/include/pcap.h:43,
from Pcap.xs:32:
/usr/include/pcap/pcap.h:394:16: note: declared here
394 | PCAP_API char *pcap_lookupdev(char *)
| ^~~~~~~~~~~~~~
Pcap.xs: In function 'XS_Net__Pcap_findalldevs_xs':
Pcap.xs:222:21: warning: 'pcap_lookupdev' is deprecated: use 'pcap_findalldevs' and use the first device [-Wdeprecated-declarations]
222 | char *dev = pcap_lookupdev(errbuf);
| ^~~~
In file included from /usr/include/pcap.h:43,
from Pcap.xs:32:
/usr/include/pcap/pcap.h:394:16: note: declared here
394 | PCAP_API char *pcap_lookupdev(char *)
| ^~~~~~~~~~~~~~
Pcap.c: In function 'XS_Net__Pcap_strerror':
Pcap.c:1703:9: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
1703 | RETVAL = pcap_strerror(error);
| ^
Pcap.xs: In function 'XS_Net__Pcap_getevent':
Pcap.xs:1038:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1038 | h = (unsigned int) pcap_getevent(p);
| ^
make: *** [Makefile:345: Pcap.o] Error 1
SAPER/Net-Pcap-0.18.tar.gz
/usr/bin/make -- NOT OK
It doesn't.
This is my first time ever installing a cpan module so I tried to install a random module, but it worked just fine.
[nick#void ~]$ cpanm Regexp::Debugger
--> Working on Regexp::Debugger
Fetching http://www.cpan.org/authors/id/D/DC/DCONWAY/Regexp-Debugger-0.002006.tar.gz ... OK
Configuring Regexp-Debugger-0.002006 ... OK
Building and testing Regexp-Debugger-0.002006 ... OK
Successfully installed Regexp-Debugger-0.002006
1 distribution installed
It would make sense that libpcap would be a dependency here, but I have it installed already.
[nick#void ~]$ sudo xbps-install libpcap
Package `libpcap' already installed.
I would appreciate help.
The problem is with my version of libpcap. This package appears to be broken on libpcap 1.10 and 1.9.1. After installing libpcap 1.8 the package built fine.

Yocto(Zeus) Perf Build fails

I want to build perf on Yocto (Zeus branch), for an image without python2. The recipe is this one:
https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-kernel/perf/perf.bb?h=zeus-22.0.4
Running this recipe yields this error:
| ERROR: Execution of '/home/yocto/poseidon-build/tmp/work/imx6dl_poseidon_revb-poseidon-linux-gnueabi/perf/1.0-r9/temp/run.do_compile.19113' failed with exit code 1:
| make: Entering directory '/home/yocto/poseidon-build/tmp/work/imx6dl_poseidon_revb-poseidon-linux-gnueabi/perf/1.0-r9/perf-1.0/tools/perf'
| BUILD: Doing 'make -j4' parallel build
| Warning: arch/x86/include/asm/disabled-features.h differs from kernel
| Warning: arch/x86/include/asm/required-features.h differs from kernel
| Warning: arch/x86/include/asm/cpufeatures.h differs from kernel
| Warning: arch/arm/include/uapi/asm/perf_regs.h differs from kernel
| Warning: arch/arm64/include/uapi/asm/perf_regs.h differs from kernel
| Warning: arch/powerpc/include/uapi/asm/perf_regs.h differs from kernel
| Warning: arch/x86/include/uapi/asm/perf_regs.h differs from kernel
| Warning: arch/x86/include/uapi/asm/kvm.h differs from kernel
| Warning: arch/x86/include/uapi/asm/kvm_perf.h differs from kernel
| Warning: arch/x86/include/uapi/asm/svm.h differs from kernel
| Warning: arch/x86/include/uapi/asm/vmx.h differs from kernel
| Warning: arch/powerpc/include/uapi/asm/kvm.h differs from kernel
| Warning: arch/s390/include/uapi/asm/kvm.h differs from kernel
| Warning: arch/s390/include/uapi/asm/kvm_perf.h differs from kernel
| Warning: arch/s390/include/uapi/asm/sie.h differs from kernel
| Warning: arch/arm/include/uapi/asm/kvm.h differs from kernel
| Warning: arch/arm64/include/uapi/asm/kvm.h differs from kernel
| Warning: arch/x86/lib/memcpy_64.S differs from kernel
| Warning: arch/x86/lib/memset_64.S differs from kernel
|
| Auto-detecting system features:
| ... dwarf: [ on ]
| ... dwarf_getlocations: [ on ]
| ... glibc: [ on ]
| ... gtk2: [ OFF ]
| ... libaudit: [ OFF ]
| ... libbfd: [ on ]
| ... libelf: [ on ]
| ... libnuma: [ OFF ]
| ... numa_num_possible_cpus: [ OFF ]
| ... libperl: [ OFF ]
| ... libpython: [ on ]
| ... libslang: [ on ]
| ... libcrypto: [ on ]
| ... libunwind: [ on ]
| ... libdw-dwarf-unwind: [ on ]
| ... zlib: [ on ]
| ... lzma: [ on ]
| ... get_cpuid: [ OFF ]
| ... bpf: [ on ]
|
| Makefile.config:352: DWARF support is off, BPF prologue is disabled
| Makefile.config:547: Missing perl devel files. Disabling perl scripting support, please install perl-ExtUtils-Embed/libperl-dev
| Makefile.config:594: Python 3 is not yet supported; please set
| Makefile.config:595: PYTHON and/or PYTHON_CONFIG appropriately.
| Makefile.config:596: If you also have Python 2 installed, then
| Makefile.config:597: try something like:
| Makefile.config:598:
| Makefile.config:599: make PYTHON=python2
| Makefile.config:600:
| Makefile.config:601: Otherwise, disable Python support entirely:
| Makefile.config:602:
| Makefile.config:603: make NO_LIBPYTHON=1
| Makefile.config:604:
| Makefile.config:605: *** . Stop.
| Makefile.perf:205: recipe for target 'sub-make' failed
| make[1]: *** [sub-make] Error 2
| Makefile:68: recipe for target 'all' failed
| make: *** [all] Error 2
| make: Leaving directory '/home/yocto/poseidon-build/tmp/work/imx6dl_poseidon_revb-poseidon-linux-gnueabi/perf/1.0-r9/perf-1.0/tools/perf'
| WARNING: exit code 1 from a shell command.
|
ERROR: Task (/home/yocto/sources/poky/meta/recipes-kernel/perf/perf.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 1947 tasks of which 1946 didn't need to be rerun and 1 failed.
Looking at the recipe, libpython seems to be set?:
PACKAGECONFIG ??= "scripting tui libunwind"
PACKAGECONFIG[dwarf] = ",NO_DWARF=1"
PACKAGECONFIG[scripting] = ",NO_LIBPERL=1 NO_LIBPYTHON=1,perl python3"
# gui support was added with kernel 3.6.35
# since 3.10 libnewt was replaced by slang
# to cover a wide range of kernel we add both dependencies
PACKAGECONFIG[tui] = ",NO_NEWT=1,libnewt slang"
PACKAGECONFIG[libunwind] = ",NO_LIBUNWIND=1 NO_LIBDW_DWARF_UNWIND=1,libunwind"
PACKAGECONFIG[libnuma] = ",NO_LIBNUMA=1"
PACKAGECONFIG[systemtap] = ",NO_SDT=1,systemtap"
PACKAGECONFIG[jvmti] = ",NO_JVMTI=1"
# libaudit support would need scripting to be enabled
PACKAGECONFIG[audit] = ",NO_LIBAUDIT=1,audit"
PACKAGECONFIG[manpages] = ",,xmlto-native asciidoc-native"
Why does it not pick up the flag?
PACKAGECONFIG has scripting in it by default.
PACKAGECONFIG options are defined as following:
PACKAGECONFIG[f1] = "--with-f1, \
--without-f1, \
build-deps-for-f1, \
runtime-deps-for-f1, \
runtime-recommends-for-f1, \
packageconfig-conflicts-for-f1 \
"
PACKAGECONFIG[scripting] is set to ",NO_LIBPERL=1 NO_LIBPYTHON=1,perl python3". See the first comma here? It means that what is defined after is when scripting is not selected.
So if you do not want python dependency to be pulled, just set PACKAGECONFIG to a value without scripting in it.
Though I'm actually surprised the default does not build, that's definitely something that is tested by autobuilders. There's probably something else going on?
c.f.: https://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#var-PACKAGECONFIG

What does error when compiling drivers for wn722n mean?

I am trying to install drivers for wireless adapter wn722n on kali linux.
Following TP link manual:https://static.tp-link.com/2018/201812/20181207/Installation%20Guide%20for%20Linux.pdf
I get a lot of errors at the make stage that I don't understand:
root#kali:~/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222# make
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.5.0-kali2-amd64/build M=/root/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222 modules
make[1]: Entering directory '/usr/src/linux-headers-5.5.0-kali2-amd64'
CC [M] /root/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222/core/rtw_cmd.o
In file included from /root/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/osdep_service.h:46,
from /root/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/drv_types.h:32,
from /root/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222/core/rtw_cmd.c:22:
/root/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/osdep_service_linux.h: In function ‘_init_timer’:
/root/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/osdep_service_linux.h:288:8: error: ‘_timer’ {aka ‘struct timer_list’} has no member named ‘data’
288 | ptimer->data = (unsigned long)cntx;
| ^~
/root/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/osdep_service_linux.h:289:2: error: implicit declaration of function ‘init_timer’; did you mean ‘_init_timer’? [-Werror=implicit-function-declaration]
289 | init_timer(ptimer);
| ^~~~~~~~~~
| _init_timer
In file included from /root/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/drv_types.h:35,
from /root/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222/core/rtw_cmd.c:22:
/root/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/wifi.h: At top level:
/root/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/wifi.h:1012: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
1012 | #define IEEE80211_MAX_AMPDU_BUF 0x40
|
In file included from /root/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/osdep_service_linux.h:86,
from /root/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/osdep_service.h:46,
from /root/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/drv_types.h:32,
from /root/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222/core/rtw_cmd.c:22:
/usr/src/linux-headers-5.5.0-kali2-common/include/linux/ieee80211.h:1451: note: this is the location of the previous definition
1451 | #define IEEE80211_MAX_AMPDU_BUF 0x100
|
cc1: some warnings being treated as errors
make[3]: *** [/usr/src/linux-headers-5.5.0-kali2-common/scripts/Makefile.build:271: /root/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222/core/rtw_cmd.o] Error 1
make[2]: *** [/usr/src/linux-headers-5.5.0-kali2-common/Makefile:1707: /root/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222] Error 2
make[1]: *** [/usr/src/linux-headers-5.5.0-kali2-common/Makefile:179: sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.5.0-kali2-amd64'
make: *** [Makefile:1911: modules] Error 2
Anyone has an idea what those mean?