DomBlack / php-scrypt

A PHP wrapper fo the scrypt hashing algorithm
Other
209 stars 57 forks source link

scrypt fails to work during the test. #6

Closed 133794m3r closed 11 years ago

133794m3r commented 11 years ago

OK, you need to change the configure script or something, somewhere. I don't know where, but you have to make it load the realtime clock library. By adding in the flag "-lrt". I don't know where this goes in your extension, but without it, it'll fail.

133794m3r commented 11 years ago

Updated to the latest build on here, copied the source, and the results are the same for me.

133794m3r commented 11 years ago

001+ /usr/bin/php: symbol lookup error: /tmpdownload/php-scrypt-master/modules/scrypt.so: undefined symbol: clock_getres 001- array

DomBlack commented 11 years ago

What system are you using, I am completely unable to replicate this?

133794m3r commented 11 years ago

Debian 6 amd64. I'm going to upgrade to v7(in a week or so) but I don't think it'll change much of a difference as by default gcc doesn't include the rt library.

DomBlack commented 11 years ago

If you add this into the config.m4 just before the final fi does it solve your issue? (You will need to re-run evertying from the phpize line onwards)

CFLAGS="$CFLAGS -lrt"
CXXFLAGS="$CXXFLAGS -lrt"
133794m3r commented 11 years ago

Works just fine, I added it to the configure file, but it works just fine now and both tests pass.

DomBlack commented 11 years ago

Could you check from this branch please bugRTLibraryMissingDebian

As the fix I gave earlier breaks builds on other systems, I believe this fix should solve it for you while keeping the build working in other places.

133794m3r commented 11 years ago

It works just fine now. I just built that branch and it compiles w/o issues.