Giter VIP home page Giter VIP logo

Comments (9)

andytson avatar andytson commented on August 28, 2024

I managed to fix this by replacing the zend_stream_getc line with the actual function from zend_stream.c

However it then complains about undefined symbol zend_error_noreturn, I replaced this with zend_error and it worked.

from xhp-lib.

crowsfan85 avatar crowsfan85 commented on August 28, 2024

Thanks. I had the same problem. This worked for me!

from xhp-lib.

laverdet avatar laverdet commented on August 28, 2024

What platform / gcc version are you guys using? I can't reproduce this on PHP 5.3.1 even though looking at the code it doesn't make sense that it works.

from xhp-lib.

andytson avatar andytson commented on August 28, 2024

CentOS 5.4 i386 and x86_64, I modified the Fedora SRPMs to build php 5.3.1

gcc version 4.1.2-46

from xhp-lib.

laverdet avatar laverdet commented on August 28, 2024

So I understand this bug, but I can't pinpoint why I can't reproduce it. zend_stream_getc is defined as static in zend_stream.c, but somehow it has no problems compiling on my system (and a lot of other systems). I can copy the code like you mentioned but I'm worried that without figuring out why it works on my system and not yours we may run into more bugs like this in the future.

from xhp-lib.

laverdet avatar laverdet commented on August 28, 2024

Well I managed to repro using gcc 4.1 like you mentioned, but I don't get the zend_error_noreturn failure. @crowsfan85, do you get the zend_error_noreturn not defined error as well, or is it just zend_stream_getc?

from xhp-lib.

andytson avatar andytson commented on August 28, 2024

I seem to no longer get that zend_error_noreturn error, whether it was me changing the CPPFLAGS in my build scripts or upgrading to php 5.3.2

So the gcc version, I assume you've been building earlier with later versions of gcc? It seems strange that they should add dodgy unexported function linking as a feature to gcc.

from xhp-lib.

laverdet avatar laverdet commented on August 28, 2024

Strange indeed. static is more of just a guideline so I think the compiler can just do whatever it wants, and once you give it -O2 or -O3 all assumptions are out the window. I'll be sure to test in gcc 4.1.x for future releases.

from xhp-lib.

laverdet avatar laverdet commented on August 28, 2024

Fixed with 8698ead

from xhp-lib.

Related Issues (20)

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.