jbboehr / php-mustache

Mustache PHP Extension
MIT License
56 stars 22 forks source link

use proper command for build #34

Closed remicollet closed 7 years ago

remicollet commented 7 years ago

Only affects some specific env. (such as using devtoolset-6 builder on RHEL-7)

remicollet commented 7 years ago

Hmm... very strange, don't understand why travis fails... (of course, works on my local build)

jbboehr commented 7 years ago

@remicollet Looks like the -nostdlib flag is causing it (master on right) php-mustache-ld-diff https://www.diffchecker.com/iwdHx2Hb

jbboehr commented 7 years ago

I'm not entirely sure why atexit is required, but maybe related to gcov?

jbboehr commented 7 years ago

@remicollet I can't replicate it using trusty in docker, but it has the same issue using the following dockerfile:

FROM php:7.0.19-zts

RUN apt-get update && \
    apt-get install -y  build-essential lcov autoconf automake git pkg-config libtool && \
    rm -rf /var/lib/apt/lists/*

RUN git clone https://github.com/jbboehr/libmustache.git /libmustache && \
    cd /libmustache && \
    autoreconf -fiv && \
    ./configure --without-mustache-spec && \
    make clean all install

RUN git clone -b issue-cxx https://github.com/remicollet/php-mustache.git /php-mustache && \
    cd /php-mustache && \
    phpize && \
    ./configure --enable-mustache CXXFLAGS="--coverage -fprofile-arcs -ftest-coverage" LDFLAGS="--coverage" && \
    make clean all

RUN echo "cd /php-mustache && \
    lcov --directory . --zerocounters && \
    lcov --directory . --capture --initial --compat-libtool --output-file coverage.info && \
    export REPORT_EXIT_STATUS=1 && \
    export NO_INTERACTION=1 && \
    export TEST_PHP_EXECUTABLE=`which php` && \
    php run-tests.php -d extension=mustache.so -d extension_dir=modules -n ./tests/*.phpt" > /entry.sh && \
    chmod +x /entry.sh

then docker run f464348c8aa8 sh /entry.sh

jbboehr commented 7 years ago

Looks like the nts image also has the issue though.

jbboehr commented 7 years ago

For the record, I believe this is the solution: https://stackoverflow.com/questions/11703709/hidden-symbol-atexit-is-referenced-by-dso-when-using-libtool-with-gcov

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 89.258% when pulling 67e9d630bd40f7597e12284c6b491abd81d2446d on remicollet:issue-cxx into 306af7d6d50a925ee740c8951371d589fa6e4958 on jbboehr:master.

remicollet commented 7 years ago

Thanks