Coder Social home page Coder Social logo

Comments (6)

remicollet avatar remicollet commented on June 7, 2024 1

Ok, using GCC 6.2 for both libmustache and pecl/mustache fixes the issue (build + test sutie ok with PHP 5.6/7.0/7.1/7.2)

So fixed on my side by

Closing as very specific to build environment

from php-mustache.

jbboehr avatar jbboehr commented on June 7, 2024

@remicollet I notice I have that error if libmustache is compiled with gcc 4.8, but php-mustache is compiled with gcc 6.2:

FROM centos:7

RUN rm -f /var/lib/rpm/__* && rpm --rebuilddb -v -v && yum clean all
RUN sed -i s/enabled=1/enabled=0/g /etc/yum/pluginconf.d/fastestmirror.conf
RUN yum install -y centos-release-scl
RUN yum install -y yum install devtoolset-6-gcc*
RUN yum install -y php php-devel autoconf automake libtool make m4 git file
RUN yum install -y gcc gcc-c++

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

RUN source scl_source enable devtoolset-6 && \
	gcc --version && \
	git clone https://github.com/jbboehr/php-mustache.git /php-mustache && \
	cd /php-mustache && \
	phpize && \
	./configure --enable-mustache && \
	make clean all

RUN echo "source scl_source enable devtoolset-6 && cd /php-mustache && make test" > /entry.sh && \
	chmod +x /entry.sh

CMD "bash" "/entry.sh"

vs

FROM centos:7

RUN rm -f /var/lib/rpm/__* && rpm --rebuilddb -v -v && yum clean all
RUN sed -i s/enabled=1/enabled=0/g /etc/yum/pluginconf.d/fastestmirror.conf
RUN yum install -y centos-release-scl
RUN yum install -y yum install devtoolset-6-gcc*
RUN yum install -y php php-devel autoconf automake libtool make m4 git file

RUN source scl_source enable devtoolset-6 && \
	gcc --version && \
	git clone https://github.com/jbboehr/libmustache.git /libmustache && \
	cd /libmustache && \
	autoreconf -fiv && \
	./configure --without-mustache-spec && \
	make clean all install

RUN source scl_source enable devtoolset-6 && \
	gcc --version && \
	git clone https://github.com/jbboehr/php-mustache.git /php-mustache && \
	cd /php-mustache && \
	phpize && \
	./configure --enable-mustache && \
	make clean all

RUN echo "source scl_source enable devtoolset-6 && cd /php-mustache && make test" > /entry.sh && \
	chmod +x /entry.sh

CMD "bash" "/entry.sh"

from php-mustache.

jbboehr avatar jbboehr commented on June 7, 2024

I assume there is some issue with usage of std::unordered_map in the library vs extension being compiled under different versions of gcc.

from php-mustache.

jbboehr avatar jbboehr commented on June 7, 2024

@remicollet let me know if compiling libmustache and php-mustache with the same version of gcc works for you, and whether or not it's possible to do that for your packaging needs.

I believe ensuring an object is both created and destroyed in code compiled by a particular version of gcc (meaning an object created in php-mustache would need to also be destroyed in php-mustache), might be a possible workaround, but it seems dangerous using two different versions to compile parts of the code.

from php-mustache.

remicollet avatar remicollet commented on June 7, 2024

whether or not it's possible to do that for your packaging needs.

The issue is that only php 7.1/7.2 are built with gcc 6.2 (which give some perf improvement)
So changing gcc version used for libmustaphe will result in other issue for 5.6/7.0

IIRC, I have tried to build both libmustache and pecl/mustache with 6.2... without success, will try again

from php-mustache.

jbboehr avatar jbboehr commented on June 7, 2024

Perfect!

from php-mustache.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.