-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
BASH 4.3.42 Errors - error importing fucntion definition for BASH_FUNC_module Fedora 23 (F23) #2065
Comments
No idea. Try Drupal Answers. |
The problem is with Drush and the latest version of Bash shell. That is why I posted this here. |
I have also experienced this problem on Fedora. It's not clear to me where to put the |
Agreed. It's a compatibility issue that will grow once the newer versions of bash are more mainstream. They just don't realize it here yet. The maintainers are quick to close rather than diagnose. |
Not sure this is caused by new versions of bash; this apparently was a problem for some folks in 2011. See: http://gridengine.org/pipermail/users/2011-November/002019.html I suspect that this problem is Fedora-specific. It would be helpful if a Fedora user could provide more diagnostic information on some of the suggested workarounds. |
Hey, Greg! I run Debian on most of my machines, and I've never encountered this problem before. Previously, my workflow was to check out the drush git repo and then switch branches when I switched back and forth between Drupal 7 and Drupal 8 projects. I only encountered this on a newer laptop that seems to do (other tasks) better with Fedora (but not this), so I think you might be correct that this Fedora-specific. The errors I encountered looked exactly like the ones mentioned in the first comment of this issue. However, apparently git branch switching is (no longer?) necessary. So for me the solution was simply to follow the install instructions on http://docs.drush.org/en/master/install/ and all seems to work, and I happily switch back and forth from D7 to D8. That might not work for others, but it suits my needs. |
@greg-1-anderson All the probing and google searching I did came back to the shell script being executed. I spent a lot of time on it before I posted the issue here because my research had come to the conclusion that the problem is with the shell script. The bash shell in Fedora is pretty far ahead of most distro's. My Mac only has v3.2.57 running Yosemite. |
Here is an example of one of the things I found and it was mentioned on other pages that the issue was with semi-colons in the bash shell scripts. That all the lines needed to have semi-colons at the end. |
Here is another good blog post pertaining to the export function. I will make a note to myself to spin up some other machines and see if I can replicate this in another distro. |
It appears the call to pcntl_exec is causing the message(s). |
@iamorangehat I will give this a test too. Maybe post a patch for others to use in testing. |
After finding the command I felt was causing the issue, I noticed that if the function_exists returns a FALSE (if pcntl_exec function is not available) so it falls through to use proc_open. I added a line to force it to FALSE. We could have probably added pcntl to the disable_functions in php.ini and did the same thing without changing the startup.inc though not sure what parm in disable_functions, i.e. pcntl or pcntl_exec |
If |
No, I was getting TRUE on my system so I forced it to false so it fell through to proc_open. Sorry for the confusion. |
I just installed Drush globally via composer on CentOS 6.8 and am getting the same error:
If I "unset module" from BASH then it seems to work OK. |
Fedora updates and Drush updates. This still spams the hell of out my screen every time I run drush.
|
Try this: |
The above works! |
Same here on CentOS 6.x and 7. Installed via Composer. |
@iamorangehat Thanks, it worked on Amazon CentOS! |
How would you go about changing that value on a shared hosting solution? In that situation I'm - ofcourse - unable to edit the php.ini. |
@nvaken , Then you need alter drush so it doesn't use pcntl_exec by editing the code. |
This thread points to the function_exists() being an unpredictable indicator of function availability. Near the bottom of the thread is this idea:
So maybe we need to have two levels of checks for availability of pcntl_exec? |
This is exactly the problem I'm having. The function is disabled in php.ini, but
|
I came across the same compile error building Netty using Fedora. I installed the package libtool.x86_64. The installation provided the missing function definitions. Allowing my build to complete successfully. |
Fixed, AFAICT. |
Solution provided by @iamorangehat works for me, thanks..! |
I just downloaded Drush 8 via composer (for D7) on CentOS7 (host on uberspace.de), and it is not fixed there - is this just fixed in Drush9? |
You will probably need to still do this: |
@iamorangehat Thanks, works perfectly. |
Wooonderful!! @iamorangehat it worked for me on CentOs 7 Thanks! |
It would be more helpful to focus on the solution by @whitingjr. Disabling |
Add the command below to ~/.bash_profile or ~/.bashrc file then logout/login again.
Or simple run quick command:
|
Fwiw the core issue is how Drush8 is retrieving the system's shell environment. The code at Lines 31 to 42 in 03539df
operates under the assumption that every environment variable printed by BASH_FUNC_module()=() { eval `/usr/bin/modulecmd bash $*`
} The origin of this envvar with a newline character is that the function containing a semicolon is exported into the environment via This is parsed into the the $env-Array by drush as: array(
[BASH_FUNC_module()] => () { eval `/usr/bin/modulecmd bash $*`
[}] =>
) As this is passed into Line 422 in 03539df
$env is not used when executing via proc_open the error is only showing when using pctnl_exec() .
So possible mitigations are indeed unsetting the env variable To ultimately fix this the environment retrieval should probably be adjusted to cope with multiline environment variables. |
It is still a problem, just got the above error in an RHEL 7.8 system. I agree with @dirkd : "To ultimately fix this the environment retrieval should probably be adjusted to cope with multiline environment variables." It also worth to mention that the above mentioned |
I have been trying to resolve this but I haven't been able to on my own. Hoping someone else here has some insight. Running the latest Drush (via Composer global install) I get errors in bash on Fedora 23 which is using Bash version 4.3.42.
This error:
and:
Repeats itself eight times per drush call. Drush still runs without a problem. Just blasts your terminal with loads of text.
I have axed the .drush/ folder and re-run drush init. That does not change the problem. Googling the error gets a lot of hits for many other issues.
Ideas?
The text was updated successfully, but these errors were encountered: