Skip to content
Brian Degnan edited this page Dec 23, 2024 · 1 revision

Welcome to the redbash wiki!

The current issue that is known is related to the perl5 Portfile under Linux. I have not yet cleaned this up yet, but these are required in the Portfile to make miniperl and the other shared objects build:

   configure.env-append \
        LDDLFLAGS="-shared -fPIC -L${prefix}/lib -lintl" \
        LDFLAGS="-L${prefix}/lib -lintl -Wl,-rpath,${prefix}/lib -Wl,-rpath,${prefix}/lib/perl5/5.34/x86_64-linux-thread-multi/CORE"

    build.env-append \
        LDFLAGS="-L${prefix}/lib -Wl,-rpath,${prefix}/lib -Wl,-rpath,${prefix}/lib/perl5/5.34/x86_64-linux-thread-multi/CORE"


    post-configure {
        ui_msg "Replacing LD_LIBRARY_PATH in Makefile..."
        reinplace "s|^LDLIBPTH = LD_LIBRARY_PATH=.*|LDLIBPTH = LD_LIBRARY_PATH=${prefix}/lib:${worksrcpath}|" ${worksrcpath}/Makefile
        
        ui_msg "Makefile content after reinplace:"
        system "grep '^LDLIBPTH' ${worksrcpath}/Makefile || echo 'LDLIBPTH not found after reinplace'"

        ui_msg "Updating CCDLFLAGS in Makefile for proper rpath..."
        reinplace "s|^CCDLFLAGS =.*|CCDLFLAGS = -Wl,-E -Wl,-rpath,${prefix}/lib -Wl,-rpath,${prefix}/lib/perl5/5.34/x86_64-linux-thread-multi/CORE|" ${worksrcpath}/Makefile


        if {[file exists ${worksrcpath}/makefile]} {
            ui_msg "Renaming conflicting makefile..."
            move ${worksrcpath}/makefile ${worksrcpath}/makefile.backup
        }
    }



    build.env-append \
        LD_LIBRARY_PATH="${prefix}/lib:${worksrcpath}"

    pre-build {
        ui_msg "Debugging build environment LD_LIBRARY_PATH..."
        system "env | grep LD_LIBRARY_PATH || echo 'LD_LIBRARY_PATH not set'"
        system "env > ${workpath}/build-env.txt"
    }

Clone this wiki locally