Inline::CPP generates within an _Inline directory a new subdirectory for each build's files.
What is a "build" in this context? I.e. do we have one subdirectory per invokation of a test script, one subdirectory per test script, or one per Inline::CPP version? How are the names of the subdirectories calculated (what are the input parameters for the function that returns the subdirectory name)?
Idea behind the last question: two test scripts, both use a common module that uses Inline:CPP, subdirectory name depends only on that module. Two gccs fight in the same subdirectory.
(I should really install some Inline::* modules. But it's 6:30 am and it will be a long day at $work. No time for fun ...)
Alexander
--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
| [reply] [Watch: Dir/Any] |
"build" refers to Inline creating a module in _Inline (like h2xs) and making it at use/BEGIN time (perl Makefile.PL/make install), before your program runs, ex
subsequent runs don't "build"
unless the c-source changes
$ perl -le " print qq{\n/* blah */\n\n} " >> modsv.c
$ perl def.pl
validate Stage
Starting Build Preprocess Stage
get_maps Stage
Finished Build Preprocess Stage
Starting Build Parse Stage
Finished Build Parse Stage
Starting Build Glue 1 Stage
Finished Build Glue 1 Stage
Starting Build Glue 2 Stage
Finished Build Glue 2 Stage
Starting Build Glue 3 Stage
Finished Build Glue 3 Stage
Starting Build Compile Stage
Starting "perl Makefile.PL" Stage
Writing Makefile for def_pl_4ff5
Writing MYMETA.yml and MYMETA.json
Finished "perl Makefile.PL" Stage
Starting "make" Stage
C:\perl\5.14.1\bin\MSWin32-x86-multi-thread\perl.exe C:\perl\site\5.14
+.1\lib\ExtUtils\xsubpp -typemap "C:\perl\5.14.1\l
ib\ExtUtils\typemap" def_pl_4ff5.xs > def_pl_4ff5.xsc && C:\perl\5.14
+.1\bin\MSWin32-x86-multi-thread\perl.exe -MExtUtil
s::Command -e mv -- def_pl_4ff5.xsc def_pl_4ff5.c
gcc -c -I"D:/soInline" -s -O2 -DWIN32 -DPERL_TEXTMODE_SCRIPTS -
+DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_S
YS -fno-strict-aliasing -mms-bitfields -s -O2 -DVERSION=\"0.00\"
+ -DXS_VERSION=\"0.00\" "-IC:\perl\5.14.1\lib\MSW
in32-x86-multi-thread\CORE" def_pl_4ff5.c
Running Mkbootstrap for def_pl_4ff5 ()
C:\perl\5.14.1\bin\MSWin32-x86-multi-thread\perl.exe -MExtUtils::Comma
+nd -e chmod -- 644 def_pl_4ff5.bs
C:\perl\5.14.1\bin\MSWin32-x86-multi-thread\perl.exe -MExtUtils::Mksym
+lists \
-e "Mksymlists('NAME'=>\"def_pl_4ff5\", 'DLBASE' => 'def_pl_4ff5'
+, 'DL_FUNCS' => { }, 'FUNCLIST' => [], 'IMPORTS'
=> { }, 'DL_VARS' => []);"
dlltool --def def_pl_4ff5.def --output-exp dll.exp
g++ -o blib\arch\auto\def_pl_4ff5\def_pl_4ff5.dll -Wl,--base-file -Wl,
+dll.base -mdll -s -L"c:\perl\5.14.1\lib\MSWin32-x8
6-multi-thread\CORE" -L"C:\MinGW\lib" def_pl_4ff5.o C:\perl\5.14.1\l
+ib\MSWin32-x86-multi-thread\CORE\libperl514.a -lmo
ldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -l
+shell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2
_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 dll.exp
dlltool --def def_pl_4ff5.def --base-file dll.base --output-exp dll.ex
+p
g++ -o blib\arch\auto\def_pl_4ff5\def_pl_4ff5.dll -mdll -s -L"c:\perl\
+5.14.1\lib\MSWin32-x86-multi-thread\CORE" -L"C:\Mi
nGW\lib" def_pl_4ff5.o C:\perl\5.14.1\lib\MSWin32-x86-multi-thread\C
+ORE\libperl514.a -lmoldname -lkernel32 -luser32 -l
gdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -l
+netapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -
lodbc32 -lodbccp32 -lcomctl32 dll.exp
C:\perl\5.14.1\bin\MSWin32-x86-multi-thread\perl.exe -MExtUtils::Comma
+nd -e chmod -- 755 blib\arch\auto\def_pl_4ff5\def_
pl_4ff5.dll
C:\perl\5.14.1\bin\MSWin32-x86-multi-thread\perl.exe -MExtUtils::Comma
+nd -e cp -- def_pl_4ff5.bs blib\arch\auto\def_pl_4
ff5\def_pl_4ff5.bs
C:\perl\5.14.1\bin\MSWin32-x86-multi-thread\perl.exe -MExtUtils::Comma
+nd -e chmod -- 644 blib\arch\auto\def_pl_4ff5\def_
pl_4ff5.bs
Finished "make" Stage
Starting "make install" Stage
Files found in blib\arch: installing files in blib\lib into architectu
+re dependent library tree
Installing D:\soInline\_Inline\lib\auto\def_pl_4ff5\def_pl_4ff5.bs
Installing D:\soInline\_Inline\lib\auto\def_pl_4ff5\def_pl_4ff5.dll
Finished "make install" Stage
Starting Cleaning Up Stage
Finished Cleaning Up Stage
Finished Build Compile Stage
SV = IV(0x99aa48) at 0x99aa4c
REFCNT = 1
FLAGS = (PADMY,IOK,pIOK)
IV = 123
SV = IV(0x99aa48) at 0x99aa4c
REFCNT = 1
FLAGS = (PADMY,IOK,pIOK)
IV = 1
$ perl notdef.pl
validate Stage
Starting Build Preprocess Stage
get_maps Stage
Finished Build Preprocess Stage
Starting Build Parse Stage
Finished Build Parse Stage
Starting Build Glue 1 Stage
Finished Build Glue 1 Stage
Starting Build Glue 2 Stage
Finished Build Glue 2 Stage
Starting Build Glue 3 Stage
Finished Build Glue 3 Stage
Starting Build Compile Stage
Starting "perl Makefile.PL" Stage
Writing Makefile for modSV
Writing MYMETA.yml and MYMETA.json
Finished "perl Makefile.PL" Stage
Starting "make" Stage
C:\perl\5.14.1\bin\MSWin32-x86-multi-thread\perl.exe C:\perl\site\5.14
+.1\lib\ExtUtils\xsubpp -typemap "C:\perl\5.14.1\l
ib\ExtUtils\typemap" modSV.xs > modSV.xsc && C:\perl\5.14.1\bin\MSWin
+32-x86-multi-thread\perl.exe -MExtUtils::Command -
e mv -- modSV.xsc modSV.c
gcc -c -I"D:/soInline" -s -O2 -DWIN32 -DPERL_TEXTMODE_SCRIPTS -
+DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_S
YS -fno-strict-aliasing -mms-bitfields -s -O2 -DVERSION=\"0.00\"
+ -DXS_VERSION=\"0.00\" "-IC:\perl\5.14.1\lib\MSW
in32-x86-multi-thread\CORE" modSV.c
Running Mkbootstrap for modSV ()
C:\perl\5.14.1\bin\MSWin32-x86-multi-thread\perl.exe -MExtUtils::Comma
+nd -e chmod -- 644 modSV.bs
C:\perl\5.14.1\bin\MSWin32-x86-multi-thread\perl.exe -MExtUtils::Mksym
+lists \
-e "Mksymlists('NAME'=>\"modSV\", 'DLBASE' => 'modSV', 'DL_FUNCS'
+ => { }, 'FUNCLIST' => [], 'IMPORTS' => { }, 'DL
_VARS' => []);"
dlltool --def modSV.def --output-exp dll.exp
g++ -o blib\arch\auto\modSV\modSV.dll -Wl,--base-file -Wl,dll.base -md
+ll -s -L"c:\perl\5.14.1\lib\MSWin32-x86-multi-thre
ad\CORE" -L"C:\MinGW\lib" modSV.o C:\perl\5.14.1\lib\MSWin32-x86-mul
+ti-thread\CORE\libperl514.a -lmoldname -lkernel32
-luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -l
+oleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm
-lversion -lodbc32 -lodbccp32 -lcomctl32 dll.exp
dlltool --def modSV.def --base-file dll.base --output-exp dll.exp
g++ -o blib\arch\auto\modSV\modSV.dll -mdll -s -L"c:\perl\5.14.1\lib\M
+SWin32-x86-multi-thread\CORE" -L"C:\MinGW\lib" mod
SV.o C:\perl\5.14.1\lib\MSWin32-x86-multi-thread\CORE\libperl514.a -
+lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -
lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -l
+ws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32
-lcomctl32 dll.exp
C:\perl\5.14.1\bin\MSWin32-x86-multi-thread\perl.exe -MExtUtils::Comma
+nd -e chmod -- 755 blib\arch\auto\modSV\modSV.dll
C:\perl\5.14.1\bin\MSWin32-x86-multi-thread\perl.exe -MExtUtils::Comma
+nd -e cp -- modSV.bs blib\arch\auto\modSV\modSV.bs
C:\perl\5.14.1\bin\MSWin32-x86-multi-thread\perl.exe -MExtUtils::Comma
+nd -e chmod -- 644 blib\arch\auto\modSV\modSV.bs
Finished "make" Stage
Starting "make install" Stage
Files found in blib\arch: installing files in blib\lib into architectu
+re dependent library tree
Installing D:\soInline\_Inline\lib\auto\modSV\modSV.dll
Finished "make install" Stage
Starting Cleaning Up Stage
Finished Cleaning Up Stage
Finished Build Compile Stage
SV = IV(0xc39248) at 0xc3924c
REFCNT = 1
FLAGS = (PADMY,IOK,pIOK)
IV = 123
SV = IV(0xc39248) at 0xc3924c
REFCNT = 1
FLAGS = (PADMY,IOK,pIOK)
IV = 1
The resulting directory structure
The _Inline/build directory usually gets cleaned up, but not for notdef.pl
notdef.pl also NAME's the module, so its name doesn't change, but def.pl doesn't NAME the module, so a name is derived from the filename (def.pl) and the md5 sum of the c-source code
Now, can two copies of notdef.pl run simultaneously? Lets see
First cleanup $ rm -rfv _Inline
And one copy will trip over the other and die , the other will continue normally $ perl -le " system 1, $^X, q,notdef.pl, for 1,2 "
$ validate Stage
Starting Build Preprocess Stage
get_maps Stage
Finished Build Preprocess Stage
Starting Build Parse Stage
validate Stage
Starting Build Preprocess Stage
get_maps Stage
Finished Build Preprocess Stage
Starting Build Parse Stage
Finished Build Parse Stage
Starting Build Glue 1 Stage
Finished Build Parse Stage
Starting Build Glue 1 Stage
Finished Build Glue 1 Stage
Starting Build Glue 2 Stage
Finished Build Glue 2 Stage
Starting Build Glue 3 Stage
Finished Build Glue 1 Stage
Starting Build Glue 2 Stage
Finished Build Glue 2 Stage
Starting Build Glue 3 Stage
Finished Build Glue 3 Stage
Starting Build Compile Stage
Starting "perl Makefile.PL" Stage
Finished Build Glue 3 Stage
Starting Build Compile Stage
Starting "perl Makefile.PL" Stage
Writing Makefile for modSV
Writing Makefile for modSV
Writing MYMETA.yml and MYMETA.json
Can't open Makefile for input: No such file or directory
at notdef.pl line 8.
BEGIN failed--compilation aborted at notdef.pl line 8.
Writing MYMETA.yml and MYMETA.json
Finished "perl Makefile.PL" Stage
Starting "make" Stage
...
Now I'm not sure what scenario davido is talking about in the OP, but I hope this helps
FWIW, def.pl/notdef.pl are derived from XS: returning a 64-bit unsigned int?/Re: Inline::C with multiple *.c
| [reply] [Watch: Dir/Any] [d/l] [select] |