Skip to content

Conversation

thekid
Copy link
Contributor

@thekid thekid commented Jun 28, 2014

The whole of password.c is inside a #if HAVE_CRYPT conditional, but basic_functions.c unconditionally initializes the password module and tries to declares its functions, leading to this error.

This fixes phpbrew/phpbrew#236

The whole of password.c is inside a `#if HAVE_CRYPT` conditional
This fixes phpbrew/phpbrew#236
@datibbaw
Copy link
Contributor

The documentation states that the password API is part of the core, so IMHO it would make more sense to make crypt a prerequisite.

@thekid
Copy link
Contributor Author

thekid commented Jun 29, 2014

The documentation states that the password API is part of the core

You're right, http://de3.php.net/manual/en/password.requirements.php states No external libraries are needed to build this extension. - but as seen above this does not apply in all cases:)

it would make more sense to make crypt a prerequisite.

This means changing the m4 stuff AFAIS which I have no clue how to do.

@CMCDragonkai
Copy link

So this allows one to compile PHP in Cygwin? 64 bit or 32 bit?

@thekid
Copy link
Contributor Author

thekid commented Jun 29, 2014

This allows one to compile PHP without -lcrypt being available (a rare case, but can happen under Cygwin).

@smalyshev
Copy link
Contributor

I'd rather just have configure bail out if the library is not available other than produce builds that miss function that is documented as part of core. But I suggest also contacting the original author (Anthony Ferrara) and asking what was the intent to happen when HAVE_CRYPT is not there.

@thekid
Copy link
Contributor Author

thekid commented Jul 8, 2014

I'd rather just have configure bail out if the library is not available

Sure, that's probably netter. I'll close this then.

@thekid thekid closed this Jul 8, 2014
@thekid
Copy link
Contributor Author

thekid commented Jul 8, 2014

/cc @ircmaxell FYI

@ircmaxell
Copy link
Contributor

Can this be opened as a php.net bug?

Looking at it, it does indeed look like an oversight. But I'm not sure the correct way to fix it... We could disable password_* if crypt isn't available, but that's not a great solution. But not being able to build PHP without crypt isn't a great one either...

@thekid
Copy link
Contributor Author

thekid commented Jul 28, 2014

@thekid thekid deleted the fix/undefined_ref_to_password branch September 29, 2017 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Windows Cygwin - Error building PHP
5 participants