Page MenuHomePhabricator

beta: install texvc
Closed, ResolvedPublic

Description

To reproduce:

Internal error
No backend defined with the name global-multiwrite.
Backtrace:
#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:
https://bugzilla.wikimedia.org/show_bug.cgi?id=45076

Details

Reference
bz47203

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 http://commons.wikimedia.beta.wmflabs.org/

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

Math works just fine on http://commons.wikimedia.org/

Related URL: https://gerrit.wikimedia.org/r/59386 (Gerrit Change If808611bcb1115a8a77384c4418255f0ddd81f7f)

https://gerrit.wikimedia.org/r/59386 (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

/usr/local/apache/uncommon/master/bin/texvc

$

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

See http://www.mediawiki.org/wiki/Texvc

Reedy added a comment.Jun 11 2013, 4:53 PM

(In reply to comment #8)

Is building texvc something Reedy has automated somewhere?
https://bugzilla.wikimedia.org/show_bug.cgi?id=49442
https://bugzilla.wikimedia.org/show_bug.cgi?id=48991

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

Reedy added a comment.Jun 11 2013, 4:56 PM

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 http://en.wikipedia.beta.wmflabs.org/wiki/Math

<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="//upload.wikimedia.org/math/4/4/c/44c7c5541a25b4ed6340e07dde8f8dca.png" />
</p>
$

$ mwscript eval.php --wiki=enwiki

return $wgMathPath

//upload.wikimedia.org/math

I have cleaned up the math related global settings https://gerrit.wikimedia.org/r/69061

$ mwscript eval.php --wiki=enwiki

return $wgMathPath

//upload.beta.wmflabs.org/math

Purged the math page http://en.wikipedia.beta.wmflabs.org/wiki/Math and it generated HTML that points to http://upload.beta.wmflabs.org/math/0/4/9/049dc5a60b2b3315b2504c319f6fb8e1.png

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

Related URL: https://gerrit.wikimedia.org/r/69068 (Gerrit Change Ib8e92577d1b9ab41e4c41e2598d10b997dd2b203)

Related URL: https://gerrit.wikimedia.org/r/69069 (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 https://integration.wikimedia.org/ci/job/beta-recompile-math-texvc/

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/

https://integration.wikimedia.org/ci/view/Beta/job/beta-recompile-math-texvc/2/

this is great, thank you!