Skip to content

Static build failed + workaround #4

@vadimkantorov

Description

@vadimkantorov

When doing a static install, there is a bug in Makefile that leads to the following

rm -f "blib/arch/auto/IO/Compress/Brotli/Brotli.a"
cp brotli/libbrotlienc.a brotli/libbrotlidec.a brotli/libbrotlicommon.a "blib/arch/auto/IO/Compress/Brotli/Brotli.a"
# cp: target 'blib/arch/auto/IO/Compress/Brotli/Brotli.a' is not a directory

The problem is because $(MYEXTLIB) contains several libraries (from Makefile): # MYEXTLIB => q[brotli/libbrotlienc$(LIB_EXT) brotli/libbrotlidec$(LIB_EXT) brotli/libbrotlicommon$(LIB_EXT)]

With the following fix, it starts working:

perl Makefile.PL LINKTYPE=static
sed -i 's/$(CP) $(MYEXTLIB) "$@"/$(CP) $(MYEXTLIB) "$(dir $@)"/' Makefile
make
make install

Don't know if this can be fixed in this package or needs to be fixed in MakeMaker...

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