MATLAB 2020a and prior versions generate pcode warning
Show older comments
I help run a centralized computing site with MATLAB for our users, and at least two versions (2019a and 2020a) complain that the P-file for ver.p is older than the ver.m that's installed and might need to be rebuilt. The ver function seems to be needed by a several functions to do something (check the license?), so the warning message comes up frequently, but it's not an error and doesn't cause code failures, just confusion and trouble tickets from our users. My assumption was that these pcode files were created by The Mathworks and shipped with MATLAB and end users need not worry about them. Any advice? Here's a sample of the message, lightly edited to shorten the paths:
Warning: P-file /xxxxxxx/matlab/2020a/toolbox/matlab/general/ver.p is older
than MATLAB file /xxxxxxx/matlab/2020a/toolbox/matlab/general/ver.m.
/xxxxxxx/matlab/2020a/toolbox/matlab/general/ver.p may be obsolete and may
need to be regenerated.
Type "help pcode" for information about generating P-files.
Users sometimes try to regenerate the P-files themselves, which can lead to some really interesting trouble tickets since they don't have write permissions to the MATLAB installation directory. For the 2020a files, they both have UNIX modify and change dates a few seconds apart on what I presume to be the install date (I'm not the one that did the install).
Answers (1)
Fangjun Jiang
on 14 Aug 2020
0 votes
Someone must have modified and saved the ver.m file by mistake. ver.m and ver.p are built-in files and shouldn't be modified. Restore the original copy for those two files and the problem should be resolved.
The "Date Modified" for ver.m in R2020a is 3/6/2019. For ver.p, it is 1/29/2020.
6 Comments
Bill Barth
on 14 Aug 2020
Fangjun Jiang
on 14 Aug 2020
check the date "modified", not "created".
Bill Barth
on 15 Aug 2020
Fangjun Jiang
on 15 Aug 2020
run "which -all ver" to see if there are multiple files.
run "pcode ver.m" and over-write the ver.p file. Make sure nobody else would do the same or have the right to over-write the ver.m file.
Bill Barth
on 15 Aug 2020
Fangjun Jiang
on 17 Aug 2020
Many .m files are for help document, for example abs.m, there won't be one-to-one match of .p file for every .m file.
Anyway, the warning message is annoying. Contact the Mathworks Tech Support. I bet they can tell you what should be the exact "time stamp" on the files and you could eventually figure out the cause and solution.
Categories
Find more on Introduction to Installation and Licensing in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!