Cygwin install scipy error on compilation - scipy

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.

Related

Problem compiling emacs 23.4.1 on Ubuntu 20.0.4.2 LTS

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?

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.

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?

Cannot compile MEX LAPACK example

Summary
I am trying to write some MEX files that use LAPACK, and I thought I'd start by looking through the examples provided by MathWorks.
However, I am having some trouble compiling them. After copying the matrixDivide.c example from [MATLAB root]/extern/examples/refbook into a working directory, I tried to build a mex file, but it failed with error undefined reference to `dgesv_' (where dgesv is the name of the LAPACK routine being called).
I was able to build a different mex example (timestwo.c) that doesn't use LAPACK.
So what's going on? What's the deal with the trailing underscore? What about this memcpy warning?
More info
I think this is fairly similar to the issues encountered by this user:
How can I use CLAPACK,BLAS or LAPACK in a mex file?
I've tried this with MATLAB R2013b and R2014b. I am running on 64-bit Linux (RHEL 6) and my compiler is gcc 4.4.7 (which is not the MathWorks recommended version, but is the newest version I can get).
Here are the relevant portions of the code I'm trying to compile:
1 /*=========================================================
2 * matrixDivide.c - Example for illustrating how to use
3 * LAPACK within a C MEX-file.
4 *
5 * X = matrixDivide(A,B) computes the solution to a
6 * system of linear equations A * X = B
7 * using LAPACK routine DGESV, where
8 * A is an N-by-N matrix
9 * X and B are N-by-1 matrices.
10 *
11 * This is a MEX-file for MATLAB.
12 * Copyright 2009-2010 The MathWorks, Inc.
13 *=======================================================*/
14 /* $Revision: 1.1.6.3 $ $Date: 2011/01/28 18:11:56 $ */
15
16 #if !defined(_WIN32)
17 #define dgesv dgesv_
18 #endif
19
20 #include "mex.h"
21 #include "lapack.h"
22
23 void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
24 {
[ snip ]
73 /* Call LAPACK */
74 dgesv(&m,&n,A2,&m,iPivot,B2,&p,&info);
75 /* plhs[0] now holds X */
76
77 mxDestroyArray(Awork);
78 mxDestroyArray(mxPivot);
79 }
Here is the output of the failed mex build:
>> mex -v -largeArrayDims matrixDivide.c
-> mexopts.sh sourced from directory (DIR = $MATLAB/bin)
FILE = /sw/matlab/R2013b/bin/mexopts.sh
----------------------------------------------------------------
-> MATLAB = /sw/matlab/R2013b
-> CC = gcc
-> CC flags:
CFLAGS = -ansi -D_GNU_SOURCE -fexceptions -fPIC -fno-omit-frame-pointer -pthread
CDEBUGFLAGS = -g
COPTIMFLAGS = -O -DNDEBUG
CLIBS = -Wl,-rpath-link,/sw/matlab/R2013b/bin/glnxa64 -L/sw/matlab/R2013b/bin/glnxa64 -lmx -lmex -lmat -lm -lstdc++
arguments =
-> CXX = g++
-> CXX flags:
CXXFLAGS = -ansi -D_GNU_SOURCE -fPIC -fno-omit-frame-pointer -pthread
CXXDEBUGFLAGS = -g
CXXOPTIMFLAGS = -O -DNDEBUG
CXXLIBS = -Wl,-rpath-link,/sw/matlab/R2013b/bin/glnxa64 -L/sw/matlab/R2013b/bin/glnxa64 -lmx -lmex -lmat -lm
arguments =
-> FC = gfortran
-> FC flags:
FFLAGS = -fexceptions -fbackslash -fPIC -fno-omit-frame-pointer
FDEBUGFLAGS = -g
FOPTIMFLAGS = -O
FLIBS = -Wl,-rpath-link,/sw/matlab/R2013b/bin/glnxa64 -L/sw/matlab/R2013b/bin/glnxa64 -lmx -lmex -lmat -lm
arguments =
-> LD = gcc
-> Link flags:
LDFLAGS = -pthread -shared -Wl,--version-script,/sw/matlab/R2013b/extern/lib/glnxa64/mexFunction.map -Wl,--no-undefined
LDDEBUGFLAGS = -g
LDOPTIMFLAGS = -O
LDEXTENSION = .mexa64
arguments =
-> LDCXX =
-> Link flags:
LDCXXFLAGS =
LDCXXDEBUGFLAGS =
LDCXXOPTIMFLAGS =
LDCXXEXTENSION =
arguments =
----------------------------------------------------------------
-> gcc -c -I/sw/matlab/R2013b/extern/include -I/sw/matlab/R2013b/simulink/include -DMATLAB_MEX_FILE -ansi -D_GNU_SOURCE -fexceptions -fPIC -fno-omit-frame-pointer -pthread -O -DNDEBUG "matrixDivide.c"
In file included from matrixDivide.c:21:
/sw/matlab/R2013b/extern/include/lapack.h:6907:1: warning: "dgesv" redefined
matrixDivide.c:17:1: warning: this is the location of the previous definition
matrixDivide.c: In function `mexFunction':
matrixDivide.c:64: warning: incompatible implicit declaration of built-in function ?memcpy?
-> gcc -O -pthread -shared -Wl,--version-script,/sw/matlab/R2013b/extern/lib/glnxa64/mexFunction.map -Wl,--no-undefined -o "matrixDivide.mexa64" matrixDivide.o -Wl,-rpath-link,/sw/matlab/R2013b/bin/glnxa64 -L/sw/matlab/R2013b/bin/glnxa64 -lmx -lmex -lmat -lm -lstdc++
matrixDivide.o: In function `mexFunction':
matrixDivide.c:(.text+0x1c6): undefined reference to `dgesv_'
collect2: ld returned 1 exit status
mex: link of ' "matrixDivide.mexa64"' failed.
After some more messing around, I figured out my (rather elementary) mistake.
You need to specify the -lmwlapack option (and/or -lmwblas, as appropriate) to the linker:
mex -largeArrayDims -lmwlapack matrixDivide.c
It even says so on the MathWorks page I was trying to follow along on. RTFM!

not able to build mod_tile on openSUSE

i tried to build the mod_tile as in the link
then i was getting the same error
and tried came got the fix from this forum
i exported these
export CXXFLAGS="$(mapnik-config --cflags)"
export LDFLAGS="$(mapnik-config --ldflags)"
adding #include at the top of src/gen_tile.cpp
and changed the Makefile with --std=gnu++11
and i'm new to the linux and the cpp
Making all in iniparser3.0b
make[1]: Entering directory `/root/src/mod_tile/iniparser3.0b'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/root/src/mod_tile/iniparser3.0b'
make[1]: Entering directory `/root/src/mod_tile'
depbase=`echo src/gen_tile.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
g++ -DHAVE_CONFIG_H -I. -I./includes -I/usr/include/freetype2 -I/usr/local/include -I/usr/local/include/mapnik/agg -I/opt/PostgreSQL/9.3/include -I/usr/include -I/usr/include/freetype2 -I/usr/include/libxml2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/libpng12 -I/usr/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng12 -DSYSTEM_LIBINIPARSER=0 -I/usr/local/include -I/usr/local/include/mapnik/agg -I/opt/PostgreSQL/9.3/include -I/usr/include -I/usr/include/freetype2 -I/usr/include/libxml2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/libpng12 -DSHAPE_MEMORY_MAPPED_FILE -DBIGINT -DBOOST_REGEX_HAS_ICU -DHAVE_JPEG -DMAPNIK_USE_PROJ4 -DHAVE_PNG -DHAVE_TIFF -DLINUX -DMAPNIK_THREADSAFE -DBOOST_SPIRIT_NO_PREDEFINED_TERMINALS=1 -DBOOST_PHOENIX_NO_PREDEFINED_TERMINALS=1 -DBOOST_SPIRIT_USE_PHOENIX_V3=1 -DNDEBUG -DHAVE_CAIRO -DGRID_RENDERER -DHAVE_LIBXML2 -std=c++11 -Wall -Wsign-compare -pthread -ftemplate-depth-300 -Wno-pragmas -O3 -MT src/gen_tile.o -MD -MP -MF $depbase.Tpo -c -o src/gen_tile.o src/gen_tile.cpp &&\
mv -f $depbase.Tpo $depbase.Po
src/gen_tile.cpp: In function ‘void parameterize_map_max_connections(mapnik::Map&, int)’:
src/gen_tile.cpp:180:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (i = 0; i < m.layer_count(); i++) {
^
src/gen_tile.cpp:181:22: error: ‘class mapnik::Map’ has no member named ‘getLayer’
layer& l = m.getLayer(i);
^
src/gen_tile.cpp:182:43: error: invalid use of incomplete type ‘class mapnik::datasource’
parameters params = l.datasource()->params();
^
In file included from src/gen_tile.cpp:1:0:
/usr/local/include/mapnik/layer.hpp:37:7: error: forward declaration of ‘class mapnik::datasource’
class datasource;
^
src/gen_tile.cpp:188:9: error: ‘shared_ptr’ is not a member of ‘boost’
boost::shared_ptr<datasource> ds = datasource_cache::instance().create(params);
^
src/gen_tile.cpp:188:9: note: suggested alternative:
In file included from /usr/include/c++/4.8/bits/shared_ptr.h:52:0,
from /usr/include/c++/4.8/memory:82,
from /usr/local/include/mapnik/layer.hpp:32,
from src/gen_tile.cpp:1:
/usr/include/c++/4.8/bits/shared_ptr_base.h:261:11: note: ‘std::shared_ptr’
class shared_ptr;
^
src/gen_tile.cpp:188:37: error: expected primary-expression before ‘>’ token
boost::shared_ptr<datasource> ds = datasource_cache::instance().create(params);
^
src/gen_tile.cpp:188:39: error: ‘ds’ was not declared in this scope
boost::shared_ptr<datasource> ds = datasource_cache::instance().create(params);
^
src/gen_tile.cpp: In function ‘protoCmd render(xmlmapconfig*, int, int, int, char*, metaTile&)’:
src/gen_tile.cpp:259:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (yy = 0; yy < render_size_ty; yy++) {
^
src/gen_tile.cpp:260:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (xx = 0; xx < render_size_tx; xx++) {
^
make[1]: *** [src/gen_tile.o] Error 1
make[1]: Leaving directory `/root/src/mod_tile'
make: *** [all-recursive] Error 1
Please let me know anything i did wrong in the flow?
i am using this code
https://github.com/springmeyer/mod_tile
to build mod_tile now its working fine.