Skip to content

Building C::Blocks takes a long time #8

Description

@tsee

I just built C::Blocks on a rather vanilla Linux (4.4.0-53-generic #74-Ubuntu SMP Fri Dec 2 15:59:10 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux) using the stock distribution perl 5.22.1.

Building C::Blocks takes "forever" in the Build stage because it falls into brute_force_screen in PerlAPI.xs.PL

tsee@l4tsee:~/perl/C-Blocks$ time ./Build 
Building C-Blocks
Creating lib/C/Blocks/PerlAPI.xs
tcc: error: undefined symbol 'PL_memory_wrap'
tcc: error: undefined symbol 'Perl_croak_nocontext'
^^^ Ignoring likely erroneous undefined symbol warning/error
Using executable screen to check 2755 identifiers

...

Using DynaLoader screen to check 2411 identifiers
Beginning brute-force screening
Using DynaLoader screen to check 2411 identifiers
ccache gcc -I/usr/local/share/perl/5.22.1/auto/share/dist/Alien-TinyCCx/include -I. -I/usr/lib/x86_64-linux-gnu/perl/5.22/CORE -DVERSION="0.42" -DXS_VERSION="0.42" -fPIC -c -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -o lib/C/Blocks.o lib/C/Blocks.c
ExtUtils::Mkbootstrap::Mkbootstrap('blib/arch/auto/C/Blocks/Blocks.bs')
x86_64-linux-gnu-gcc -shared -L/usr/local/lib -fstack-protector-strong -o blib/arch/auto/C/Blocks/Blocks.so lib/C/Blocks.o -L/usr/local/share/perl/5.22.1/auto/share/dist/Alien-TinyCCx/lib -ltcc
ccache gcc -I/usr/local/share/perl/5.22.1/auto/share/dist/Alien-TinyCCx/include -I. -I/usr/lib/x86_64-linux-gnu/perl/5.22/CORE -DXS_VERSION="0.42" -DVERSION="0.42" -fPIC -c -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -o lib/C/Blocks/PerlAPI.o lib/C/Blocks/PerlAPI.c
ExtUtils::Mkbootstrap::Mkbootstrap('blib/arch/auto/C/Blocks/PerlAPI/PerlAPI.bs')
x86_64-linux-gnu-gcc -shared -L/usr/local/lib -fstack-protector-strong -o blib/arch/auto/C/Blocks/PerlAPI/PerlAPI.so lib/C/Blocks/PerlAPI.o -L/usr/local/share/perl/5.22.1/auto/share/dist/Alien-TinyCCx/lib -ltcc

real    6m59.862s
user    6m59.248s
sys     0m13.268s

(I think that the "starting brute force scan" showing up late in the output is a STDOUT/STDERR mixing or a PerlIO buffering effect.)

The bit that I found surprising was that this uses the system compiler rather than TCC, so there's clearly something about the purpose of this that I haven't intuitively understood (didn't dig).

HTH,
Steffen

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions