I'm using perl Inline::CPP with this sample code from cpan documentation
use Inline CPP;
print "9 + 16 = ", add(9, 16), "\n";
print "9 - 16 = ", subtract(9, 16), "\n";
__END__
__CPP__
int add(int x, int y) {
return x + y;
}
int subtract(int x, int y) {
return x - y;
}
The Error Log
C:\strawberry\perl\bin\perl.exe C:\strawberry\perl\lib\ExtUtils\xsubpp -type
"C:\strawberry\perl\lib\ExtUtils\typemap" inline_pl_172d.xs > inline_pl_172
sc && C:\strawberry\perl\bin\perl.exe -MExtUtils::Command -e mv -- inline_pl_
d.xsc inline_pl_172d.c
Didn't find a 'MODULE ... PACKAGE ... PREFIX' line
g++ -c -s -O2 -DWIN32 -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEX
DPERL_IMPLICIT_SYS -fno-strict-aliasing -mms-bitfields -s -O2 -DVERSION=\
00\" -DXS_VERSION=\"0.00\" "-IC:\strawberry\perl\lib\CORE" inline_pl_17
c
inline_pl_172d.xs:28:2: error: 'MODULE' does not name a type
dmake: Error code 129, while making 'inline_pl_172d.o'
A problem was encountered while attempting to compile and install your Inline
CPP code. The command that failed was:
dmake > out.make 2>&1
The build directory was:
D:\university\phd\data\datamail\Chordata2\_Inline\build\inline_pl_172d
To debug the problem, cd to the build directory, and inspect the output files
at D:\university\phd\data\datamail\Chordata2\inline.pl line 0.
...propagated at C:/strawberry/perl/site/lib/Inline/C.pm line 772.
INIT failed--call queue aborted.
If the package is not installed well on my machine How to know and fix it ?
The your code works for me without modification once I installed Inline::CPP from CPAN...
c:\Perl>
c:\Perl>perl StackOverflow.pl
Set up gcc environment - 3.4.5 (mingw-vista special r3)
9 + 16 = 25
9 - 16 = -7
c:\Perl>
This is perl 5, version 16, subversion 3 (v5.16.3) built for MSWin32-x86-multi-thread
(with 1 registered patch, see perl -V for more detail)
Copyright 1987-2012, Larry Wall
Binary build 1603 [296746] provided by ActiveState http://www.ActiveState.com
Built Mar 13 2013 11:29:21
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
c:\Perl>
This is on a Win7 32 bit system running ActivePerl 5.16.3 multi-thread and Inline::CPP 0.46 using the default install settings in the Inline::CPP module setup. From the looks of things Perl appears to be using GCC 3.4.5 as the module compiler...
c:\Perl>gcc -v
Reading specs from C:/Perl/site/lib/auto/MinGW/bin/../lib/gcc/mingw32/3.4.5/specs
Configured with: ../gcc-3.4.5-20060117-3/configure --with-gcc --with-gnu-ld --with-gnu-as --host=mingw32 --target=mingw32 --prefix=/mingw --enable-threads --disable-nls --enable-languages=c,c++,f77,ada,objc,java --disable-win32-registry --disable-shared --enable-s
jlj-exceptions --enable-libgcj --disable-java-awt --without-x --enable-java-gc=boehm --disable-libgcj-debug --enable-interpreter --enable-hash-synchronization --enable-libstdcxx-debug
Thread model: win32
gcc version 3.4.5 (mingw-vista special r3)
c:\Perl>
The make utility used is dmake 4.11...
c:\Perl>dmake -V MAKE_VERSION
dmake.exe - Version 4.11-20080107-SHAY (Windows / MS Visual C++)
Copyright (c) 1990,...,1997 by WTI Corp.
Default Configuration:
MAXLINELENGTH := 32766
MAXPROCESSLIMIT := 4
MAXPROCESS := 1
.IMPORT .IGNORE: DMAKEROOT
.MAKEFILES : makefile.mk makefile
.SOURCE : .NULL
DMAKEROOT *= $(ABSMAKECMD:d)startup
MAKESTARTUP := $(DMAKEROOT)\startup.mk
Please read the NEWS file for the latest release notes.
c:\Perl>
Complete Inline::CPP CPAN module install log...
c:\Perl>cpan
Set up gcc environment - 3.4.5 (mingw-vista special r3)
cpan shell -- CPAN exploration and modules installation (v2.00)
Enter 'h' for help.
cpan> install Inline::CPP
Reading 'C:\Perl\cpan\Metadata'
Database was generated on Mon, 28 Oct 2013 11:08:37 GMT
Fetching with LWP:
http://ppm.activestate.com/CPAN/authors/01mailrc.txt.gz
Reading 'C:\Perl\cpan\sources\authors\01mailrc.txt.gz'
............................................................................DONE
Fetching with LWP:
http://ppm.activestate.com/CPAN/modules/02packages.details.txt.gz
Reading 'C:\Perl\cpan\sources\modules\02packages.details.txt.gz'
Database was generated on Tue, 05 Nov 2013 20:53:02 GMT
Warning: This index file is 40 days old.
Please check the host you chose as your CPAN mirror for staleness.
I'll continue but problems seem likely to happen.
............................................................................DONE
Fetching with LWP:
http://ppm.activestate.com/CPAN/modules/03modlist.data.gz
Reading 'C:\Perl\cpan\sources\modules\03modlist.data.gz'
............................................................................DONE
Writing C:\Perl\cpan\Metadata
Running install for module 'Inline::CPP'
Running make for D/DA/DAVIDO/Inline-CPP-0.46.tar.gz
Fetching with LWP:
http://ppm.activestate.com/CPAN/authors/id/D/DA/DAVIDO/Inline-CPP-0.46.tar.gz
Fetching with LWP:
http://ppm.activestate.com/CPAN/authors/id/D/DA/DAVIDO/CHECKSUMS
Checksum for C:\Perl\cpan\sources\authors\id\D\DA\DAVIDO\Inline-CPP-0.46.tar.gz ok
Scanning cache C:\Perl/cpan/build for sizes
...........................................................................-DONE
DEL(1/2): C:\Perl\cpan\build\Math-Polynomial-1.005-ahaC2G
DEL(2/2): C:\Perl\cpan\build\Math-Polynomial-1.005-ahaC2G.yml
Inline-CPP-0.46/
Inline-CPP-0.46/Makefile.PL
Inline-CPP-0.46/META.yml
Inline-CPP-0.46/README
Inline-CPP-0.46/MANIFEST
Inline-CPP-0.46/TESTED
Inline-CPP-0.46/Changes
Inline-CPP-0.46/MANIFEST.SKIP
Inline-CPP-0.46/t/
Inline-CPP-0.46/t/03prefix.t
Inline-CPP-0.46/t/02basic.t
Inline-CPP-0.46/t/14changes.t
Inline-CPP-0.46/t/11rewrite_config.t
Inline-CPP-0.46/t/04charptr.t
Inline-CPP-0.46/t/07perlcritic.t
Inline-CPP-0.46/t/00load_prereqs.t
Inline-CPP-0.46/t/01fn_cans.t
Inline-CPP-0.46/t/10kwalitee.t
Inline-CPP-0.46/t/06fn_regress.t
Inline-CPP-0.46/t/08cppguess.t
Inline-CPP-0.46/t/09pod_coverage.t
Inline-CPP-0.46/t/13version_numbers.t
Inline-CPP-0.46/t/12custom_libs.t
Inline-CPP-0.46/t/05pod.t
Inline-CPP-0.46/grammar/
Inline-CPP-0.46/grammar/Makefile.PL
Inline-CPP-0.46/grammar/grammar.pm
Inline-CPP-0.46/grammar/t/
Inline-CPP-0.46/grammar/t/03inline.t
Inline-CPP-0.46/grammar/t/02scope.t
Inline-CPP-0.46/grammar/t/10struct.t
Inline-CPP-0.46/grammar/t/01nherit.t
Inline-CPP-0.46/grammar/t/05virt.t
Inline-CPP-0.46/grammar/t/09purevt.t
Inline-CPP-0.46/grammar/t/11minhrt.t
Inline-CPP-0.46/grammar/t/15stvar.t
Inline-CPP-0.46/grammar/t/14const.t
Inline-CPP-0.46/grammar/t/00pod_coverage.t
Inline-CPP-0.46/grammar/t/16varlst.t
Inline-CPP-0.46/grammar/t/13vararg.t
Inline-CPP-0.46/grammar/t/12retlst.t
Inline-CPP-0.46/grammar/t/17memberarray.t
Inline-CPP-0.46/grammar/t/06deflt.t
Inline-CPP-0.46/grammar/t/07static.t
Inline-CPP-0.46/grammar/t/08anon.t
Inline-CPP-0.46/grammar/t/04const.t
Inline-CPP-0.46/CPP.pm
Inline-CPP-0.46/META.json
Inline-CPP-0.46/lib/
Inline-CPP-0.46/lib/Inline/
Inline-CPP-0.46/lib/Inline/CPP/
Inline-CPP-0.46/lib/Inline/CPP/Config.pm
Inline-CPP-0.46/lib/Inline/CPP.pod
CPAN.pm: Building D/DA/DAVIDO/Inline-CPP-0.46.tar.gz
Set up gcc environment - 3.4.5 (mingw-vista special r3)
Warning: prerequisite Inline version 0.53 not found. at Makefile.PL line 49.
Warning: prerequisite Inline::C version 0.53 not found. at Makefile.PL line 49.
This will configure and build Inline::C++.
What default C++ compiler would you like to use? [C:\Perl\site\bin\g++.exe]
What default libraries would you like to include? [-lstdc++]
Detected <iostream> style headers. ('.h' not needed.)
Checking if your kit is complete...
Looks good
Warning: prerequisite Inline 0.53 not found. We have 0.52.
Warning: prerequisite Inline::C 0.53 not found. We have 0.52.
Writing Makefile for Inline::CPP::grammar
Writing MYMETA.yml and MYMETA.json
Writing Makefile for Inline::CPP
Writing MYMETA.yml and MYMETA.json
---- Unsatisfied dependencies detected during ----
---- DAVIDO/Inline-CPP-0.46.tar.gz ----
Inline::C [requires]
Inline [requires]
Running make test
Delayed until after prerequisites
Running make install
Delayed until after prerequisites
Running install for module 'Inline::C'
Running make for S/SI/SISYPHUS/Inline-0.53.tar.gz
Fetching with LWP:
http://ppm.activestate.com/CPAN/authors/id/S/SI/SISYPHUS/Inline-0.53.tar.gz
Fetching with LWP:
http://ppm.activestate.com/CPAN/authors/id/S/SI/SISYPHUS/CHECKSUMS
Checksum for C:\Perl\cpan\sources\authors\id\S\SI\SISYPHUS\Inline-0.53.tar.gz ok
Inline-0.53/
Inline-0.53/C/
Inline-0.53/C/C-Cookbook.pod
Inline-0.53/C/C.pm
Inline-0.53/C/C.pod
Inline-0.53/C/Changes
Inline-0.53/C/lib/
Inline-0.53/C/lib/Inline/
Inline-0.53/C/lib/Inline/C/
Inline-0.53/C/lib/Inline/C/ParseRecDescent.pm
Inline-0.53/C/lib/Inline/C/ParseRegExp.pm
Inline-0.53/C/Makefile.PL
Inline-0.53/C/README
Inline-0.53/C/rt/
Inline-0.53/C/rt/grammars.t
Inline-0.53/C/t/
Inline-0.53/C/t/00init.t
Inline-0.53/C/t/01syntax.t
Inline-0.53/C/t/02config.t
Inline-0.53/C/t/03typemap.t
Inline-0.53/C/t/04perlapi.t
Inline-0.53/C/t/05xsmode.t
Inline-0.53/C/t/06parseregexp.t
Inline-0.53/C/t/07typemap_multi.t
Inline-0.53/C/t/08taint.t
Inline-0.53/C/t/08taint_1.p
Inline-0.53/C/t/08taint_2.p
Inline-0.53/C/t/08taint_3.p
Inline-0.53/C/t/09parser.t
Inline-0.53/C/t/10callback.t
Inline-0.53/C/t/11default_readonly.t
Inline-0.53/C/t/12taint_old.t
Inline-0.53/C/t/14void_arg.t
Inline-0.53/C/t/15ccflags.t
Inline-0.53/C/t/16ccflagsex.t
Inline-0.53/C/t/17prehead.t
Inline-0.53/C/t/18quote_space.t
Inline-0.53/C/t/19INC.t
Inline-0.53/C/t/20eval.t
Inline-0.53/C/t/21read_DATA.t
Inline-0.53/C/t/22read_DATA_2.t
Inline-0.53/C/t/23validate.t
Inline-0.53/C/t/bar/
Inline-0.53/C/t/bar/find_me_in_bar.h
Inline-0.53/C/t/foo/
Inline-0.53/C/t/foo/find_me_in_foo.h
Inline-0.53/C/t/prehead.in
Inline-0.53/C/t/soldier_typemap
Inline-0.53/C/t/typemap
Inline-0.53/Changes
Inline-0.53/Inline-API.pod
Inline-0.53/Inline-FAQ.pod
Inline-0.53/Inline-Support.pod
Inline-0.53/Inline.pm
Inline-0.53/Inline.pod
Inline-0.53/kobes.log
Inline-0.53/lib/
Inline-0.53/lib/Inline/
Inline-0.53/lib/Inline/denter.pm
Inline-0.53/lib/Inline/Foo.pm
Inline-0.53/lib/Inline/MakeMaker/
Inline-0.53/lib/Inline/MakeMaker/Changes
Inline-0.53/lib/Inline/MakeMaker.pm
Inline-0.53/Makefile.PL
Inline-0.53/MANIFEST
Inline-0.53/modules/
Inline-0.53/modules/Math/
Inline-0.53/modules/Math/Simple/
Inline-0.53/modules/Math/Simple/Changes
Inline-0.53/modules/Math/Simple/Makefile.PL
Inline-0.53/modules/Math/Simple/MANIFEST
Inline-0.53/modules/Math/Simple/Simple.pm
Inline-0.53/modules/Math/Simple/test.pl
Inline-0.53/README
Inline-0.53/symbols.perl
Inline-0.53/t/
Inline-0.53/t/00init.t
Inline-0.53/t/01usages.t
Inline-0.53/t/02config.t
Inline-0.53/t/03errors.t
Inline-0.53/t/04create.t
Inline-0.53/t/05files.t
Inline-0.53/t/06rewrite_config.p
Inline-0.53/t/06rewrite_config.t
Inline-0.53/t/07rewrite2_config.p
Inline-0.53/t/07rewrite2_config.t
Inline-0.53/t/file
Inline-0.53/ToDo
CPAN.pm: Building S/SI/SISYPHUS/Inline-0.53.tar.gz
Set up gcc environment - 3.4.5 (mingw-vista special r3)
Checking if your kit is complete...
Looks good
Inline::C is packaged with Inline.pm because it is the most commonly used
Inline Language Support Module (ILSM).
See also: Inline::ASM, ::Awk, ::BC, ::Basic, ::Befunge, ::CPP (C++), ::CPR,
::Foo, ::Guile, ::Java, ::Octave, ::PERL, ::Python, ::Ruby, ::TT,
::Tcl and ::WebChat.
Config.pm indicates that your version of Perl was built with this C compiler:
C:\Perl\site\bin\gcc.exe
I have located this compiler on your system.
Do you want to install Inline::C? [y] y
Writing Makefile for Inline::C
Writing MYMETA.yml and MYMETA.json
Writing Makefile for Inline
Writing MYMETA.yml and MYMETA.json
Fixing Makefile for MSWin32
cp Inline.pod blib\lib\Inline.pod
cp lib/Inline/MakeMaker/Changes blib\lib\Inline\MakeMaker\Changes
cp lib/Inline/denter.pm blib\lib\Inline\denter.pm
AutoSplitting blib\lib\Inline\denter.pm (blib\lib\auto\Inline\denter)
cp Inline.pm blib\lib\Inline.pm
AutoSplitting blib\lib\Inline.pm (blib\lib\auto\Inline)
cp lib/Inline/Foo.pm blib\lib\Inline\Foo.pm
cp Inline-API.pod blib\lib\Inline-API.pod
cp lib/Inline/MakeMaker.pm blib\lib\Inline\MakeMaker.pm
cp Inline-FAQ.pod blib\lib\Inline-FAQ.pod
cp Inline-Support.pod blib\lib\Inline-Support.pod
cp lib/Inline/C/ParseRegExp.pm ..\blib\lib\Inline\C\ParseRegExp.pm
cp C-Cookbook.pod ..\blib\lib\Inline\C-Cookbook.pod
cp C.pm ..\blib\lib\Inline\C.pm
cp C.pod ..\blib\lib\Inline\C.pod
cp lib/Inline/C/ParseRecDescent.pm ..\blib\lib\Inline\C\ParseRecDescent.pm
SISYPHUS/Inline-0.53.tar.gz
C:\Perl\site\bin\dmake.exe -- OK
Running make test
C:\Perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib\lib', 'blib\arch')" t/*.t
t/00init.t ............. ok
t/01usages.t ........... ok
t/02config.t ........... ok
t/03errors.t ........... ok
t/04create.t ........... ok
t/05files.t ............ ok
t/06rewrite_config.t ... ok
t/07rewrite2_config.t .. ok
All tests successful.
Files=8, Tests=19, 15 wallclock secs ( 0.11 usr + 0.06 sys = 0.17 CPU)
Result: PASS
C:\Perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, '..\blib\lib', '..\blib\arch')" t/*.t
t/00init.t .............. ok
t/01syntax.t ............ ok
t/02config.t ............ ok
t/03typemap.t ........... ok
t/04perlapi.t ........... ok
t/05xsmode.t ............ ok
t/06parseregexp.t ....... ok
t/07typemap_multi.t ..... ok
t/08taint.t ............. ok
t/09parser.t ............
This test could take a couple of minutes to run
t/09parser.t ............ ok
t/10callback.t .......... ok
t/11default_readonly.t .. ok
t/12taint_old.t ......... Skipped - applies only to perl 5.6.x
t/12taint_old.t ......... ok
t/14void_arg.t .......... ok
t/15ccflags.t ........... ok
t/16ccflagsex.t ......... ok
t/17prehead.t ........... ok
t/18quote_space.t ....... ok
t/19INC.t ............... ok
t/20eval.t .............. ok
t/21read_DATA.t ......... ok
t/22read_DATA_2.t ....... ok
t/23validate.t .......... ok
All tests successful.
Files=23, Tests=71, 165 wallclock secs ( 0.12 usr + 0.05 sys = 0.17 CPU)
Result: PASS
SISYPHUS/Inline-0.53.tar.gz
C:\Perl\site\bin\dmake.exe test -- OK
Running make install
Prepending C:\Perl\cpan\build\Inline-0.53-JPPUvK/blib/arch C:\Perl\cpan\build\Inline-0.53-JPPUvK/blib/lib to PERL5LIB for 'install'
Installing C:\Perl\site\lib\Inline.pm
Installing C:\Perl\site\lib\Inline.pod
Installing C:\Perl\site\lib\Inline\C.pm
Installing C:\Perl\site\lib\Inline\MakeMaker.pm
Installing C:\Perl\site\lib\Inline\MakeMaker\Changes
Appending installation info to C:\Perl\lib/perllocal.pod
SISYPHUS/Inline-0.53.tar.gz
C:\Perl\site\bin\dmake.exe install -- OK
Inline is up to date (0.53).
Running make for D/DA/DAVIDO/Inline-CPP-0.46.tar.gz
Has already been unwrapped into directory C:\Perl\cpan\build\Inline-CPP-0.46-QMmSMq
CPAN.pm: Building D/DA/DAVIDO/Inline-CPP-0.46.tar.gz
cp lib/Inline/CPP/Config.pm blib\lib\Inline\CPP\Config.pm
cp CPP.pm blib\lib\Inline\CPP.pm
cp lib/Inline/CPP.pod blib\lib\Inline\CPP.pod
cp grammar.pm ..\blib\lib\Inline\CPP\grammar.pm
DAVIDO/Inline-CPP-0.46.tar.gz
C:\Perl\site\bin\dmake.exe -- OK
Running make test
C:\Perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib\lib', 'blib\arch')" t/*.t
t/00load_prereqs.t ..... # $Config{osname}: MSWin32
# $Config{cc}: C:\Perl\site\bin\gcc.exe
# $Config{gccversion}: 3.4.5 (mingw-vista special r3)
t/00load_prereqs.t ..... ok
t/01fn_cans.t .......... ok
t/02basic.t ............ ok
t/03prefix.t ........... ok
t/04charptr.t .......... ok
t/05pod.t .............. skipped: Author Test: Set $ENV{RELEASE_TESTING} to a true value to run.
t/06fn_regress.t ....... ok
t/07perlcritic.t ....... skipped: Author Test: Set $ENV{RELEASE_TESTING} to a true value to run.
t/08cppguess.t ......... # ExtUtils::CppGuess not installed. This set of tests and diagnostics
# is more thorough when ExtUtils::CppGuess can be loaded.
# Detected basic defaults (Strawberry, etc.).
#
# Compiler guess:
t/08cppguess.t ......... 1/2 # Makefile.PL approach: [C:\Perl\site\bin\g++.exe].
#
# Linker guess:
# Makefile.PL approach: [-lstdc++].
t/08cppguess.t ......... ok
t/09pod_coverage.t ..... skipped: Author Test: Set $ENV{RELEASE_TESTING} to a true value to run.
t/10kwalitee.t ......... skipped: Author Test: Set $ENV{RELEASE_TESTING} to a true value to run.
t/11rewrite_config.t ... skipped: Author Test: Set $ENV{RELEASE_TESTING} to a true value to run.
t/12custom_libs.t ...... ok
t/13version_numbers.t .. skipped: Author Test: Set $ENV{RELEASE_TESTING} to a true value to run.
t/14changes.t .......... skipped: Author tests skipped. Set $ENV{RELEASE_TESTING} to run
All tests successful.
Files=15, Tests=29, 22 wallclock secs ( 0.09 usr + 0.05 sys = 0.14 CPU)
Result: PASS
C:\Perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, '..\blib\lib', '..\blib\arch')" t/*.t
t/00pod_coverage.t .. ok
t/01nherit.t ........ ok
t/02scope.t ......... ok
t/03inline.t ........ ok
t/04const.t ......... ok
t/05virt.t .......... ok
t/06deflt.t ......... ok
t/07static.t ........ ok
t/08anon.t .......... ok
t/09purevt.t ........ ok
t/10struct.t ........ ok
t/11minhrt.t ........ ok
t/12retlst.t ........ ok
t/13vararg.t ........ ok
t/14const.t ......... ok
t/15stvar.t ......... ok
t/16varlst.t ........ ok
t/17memberarray.t ... ok
All tests successful.
Test Summary Report
-------------------
t/11minhrt.t (Wstat: 0 Tests: 38 Failed: 0)
TODO passed: 28-31
Files=18, Tests=79, 89 wallclock secs ( 0.14 usr + 0.00 sys = 0.14 CPU)
Result: PASS
DAVIDO/Inline-CPP-0.46.tar.gz
C:\Perl\site\bin\dmake.exe test -- OK
Running make install
Prepending C:\Perl\cpan\build\Inline-CPP-0.46-QMmSMq/blib/arch C:\Perl\cpan\build\Inline-CPP-0.46-QMmSMq/blib/lib to PERL5LIB for 'install'
Installing C:\Perl\site\lib\Inline\CPP.pm
Installing C:\Perl\site\lib\Inline\CPP.pod
Installing C:\Perl\site\lib\Inline\CPP\Config.pm
Installing C:\Perl\site\lib\Inline\CPP\grammar.pm
Appending installation info to C:\Perl\lib/perllocal.pod
DAVIDO/Inline-CPP-0.46.tar.gz
C:\Perl\site\bin\dmake.exe install -- OK
cpan> exit
Lockfile removed.
c:\Perl>
Hopes this helps.
Related
Here is my building process
I open mingw32 from the x64 Native Tools Command Prompt for VS 2022
then in the mingw32 shell:
# cd /
# ./c/Program\ Files/Microsoft\ Visual\ Studio/2022/Community/VC/Auxiliary/Build/vcvars32.bat
# cd ~
# pacman -Sy diffutils git make gcc yasm pkg-config --noconfirm
# git clone --depth 1 https://git.ffmpeg.org/ffmpeg.git ffmpeg
# git clone https://git.videolan.org/git/ffmpeg/nv-codec-headers.git nv-codec-headers
# cd nv-codec-headers/
# make PREFIX=/usr/local
# make install PREFIX=/usr/local
# cd ..
# mkdir nv_sdk
# cp -r /c/Program\ Files/NVIDIA\ GPU\ Computing\ Toolkit/CUDA/v11.7/lib/Win32/* nv_sdk
# cp -r /c/Program\ Files/NVIDIA\ GPU\ Computing\ Toolkit/CUDA/v11.7/include/* nv_sdk
# export PATH="/c/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.32.31326/bin/Hostx86/x86/":$PATH
# export PATH="/c/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.7/bin/":$PATH
# ./configure --disable-everything --enable-decoder=h264 --enable-decoder=hevc --enable-cross-compile --disable-avdevice --disable-swresample --disable-postproc --disable-avfilter --target-os=mingw32 --enable-cuda-nvcc --enable-nonfree --toolchain=msvc --extra-cflags=-I../nv_sdk --extra-ldflags=" -m32 -L../nv_sdk" --enable-shared --shlibdir=SHARED_LIBS --arch=x86_32 --enable-runtime-cpudetect --enable-w32threads
# make -j8
# make install
first I have a bunch of warnings during the making looking like that:
libavutil/opt.c(1075): warning C4133: 'fonction' : types incompatibles - de 'AVPixelFormat *' à 'int *'
And finally the make install returns :
EXTERN_PREFIX="_" AR="lib.exe" NM="dumpbin.exe -symbols" ./compat/windows/makedef libavutil/libavutil.ver libavutil/adler32.o libavutil/aes.o libavutil/aes_ctr.o libavutil/audio_fifo.o libavutil/avsscanf.o libavutil/avstring.o libavutil/base64.o libavutil/blowfish.o libavutil/bprint.o libavutil/buffer.o libavutil/camellia.o libavutil/cast5.o libavutil/channel_layout.o libavutil/color_utils.o libavutil/cpu.o libavutil/crc.o libavutil/des.o libavutil/detection_bbox.o libavutil/dict.o libavutil/display.o libavutil/dovi_meta.o libavutil/downmix_info.o libavutil/encryption_info.o libavutil/error.o libavutil/eval.o libavutil/fifo.o libavutil/file.o libavutil/file_open.o libavutil/film_grain_params.o libavutil/fixed_dsp.o libavutil/float_dsp.o libavutil/frame.o libavutil/hash.o libavutil/hdr_dynamic_metadata.o libavutil/hdr_dynamic_vivid_metadata.o libavutil/hmac.o libavutil/hwcontext.o libavutil/hwcontext_d3d11va.o libavutil/hwcontext_dxva2.o libavutil/imgutils.o libavutil/integer.o libavutil/intmath.o libavutil/lfg.o libavutil/lls.o libavutil/log.o libavutil/log2_tab.o libavutil/lzo.o libavutil/mastering_display_metadata.o libavutil/mathematics.o libavutil/md5.o libavutil/mem.o libavutil/murmur3.o libavutil/opt.o libavutil/parseutils.o libavutil/pixdesc.o libavutil/pixelutils.o libavutil/random_seed.o libavutil/rational.o libavutil/rc4.o libavutil/reverse.o libavutil/ripemd.o libavutil/samplefmt.o libavutil/sha.o libavutil/sha512.o libavutil/slicethread.o libavutil/spherical.o libavutil/stereo3d.o libavutil/tea.o libavutil/threadmessage.o libavutil/time.o libavutil/timecode.o libavutil/tree.o libavutil/twofish.o libavutil/tx.o libavutil/tx_double.o libavutil/tx_float.o libavutil/tx_int32.o libavutil/utils.o libavutil/version.o libavutil/video_enc_params.o libavutil/x86/cpu.o libavutil/x86/cpuid.o libavutil/x86/fixed_dsp.o libavutil/x86/fixed_dsp_init.o libavutil/x86/float_dsp.o libavutil/x86/float_dsp_init.o libavutil/x86/imgutils.o libavutil/x86/imgutils_init.o libavutil/x86/lls.o libavutil/x86/lls_init.o libavutil/x86/tx_float.o libavutil/x86/tx_float_init.o libavutil/xga_font_data.o libavutil/xtea.o > libavutil/avutil-57.def
Could not create temporary library.
make: *** [ffbuild/library.mak:118: libavutil/avutil-57.dll] Error 1
What am I doing wrong ?
shall I install others packets from pacman?
I open mingw32 from the x64 Native Tools Command Prompt for VS 2022
maybe you should open it in X86 Native Tools Command Prompt for VS 2022
I'm porting an autotools project from CentOS 6 without docker to a CentOS 8 docker. When I run make check, instead of printing everything to the console like it used to, it is printing only:
PASS: unit_tests_for_component_x
============================================================================
Testsuite summary for my-product 0.10
============================================================================
# TOTAL: 1
# PASS: 1
# SKIP: 0
# XFAIL: 0
# FAIL: 0
# XPASS: 0
# ERROR: 0
============================================================================
In case of a failed test, it prints:
FAIL: unit_tests_component_x
============================================================================
Testsuite summary for my-product 0.10
============================================================================
# TOTAL: 1
# PASS: 0
# SKIP: 0
# XFAIL: 0
# FAIL: 1
# XPASS: 0
# ERROR: 0
============================================================================
See component_x/test-suite.log
Please report to support#mycompany.com
============================================================================
And then I have to open the component_x/test-suite.log file in order to see what happend.
Note: this also happens on CentOS 8 without docker.
I would much prefer to have gtest just print it all on the console, both the PASSED tests and the FAILED tests, even if it's overly verbose - I'm comfortable with that.
Environment details:
gtest-1.7.0-0, official CentOS 8.1.1911 docker, autotools 2.69, gcc 8.3.1
Many thanks
This question already has answers here:
Using different delimiters in sed commands and range addresses
(3 answers)
Closed 1 year ago.
When following their documentation and running ./build_packages --board=lakitu, I get the following error.
Using ubuntu 16.0.4. Looks like a sed syntax error? Am I missing a variable? Does sed work differently in different operating systems or is something wrong with their documentation/scripts? Followed their documentation to the t and didn't add or configure anything. Waiting for a successful run first.
Looking at similar questions, they all appear to be syntax errors...
* Package: sys-boot/shim-14.0.20180308-r4
* Repository: lakitu
* USE: abi_x86_64 amd64 elibc_glibc kernel_linux userland_GNU
* FEATURES: network-sandbox sandbox splitdebug userpriv usersandbox
* Running stacked hooks for pre_pkg_setup
* sysroot_build_bin_dir ... [ ok ]
* Running stacked hooks for post_pkg_setup
* python_eclass_hack ... [ ok ]
* Running stacked hooks for pre_src_unpack
* python_multilib_setup ... [ ok ]
>>> Unpacking source...
>>> Unpacking shim-14.0.20180308.tar.gz to /build/lakitu/tmp/portage/sys-boot/shim-14.0.20180308-r4/work
>>> Source unpacked in /build/lakitu/tmp/portage/sys-boot/shim-14.0.20180308-r4/work
* Running stacked hooks for post_src_unpack
* asan_init ... [ ok ]
>>> Preparing source in /build/lakitu/tmp/portage/sys-boot/shim-14.0.20180308-r4/work/shim-79cdb2a215de2ace7d1bf0a294165a04b726c70a ...
>>> Source prepared.
>>> Configuring source in /build/lakitu/tmp/portage/sys-boot/shim-14.0.20180308-r4/work/shim-79cdb2a215de2ace7d1bf0a294165a04b726c70a ...
>>> Source configured.
>>> Compiling source in /build/lakitu/tmp/portage/sys-boot/shim-14.0.20180308-r4/work/shim-79cdb2a215de2ace7d1bf0a294165a04b726c70a ...
make -j8 ARCH=x86_64 CROSS_COMPILE=x86_64-cros-linux-gnu- EFI_INCLUDE=/build/lakitu//usr/include/efi EFI_PATH=/build/lakitu//usr/lib64 ARCH_LDFLAGS=--no-experimental-use-relr COMMITID=79cdb2a215de2ace7d1bf0a294165a04b726c70a DEFAULT_LOADER=\\\\grub-lakitu.efi shimx64.efi
sed -e "s,##VERSION##,14," \
-e "s,##UNAME##,Linux x86_64 Intel Xeon E312xx (Sandy Bridge, IBRS update) GenuineIntel GNU/Linux," \
-e "s,##COMMIT##,79cdb2a215de2ace7d1bf0a294165a04b726c70a," \
< /build/lakitu/tmp/portage/sys-boot/shim-14.0.20180308-r4/work/shim-79cdb2a215de2ace7d1bf0a294165a04b726c70a/version.c.in > version.c
sed: -e expression #2, char 60: unknown option to `s'
make: *** [Makefile:183: version.c] Error 1
* ERROR: sys-boot/shim-14.0.20180308-r4::lakitu failed (compile phase):
* emake failed
*
* If you need support, post the output of `emerge --info '=sys-boot/shim-14.0.20180308-r4::lakitu'`,
* the complete build log and the output of `emerge -pqv '=sys-boot/shim-14.0.20180308-r4::lakitu'`.
* The complete build log is located at '/build/lakitu/tmp/portage/logs/sys-boot:shim-14.0.20180308-r4:20190531-002217.log'.
* For convenience, a symlink to the build log is located at '/build/lakitu/tmp/portage/sys-boot/shim-14.0.20180308-r4/temp/build.log'.
* The ebuild environment file is located at '/build/lakitu/tmp/portage/sys-boot/shim-14.0.20180308-r4/temp/environment'.
* Working directory: '/build/lakitu/tmp/portage/sys-boot/shim-14.0.20180308-r4/work/shim-79cdb2a215de2ace7d1bf0a294165a04b726c70a'
* S: '/build/lakitu/tmp/portage/sys-boot/shim-14.0.20180308-r4/work/shim-79cdb2a215de2ace7d1bf0a294165a04b726c70a'
There's a , after Bridge
-e "s,##UNAME##,Linux x86_64 Intel Xeon E312xx (Sandy Bridge, IBRS update) GenuineIntel GNU/Linux," \
Change to
-e "s###UNAME###Linux x86_64 Intel Xeon E312xx (Sandy Bridge, IBRS update) GenuineIntel GNU/Linux#" \
=========================
[root#officekam asterisk-11.5.1]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 143G 69G 67G 51% /
/dev/sda1 97M 44M 49M 48% /boot
tmpfs 1008M 0 1008M 0% /dev/shm
==============
Exeplain each Step.
/etc/asterisk/asterisk.conf
----
directories
astetcdir => /etc/asterisk
astmoddir => /usr/lib/asterisk/modules
astvarlibdir => /var/lib/asterisk
astdbdir => /var/lib/asterisk
astkeydir => /var/lib/asterisk
astdatadir => /var/lib/asterisk
astagidir => /var/lib/asterisk/agi-bin
astspooldir => /var/spool/asterisk
astrundir => /var/run/asterisk
astlogdir => /var/log/asterisk
[options]
;verbose = 3
;debug = 3
;alwaysfork = yes ; Same as -F at startup.
;nofork = yes ; Same as -f at startup.
;quiet = yes ; Same as -q at startup.
;timestamp = yes ; Same as -T at startup.
;execincludes = yes ; Support #exec in config files.
;console = yes ; Run as console (same as -c at startup).
;highpriority = yes ; Run realtime priority (same as -p at
; startup).
;initcrypto = yes ; Initialize crypto keys (same as -i at
; startup).
;nocolor = yes ; Disable console colors.
;dontwarn = yes ; Disable some warnings.
**dumpcore = yes** ; Dump core on crash (same as -g at startup).
======================
my System:
/usr/src/asterisk-11.5.1/:
i run asterisk with : asterisk -U asterisk -vvvvvvvvvvvvvvvvgc -dddddddddd
Note :
gdb is install
ulimit -U unlimit .
But Core file not geneated .
So how use $gdb corefile
=======other setting ========
#DAEMON_COREFILE_LIMIT="unlimited" has been added.
DAEMON_COREFILE_LIMIT="unlimited"
=============================
**# /etc/profile**
# System wide environment and startup programs, for login setup
# Functions and aliases go in /etc/bashrc
# It's NOT good idea to change this file unless you know what you
# are doing. Much better way is to create custom.sh shell script in
# /etc/profile.d/ to make custom changes to environment. This will
# prevent need for merging in future updates.
ulimit -c unlimited >/dev/null 2>&1
**
# Controls whether core dumps will append the PID to the core filename.
# Useful for debugging multi-threaded applications.
kernel.core_uses_pid = 1
**
===================
kernel.core_pattern = '/tmp/core_dump/core'
===================
**lrwxrwxrwx 1 asterisk asterisk 0 Dec 24 11:44 cwd -> /usr/src/asterisk/asterisk-11.5.1**
-r-------- 1 asterisk asterisk 0 Dec 24 11:44 environ
lrwxrwxrwx 1 asterisk asterisk 0 Dec 24 11:44 exe -> /usr/sbin/asterisk
======================================
You need
1) compile asterisk with debug symbols
2) in /etc/asterisk/asterisk.conf enable core dump.
Check more info at voip-info asterisk debugging page
mercurial-server runs on Ubuntu 12.04 LTS
myserver#ip:/etc$ hg --version
Mercurial Distributed SCM (version 2.0.2)
myserver#ip:/etc$ dpkg -s mercurial-server
Package: mercurial-server
Version: 1.2-1
....
myserver#ip:/etc/mercurial-server/remote-hgrc.d$ ls -ltr
total 12
-rw-r--r-- 1 root root 180 Oct 10 2011 logging.rc
-rw-r--r-- 1 root root 139 Oct 10 2011 access.rc
-rw-r--r-- 1 root root 74 Mar 13 22:14 check.rc
myserver#ip:/etc/mercurial-server/remote-hgrc.d$ cat check.rc
[hooks]
pretxncommit.author_check = /SOURCE/mercurial-server/validate.sh
#manually added here too
myserver#ip:/etc/mercurial-server/remote-hgrc.d$ cat ~hg/repos/hgadmin/.hg/hgrc
# WARNING: when these hooks run they will entirely destroy and rewrite
# ~/.ssh/authorized_keys
[extensions]
hgext.purge =
[hooks]
changegroup.aaaab_update = hg update -C default > /dev/null
changegroup.aaaac_purge = hg purge --all > /dev/null
changegroup.refreshauth = python:mercurialserver.refreshauth.hook
pretxncommit.author_check = /SOURCE/mercurial-server/validate.sh
myserver#ip:/etc/mercurial-server/remote-hgrc.d$ cat /SOURCE/mercurial-server/validate.sh
#!/bin/bash
echo "REMUSR:$REMOTE_USER"
echo "ATHR:`hg tip --template "{author}\n"`b"
exit 1
myserver#ip:~$ sudo -u hg cat ~hg/.ssh/authorized_keys
no-pty,no-port-forwarding,no-X11-forwarding,no-agent-forwarding,command="/usr/share/mercurial-server/hg-ssh root/user1/user1.pub" ssh-rsa AAAAB3xOMN8ZiF user1#server.com
no-pty,no-port-forwarding,no-X11-forwarding,no-agent-forwarding,command="/usr/share/mercurial-server/hg-ssh users/user2/user2.pub" ssh-rsa AAAAB3N..0HchQQw== user2#server.com
After this from a local machine(Windows) I cloned a testproject ,changed,commited,push and it was successfull without any error or message.I tried this with both the initial user/key and a user/key added via hgadmin push
D:\hg\testproj>hg push
pushing to ssh://hg#myserver.com/testproj
searching for changes
remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: added 1 changesets with 1 changes to 1 files
Works with
$ cat check.rc
[hooks]
pretxnchangegroup.author_check = /SOURCE/mercurial-server/validate.sh
Not working with pretxncommit