Page MenuHomePhabricator

beta: install texvc
Closed, ResolvedPublic


To reproduce:

Internal error
No backend defined with the name global-multiwrite.
#0 /data/project/apache/common-local/php-master/extensions/Math/MathTexvc.php(229): FileBackendGroup->get('global-multiwri...')
#1 /data/project/apache/common-local/php-master/extensions/Math/MathTexvc.php(47): MathTexvc->getBackend()
#2 /data/project/apache/common-local/php-master/extensions/Math/MathTexvc.php(303): MathTexvc->getHashPath()
#3 /data/project/apache/common-local/php-master/extensions/Math/MathTexvc.php(32): MathTexvc->readCache()
#4 /data/project/apache/common-local/php-master/extensions/Math/Math.hooks.php(54): MathTexvc->render()
#5 [internal function]: MathHooks::mathTagHook('3 + 2', Array, Object(Parser), Object(PPFrame_DOM))
#6 /data/project/apache/common-local/php-master/includes/parser/Parser.php(3913): call_user_func_array(Array, Array)
#7 /data/project/apache/common-local/php-master/includes/parser/Preprocessor_DOM.php(1155): Parser->extensionSubstitution(Array, Object(PPFrame_DOM))
#8 /data/project/apache/common-local/php-master/includes/parser/Parser.php(3070): PPFrame_DOM->expand(Object(PPNode_DOM), 0)
#9 /data/project/apache/common-local/php-master/includes/parser/Parser.php(1148): Parser->replaceVariables('<math>3 + 2</ma...')
#10 /data/project/apache/common-local/php-master/includes/parser/Parser.php(383): Parser->internalParse('<math>3 + 2</ma...')
#11 /data/project/apache/common-local/php-master/includes/content/WikitextContent.php(300): Parser->parse('<math>3 + 2</ma...', Object(Title), Object(ParserOptions), true, true, NULL)
#12 /data/project/apache/common-local/php-master/includes/EditPage.php(3081): WikitextContent->getParserOutput(Object(Title), NULL, Object(ParserOptions))
#13 /data/project/apache/common-local/php-master/includes/EditPage.php(2103): EditPage->getPreviewText()
#14 /data/project/apache/common-local/php-master/includes/EditPage.php(441): EditPage->showEditForm()
#15 /data/project/apache/common-local/php-master/includes/actions/EditAction.php(50): EditPage->edit()
#16 /data/project/apache/common-local/php-master/includes/actions/EditAction.php(76): EditAction->show()
#17 /data/project/apache/common-local/php-master/includes/Wiki.php(439): SubmitAction->show()
#18 /data/project/apache/common-local/php-master/includes/Wiki.php(305): MediaWiki->performAction(Object(Article), Object(Title))
#19 /data/project/apache/common-local/php-master/includes/Wiki.php(565): MediaWiki->performRequest()
#20 /data/project/apache/common-local/php-master/includes/Wiki.php(458): MediaWiki->main()
#21 /data/project/apache/common-local/php-master/index.php(59): MediaWiki->run()
#22 /data/project/apache/common-local/w/index.php(3): require('/data/project/a...')
#23 {main}

Version: unspecified
Severity: major
See Also:



Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 1:35 AM
bzimport set Reference to bz47203.

Different error message on

Failed to parse (Missing texvc executable; please see math/README to configure.): 3 + 2

Math works just fine on

Related URL: (Gerrit Change If808611bcb1115a8a77384c4418255f0ddd81f7f) (Gerrit Change If808611bcb1115a8a77384c4418255f0ddd81f7f) | change APPROVED and MERGED [by jenkins-bot]

The change fix the first error:

No backend defined with the name `global-multiwrite`.

Now lets look at installing texvc on beta.

$ mwscript eval.php --wiki=enwiki

echo $wgTexvc



The uncommon dir is empty. So we need to generate the texvc under /data/project/apache/uncommon

I have Zerooo idea how to compile texvc nowadays :(

we'd like to point the Math browser test to beta since we'll be using test2 for VE testing for a bit, and the old editor and VE will be mutually exclusive


(In reply to comment #8)

Is building texvc something Reedy has automated somewhere?

No. It was previously part of the normal scap process till Aaron removed it for being relatively slow. The code changes so infrequently, so in most cases, doing it once after initial deployment should be enough.

The script I use is scap-recompile, and through dsh run it on all the apaches.

dsh -F25 -cM -g mediawiki-installation -o -oSetupTimeout=10 'sudo -u mwdeploy /usr/bin/scap-recompile'

bug 45076 is a request to package it and distribute it, so we wouldn't need to create a version per mediawiki deployment

if ( $wmgUseMath ) {
require_once( "$IP/extensions/Math/Math.php" );
$wgTexvc = "/usr/local/apache/uncommon/$wmfVersionNumber/bin/texvc";
if ( $wgDBname === 'hewiki' ) {

		$wgDefaultUserOptions['math'] = 0;

$wgMathFileBackend = $wmgMathFileBackend;
$wgMathDirectory = '/mnt/upload7/math'; // just for sanity
$wgMathPath = $wmgMathPath;
$wgUseMathJax = true;

Of course, the simple fix is to remove the version variant from that path to executable (at least, for wmf wikis) as an intermediate step

Test case is on

<math>3 + 2</math>

gives out:

Failed to parse (Missing texvc executable; please see math/README to configure.): 3 + 2

Rebuild math on deployment-bastion as mwdeploy using /usr/bin/scap-recompile . The generated HTML points to production though:

$ echo '<math>2+3</math>'|mwscript parse.php --wiki=enwiki
parse.php: warning: reading wikitext from STDIN. Press CTRL+D to parse.

<p><img class="tex" alt="2+3" src="//" />

$ mwscript eval.php --wiki=enwiki

return $wgMathPath


I have cleaned up the math related global settings

$ mwscript eval.php --wiki=enwiki

return $wgMathPath


Purged the math page and it generated HTML that points to

Still have to have texvc automatically recompiled whenever it is changed.

Related URL: (Gerrit Change Ib8e92577d1b9ab41e4c41e2598d10b997dd2b203)

Related URL: (Gerrit Change I704ead3913fde080344015bb246c1d21af61ace5)

Jenkins job and Zuul triggers have been deployed (changes above).

Whenever a change is merged in Math (for example a l10n update), we will have to check whether the job works properly at

Hence this bug is very close to be resolved for good.

The Jenkins job has been triggered properly after a merge. Math is thus self updating on beta \O/