Closed remicollet closed 7 years ago
Hmm... very strange, don't understand why travis fails... (of course, works on my local build)
@remicollet Looks like the -nostdlib
flag is causing it (master on right)
https://www.diffchecker.com/iwdHx2Hb
I'm not entirely sure why atexit
is required, but maybe related to gcov?
@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
Looks like the nts
image also has the issue though.
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
Thanks
Only affects some specific env. (such as using devtoolset-6 builder on RHEL-7)