New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with make on OSX 10.10.2 #167
Comments
What compiler are you using? |
Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn) |
I have no 32bit system here right now, but I may be able to solve it right away. Could you fetch the master branche to see if the latest commit solves your issue? |
change |
@andot .. I would suggest, as in issue #57, the other way around to define every variable type as int16_t, int32_t etc. A quick quote of my posting in issue #57: "... what i noticed is that you mixing the value type definitions (int(C/C++), int32_t(STL), int32(PHP)) could be lead to problems if some platform define f.e: int as a 64 bit type you know what i mean. I suggest that maybe if its prossible to use only one definition of one type. Furthermore accessing arrays should be done if possible with size_t or uint32_t and not with and fixed signed type like "int32_t" because it's safer [-n access] etc. and you are scaleable (under x64 size_t is 64bit - just for the future because php is only available in 32bit for now). STL containeres are also using size_t as index and return parameter. ..." |
I think that the users can decide to use |
The problem is that you shouldn't mix any types either int with int32_t or the other way around or long with int around also you should be aware how much bytes your are actually are using but only with the define int32_t you can be shure about that. So therefore ether use only long or int or int32_t or size_t if you want to get the full advantage of 64bit. |
The |
And then they want to build their extensions on multiply plattforms on both 32bit and 64bit and then they have the same problem so why not rather say that's the interface (you can still cast n int to an int32_t if an compile error occures) and deal with it. |
If they want to build their extensions on multiply platforms on both 32bit and 64bit, and if they want some fixed size type, they can use |
AFAIK, the real issue comes from Zend. In Zend, they have been so You know, PHP was just developed by some guys that needed a tool to make websites interactive, without having a big master plan, and without knowing that one day it would grow out to be one of the most important web languages in the universe. They just did things. This is the cause that PHP has so many inconsistencies and strange "features". The fact that numbers in a script language behave different when the script runs on a 32bit platform than on a 64bit platform is weird - script languages are supposed to run the same everywhere, and not depend on the architecture! This is still an issue among the PHP internal girls and guys, and once in a while you see suggestions coming up to finally solve this 32bit/64bit mistake that PHP has. I don't know what the current state is. In PHP-CPP I wanted to hide this internal PHP mistake, and only expose "stdint.h" types. PHP-CPP only works with explicit 16bit, 32bit or 64bit numbers, so for a PHP-CPP user there can be no doubt about the number of bits that is being used for a variable. It is not going to happen that PHP-CPP is going to expose vague types like 'long' and 'int', because I do not want to make the same mistake that Zend did. The question is: does PHP-CPP now compile on a 32bit platform? If the answer is yes, the problem is solved. |
In fact, Mac OS X 10.10.2 is 64bit platform. |
I have no access to a mac, so I could really use a pull request if someone can fix it. Just a single (int64_t) cast has to be added to solve this. |
@andot: sry but that's not true if the interface has long and you use int32_t you have the same problem as the other way around. @EmielBruijntjes: I totaly agree with you 👍 that's my point. Under Win7 32bit it works. But nevertheless we should replace the currently not converted "int, long, etc" to "int32_t". To the compiling problem maybe this helps: http://stackoverflow.com/questions/986426/what-do-stdc-limit-macros-and-stdc-constant-macros-mean |
It still can't work on Mac OS X. but my branch can works https://github.com/andot/PHP-CPP/tree/my_branches. I used If the interface has I think the user decides to use |
The new version can compile now. But
|
Following error is coming:
The text was updated successfully, but these errors were encountered: