Package Details: matlab 9.12.0.1903524-5

Git Clone URL: https://aur.archlinux.org/matlab.git (read-only, click to copy)
Package Base: matlab
Description: A high-level language for numerical computation and visualization
Upstream URL: http://www.mathworks.com
Keywords: matlab
Licenses: custom
Provides: matlab, matlab-bin, python-matlabengine
Submitter: ido
Maintainer: Rubo (sukanka)
Last Packager: Rubo
Votes: 32
Popularity: 1.33
First Submitted: 2015-08-15 09:33 (UTC)
Last Updated: 2022-04-28 14:33 (UTC)

Pinned Comments

Rubo commented on 2022-04-19 16:04 (UTC) (edited on 2022-04-25 16:25 (UTC) by Rubo)

Hello, I just pushed an update to the 2022a release. Some things have changed:

  • The PKGBUILD is based on the one VictriD kindly provided here, with some minor adjustments to make it work against the 2022a release. For more information on how it works and what has changed, read that comment. I put the files on a GitHub repo here: https://github.com/Rubo3/matlab-aur.
  • I rewrote most of the README, in order to cover some installation issues, like the correct unzip flags so that the installer doesn't complain of files being shorted than expected; the new libxcrypt-compat dependency and the FreeType shared object renaming.
  • I removed matlab.script, let me know if you want it back.
  • I added an install script, which covers basic installation needs (i.e. the exact procedure listed in the README), so that you only have to interact with the on-line installer. Please remember to edit the PKGBUILD products variable beforehand if you want a partial install. The points listed by bbaserdem here still hold.

It runs, but there are many errors, most likely because the dependencies on the PKGBUILD do not reflect the current ones. If you'd like to help out, here are the MATLAB dependencies for the Docker container. In the Source Repository box you can find the link to the base-dependencies.txt mentioned in the Dockerfile. If you find something interesting, please leave a message!

bbaserdem commented on 2020-09-21 16:39 (UTC) (edited on 2021-02-03 18:13 (UTC) by bbaserdem)

READ THE README FILE IN THE REPO. NO AUR HELPERS SUPPORTED. ONLY ARCHLINUX AS OS IS SUPPORTED. YOU SHOULD BE BUILDING THIS PACKAGE USING MAKEPKG, NOTHING ELSE WILL BE SUPPORTED. Please only post issues here AFTER you followed the README.md. located at the root of this repo: https://aur.archlinux.org/cgit/aur.git/tree/README.md?h=matlab Due to a lot of comments; my spam filter is removing AUR notifications which keeps me from responding timely to issues in packaging, please don't post if you don't do some troubleshooting yourself. If your skill level is not up to troubleshooting (or following simple instructions as laid out by the readme), just install matlab locally, without using this package.

  • This PKGBUILD is NOT a minimal installation; as it has (hard) dependencies to gcc8 to force MATLAB to use system libraries. While generally not required; this PKGBUILD is trying to make MATLAB work with the system rather than with the mathworks-provided binaries. Currently it also does the python integration so that jupyter can be used with it.
  • This will only work with 2020b version; and will not work with earlier (or later) versions.
  • This PKGBUILD DOES NOT DOWNLOAD MATLAB FOR YOU. The EULA prevents redistribution of the software. Read the README.md file contained in the PKGBUILD repo. This is essentially a script to integrate an existing matlab installer with your archlinux system; it does NOT come with any software from Mathworks. You most likely cannot build this package using an AUR helper; you NEED to manually provide files; and to get the files you need a valid MATLAB licence. The process of fetching the files is described in detail in the README.md in the repo. (You can use any valid credentials to install the package using this PKGBUILD; including a licence file that does not match the machine; but you will need to reactivate matlab by using activate_matlab.sh with root privileges.)
  • Current users; please help me test and trim the dependencies list, and submit your personal fixes for issues if you have them so they can be added to the PKGBUILD. (Cuda related contributions; if needed would be good as I don't have nvidia GPU's to test compatibility.)
  • To use jupyter with matlab; you also need jupyter-matlab_kernel(-git).

Latest Comments

daniel_shub commented on 2022-05-16 14:53 (UTC)

@rellieberman the MATLAB installer will not care, but you will likely run into problems with pacman if you either try and reinstall the current version or upgrade the package to a new version.

rellieberman commented on 2022-05-15 14:45 (UTC)

Hi all, and thanks for all the amazing work! I have a question, if I want to add more packages after a partial install, do I have to redo the whole installation? is there a way to just add the new packages I need? Thanks

game commented on 2022-05-09 22:27 (UTC)

Thanks for all the great work! Sadly I am stuck with the same log as this comment. I have downloaded the latest PKGBUILD 'pkgrel=5', 'pkgver=9.12.0.1903524' and Matlab <version>9.12.0.1927505</version> which sets pkgrel and pkgver correctly. Still building gets stuck at the non-existent folder ${srcdir}/build/extern/engines/python. Do you have any guidance for me?

Ketchup901 commented on 2022-05-01 10:30 (UTC)

Thanks for the update, partial install works now.

Rubo commented on 2022-04-25 17:52 (UTC)

@sukanka thank you, I left a comment on your pull request and I have enabled the Issues tab. I don't know why it was disabled.

sukanka commented on 2022-04-25 16:34 (UTC)

@Rubo, I ran namcap for the built package to check dependencies, and here is the output. https://fars.ee/53NB

Dependencies should be updated according to the output. Some are in depends and some should go into optdepends (for example java-runtime) and some should be removed(libselinux)

BTW, I cannot open an issue in that github repo.

Rubo commented on 2022-04-25 16:19 (UTC)

@sukanka I'm glad to hear you built it successfully. As mentioned in this comment, there is a repo here. I guess the choice of links being grey near black text is a little unfortunate...

sukanka commented on 2022-04-25 14:36 (UTC) (edited on 2022-04-25 15:14 (UTC) by sukanka)

@Rubo, thanks for your reply, I now use the latest PKGBUILD, still, the problem is

==> Starting pkgver()...
==> Removing existing $pkgdir/ directory...
==> Starting build()...
  -> Running original installer...
  -> Building Python API...
/home/sukanka/Downloads/matlab/PKGBUILD: line 160: cd: /tmp/makepkg/matlab/src/build/extern/engines/python: No such file or directory
==> ERROR: A failure occurred in build().
    Aborting...

But I notice another thing that may help. My matlab version is different from yours.

<version>9.12.0.1884302</version>
<release>R2022a</release>

I'm now redownloading 9.12.0.1927505 Update: I build this version successfully.

BTW, maybe you can setup a github repo for discussing this problem.

Rubo commented on 2022-04-25 14:21 (UTC) (edited on 2022-04-25 14:23 (UTC) by Rubo)

@sukanka sure, I re-package it every time I edit the PKGBUILD, to see if it works, and the current one works following the standard procedure, with or without the install.sh script. Maybe you meant /tmp/makepkg/matlab/src/build/extern/, since the problematic directory is ${srcdir}/build/extern/engines/python?

I bumped the release of the PKGBUILD to 4. Nothing has changed since the previous one, just pkgrel, please update it so that we are all on the same track.

With the Python MATLAB engine, it seems to me two problems can occur:

  1. Right after -> Building Python API.... If you are doing a partial installation, when the MATLAB off-line installer is ran at line 156, ${srcdir}/build is empty, so surely ${srcdir}/build/extern/engines/python can't be there! I'm thinking of splitting the building and the packaging of the Python engine from MATLAB itself. Please, let me know what do you think.
  2. Right after -> Packaging Python API.... If you are using an old PKGBUILD, where you have pkgname=('python-matlabengine' 'matlab') instead of pkgname=('matlab' 'python-matlabengine'), the package_python-matlabengine function is ran after package_matlab. As you can see at line 274 of the current PKGBUILD, package_matlab moves ${srcdir}/build into ${pkgdir}/${instdir}. Then, at line 192, package_python-matlabengine changes the current directory to ${srcdir}/build/extern/engines/python, and an error is thrown, because ${srcdir}/build isn't there anymore, now it's in ${pkgdir}/${instdir}! That was a problem in one of the previous PKGBUILDs, which I fixed, and that's why I added the comment at lines 5-6.

I hope those are the only two problems, but please let me know if that's not the case.

sukanka commented on 2022-04-25 13:44 (UTC)

@Rubo, did you build the package yourself? Could you please have a look at the downloaded files? I notice in /tmp/makepkg/matlab/src/matlab/extern/, there is only include/, no engines/python. I used the latest PKGBUILD, and matlab R2022a downloaded from matlab installer.

Rubo commented on 2022-04-25 11:15 (UTC)

@tornado99 are you using the latest PKGBUILD? Are you doing a partial installation? Please check the comments below.

tornado99 commented on 2022-04-25 10:52 (UTC)

-> Building Python API... /var/tmp/pamac-build-[user]/matlab/PKGBUILD: line 162: cd: /var/tmp/pamac-build-[user]/matlab/src/build/extern/engines/python: No such file or directory ==> ERROR: A failure occurred in build().

Rubo commented on 2022-04-21 07:18 (UTC) (edited on 2022-04-21 07:26 (UTC) by Rubo)

@Ketchup901 @sukanka when makepkg extracts the contents of matlab.tar, it's normal that $srcdir contains only the matlab directory and a link to matlab.tar. Then, while the original installer is running, $srcdir/build is created with all the files which can be happily consumed by package_python-matlabengine and moved around by package_matlab. But I tried with a partial install, and I confirm $srcdir/build is empty. Maybe the Python engine creation needs be done after MATLAB is packaged.

sukanka commented on 2022-04-21 01:02 (UTC)

@Ketchup901 I have the same problem, I noticed there is no such file or directory (${srcdir}/build/extern/engines/python) in the downloaded tarball, only ${srcdir}/build/extern/include. (I redownloaded for several times) So makepkg will give an error. But I also tried matlab installer script, after installation, there is extern/engines/python. I don't know the reason.

Ketchup901 commented on 2022-04-20 22:39 (UTC) (edited on 2022-04-20 22:39 (UTC) by Ketchup901)

@Rubo I'm using the most recent PKGBUILD. Yes, the error occurs right after "Packaging Python API". FYI I'm trying to do a partial install with only MATLAB, don't know if that makes any difference. I've edited the PKGBUILD to say partialinstall=true and products=( "MATLAB" ).

Rubo commented on 2022-04-20 21:40 (UTC)

@Ketchup901 it's the directory which contains the necessary files to build the Python engine. Please make sure that python-matlabengine comes before matlab in the PKGBUILD pkgname variable, as the package_matlab function moves files needed by package_python-matlabengine, so if that's not the case, that's likely why there is no such directory and it probably means you are using an old PKGBUILD. The current one should work, or at least it works for me. Did you get the error right after -> Packaging Python API...?

Ketchup901 commented on 2022-04-20 19:38 (UTC)

What is "${srcdir}/build/extern/engines/python" supposed to be? I followed the instructions for creating matlab.tar but there is no such directory.

Rubo commented on 2022-04-20 11:05 (UTC) (edited on 2022-04-20 12:17 (UTC) by Rubo)

@MoetaYuko https://github.com/Rubo3/matlab-aur/blob/Rubo3-patch-1/PKGBUILD Before pushing an update, can you please tell me if this works for you? It seems to work for me.

Edit: I see you have forked and updated VictriD's PKGBUILD here. I have integrated your changes, thank you.

MoetaYuko commented on 2022-04-20 09:54 (UTC)

  1. MatLab won't start after overriding LD_LIBRARY_PATH with gcc9 lib, the hack should be dropped.
  2. libfreetype.so should be removed in package_matlab() as well, in case the tar is not prepared by install.sh

Rubo commented on 2022-04-19 18:20 (UTC)

@mys_721tx Thanks, fixed it.

mys_721tx commented on 2022-04-19 16:45 (UTC) (edited on 2022-04-19 16:46 (UTC) by mys_721tx)

@Rubo Step 4 should be MATLABROOT/install instead.

Rubo commented on 2022-04-19 16:04 (UTC) (edited on 2022-04-25 16:25 (UTC) by Rubo)

Hello, I just pushed an update to the 2022a release. Some things have changed:

  • The PKGBUILD is based on the one VictriD kindly provided here, with some minor adjustments to make it work against the 2022a release. For more information on how it works and what has changed, read that comment. I put the files on a GitHub repo here: https://github.com/Rubo3/matlab-aur.
  • I rewrote most of the README, in order to cover some installation issues, like the correct unzip flags so that the installer doesn't complain of files being shorted than expected; the new libxcrypt-compat dependency and the FreeType shared object renaming.
  • I removed matlab.script, let me know if you want it back.
  • I added an install script, which covers basic installation needs (i.e. the exact procedure listed in the README), so that you only have to interact with the on-line installer. Please remember to edit the PKGBUILD products variable beforehand if you want a partial install. The points listed by bbaserdem here still hold.

It runs, but there are many errors, most likely because the dependencies on the PKGBUILD do not reflect the current ones. If you'd like to help out, here are the MATLAB dependencies for the Docker container. In the Source Repository box you can find the link to the base-dependencies.txt mentioned in the Dockerfile. If you find something interesting, please leave a message!

j.zelinka commented on 2022-04-18 18:59 (UTC) (edited on 2022-04-18 19:07 (UTC) by j.zelinka)

After the system update (ArchLinux), the following error occurred while trying to open LiveScript: "The Live Editor is unable to run in the current system configuration." I have found the advice in one discussion (https://bbs.archlinux.org/viewtopic.php?pid=2028209#p2028209) - to rename file MATLABROOT/bin/glnxa64/libfreetype.so.6.

bbaserdem commented on 2022-03-01 22:31 (UTC)

Anyone wants to take over the package? I don't use Arch anymore. Please email me so we can discuss; as I want to hand over this package to someone who knows what they are doing.

kruzah commented on 2022-02-16 12:28 (UTC) (edited on 2022-02-16 12:29 (UTC) by kruzah)

@kyak Thank you, this solved the issue. Perhaps the package maintainer should add this as a dependency as well

kyak commented on 2022-02-16 11:49 (UTC)

@kruzah install libxcrypt-compat from aur

kruzah commented on 2022-02-16 10:35 (UTC)

MATLAB longer works after a soname update on libcrypt.so/libxcrypt:

/opt/tmw/MATLAB-r2020b/bin/glnxa64/MATLAB: error while loading shared libraries: libcrypt.so.1: cannot open shared object file: No such file or directory

outloudvi commented on 2022-01-26 10:34 (UTC)

Please note that you may need to extract/unpack the installer with unzip instead of some GUI utilities (e.g. Ark), or some symbol links or so would be missing, and you will get such error messages when running ./install:

/tmp/matlab-instlaller/bin/glnxa64/MathWorksProductInstaller: error while loading shared libraries: /tmp/matlab-instlaller/bin/glnxa64/libicudata.so.69: file too short

thunderel05 commented on 2022-01-15 22:47 (UTC)

I followed the instruction in https://github.com/Victrid/matlab-aur, everything went find until the "makepkg -s". When I executed this command, It always stop at

Starting build()... ERROR: A failure occured in build(). Aborting...

Any suggestions? (fyi, my source is matlab 2020b)

daniel_shub commented on 2021-11-12 16:04 (UTC)

@tornado99 what type of instructions do you want? If you don't want to compile gcc8 on every machine, just compile it once and then install it on all the machines. If you want to run MATLAB without a compiler, just remove gcc8 as a dependency.

tornado99 commented on 2021-11-12 14:37 (UTC)

There should be clear instructions for those who want to disable GCC from the pkgbuild. I just install Matlab from their installer on most of my machines as I can't afford to lock up a machine for 1/2 a day compiling GCC. In fact if you wanted to run MATLAB on a low-end machine you could be waiting several days for the GCC part to finish.

MoetaYuko commented on 2021-10-13 04:12 (UTC)

@bbaserdem ./install from r2021b iso works fine for me

bbaserdem commented on 2021-10-12 14:58 (UTC)

@VictriD; what you have is amazing; i do want to add it to the script.

@all; i can't make matlab installer (2021b) run on my PC; does anyone have any issues with it?

VictriD commented on 2021-07-31 16:48 (UTC)

Hello, I've modified the package script from burger's https://github.com/bloatmode/matlab-aur.git. The new script can be located by https://github.com/Victrid/matlab-aur.

This script can:

  • Determine and update the versions by the provided matlab installer package, and determine the needed dependencies' version.
  • Marked GCC stuff as optional dependencies. These are only used by compiler related programs.
  • Removed the license file, then the package can be distributed through network and multiusers on a machine. As matlab is licensed per-user, this can be more practical as users will activate the matlab when they opened for the first time.

Meanwhile:

  • The script installs matlab into /usr/lib rather than /opt
  • The script do not allow multiple instances of versions.

tornado99 commented on 2021-05-12 17:13 (UTC) (edited on 2021-05-12 17:13 (UTC) by tornado99)

Should opt/tmw/MATLAB-rxxxxx be given user read/write access? Otherwise toolboxes cannot be installed using the Add-on Explorer.

offmilk commented on 2021-03-18 02:30 (UTC) (edited on 2021-03-18 05:42 (UTC) by offmilk)

Edit: This bug actually now occurs as soon as matlab has started

I have discovered a bug using kernel:5.10.16-arch1-1 where when I click on a different window then come back to matlab I cannot click anywhere, I can minimize, expand/restore and close but I can't click on anything else. Restarting the app allows me to use it again however clicking out of it again replicates the bug. Let me know what further details you would need

burger commented on 2021-03-16 01:39 (UTC)

The following changes since commit 04100d8083b1:

Fixed version typo on PKGBUILD (2021-02-03 13:06:49 -0500)

are available in the Git repository at:

https://github.com/bloatmode/matlab-aur.git

for you to fetch changes up to 7cb38505583b311a25e989c68426f18b6ee30659:

Added instructions on how to download the license file and installation key if the license is provided by an organization and MATLAB is being installed for the first time on a PC. (2021-03-16 02:18:08 +0100)


bloatmode (1): Added instructions on how to download the license file and installation key if the license is provided by an organization and MATLAB is being installed for the first time on a PC.

README.md | 1 + 1 file changed, 1 insertion(+)

burger commented on 2021-03-16 01:38 (UTC)

You can get gcc8 binaries by adding the arch4edu repository.

bbaserdem commented on 2021-03-07 22:58 (UTC)

gcc8 is required to compile mex files using native gcc. This is not a minimal package; if you don't want gcc integration, you can install matlab through other methods.

tornado99 commented on 2021-03-07 22:49 (UTC)

I ran this on an i7 desktop with 16GB RAM and it choked the machine trying to compile gcc8 for over an hour, but it did complete successfully. I then tried on a lower spec laptop and it aborted with gcc compile errors after about 20 minutes. Could you say what are the advantages of using gcc8? and if this could be made optional as otherwise users with lower spec machines could be waiting many hours just to get Matlab installed.

offmilk commented on 2021-02-28 05:23 (UTC) (edited on 2021-02-28 05:29 (UTC) by offmilk)

I was able to overcome the "Error Starting Desktop" by installing both jre8-openjdk and jdk8-openjdk and running export MATLAB_JAVA=/usr/lib/jvm/java-8-openjdk/jre in the terminal, however I am experiencing some internal errors which are due to my integrated intel graphics. I will edit this comment once I resolve these issues, and what I did.

UPDATE: This didnt take long... I am able to start matlab with zero problems now provided I use the -softwareopengl flag when running matlab. Please note that I can reproduce the error by not including the flag - I will add this as an alias so I dont need to type it every time.

bbaserdem commented on 2021-02-25 23:55 (UTC)

Building any AUR package requires the dependencies installed. That is what dependency is. For this package; it's not enough that you have all the dependencies installed locally, but you need to provide the three aforementioned files in the README in the build directory.

hif that was not clear to you; i suggest reading through https://wiki.archlinux.org/index.php/PKGBUILD

I cannot replicate your GUI problems; most likely associated with your system or your desktop environment; but MATLAB installation works, just not the client. If you find a fix; please report it so I may add it to the PKGBUILD if it can be fixed as such.

offmilk commented on 2021-02-25 23:48 (UTC)

@bbaserdem

Just to clarify the README.md, when it says "Besides the dependencies; the source files MUST be present at the directory" does this mean that gcc8 needs to be placed in the same directory (and any other dependencies)?

I can start matlab without a desktop environment so I will look into what is going on there, thanks

bbaserdem commented on 2021-02-25 17:50 (UTC)

Obviously AUR dependencies needs to be resolved by you; that's how AUR works. I suggest getting acquainted, but there should be no issues installing gcc8 using an aur helper.

Try running matlab -nodesktop from a terminal; and if you get to the console that means it has something to do with your graphical desktop. I don't know how to resolve your issue, never encountered it.

You can also try de-integration by replacing the symlinks in /opt/tmw/matlab-2020b with the static libraries in /opt/tmw/matlab-2020b/backup to see if it's an integration issue. That or install matlab locally in your home folder using only the mathworks installer and see if it works.

offmilk commented on 2021-02-25 13:48 (UTC) (edited on 2021-02-25 13:49 (UTC) by offmilk)

Followed the README.md and makepkg was failing to resolve the gcc8 dependencies, I've tried installing gcc8 manually (only supported through the aur - this also needed to be built using PKGBUILD as the aur helper is not supported) then had to comment out these dependencies in the PKGBUILD.

The build seemed successful however once I run the matlab file I get an empty grey text box with the window title "Error Starting Desktop", not even the only button (I'm assuming says close) has text.

Let me know if you need further details

hawath commented on 2021-02-21 08:26 (UTC) (edited on 2021-02-22 09:05 (UTC) by hawath)

@bbaserdem; Thanks for your reply.

I am not very sure what you mean by "in the presence of either or both llvm-libs and gcc-libs would solve the problem" since I don't think it's quite possible to remove package "llvm-libs" or even "gcc-libs". Perhaps I misunderstood your words.

Do you mean try to install a lower version of llvm-libs or gcc-libs?

Update 2021.2.22

I found that running matlab through "LD_LIBRARY_PATH=/usr/lib matlab" can suppress (fix?) the error and OpenGL is correctly loaded. But I do not know whether this will affect matlab loading gcc8 libs.

bbaserdem commented on 2021-02-21 07:41 (UTC) (edited on 2021-02-21 08:30 (UTC) by bbaserdem)

If that was an issue; I would have the same issue, but I don't. I assume the presence of either or both llvm-libs and gcc-libs would solve the problem?

@billypilgrim, could you check it out? (On the PC that the built installable pkgbuild won't work; first install llvm-libs, try to open, then remove llvm-libs and install gcc-libs, try to open, then install llvm-libs again and try to open.) Then could you report? If you give it green light; I'll add the necessary packages as dependencies.

hawath commented on 2021-02-21 07:04 (UTC) (edited on 2021-02-21 07:05 (UTC) by hawath)

@billypilgrim, @bbaserdem;

Problem description

I also encountered billypilgrim's problem. It seems that mesa libs (called by OpenGL lib) use llvm-libs (provides libLLVM-11.so) and llvm-libs uses gcc-libs (provides libstdc++.so.6). The problem is that line 262 in PKGBUILD tells matlab (and possibly libs called by matlab) to find libs from gcc8-libs path (for me /lib/gcc/x86_64-pc-linux-gnu/8.4.0) first, which is necessary for matlab but possibly not (even harmful) for some other libs. Or, in other words, the current version of llvm-libs requires a higher version of gcc-libs than gcc8-libs to properly function.

I think the problem could be fixed if the updated lib path can be excluded for OpenGL, but I do not know how to achieve this.

System Inform
  • Linux Satellite 5.10.15-1-MANJARO #1 SMP PREEMPT Wed Feb 10 10:42:47 UTC 2021 x86_64 GNU/Linux
  • Package version:
    • gcc-libs:10.2.0-6
    • llvm-libs:11.0.1-2
    • mesa:20.3.4-1
    • matlab:9.9.0.1467703-4(latest)

hawath commented on 2021-02-07 13:11 (UTC)

@bbaserdem; Thanks for the gcc package update!

bbaserdem commented on 2021-02-05 19:11 (UTC) (edited on 2021-02-05 19:13 (UTC) by bbaserdem)

@billypilgrim check out the archwiki page for intel related issues as well; they might relate. I don't have issues with amdgpu and this pkgbuild. Check out your card; i have AMD Radeon RX 5700 XT

Please report back if you manage to fix it; and it's fixable (a missing dependency or launch options) so I can add a fix/dependency to the pkgbuild.

billypilgrim commented on 2021-02-05 18:23 (UTC)

Is anyone else getting issues with amdgpu?

This is what I get in my terminal when I start matlab: libGL error: MESA-LOADER: failed to open radeonsi: /usr/lib/gcc/x86_64-pc-linux-gnu/8.4.0/libstdc++.so.6: version GLIBCXX_3.4.26' not found (required by /usr/lib/libLLVM-11.so) (search paths /usr/lib/dri) libGL error: failed to load driver: radeonsi libGL error: MESA-LOADER: failed to open radeonsi: /usr/lib/gcc/x86_64-pc-linux-gnu/8.4.0/libstdc++.so.6: versionGLIBCXX_3.4.26' not found (required by /usr/lib/libLLVM-11.so) (search paths /usr/lib/dri) libGL error: failed to load driver: radeonsi libGL error: MESA-LOADER: failed to open swrast: /usr/lib/gcc/x86_64-pc-linux-gnu/8.4.0/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /usr/lib/libLLVM-11.so) (search paths /usr/lib/dri) libGL error: failed to load driver: swrast

And here's the error message I get within the matlab GUI once it's loaded: com.jogamp.opengl.GLException: X11GLXDrawableFactory - Could not initialize shared resources for X11GraphicsDevice[type .x11, connection :0, unitID 0, handle 0x0, owner false, ResourceToolkitLock[obj 0x643bdb87, isOwner false, <29e4dacf, 2c84828b>[count 0, qsz 0, owner <NULL>]]] at jogamp.opengl.x11.glx.X11GLXDrawableFactory$SharedResourceImplementation.createSharedResource(X11GLXDrawableFactory.java:326) at jogamp.opengl.SharedResourceRunner.run(SharedResourceRunner.java:297) at java.lang.Thread.run(Thread.java:748) Caused by: com.jogamp.opengl.GLException: AWT-EventQueue-0-SharedResourceRunner: Unable to create temp OpenGL context(1) at jogamp.opengl.x11.glx.X11GLXContext.createImpl(X11GLXContext.java:368) at jogamp.opengl.GLContextImpl.makeCurrentWithinLock(GLContextImpl.java:759) at jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:642) at jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:580) at jogamp.opengl.x11.glx.X11GLXDrawableFactory$SharedResourceImplementation.createSharedResource(X11GLXDrawableFactory.java:297) ... 2 more

I can still open figure windows etc. but OpenGL is disabled.

Hork commented on 2021-02-03 09:20 (UTC)

That seems to be /tmp no enough space issue, not sure if this makepkg error was also caused by that.

Hork commented on 2021-02-02 21:23 (UTC)

Read the readme.md, and use unzip -X -K to resolve libexpat issue. Rename your installer dir to something else, download to a folder called matlab and tar it there.

P1000 commented on 2021-02-02 17:08 (UTC) (edited on 2021-02-02 19:22 (UTC) by P1000)

I managed to make it work using this. https://stackoverflow.com/a/60939113 How would I adjust this process to make use of the AUR package instead?


Edit: I have my license.lic file downloaded. Do I need any other files from somewhere before this package will work? : https://mathworks.com/licensecenter/licenses/ : I downloaded the license.lix (matlab.lic) file provided and copied to the key from the textbox into matlab.fik while downloading matlab.tar.gz from AUR and renaming to matlab.tar Now it says: ==> Starting prepare()... sed: can't read /home/USER/matlab/src/matlab/installer_input.txt: No such file or directory Where do I get installer_input.txt from?


When I download and extracted the package from the Matlab Website I get the following output:

...matlab_R2020b_glnxa64/bin/glnxa64/install_unix: error while loading shared libraries: ...matlab_R2020b_glnxa64/bin/glnxa64/libexpat.so.1: file too short

linexpat.so.1 contains : 'libexpat.so.1.6.11'

I'm getting the following error with pamac - ERROR: matlab.tar was not found in the build directory and is not a URL.

Preparing... Cloning matlab build files... Checking matlab dependencies... Resolving dependencies... Checking inter-conflicts...

Building matlab... ==> Making package: matlab 9.9.0.1467703-3 (Tue 02 Feb 2021 17:02:45 GMT) ==> Checking runtime dependencies... ==> Checking buildtime dependencies... ==> Retrieving sources... ==> ERROR: matlab.tar was not found in the build directory and is not a URL. Failed to build matlab

MoetaYuko commented on 2021-02-02 12:47 (UTC)

https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=matlab#n261 here's a typo, should be pacman -Q gcc8

Hork commented on 2021-01-31 13:36 (UTC)

I am using latest ucode. I reported my issue on matlab answers. Hope somebody can fix it.

bbaserdem commented on 2021-01-31 02:19 (UTC) (edited on 2021-01-31 02:22 (UTC) by bbaserdem)

I'm on a zen2 microarchitecture (AMD Ryzen 7 3700x) and it works fine. It probably is something else related specifically to your desktop. If you are not using it already; I suggest installing amd-microcode and making sure your bootloader loads the related ramdisk before loading initrd.

Either way; you can build the package on your server; copy the tar.zst file to your desktop and install using pacman -U matlab.blabla.tar.zst. For activation; after installation you can run sudo activate_matlab.sh; but you shouldn't need to if you used the licence that is appropriate for your PC (using the MAC address of any of your ethernet interfaces; as far as I recall.)

Please post this in mathworks forums; as anyone else on other linux distros having the same problem can benefit from your experience; or help diagnose what exactly is going wrong.

Hork commented on 2021-01-31 00:02 (UTC)

Strangely enough, I copied exact same files to my arch server and it runs. I guess that architecture issue still persists on this version and I'm running my desktop on AMD zen2.

auricom commented on 2021-01-30 13:43 (UTC) (edited on 2021-01-30 13:44 (UTC) by auricom)

I've installed the latest update and it seemed to go without any hitches apart from having to re-activate Matlab afterwards. Many thanks bbaserdem!

Everything I've tested works fine apart from Matlab's built-in updater which notifies me about an update but always fails during the installation with the message "Something unexpected occured". However I don't think the updater has ever worked for me when installing Matlab via the AUR package and it's certainly not a problem specific to this latest PKGBUILD.

I'm guessing it's some kind of permissions error but not really sure. Has anybody else managed to use it successfully?

bbaserdem commented on 2021-01-30 08:41 (UTC)

I would check mathworks forums for a fix; as if the provided installer is not working on your system it's an issue on the installer end. I can't replicate your issue so I don't know how to help you.

If you find the solution please post it here.

Hork commented on 2021-01-29 20:49 (UTC)

Seems to be a matlab installer issue. Cannot install even with their default installer. Generate a "archive is not a ZIP archive" error but last one has this issue is way back to 2016a. No idea what's going wrong there.

Hork commented on 2021-01-28 19:06 (UTC)

Not really, I created the tar bar exactly as the md instructed. However, the downloaded matlab folder does not have that file in the first place.

bbaserdem commented on 2021-01-28 16:26 (UTC)

I assume this is a problem with the way you created the tar file; did you follow the instructions as exactly stated in the README provided by the repo? I would delete the one you have and recreate the needed files.

Hork commented on 2021-01-28 10:47 (UTC) (edited on 2021-01-28 10:49 (UTC) by Hork)

I straced that matlab/bin/glnxa64/install_unix, stat("/tmp/makepkg/matlab/src/matlab/sys/java/jre/glnxa64/jre/lib/security/jssecacerts", 0x7fffe1f6baf0) = -1 ENOENT (No such file or directory) is what I suspect wrong. Do you have this file in your downloaded matlab folder?

bbaserdem commented on 2021-01-27 19:44 (UTC) (edited on 2021-01-27 19:47 (UTC) by bbaserdem)

What is that installer? I can't help if you are not being specific. The installer for MATLAB does not print to stdout; and that's on mathworks nothing I can do. There should be some installer log somewhere; but I don't know where the installer puts it. Your problem is not due to python; because anything to do with python is printed on stdout when you run makepkg.

You don't need to do any chrooting; install dependencies, bring together the neccessary files and mimic the PKGBUILD steps (on your home directory; NOT on your main system.) Be sure to read the README.md in the repo, and make sure you are not using ANY aur helper.

Hork commented on 2021-01-27 17:30 (UTC)

That is the thing, I don't actually know whats wrong with that installer, it does not have any log. I don't even know how to debug this, I might need to do some chroot to mimic makepkg and go through build steps one by one.

bbaserdem commented on 2021-01-26 19:55 (UTC) (edited on 2021-01-26 19:59 (UTC) by bbaserdem)

that is not very specific; what issue are you having? Either way; make sure you rebuild the aur dependencies and jupyter-matlab_kernel-git again so that everything is using python 3.9 (you need to rebuild python-dependent aur packages again; even if their pkgbuild are not updated)

I built this package just fine; with the up to date versions of dependencies. And everything works. So curious as to what is not working.

Hork commented on 2021-01-26 18:39 (UTC)

I still have that python issue, with latest pkgbuild.

Andy2 commented on 2021-01-22 20:27 (UTC)

Hi,

I ran into the same Python issue and I "backported" the Python 3.8 faking for Python 3.9. Matlab installed and I was able to start a Matlab engine from an iPython shell, so I would suspect it works.

I even installed the Update 3 as root after Matlab told me I could do that from the little bell icon menu and it still works.

Patch:

diff --git a/PKGBUILD b/PKGBUILD
index b6a40eb..87f79b8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -150,22 +150,53 @@ build() {
   #   cause the installation to be non-interactive
   "${srcdir}/${pkgname}/install" -inputFile "${srcdir}/${pkgname}/installer_input.txt"

+  # Create spoofing for Python API
+  # https://aur.archlinux.org/packages/matlab-engine-for-python/
+  cd "${srcdir}/build/extern/engines/python"
+  # Getting appropriate python version for spoofing
+  _matminor="$(find "${srcdir}/build/extern/engines/python" \
+    -name 'matlabengineforpython3*.so' |
+    sort |
+    sed 's|.*matlabengineforpython3_\([0-9]\)\.so|\1|g' |
+    tail -1)"
+  echo 'import sys' > "${srcdir}/sitecustomize.py"
+  echo "sys.version_info = (3, ${_matminor}, 0)" >> "${srcdir}/sitecustomize.py"
+
   # Build the python API
   cd "${srcdir}/build/extern/engines/python"
-  python setup.py build
+  PYTHONPATH="${srcdir}" python setup.py build
 }

 package() {
   # Package the python API
   cd "${srcdir}/build/extern/engines/python"
-  python setup.py install --root="${pkgdir}" --optimize 1 --skip-build
-  # Fix erronous referances in the _arch.txt files
+  PYTHONPATH="${srcdir}" python setup.py install --root="${pkgdir}" --optimize 1 --skip-build
+
+  # Spoofing trick to fool matlab into believing python 3.9 is supported
+  _matminor="$(find "${srcdir}/build/extern/engines/python" \
+    -name 'matlabengineforpython3*.so' |
+    sort |
+    sed 's|.*matlabengineforpython3_\([0-9]\)\.so|\1|g' |
+    tail -1)"
+  _prefix="$(python -c 'import sys; print(sys.prefix)')"
+  _pytminor="$(python -c 'import sys; print(sys.version_info.minor)')"
+
+  # Correct file names
+  if [[ "${_pytminor}" != "${_matminor}" ]]; then
+    mv "${pkgdir}/${_prefix}/lib/python3".{"${_matminor}","${_pytminor}"}
+    _egginfo="$(ls "${pkgdir}/${_prefix}/lib/python3.${_pytminor}/site-packages/"*"-py3.${_matminor}.egg-info")"
+    mv "${_egginfo}" "${_egginfo%py3."${_matminor}".egg-info}py3.${_pytminor}.egg-info"
+    sed -i "s|sys.version_info|(3, $_matminor, 0)|" \
+      "${pkgdir}/${_prefix}/lib/python3.${_pytminor}/site-packages/matlab/engine/__init__.py"
+  fi
+
+  # Fix erronous references in the _arch.txt files
   _prefix="$(python -c 'import sys; print(sys.prefix)')"
   errstr="${srcdir}/build/extern/engines/python/"
   trustr="${instdir}/extern/engines/python/"
   for _dir in \
     "${srcdir}/build/extern/engines/python/build/lib/matlab/engine" \
-    "${pkgdir}/${_prefix}/lib/python3.8/site-packages/matlab/engine" \
+    "${pkgdir}/${_prefix}/lib/python3.${_pytminor}/site-packages/matlab/engine" \
     ; do
     sed -i "s|${errstr}|${trustr}|" "${_dir}/_arch.txt"
   done

bbaserdem commented on 2021-01-06 03:10 (UTC)

@hawath; when I last updated the package; gcc8 was not in AUR and I do not have any intention to package that. It seems gcc8 was submitted to AUR a month after I installed the package. I'll also change the gcc version when I fix the python issue.

bbaserdem commented on 2021-01-06 03:07 (UTC)

@tornado99; that's where external software is installed. https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard

bbaserdem commented on 2021-01-06 03:05 (UTC)

@magnetron2.4ghz you need to switch the spoof for python 3.7 to python 3.8; it's not gonna be seamless copy paste. However; the line you are reporting should work; as I installed using the previous version before. I do remember making a few typos that made the package not build but I recall not committing them but perhaps I did?

@sukanka; this is a system-wide installation pkgbuild thus I see no reason to integrate with anaconda or neither do I use anaconda myself. So for that, you are on your own.

If you people rather not deal with this; you can remove the matlab-engine-for-python from depends array manually; and remove any build instructions for python integration. The reason why i included this in the package is to play nice with jupyter-matlab_kernel-git; integration needs to happen on the matlab pkgbuild; not a seperate one otherwise the pkgbuild tries to run matlab which is unneccessary overhead. (Year 2021 and matlab still does not respect a quick version check on their launcher matlab script.)

Again I apologize for the delay in updating the package; but I'm not going to push any changes until I can confirm that everything works; and I need access to my PC before that. I'm not going to my workplace until end of January due to COVID so only going to be able to test then.

magnetron2.4ghz commented on 2021-01-04 23:53 (UTC)

I tried swapping the Build() function from the makepkg version bbaserdem mentioned (2020a), which seems to have fixed that error but now I'm getting a different, generic build() error:

==> ERROR: A failure occurred in build(). Aborting...

It seems the error occurs on this line (I figured this out using a couple echo statements)

"${srcdir}/${pkgname}/install" -inputFile "${srcdir}/${pkgname}/installer_input.txt"

For today I will use MATLAB online, but I will be back to do more troubleshooting tonight!

sukanka, which installation script do you refer to? the one listed in your comment? would that have the same effect as swapping the whole build function as I have done?

P.S. Thank you bbaserdem and sukanka for the quick replies!

sukanka commented on 2021-01-04 12:48 (UTC) (edited on 2021-01-04 12:51 (UTC) by sukanka)

I change gcc9 to gcc and it just works! As for the python3.9, I guess we can add "3.9" to the list. But I use anaconda, and I make it use python provided by anaconda. And I have to use the legacy installation script, or it will fail.

sed -i 's|install_unix"|install_unix_legacy"|g'  "${srcdir}/${pkgname}/install"
# add this to build(){}

bbaserdem commented on 2021-01-04 02:09 (UTC)

I have a fix for the python 3.9 (i fixed this issue within the pkgbuild before) however I won't be able to test it and roll it ouh; as I did not have access to my PC until the end of January.

If you feel confident; you can dig out the fix in the PKGBUILD commit history; i believe either 2019b or 2020a versions were using an outdated version of python and I had the fix for either one of the versions. If not; I ask for patience until I get back home to make sure the spoofing works before i publish.

magnetron2.4ghz commented on 2021-01-03 22:50 (UTC)

The installer for matla-engine-for-python doesnt currently support python 3.9, as this error in build() illustrates

Traceback (most recent call last): File "/home/<username>/MATLAB/matlab/src/build/extern/engines/python/setup.py", line 15, in <module> raise EnvironmentError('MATLAB Engine for Python supports Python version' OSError: MATLAB Engine for Python supports Python version 2.7, 3.6, 3.7, and 3.8, but your version of Python is 3.9

I tried installing python38 from AUR but no dice. Same Error.

daniel_shub commented on 2020-12-18 02:09 (UTC)

@tornado99 it gets installed in /opt/tmw because that is where the FHS says it should go: /opt is reserved for the installation of add-on application software packages. (https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch03s13.html). Now you might be thinking, but TMW defaults to /usr/local and that is where all the online tutorials say it goes. And that is right, and consistent with the FHS: The /usr/local hierarchy is for use by the system administrator when installing software locally. (https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch04s09.html). The difference is that this package essentially removes the system administrator from the process and in general, a package manager should never install anything in /usr/local.

tornado99 commented on 2020-12-17 19:23 (UTC) (edited on 2020-12-17 19:42 (UTC) by tornado99)

Any clues where this is installed? Followed the Readme and installation finished without errors. However /usr/local/MATLAB is empty apart from an older version I installed manually.

Edit: found it at /opt/tmw. Why this location?

MoetaYuko commented on 2020-12-06 08:17 (UTC)

Please update for python 3.9

hawath commented on 2020-12-03 15:54 (UTC) (edited on 2020-12-03 15:54 (UTC) by hawath)

From the supported compiler page, it seems that GCC 8.X is better supported and the supported gfortran version seems to be only 8.3?

jimmy_979 commented on 2020-12-03 11:21 (UTC)

Can I use license.dat file instead of license.lic?

kyak commented on 2020-10-02 08:56 (UTC)

@daniel_shub you can request a trial version of MATLAB here: https://www.mathworks.com/campaigns/products/trials.html

daniel_shub commented on 2020-09-30 16:32 (UTC)

@bbaserdem as you say, running my example check function from within the PKGBUILD is difficult because of potential differences in the hardware on the build machine and the target machine and it probably would not tell you much about how MATLAB will behave on the target machine. Running the check on the build machine also would require activating MATLAB on the build machine which introduces other problems. That is why I did not include the check function originally when I created the package.

I think having an additional script that tests the MATLAB installation on the target machine is probably the way to go. This way a system administrator who is asked to install MATLAB on the target machine can be reasonably confident that the software works on the target hardware even if they do not understand MATLAB. Of course this is extra work but it would resolve questions like the one by @rellieberman. I wish I had a newer version of MATLAB so that I would not have been forced to neglect the package for all those years and could help out with writing a test function, because as I think everybody realizes, getting MATLAB to work in Arch is tricky.

bbaserdem commented on 2020-09-30 15:58 (UTC) (edited on 2020-09-30 16:03 (UTC) by bbaserdem)

The activation and licensing completely is disengaged from the PKGBUILD. You have to do that manually yourself; which I documented in the README.md. If you install the created package on a machine that is different than the licensed one, you won't be able to run the package. And as long as you don't redistribute (and that is fully on you; not the AUR) the built package; you are compliant with the EULA. Just to be 100% sure; you need to remove the matlab tar.zst from the pacman cache; but you won't go to jail if you don't do that.

There are absolutely no files distributed through the AUR; this is just an installation script. This PKGBUILD is not a matlab installation hack; it's a matlab-pacman integration at best; and fixes some behavioral issues for you. This is not meant to be portable due to how the EULA works; you are not supposed to port it anywhere. However; what you can do is you can run this package on some computer B; but prepare the outlying package to be installed on computer A. As long as you keep your copies to yourself; you are fully within the EULA. Robustness wise; this is the recommended installation procedure from the MATLAB website regarding installing without an active internet connection so that I don't agree with; it's the proper way to do so.

The check function is a good suggestion for things like compatible python version and whatnot, I'll see what I can come up with based on your suggestion. Hardware tests would not be good practice; as there is no guarantee that the computer that will run the built package is the same as the one doing the packaging; not to mention the makepkg user usually does not have access to hardware interfaces. Not to mention not all hardware will support every feature (can't run gpu array on one of my PC's, hardware acceleration and audio is disabled on my server, not everyone wants all the features, etc.

Maintenance wise; I have seen this package neglected over the past few years. While i'm working at the lab I'm in (for another year) and while I actively use Arch as my desktop distribution; I am planning on maintaining this package and won't share maintenance with someone else unless I can trust them. But I will most likely maintain it for another year, a year and a half at most, and then pass it on to someone with motivation to provide.

daniel_shub commented on 2020-09-30 15:11 (UTC)

I think the package would benefit from a check function or an extra script that checks the installation. When I originally created the PKGBUILD, I toyed with including the following

checkdepends=(xorg-fonts-100dpi cuda)
check () {
  _matlab_cmd="/bin/matlab -nodesktop -nosplash -r"
  LC_ALL=C $matlab_cmd "version -java, exit" | grep Java
  LC_ALL=C $matlab_cmd "opengl info; exit" | grep Software
  LC_ALL=C $matlab_cmd "x=rand(10, 'single'); g=gpuArray(x); Success=isequal(gather(g), x), exit"  | sed -ne '/Success =/,$p'
  LC_ALL=C $matlab_cmd "doc doc; pause; exit"
  LC_ALL=C $matlab_cmd "xlabel('BIG FONT', 'FontSize', 42); ylabel('small font', 'FontSize', 12); pause; exit" > /dev/null
  LC_ALL=C $matlab_cmd "bench, pause; exit" > /dev/null
  LC_ALL=C $matlab_cmd "load handel; sound(y, Fs); pause(length(y)/Fs); exit" > /dev/null
}

but dealing with the licensing and activation in makepkg did not seem robust or portable, and probably violates the MATLAB ELUA. That said, I did manually run those tests (along with namcap) on my machine before updating the PKGBUILD to make sure it worked. I would incrementally add dependencies until the package would pass those tests.

Most of the above script is documented in the MATLAB Arch wiki and covers most of my MATLAB use cases. I just looked at the wiki now and it seems like a more complete check/test function would include tests for the compiler(s), serial port, static TLS issues, addon manager (this is apparently where the libselinux package is needed), live script, and webcam support. I do not have a license for newer versions of MATLAB, so can no longer maintain the package or really help with the tests.

bbaserdem commented on 2020-09-30 14:52 (UTC)

I'll run it myself once it's OK for me to do so (when i'm not actively using matlab and free time) In the meantime; anyone wishing to skip libselinux installation can try removing from the dependency array for now.

rellieberman commented on 2020-09-30 14:17 (UTC)

Thanks for the quick response. I would just point out that the installer ran fine on my system without libselinux. Is there anything I could test to help make sure it works?

(I installed very few of matlabs components so maybe it's needed for some other component. but again installer worked fine)

bbaserdem commented on 2020-09-30 14:04 (UTC) (edited on 2020-09-30 14:07 (UTC) by bbaserdem)

libselinux is needed to run the installer; it's just the library component and is NOT selinux. You don't need to set it up. It is also listed as a dependency in the docker build images. I can double check if everything works fine without libselinux for 2020b and remove it if it doesnt break (less aur dependencies, the better); but previously with 2020a on arch; the installer would not run without libselinux which was confounding as there was no documentation on that dependence and installer. (Their official supported distro is Ubuntu; and I assume Ubuntu has libselinux by default)

Even if the main binary does not need it; you need to run the installer yourself at least once; so i consider that as a dependency.

rellieberman commented on 2020-09-30 13:57 (UTC) (edited on 2020-09-30 13:57 (UTC) by rellieberman)

Hi, thanks for this package :)

Does anyone know why libselinux is a dependency? I have just installed this package without the selinux dependency and all seems to be working fine. Seem like quite an overhead to have to install selinux just to run matlab.

bbaserdem commented on 2020-09-29 21:43 (UTC)

@ruy16109 thanks for bringing attention. I replaced the name with mcc-matlab so it should not happen. If you can confirm it works fine that would be great.

ruy16109 commented on 2020-09-28 14:59 (UTC)

The new matlab PKGBUILD conflicts with mathematica because both try to own /usr/bin/mcc.

Matlab version: 9.9.0.1467703-1 Mathematica version: 12.1.0-1 (not yet updated because it takes ages, but I assume the same would happen)

bbaserdem commented on 2020-09-23 11:14 (UTC)

This is for the latest matlab version 2020b; not 2020a; 2020a does not work with with python 3.8 Either update matlab to the latest version; or browse through commits in this repo to get the r2020a version.

sab commented on 2020-09-23 09:52 (UTC) (edited on 2020-09-23 09:53 (UTC) by sab)

I got problem with the python version using Manjaro Linux KDE Plasma 5.19.5 running makepkg for R2020a.

Traceback (most recent call last):
  File "setup.py", line 15, in <module>
    raise EnvironmentError('MATLAB Engine for Python supports Python version'
OSError: MATLAB Engine for Python supports Python version 2.7, 3.6, and 3.7, but your version of Python is 3.8
==> ERROR: A failure occurred in build().
    Aborting...

Is there a simple fix? I think python 3.8 is required by manjaro packages ...

bbaserdem commented on 2020-09-21 21:54 (UTC)

Sorry for the message spam; but brought the pkgbuild up to 2020b. It works with all the features I tested with (hardware acceleration, jupyter notebook using python engine, gui using bspwm). If anyone is using this PKGBUILD; please let me know if compilation works (switched to native libraries) Also; gcc6 is let go in favor of gcc9; which is in the community repos so you can drop the aur dependency.

bbaserdem commented on 2020-09-21 16:39 (UTC) (edited on 2021-02-03 18:13 (UTC) by bbaserdem)

READ THE README FILE IN THE REPO. NO AUR HELPERS SUPPORTED. ONLY ARCHLINUX AS OS IS SUPPORTED. YOU SHOULD BE BUILDING THIS PACKAGE USING MAKEPKG, NOTHING ELSE WILL BE SUPPORTED. Please only post issues here AFTER you followed the README.md. located at the root of this repo: https://aur.archlinux.org/cgit/aur.git/tree/README.md?h=matlab Due to a lot of comments; my spam filter is removing AUR notifications which keeps me from responding timely to issues in packaging, please don't post if you don't do some troubleshooting yourself. If your skill level is not up to troubleshooting (or following simple instructions as laid out by the readme), just install matlab locally, without using this package.

  • This PKGBUILD is NOT a minimal installation; as it has (hard) dependencies to gcc8 to force MATLAB to use system libraries. While generally not required; this PKGBUILD is trying to make MATLAB work with the system rather than with the mathworks-provided binaries. Currently it also does the python integration so that jupyter can be used with it.
  • This will only work with 2020b version; and will not work with earlier (or later) versions.
  • This PKGBUILD DOES NOT DOWNLOAD MATLAB FOR YOU. The EULA prevents redistribution of the software. Read the README.md file contained in the PKGBUILD repo. This is essentially a script to integrate an existing matlab installer with your archlinux system; it does NOT come with any software from Mathworks. You most likely cannot build this package using an AUR helper; you NEED to manually provide files; and to get the files you need a valid MATLAB licence. The process of fetching the files is described in detail in the README.md in the repo. (You can use any valid credentials to install the package using this PKGBUILD; including a licence file that does not match the machine; but you will need to reactivate matlab by using activate_matlab.sh with root privileges.)
  • Current users; please help me test and trim the dependencies list, and submit your personal fixes for issues if you have them so they can be added to the PKGBUILD. (Cuda related contributions; if needed would be good as I don't have nvidia GPU's to test compatibility.)
  • To use jupyter with matlab; you also need jupyter-matlab_kernel(-git).

lowkeyinterested commented on 2020-09-18 07:10 (UTC)

Agreed, this package sorely needs an update, r2020b supports python3.8 and gtk3 out of the box.

Jino commented on 2020-09-09 08:06 (UTC) (edited on 2020-09-09 08:07 (UTC) by Jino)

As this is flagged out of date since half a year, I would kindly ask @greyltc to add @bbaserdem as a comaintainer as proposed below.

tornado99 commented on 2020-05-29 20:22 (UTC)

Would it be possible to add the file type associations and icons to the script? In the installation directory of the Windows version there are 25 icons for different filetypes. If there is a way of auto-extracting these from the Linux installer that would be great. Even just .m .mat and .fig would be good.

bbaserdem commented on 2020-05-13 13:16 (UTC)

@greyltc if you make me a comaintainer or deliver the package to me; I can update the pkgbuild to 2020a; I have a good one working linked in my previous post and actively update versions in between releases; and will be doing so until next year for sure.

bbaserdem commented on 2020-04-07 20:31 (UTC) (edited on 2020-04-07 20:32 (UTC) by bbaserdem)

If anyone is interested with a working PKGBUILD; I edited my private one to work with 2020a; https://github.com/bbaserdem/Matlab/blob/master/PKGBUILD

I tried matching the dependency list with all the packages in the dockerfile. Most of the debian packages are in the arch repos; or at least AUR, but the versions referanced on the dockerfile are older than arch versions. A lot of these dependencies are probably not needed; but I don't want to test what works and what breaks one-by-one.

Still I can install just fine. Do note that matlab installer does need libselinux to run; and is needed to generate the tar.

auricom commented on 2020-03-29 21:25 (UTC)

Echoing what japm48 said, R2020a has a new installer which depends on libselinux to run. The new installer gives you the option to download files without installing which will make using this PKGBUILD slightly easier. Also, I think Mathworks changed some other stuff because, unlike previous versions, once installed I didn't have to change Matlab's glib symlinks to point to system libraries to get the add-ons manager to work.

japm48 commented on 2020-03-27 00:10 (UTC) (edited on 2020-03-27 00:56 (UTC) by japm48)

While trying to install r2020a I had this error after executing ./install:

terminate called after throwing an instance of 'std::runtime_error'
  what():  Unable to launch the MATLABWindow application

I solved this by installing libselinux (in AUR).

For the record: I found the missing dependency by executing ./bin/glnxa64/MATLABWindow.

Besides, it works without gtk2 (perhaps it now depends on gtk3).

medicineman25 commented on 2020-03-04 23:23 (UTC)

Just got this when trying to install

==> Making package: matlab 9.7.0.1296695-1 (Thu Mar 5 10:15:31 2020) ==> Retrieving sources... ==> ERROR: matlab.tar was not found in the build directory and is not a URL. Error downloading sources: matlab

Going to go the manual route for now

greyltc commented on 2020-01-28 19:01 (UTC)

@kyak oh cool, thanks. The deps here definitely do need some work!

kyak commented on 2020-01-28 18:31 (UTC)

@greyltc thanks for the effort!

I'd like to point you to the now official Dockerfile from MathWorks themselves: https://github.com/mathworks-ref-arch/matlab-dockerfile/blob/master/Dockerfile and https://hub.docker.com/r/mathworks/matlab-deps/dockerfile.

It can be useful for us to get all the dependencies correctly.

greyltc commented on 2020-01-28 17:34 (UTC) (edited on 2020-01-29 10:03 (UTC) by greyltc)

I've just fixed a number of bugs in the PKGBUILD, so as of today with r2019b update 3, I can verify that it's up to date and working. Apologies I don't get around to updating this too often. I don't reinstall MATLAB so frequently to keep up with all the releases. If you'd like to help maintain it, let me know and I can add you as a co-maintainer. The install instructions in the wiki look mostly okay (though I haven't followed them to check that), but hopefully you should just be able to get by with reading my notes in the PKGBUILD its self.

ragouel commented on 2019-11-20 11:49 (UTC)

Matlab won't install, what am I doing wrong ?

Error: This folder name is invalid. Folder names can contain alphanumeric characters and '-', '_', '.', or '/' only. The destination folder cannot be named "private".

Det commented on 2019-10-21 12:08 (UTC)

Update, please?

6etacat commented on 2019-09-13 06:08 (UTC)

The wiki is updated to solve the following error:

Using a File Installation Key requires you run the installer from a MATLAB DVD or from a directory which contains files previously downloaded via the installer.

https://wiki.archlinux.org/index.php/MATLAB#Installing_from_the_AUR_package

ttpcodes commented on 2019-03-11 18:42 (UTC) (edited on 2019-03-11 18:42 (UTC) by ttpcodes)

When the installer comes up on this error:

Using a File Installation Key requires you run the installer from a MATLAB DVD or from a directory which contains files previously downloaded via the installer.

makepkg doesn't stop running, but rather continues and will even install an empty binary that doesn't function. I'm well aware of the proper way to acquire the Matlab files to build the package, but is there a way to get the PKGBUILD script to halt on this error?

greyltc commented on 2018-12-19 20:47 (UTC)

@jadesoturi The .zip you download from tmw only contains the files needed to run the installer, not all the files required for installation. You need the complete iso. Alternatively, you can run the installer manually, it will download the proper contents of the archives/ folder to a folder in /tmp/. You can then use those files along with the contents of the .zip you previously downloaded to generate the matlab.tar that this package needs to build.

jadesoturi commented on 2018-10-31 15:47 (UTC) (edited on 2018-10-31 15:50 (UTC) by jadesoturi)

I'm having issues installing this. I got the fik and lic files and the latest zip from Mathworks, but when running makepkg -si it terminates with the following error:

  -> Modifying the installer settings
sed: can't read /home/jadesoturi/temp/matlab/src/matlab/installer_input.txt: No such file or directory
==> ERROR: A failure occurred in prepare().
    Aborting...

Checking the src folder, i see that everything has been extracted to src/ and not src/matlab. Moving everything to src/matlab makes the installer run, but then i get this error:

(Oct 31, 2018 16:42:00) Starting local product/component search in download directory
(Oct 31, 2018 16:42:00) Searching for archives...
(Oct 31, 2018 16:42:00) Reading /home/jadesoturi/temp/matlab/src/matlab/archives
(Oct 31, 2018 16:42:00) 2 files found in /home/jadesoturi/temp/matlab/src/matlab/archives
(Oct 31, 2018 16:42:00) Reading /home/jadesoturi/temp/matlab/src/matlab
(Oct 31, 2018 16:42:00) 20 files found in /home/jadesoturi/temp/matlab/src/matlab
(Oct 31, 2018 16:42:00) Archive search complete.  22 total files found.
(Oct 31, 2018 16:42:01) Completed local product/component search
(Oct 31, 2018 16:42:01) Error: Unable to locate required installation files.

Using a File Installation Key requires you run the installer from a MATLAB DVD or from a directory which contains files previously downloaded via the installer.

To obtain the missing files, click Back on the previous screen and select Log in with a MathWorks Account or contact your MATLAB license administrator. (Oct 31, 2018 16:42:01) Exiting with status -2 (Oct 31, 2018 16:42:01) End - Unsuccessful. Finished

Please advise... I was under the impression that the ZIP file downloaded from Mathworks included everything needed for the installation. I have no DVD and my license is provided by my uni...

bbaserdem commented on 2018-10-15 21:51 (UTC)

@hottea, thats great info. I am not, I am just creating a local tarball of matlab, so I can distribute it easily on my 4 archlinux installations. But knowing the file structure for the tarball is a godsent.

On further inspection, matlab now (since 2018b at least from what I have noticed) installs the products to /tmp/tmw<random> while using the network installer. I don't think this was the previous behavior (and it is bad practice to put 8GB on a tmpfs) do notice that the file is deleted upon installation/exiting; so pause once the installer reports 'installing' and cp the directory out of tmp.</random>

hottea commented on 2018-10-04 03:16 (UTC)

@bbaserdem Hey, if you're license administrator, you could download the product via installer with download only option, see here for detail. A typical matlab tarball look like this:

matlab
├── activate.ini
├── archives/
├── bin/
├── etc/
├── help/
├── install
├── installer_input.txt
├── install_guide.pdf
├── java/
├── license_agreement.txt
├── licenses/
├── patents.txt
├── readme.txt
├── sys/
├── trademarks.txt
├── ui/
└── version.txt

Matlab products locate in archives directory.

bbaserdem commented on 2018-10-01 16:50 (UTC)

I was wondering if anyone had any issues installing R2018b. I'm trying to create the tar file using the installer, but it looks like the toolboxes are installed somewhere i dont know. I used to install to a directory called faux, and cancelled the moment toolboxes finished, then merged the two directories. (Not working this time around, Im getting missisng file warnings on the installer)

I tried looking for guides regarding creating the tar but nada. Can anyone help out? (And maybe we can include instructions in PKGBUILD how to properly create tar from the installer?)

PanSi21 commented on 2018-09-29 16:54 (UTC)

:: Parsing SRCINFO (1/2): ncurses5-compat-libs :: Parsing SRCINFO (2/2): matlab ==> Creazione del pacchetto: ncurses5-compat-libs 6.1-1 (sab 29 set 2018 20:53:51 CEST) ==> Download dei sorgenti in corso... -> È stato trovato ncurses-6.1.tar.gz -> È stato trovato ncurses-6.1.tar.gz.sig ==> Validazione di source file con md5sums... ncurses-6.1.tar.gz ... Verificato ncurses-6.1.tar.gz.sig ... Ignorato ==> Validazione delle firme dei sorgenti con gpg in corso... ncurses-6.1.tar.gz ... Verificato ==> Pulizia in corso... ==> Creazione del pacchetto: matlab 9.4.0.813654-1 (sab 29 set 2018 20:53:51 CEST) ==> Download dei sorgenti in corso... -> Download di matlab.tar in corso... curl: (3) Invalid file://hostname/, expected localhost or 127.0.0.1 or none ==> ERRORE: Impossibile scaricare file://matlab.tar L'operazione sta per essere interrotta... Error downloading sources: matlab

hottea commented on 2018-08-16 12:41 (UTC)

@petronny If gcc6 is not listed as dep, then we should not modify mex opts in ${MATLAB}/bin/glnxa64/mexopts/LANG_glnxa64.xml. And gcc6 in AUR is gcc 6.4, not gcc 6.3 which is officially supported by MathWorks.

hottea commented on 2018-08-16 08:30 (UTC)

@petronny matlab.lic is available in your account center in MathWorks website. If you don't have one, then you could/should not install matlab.

petronny commented on 2018-08-15 10:42 (UTC) (edited on 2018-08-15 10:42 (UTC) by petronny)

1

For non-network installations, installation from a purchased DVD for example, nowhere will provide this matlab.lic file to users.

Current PKGBUILD requires that users have to run touch matlab.lic to generate a meaningless file before running makepkg.

2

Okay, there are 2 solutions,

  1. you could keep them and set gcc6 as a optional dependency.
  2. you could remove them and set gcc6 as a dependency.

Now gcc6 is removed from the official repositories.
It makes the current way, which is the solution 1, is acceptable now. So you can keep them.

3

Yes, you should set mex options by the way suggested by the wiki pages.

daniel_shub commented on 2018-08-14 15:32 (UTC)

@hottea I think it is a bad idea to include the license file(s) in the PKGBUILD and perform automated activation. License files are really complicated. You can have per user license files and per machine license files. A single installation of MATLAB can have multiple license files. For network installation, a license file is/was required, but for non-network installations, you don't/didn't need a license file. When I first wrote the PKGBUILD I used the license file for building a network installation, but did not include it in the package.

Activation is really stupid, as far as I could determine all it does is download the license file and copy it to the required directory 9it probably tell TMW lots of stuff also).

hottea commented on 2018-08-14 12:44 (UTC) (edited on 2018-08-14 12:45 (UTC) by hottea)

@petronny emm, you could update the PKGBUILD file. 1. I don't quite understand your point, user just need to provide matlab.lic in the same dir with PKGBUILD, and run makepkg.

2, 3. As for mex, should I remove the unused library files, and set mex opt? According to wiki page, matlab doesn't seem to respect the ${MATLAB}/bin/mexopts.sh customization. Instead it uses ${MATLAB}/bin/glnxa64/mexopts/LANG_glnxa64.xml file.

petronny commented on 2018-08-14 03:53 (UTC)

@hottea

1

You didn't answer me directly. Why matlab.lic is added as source for non-network installations? How could these users even get this file to run makepkg?

2
-  ## See $MATLABROOT/sys/os/glnxa64/README.libstdc++
-  msg2 'Removing unused library files'
-  rm ${pkgdir}/opt/tmw/${pkgname}/sys/os/glnxa64/{libstdc++.so.6.0.20,libstdc++.so.6,libgcc_s.so.1,libgfortran.so.3.0.0,libgfortran.so.3,libquadmath.so.0.0.0,libquadmath.so.0}

See $MATLABROOT/sys/os/glnxa64/README.libstdc++ and you will know why they are removed by @greyltc and me.

3

About mex. See @daniel_shub 's comment.
You should set the recommended compilers since you have listed gcc6 as an optional dependency for mex in PKGBUILD.

4

I guess it's not clear enough for @a36233

petronny commented on 2018-08-14 03:42 (UTC)

@daniel_shub

1
-  msg2 'Creating links for executables'
-  install -d -m755 "${pkgdir}/usr/bin/"
-  for _executable in deploytool matlab mbuild mcc mex; do
-    ln -s "/opt/tmw/${pkgname}/bin/${_executable}" "${pkgdir}/usr/bin/${_executable}"
-  done

He removed the binaries.

2

Some of use are packaging and then distributing via a local (or non-local) repository (MATLAB restrictive EULA be damned)

I agree that including PKGEXT in the PKGBUILD is bad style. But it is acceptable for matlab since it cannot be re-distributed.

daniel_shub commented on 2018-08-13 15:07 (UTC)

@petronny I think including PKGEXT in the PKGBUILD is bad style. It should be left to the user to decide and set via makepkg.conf.

Not all of use package and then install. Some of use are packaging and then distributing via a local (or non-local) repository (MATLAB restrictive EULA be damned). In these cases, the carezy long compression time is worth it to reduce the download bandwidth.

Really wish I had a license for a new version. Trying to get some of the older versions to work is a dependency hell. I would much rather figure out the new dependencies and be done with it.

daniel_shub commented on 2018-08-13 15:01 (UTC)

@hottea in version 9.3.0.713579 release 2 symbolic links were created in /usr/bin which caused the conflict. It looks like Darcy Hu made a modification that fixed the issue.

As for the mex compiler issues. I have been told by TMW that higher versions are not supported. That said, I could never find a test case that failed with a higher version. That said, since it is closed source, when I created the PKGBUILD, I went with the required version and I recommend sticking with that approach.

As for the dependencies, it is a real nightmare. I spent a lot of time starting with a clean chroot and only the base group installed and slowly added dependencies until I could get MATLAB to start. Then I tested things like plotting, sound, the doc viewer, opengl, cuda, etc.

My tests before releasing were matlab_cmd="/bin/matlab -nodesktop -nosplash -r" LC_ALL=C $matlab_cmd "version -java, exit" | grep Java LC_ALL=C $matlab_cmd "opengl info; exit" | grep Software LC_ALL=C $matlab_cmd "x=rand(10, 'single'); g=gpuArray(x); Success=isequal(gather(g), x), exit" | sed -ne '/Success =/,$p' LC_ALL=C $matlab_cmd "doc doc; pause; exit" LC_ALL=C $matlab_cmd "xlabel('BIG FONT', 'FontSize', 42); ylabel('small font', 'FontSize', 12); pause; exit" > /dev/null LC_ALL=C $matlab_cmd "bench, pause; exit" > /dev/null LC_ALL=C $matlab_cmd "load handel; sound(y, Fs); pause(length(y)/Fs); exit" > /dev/null

hottea commented on 2018-08-13 11:59 (UTC)

@petronny 1. You still need a license file from you administrator if you use network installation. For non-network installation, we could automate activate after installation. 2. For mex support with libs issue, you could use higher version of compilers, though it's not officially supported. 3. I think it's clear enough, user need to prepare a tarball matlab.tar from the MATLAB iso image. 4. I don't see such problem. MATLAB is installed in /opt/matlab, so it wouldn't conflict with texlive-bin.

As for deps, since MATLAB is not open source, and there is no deps list provided by MathWorks, I'm not quite sure to keep or remove which deps.

petronny commented on 2018-08-03 05:57 (UTC)

@bbaserdem

Also, is there a specific reason for having non pkg.xz extension?

Because it will take a lot of time to compress the package and then you will extract it just after the compression.

bbaserdem commented on 2018-08-03 01:39 (UTC)

ncurses5-compat-libs is necessary only for >=2016a, which I believe can be phased out. That would leave only a single aur dependency. There is a matlab-2015b package seperately in aur.

Also, is there a specific reason for having non pkg.xz extension?

Also getting a ==> WARNING: Package contains reference to $srcdir.

@a36233 your tar has to have a folder matlab in it, not directly the contents of the matlab installation. Either untar into a directory named matlab then tar -cvf matlab.tar matlab the directory. Or remove the ${pkgname} from the lines that refer to the source files.

specter119 commented on 2018-08-02 11:25 (UTC)

I vote for petronny's comment.

a36233 commented on 2018-07-25 14:03 (UTC) (edited on 2018-07-25 14:22 (UTC) by a36233)

I'm having the following problem:

-> Modifying the installer settings
sed: can't read
<path>AUR/matlab/matlab/src/matlab/installer_input.txt: No such file or directory</path>
==> ERROR: A failure occurred in prepare().
Aborting...

"installer_input.txt" it at root of the tar file in r2018a

petronny commented on 2018-07-23 03:04 (UTC) (edited on 2018-07-23 03:08 (UTC) by petronny)

@hottea

1
 source=("file://matlab.tar"
-        "file://matlab.fik")
+       "file://matlab.fik"
+       "file://matlab.lic"
+       "matlab.png::https://upload.wikimedia.org/wikipedia/commons/2/21/Matlab_Logo.png")

,

-#_networkinstall=true
-
-## For network installations, apparently, a license file needs to be used for the installation.
-if [ ! -z ${_networkinstall+isSet} ]; then
-  source+=("file://license.dat")
-  md5sums+=('SKIP')
-fi

Why matlab.lic is added as source for non-network installations?

2
-  msg2 'Configuring mex options'
-  sed -i "s#CC='gcc'#CC='gcc-4.7'#g" "${pkgdir}/opt/tmw/${pkgname}/bin/mexopts.sh"
-  sed -i "s#CXX='g++'#CXX='g++-4.7'#g" "${pkgdir}/opt/tmw/${pkgname}/bin/mexopts.sh"
-  sed -i "s#FC='gfortran'#FC='gfortran-4.7'#g" "${pkgdir}/opt/tmw/${pkgname}/bin/mexopts.sh"

,

-  ## See $MATLABROOT/sys/os/glnxa64/README.libstdc++
-  msg2 'Removing unused library files'
-  rm ${pkgdir}/opt/tmw/${pkgname}/sys/os/glnxa64/{libstdc++.so.6.0.20,libstdc++.so.6,libgcc_s.so.1,libgfortran.so.3.0.0,libgfortran.so.3,libquadmath.so.0.0.0,libquadmath.so.0}

and

-  # make sure MATLAB can find libgfortran.so.3
-  sed -i 's,LD_LIBRARY_PATH="`eval echo $LD_LIBRARY_PATH`",LD_LIBRARY_PATH="`eval echo $LD_LIBRARY_PATH`:/usr/lib/gcc/x86_64-pc-linux-gnu/5.5.0",g' "${pkgdir}/opt/tmw/matlab/bin/matlab"

Why these are removed?

3
-## This PKGBUILD creates an Arch Linux package for the proprietary MATLAB application. A license from The MathWorks is needed in order to both build the package and to run MATLAB once the package is installed. In order to build the package the user must supply a plain text file installation key and the software. For network installations, in addition to the file installation key, a license file needs to be used for the installation. The tar archive file can be generated from an ISO downloaded from The MathWorks, generated from the official DVD, or created by using the interactive installer to download the toolboxes (installation can be made to a temporary directory and canceled once the toolboxes are downloaded). The contents of the tar archive must include: ./archives/ ./bin/ ./etc/ ./help/ ./java/ /sys ./activate.ini ./install ./installer_input.txt

Why these instructions are removed? They are much clearer.

4
$ pacman -Fo /usr/bin/mex
usr/bin/mex is owned by extra/texlive-bin 2017.44590-14

Please rename the mex binary in matlab.

greyltc commented on 2018-07-20 16:07 (UTC)

Done. Go ahead and make your changes folks!

hottea commented on 2018-07-20 15:35 (UTC)

@greyltc Ok, I'm glad to.

petronny commented on 2018-06-26 08:30 (UTC)

@greyltc OK if you approve my changes.

greyltc commented on 2018-06-20 17:36 (UTC)

@petronny and/or @hottea, would you like me to make you a co-maintainer?

petronny commented on 2018-05-08 21:58 (UTC) (edited on 2018-05-09 11:02 (UTC) by petronny)

@greyltc I wrote a 2018a PKGBUILD here. It behaves almost as same as your current one, except splitting the keys to a new package.

PS. You can just pull my repository to fetch these changes.

hottea commented on 2018-05-02 07:52 (UTC)

Hi all, I create a repo in Github. If interested, one could use this PKGBUILD for building a package. I remove all dependencies, install all products available by default, and no desktop entry is provided. I gonna add a desktop entry to wiki.

greyltc commented on 2018-05-01 14:26 (UTC)

@gunjah post a link here to a pastebin (or similar) of your 2018a PKGBUILD and I'll have a look at getting it in here

sadid commented on 2018-05-01 14:12 (UTC) (edited on 2018-05-01 14:12 (UTC) by sadid)

@gunjah, you can just copy/paste it here or create your own 2018a specific aur package.

jachymb commented on 2018-04-25 11:54 (UTC)

Please update to 2018a

coldspark commented on 2018-04-19 08:31 (UTC)

I updated the PKGBUILD for 2018a. How can I upload it?

hottea commented on 2017-12-20 12:02 (UTC) (edited on 2017-12-20 12:08 (UTC) by hottea)

Hello, I write a PKGBUILD based on this one.

Changes:

  • default installation folder: /opt/matlab
  • license.dat is installed in /opt/matlab/licenses. I'm sure how matlab activing, but just copying license.dat to /etc/matlab/licenses/, and create a soft link from /opt/matlab/licenses to /etc/matlab/licenses/ not work for me.
  • matlab.tar is created by just copying all file in matlab iso file to folder matlab, and tar cvf matlab.tar matlab

However, I just test with _networkinstall=true, and everything works fine. I'm not sure if other activating method would work.

hottea commented on 2017-12-20 02:10 (UTC)

@daniel_shub Hi, it seems that the package don't install the license.dat when _networkinstall=true. It just create a soft link to /etc/matlab/licenses/, but /etc/matlab/licenses/ is not created, license.dat is not installed either. So after installation, one still need to activate matlab.

As for the ISO file, only license Administrator could download the ISO file. I just download it from school website (our school buy licenses). Or one could always down the ISO in some other way. As long as one has the proper license, I think it's OK to do that.

daniel_shub commented on 2017-12-19 19:17 (UTC)

@hottea the tarball is a pain. When I first packaged things, TMW was making getting the ISO file difficult, but you could download zip files of everything you needed from your TMW account. Then they changed the installer so that you could only download the files from the installer. Getting the files into a place that makepkg can find them is a moving target. I no longer have access to new versions of MATLAB and am no longer sure what the easiest or best thing to do it. If I had access to ISO files I would probably just use the ISO and add a checksum.

I used /opt/tmw/matlab based on Adobe Reader (https://aur.archlinux.org/packages/acroread/) which puts the package in /opt/Adobe/Reader9 and Google Earth (https://aur.archlinux.org/packages/google-earth/) which puts the package in /opt/google/earth/free/. I think the FHS requirement for subdirectories to be the LANANA names only came about recently, maybe it is time to just use /opt/matlab.

hottea commented on 2017-12-19 15:07 (UTC)

It seems that the matlab.tar contains all file in the matlab iso, I think it would be better if it one could create a matlab folder, and copy files in matlab iso to the matlab folder, and then create a tarball by tar cvf matlab.tar matlab/. Also why the installation dir is /opt/tmw/matlab? It's a little weird.

@t4mmi In package function, the MATLAB installer output is redirected to /dev/null, you might wanna change it and see the log. In fact, I think it MathWorks's mistake that matlab installer and some other scripts are without x permission. Just chmod +x -R matlab before create matlab.tar might fix it.

jkhsjdhjs commented on 2017-12-04 17:22 (UTC)

@t4mmi You need to place matlab.tar and matlab.fik (a file with your installation key inside) in the directory where you cloned this package. If you used pacaur it is ~/.cache/pacaur/matlab. Further instructions are in the head of the PKGBUILD.

t4mmi commented on 2017-12-04 16:35 (UTC) (edited on 2017-12-04 16:36 (UTC) by t4mmi)

was unable to build ...

[user@workstation matlab]$ makepkg -si

==> Making package: matlab 9.3.0.713579-2 (Mon Dec 4 17:31:29 CET 2017)

==> Checking runtime dependencies...

==> Checking buildtime dependencies...

==> Retrieving sources...

==> ERROR: Unknown download protocol: file Aborting...

jkhsjdhjs commented on 2017-12-04 16:32 (UTC) (edited on 2017-12-04 16:32 (UTC) by jkhsjdhjs)

@streckus: very nice, thank you! It would also be nice if the PKGBUILD would check the exit code of the matlab installer for failure because if the matlab installer fails you won't know, it will only show:

install: cannot stat '/home/MyName/.cache/pacaur/matlab/pkg/matlab/opt/tmw/matlab/license_agreement.txt': No such file or directory

The error, that @yiping_huang, @xcabal and I experienced. For me it failed because I entered a wrong installation key.

commented on 2017-11-28 15:06 (UTC)

What are the steps to install Matlab using this PKGBUILD? Wiki tells about an ISO, but MathWorks lets download a ZIP, and the PKGBUILD uses a TAR. Any example how to proeed?

otaj commented on 2017-11-27 17:04 (UTC)

Why is there added the weird number after version 9.3 (aka current version 9.3.0.713579)? As far as I know, it's not MathWorks' numbering (they use just 9.3) and when I tweaked the PKGBUILD manually from previous release before you bumped the version up to comply with our school's installation of MATLAB, I just put there 9.3 and now pacaur (pacman helper) wants me to update it every time, since 9.3.0.713579 is newer version than 9.3. I know, I can add it to IgnorePkg (and that's the current status), but it's sort of annoying. Anyway, not to sound so negative, thanks for the PKGBUILD, it's awesome to have something to build it upon ;)

streckus commented on 2017-11-19 18:03 (UTC) (edited on 2017-11-19 18:05 (UTC) by streckus)

I modified the PKGBUILD to correctly link to gcc49 (for mex), link mex as /usr/bin/matlab-mex for avoiding conflicts with texlive etc. and include the fixes for Addon Manager and Help Browser from the Wiki mentioned in Turtizzles comment below. You can find my version here: https://pastebin.com/wyKwL728 (Also, I dropped the ncurses5-compat-libs dependency since its not needed anymore, see https://wiki.archlinux.org/index.php/matlab#Installing_from_the_MATLAB_installation_software )

alienzj commented on 2017-11-02 00:23 (UTC)

sudo pacman -U matlab-9.2.0.556344-3-x86_64.pkg.tar [sudo] password for alienzj: loading packages... resolving dependencies... looking for conflicting packages... Packages (1) matlab-9.2.0.556344-3 Total Installed Size: 14088.64 MiB :: Proceed with installation? [Y/n] y (1/1) checking keys in keyring [########################################################################] 100% (1/1) checking package integrity [########################################################################] 100% (1/1) loading package files [########################################################################] 100% (1/1) checking for file conflicts [########################################################################] 100% error: failed to commit transaction (conflicting files) matlab: /usr/bin/mcc exists in filesystem matlab: /usr/bin/mex exists in filesystem Errors occurred, no packages were upgraded.

Turtizzle commented on 2017-10-25 16:48 (UTC) (edited on 2017-10-25 16:59 (UTC) by Turtizzle)

gcc5 was updated to version 5.5, now the path to libgfortran.so.3 changed to /usr/lib/gcc/x86_64-pc-linux-gnu/5.5.0/libgfortran.so.3. The last line in package() needs a change. :) For everyone who does not want to build the entire package again because of this small change: Open /opt/tmv/matlab/bin/matlab in the editor of your choice and change the two paths manually. Edit: As we're already editing links: we could also include the fixes from "Addon Manager not working": https://wiki.archlinux.org/index.php/matlab#Addon_manager_not_working (In addition to the update, ofc)

yiping_huang commented on 2017-10-21 17:23 (UTC)

==> Entering fakeroot environment... ==> Starting package()... -> Starting MATLAB installer -> Installing license install: cannot stat '/home/_MyName_/.cache/pacaur/matlab/pkg/matlab/opt/tmw/matlab/license_agreement.txt': No such file or directory ==> ERROR: A failure occurred in package(). Aborting... :: failed to build matlab package(s) Same as @xcabal, there is no pacaur/matlab/pkg/matlab/opt folder.

daniel_shub commented on 2017-10-18 13:48 (UTC)

@21violins you need to download the software from the Mathworks and put the software in the build directory. the PKGBUILD tells you how to do this.

21violins commented on 2017-10-18 02:58 (UTC)

I'm getting the following error when trying to install R2017b. ==> Making package: matlab 9.2.0.556344-3 (Tue Oct 17 22:13:06 EDT 2017) ==> Checking runtime dependencies... ==> Checking buildtime dependencies... ==> Retrieving sources... ==> ERROR: Unknown download protocol: file Aborting...

daniel_shub commented on 2017-09-08 14:14 (UTC)

@Turtizzle the Arch packaging guidelines (https://wiki.archlinux.org/index.php/Arch_packaging_standards) say "Packages should never be installed to /usr/local". I think the best thing to do is probably just create a link in /usr/bin called matlab-mex instead of just mex. If that causes problems for users, then they can add /opt/tmw/matlab/bin to their path variable.

Turtizzle commented on 2017-09-08 07:51 (UTC)

I just moved all executables to /usr/local/bin, as I believe that inofficial packages shouldn't mess with /usr/bin for exactly such conflict reasons anyway. This "fixes" the conflict-problem, unless you rely on directly calling "mex" for whatever reason in your tex-workflow. (Usually, you'd use a building script for that anyway, which probably includes the full path.)

streckus commented on 2017-09-07 17:25 (UTC)

@noel: You can change the PKGBUILD link mex to /usr/bin/matlab-mex or similar. From inside MATLAB, you won't get any difference to normal usage of mex but you might have to point build tools to the right file if you build libraries using mex.

noel commented on 2017-09-06 22:23 (UTC)

conflicts with texlive-bin -> /usr/bin/mex

smldis commented on 2017-09-05 15:06 (UTC) (edited on 2017-09-05 15:15 (UTC) by smldis)

For new users, notice that you have to follow the Wiki for using this pkg. right?

streckus commented on 2017-09-03 16:59 (UTC)

For Matlab 2017a, the optional dependency gcc47 can be updated to gcc49. (The corresponding AUR package also includes gfortran.)

Turtizzle commented on 2017-08-31 09:19 (UTC) (edited on 2017-09-04 09:27 (UTC) by Turtizzle)

Hi, I have minor problems installing the package with 2017a. In particular, some of the files referenced in the package() method of the PKGBUILD do not exist. Some shell output: https://pastebin.com/raw/3MN1p7iW The original content of my installer_input.txt: https://pastebin.com/raw/YNnjs3u4 The content of the installer_input.txt in the src-folder: https://pastebin.com/raw/k4SyVULs I hope you can help me out with this one, looks like a minor issue, but I don't know much about the matlab installation process... thanks. :) Edit: I finally had some time to look into it myself... solved it quite easily. I removed the "silent" option of the installer, then it told me that a license file was required. There was no license.dat available in our software repository, but a network.lic ... I renamed the file, enabled "_networkinstall" and yea, awesome.

greyltc commented on 2017-08-24 10:20 (UTC)

@progwolff, I have harfbuzz 1.4.8-1 on my system and the GUI works fine

progwolff commented on 2017-08-24 07:49 (UTC)

harfbuzz=1.4.6 is a runtime dependency. Without it, or with a higher version, the GUI fails to start.

greyltc commented on 2017-08-22 10:56 (UTC)

I've just updated this and R2017a is working alright with this package for me now. Somehow Mathworks' hardware opengl support detection is wonky. I just run `matlab -nosoftwareopengl` to work around that.

greyltc commented on 2017-08-22 09:52 (UTC)

Hey all, I've adopted this and I'll try to get it up to snuff on R2017a

kyak commented on 2017-08-22 06:44 (UTC) (edited on 2017-08-22 06:46 (UTC) by kyak)

@kahlos - Not only these dependencies are required, there are actually more required dependencies in newer releases. The fact that MATLAB launched successfully on your minimal system doesn't mean that all the vast of MATLAB toolboxes will run successfully. Some toolboxes, like Image Acquisition, requre gstreamer (not gstreamer 0.10). Some functionality, like SDI or Add-on Manager, require libselinux. Some features may require ffmpeg. And it goes on. The wiki mentiones some of these caveates - but i just wanted to caution you that the fact that you have bare X running doesn't mean all aspects of MATLAB will work successfully.

ido commented on 2017-08-21 17:06 (UTC)

@kahlos - thanks for the script. I haven't touched this package in a long time. daniel_shub is in charge as far as I know, have a look at his matlab-<YYYY[a|b]> packages, e.g. matlab-2015b.

kahlos commented on 2017-08-15 15:55 (UTC)

With the latest versions of MATLAB this AUR package isn't working very well and I'm not sure all the dependencies are actually required any more. I'm running a fairly minimal system, where I installed MATLAB manually and it seems to be working fine. I created a script to silently install MATLAB packages, which might be useful to others: https://gist.github.com/kahlos/97c9371f7a5476678ef11c836c97a14f

bbaserdem commented on 2017-07-06 18:35 (UTC)

The PKGBUILD is outdated for R2017a, you got to change the line 91 to remove libstdc++.so.6.0.17 to libstdc++.so.6.0.20 since this version uses the new library.

qft commented on 2017-05-18 15:26 (UTC)

Please note that MATLAB does not run under GCC7 because of the ABI changes in libgfortran (major version number bumped from 3 to 4). Please install libgfortran6 in the AUR if you upgrade to GCC7.

kausban commented on 2017-03-15 12:46 (UTC)

I needed to install gsreamer0.10 from the aur to get image aquisition adapters working and so that matlab could see my webcam and video device on matlab2016b.

Repentinus commented on 2017-03-08 18:10 (UTC) (edited on 2017-03-08 18:12 (UTC) by Repentinus)

If someone else has trouble installing R2016b using the provided PKGBUILD, then they might find this modified PKGBUILD <https://gist.github.com/anonymous/dc16ef3218404a5e31dc69cfd5390898> useful. I had to provide the network licence file to get the build to proceed and update the list of libraries to be deleted at the end, as R2016b has been linked with gcc4.9. I have also changed optdepends to reflect that. I have further prefixed all matlab binaries other than matlab with matlab- in /usr/lib/. I won't be uploading my PKGBUILD as matlab-r2016b as I cannot be bothered to clean it up and maintain it. If you find it useful and can be bothered to make sure the dependencies are all declared, please go ahead and upload it to AUR once cleaned up.

flying-sheep commented on 2017-01-26 10:31 (UTC) (edited on 2017-01-26 10:31 (UTC) by flying-sheep)

gstreamer0.10-base is gone. can matlab work with an up-to-date gstreamer?

tcuc commented on 2017-01-09 11:47 (UTC)

There's a pgp error, not sure how to solve it. guessing it's not a mitm on my side but just a different author. ==> Verifying source file signatures with gpg... ncurses-6.0-20161224.tgz ... FAILED (unknown public key 702353E0F7E48EDB) ==> ERROR: One or more PGP signatures could not be verified! The build failed. Dependencies for `matlab' are not met, not building...

jsjolund commented on 2016-12-26 21:45 (UTC)

I had to install the libselinux package in order to use the Add-On Explorer in Matlab R2016b. https://se.mathworks.com/matlabcentral/answers/309629-cannot-open-add-on-window-on-linux Maybe this package should be added to depends or optdepends?

xcabal commented on 2016-11-25 05:28 (UTC)

@daniel_shub I figured out the issue thanks to you by removing &> /dev/null from line 66, turns out I was giving it the wrong fik. I was under the impression that the number I was giving by my school was the fik, turns out it was not and my school gave me the correct fik to install Thanks for the Help

daniel_shub commented on 2016-11-23 15:06 (UTC)

@xcabal what version of MATLAB are you installing? Is there anything in /mnt/f078739e-820f-40da-bf0d-838723a49f50/software/mat/pkg/matlab/opt/tmw/ You could try removing &> /dev/null from line 66 and you might get a more helpful error message.

xcabal commented on 2016-11-19 03:10 (UTC) (edited on 2016-11-19 03:10 (UTC) by xcabal)

I'm getting the following message trying to install matlab 2016b ==> Starting package()... -> Starting MATLAB installer -> Installing license install: cannot stat '/mnt/f078739e-820f-40da-bf0d-838723a49f50/software/mat/pkg/matlab/opt/tmw/matlab/license_agreement.txt': No such file or directory ==> ERROR: A failure occurred in package(). Aborting... im am not sure what it whats let alone how to fix it anyone have any idea how to resolve this? thanks

kyak commented on 2016-10-16 13:19 (UTC)

With R2016b, if you get error like "Unable to start MATLABWindow process" with Add-on Explorer, Simulink gallery, Simulation Data Inspector etc, make sure to install this package: https://aur.archlinux.org/packages/libselinux/ MATLABWindow executable is linked with libselinux.so, so you need this.

wallacoloo commented on 2016-10-06 08:24 (UTC)

btw, `/usr/bin/mcc` is in conflict with mathematica, as well. I'm going to try linking just /usr/bin/matlab and nothing else. As it stands, either declare the conflict on texlive/mathematica, or change the links - the worst thing to do is to get the error message only once pacman has spent a full hour decompressing the package, whereas one could have dealt with the issue up-front if they new about the conflict. My vote goes towards *not* linking any binaries, and then documenting this in the wiki AND displaying a post-installation message telling the user where the binaries can be found. I suppose one could also create another package (e.g. `matlab-links`) which packages only the links, but depends on `matlab` (which has no /usr/bin links) and then users now have the option to install matlab with or without symlinks, but I'm pretty sure that's unidiomatic in at least one way.

daniel_shub commented on 2016-08-22 15:33 (UTC)

@greyltc Depending on what you are doing, running hardware based opengl can be much faster ... The texlive-bin conflict is a pain. Having MATLAB conflict with TeX Live seems silly. This means either renaming the MATLAB executables or simply not creating links in /usr/bin. I don't have a good set of tests of mex functionality, so I do not know if changing the name is viable. That said, it is just a link, so I think it should be fine. I am leaning towards not linking anything to /usr/bin. The problem with that is then people need to add /opt/tmw/matlab/bin/ to their path to start MATLAB from the CLI (the PKGBUILD can take care of the desktop launcher). We could then add a link on the Arch MATLAB wiki page to how to change the path. Any thoughts? In the meantime, you can comment out lines 74-78 (or modify them to choose a different name).

daniel_shub commented on 2016-08-22 15:19 (UTC)

@Tallix the MATLAB installer makes use of /tmp during the installation process. On Arch, /tmp is a tmpfs that usually defaults to using up to half of your available RAM. This means the space in your home partition does not matter. When I build from either the PKGBUILD or directly from the MATLAB installer, I get exactly the same files written to /tmp. The only reason I can think of that it works for you with the MATLAB installer and not the PKGBUILD is that maybe you are only installing a subset of the toolboxes with the MATLAB installer. If you install less stuff, you need less space in /tmp. Since the tmpfs filesystem uses RAM it is much faster than filesystems located on a physical hard drive. That said, the Arch way may be to keep everything in ${srcdir}. Let me check. In the mean time you can either mount /tmp as a regular filesystem (https://wiki.archlinux.org/index.php/Tmpfs#Disable_automatic_mount) or edit the PKGBUILD to pass the MATLAB installer '-tmpdir "${srcdir}"'. Basically, you want to change line 66 from "${srcdir}/install" -t -inputFile "${srcdir}/installer_input.txt" -mode silent &> /dev/null to "${srcdir}/install" -t -inputFile "${srcdir}/installer_input.txt" -mode silent -tmpdir "${srcdir}" &> /dev/null

Tallix commented on 2016-08-22 06:40 (UTC)

@0tie @daniel_shub @ido I'm having the same problem, even when running makepkg -s while in my home partition, which has 662.7GB of free space. The origin of the issue appears to be the Matlab installer. I modified the PKGBUILD so that the output of the Matlab installer is not redirected to /dev/null and now I'm seeing errors from cp saying that it has no space left on the device when trying to write to /tmp/mathworks_23253/whatever and a final error that says "Error: No classpath definition jar found." I find this strange, because I was able to run the installer by itself just fine earlier... I just wanted to use the AUR package because it integrates everything into Arch nicely.

greyltc commented on 2016-08-21 15:58 (UTC)

In case it helps anyone else... MATLAB on my machine was segfaulting a few seconds after I started it and it mostly finished drawing the UI: Segmentation violation detected at Sun Aug 21 16:50:31 2016 ... I've found two solutions. 1. Running matlab -r "opengl('save','software')" solves it (on next startup) 2. Run it with LIBGL_DRI3_DISABLE=1 matlab

greyltc commented on 2016-08-19 16:10 (UTC) (edited on 2016-08-21 14:11 (UTC) by greyltc)

@daniel_shub Do you think it would break anything if you renamed the /usr/bin/mex link you have here to something else (/usr/bin/mex-ml perhaps)? That file name conflicts with a file provided in https://www.archlinux.org/packages/extra/x86_64/texlive-bin/ which is a shame. At the very least, you should add texlive-bin to `conflicts`

ido commented on 2016-07-22 15:57 (UTC)

@0tie: do you get the same issues when you do this somewhere outside of /tmp (for example, in your home directory): yaourt -G matlab cd matlab makepkg -s ... /tmp is a tmpfs that usually defaults to using up to half of your available RAM.

daniel_shub commented on 2016-07-20 15:50 (UTC)

@Otie Are you sure that /tmp actually has 25G of free space? Arch uses a tempfs for /tmp by default (https://wiki.archlinux.org/index.php/Tmpfs) so I think the free space will be limited by your RAM and swap space. What does df -h /tmp give you? How many toolboxes are trying to install?

0tie commented on 2016-07-18 16:05 (UTC) (edited on 2016-07-18 19:10 (UTC) by 0tie)

Hey there, the problem of korfa in https://aur.archlinux.org/packages/matlab-r2015b/ still exists. Tried to install R2016a the whole day :/ The Matlab installer complains about not having enough space in /tmp, but it should have (25G!): ==> Erstelle und installiere Paket ==> Erstelle Paket: matlab 08.06.00-1 (Mo 18. Jul 17:59:46 CEST 2016) ==> Prüfe Laufzeit-Abhängigkeiten... ==> Prüfe Buildtime-Abhängigkeiten... ==> Empfange Quellen... -> matlab.iso gefunden -> matlab.fik gefunden ==> Überprüfe source Dateien mit md5sums... matlab.iso ... Übersprungen matlab.fik ... Übersprungen ==> Entpacke Quellen... -> Entpacke matlab.iso mit bsdtar ==> Beginne prepare()... -> Creating desktop file -> Extracting file installation key -> Modifying the installer settings ==> Betrete fakeroot Umgebung... ==> Beginne package()... -> Starting MATLAB installer Preparing installation files ... Installing ... [...] (Jul 18, 2016 18:01:54) # Today's Date: (Jul 18, 2016 18:01:54) Mon Jul 18 18:01:54 CEST 2016 (Jul 18, 2016 18:01:54) (Jul 18, 2016 18:01:54) System Info (Jul 18, 2016 18:01:54) OS: Linux 4.6.4-1-ARCH (Jul 18, 2016 18:01:54) Arch: amd64 (Jul 18, 2016 18:01:54) Data Model: 64 (Jul 18, 2016 18:01:54) Language: de (Jul 18, 2016 18:01:54) Java Vendor: Oracle Corporation (Jul 18, 2016 18:01:54) Java Home: /tmp/mathworks_16073/sys/java/jre/glnxa64/jre (Jul 18, 2016 18:01:54) Java Version: 1.7.0_60 (Jul 18, 2016 18:01:54) Java VM Name: Java HotSpot(TM) 64-Bit Server VM (Jul 18, 2016 18:01:54) Java Class Path: /tmp/mathworks_16073/java/config/professionalinstaller/pathlist.jar (Jul 18, 2016 18:01:54) User Name: root (Jul 18, 2016 18:01:54) Current Directory: /tmp/yaourt-tmp-johannes/aur-matlab/src (Jul 18, 2016 18:01:54) Input arguments: (Jul 18, 2016 18:01:54) root /tmp/yaourt-tmp-johannes/aur-matlab/src (Jul 18, 2016 18:01:54) libdir /tmp/mathworks_16073 (Jul 18, 2016 18:01:54) t true (Jul 18, 2016 18:01:54) inputFile /tmp/yaourt-tmp-johannes/aur-matlab/src/installer_input.txt (Jul 18, 2016 18:01:54) mode silent (Jul 18, 2016 18:01:54) standalone true (Jul 18, 2016 18:01:55) Input file: [...] (Jul 18, 2016 18:01:57) Starting local product/component search in download directory (Jul 18, 2016 18:01:57) Searching for archives... (Jul 18, 2016 18:01:57) Reading /tmp/yaourt-tmp-johannes/aur-matlab/src/archives (Jul 18, 2016 18:01:57) Assembling product list... (Jul 18, 2016 18:01:57) 2210 files found in /tmp/yaourt-tmp-johannes/aur-matlab/src/archives (Jul 18, 2016 18:01:57) Reading /tmp/yaourt-tmp-johannes/aur-matlab/src (Jul 18, 2016 18:01:57) 15 files found in /tmp/yaourt-tmp-johannes/aur-matlab/src (Jul 18, 2016 18:01:57) /root/Downloads/MathWorks/R2016a/archives doesn't exist ... skipping. (Jul 18, 2016 18:01:57) Archive search complete. 2225 total files found. (Jul 18, 2016 18:02:04) Completed local product/component search (Jul 18, 2016 18:02:05) Installing Product: MATLAB 9.0 (Jul 18, 2016 18:02:12) java.io.FileNotFoundException: /tmp/yaourt-tmp-johannes/aur-matlab/pkg/matlab/opt/tmw/matlab/toolbox/matlab/icons/plotpicker-simio.png (Auf dem Gerät ist kein Speicherplatz mehr verfügbar) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.(Unknown Source) [...] at java.lang.Thread.run(Unknown Source) (Jul 18, 2016 18:02:12) The following error was detected while installing matlab_toolbox_icons_common: /tmp/yaourt-tmp-johannes/aur-matlab/pkg/matlab/opt/tmw/matlab/toolbox/matlab/icons/plotpicker-simio.png (Auf dem Gerät ist kein Speicherplatz mehr verfügbar) Would you like to retry installing matlab_toolbox_icons_common? If you press No, the installer will exit without completing the installation. More information can be found at /tmp/mathworks_root.log (Jul 18, 2016 18:02:12) Exiting with status -1 (Jul 18, 2016 18:02:13) End - Unsuccessful. Finished -> Installing license -> Creating links for license.lic -> Creating links for executables -> Installing desktop files install: der Aufruf von stat für '/tmp/yaourt-tmp-johannes/aur-matlab/pkg/matlab/opt/tmw/matlab/help/matlab/matlab_env/matlab_desktop_icon.png' ist nicht möglich: Datei oder Verzeichnis nicht gefunden ==> FEHLER: Ein Fehler geschah in package(). Breche ab... ==> FEHLER:Makepkg konnte matlab nicht erstellen.

birnenwerfer commented on 2016-03-31 00:44 (UTC)

I get the same error "Protocol for the unknown download : files" But I have downloaded the matlab iso file (R2016a_glnxa64.iso) with campus licence from our university. We don't need a keyfile or anything like this. We get a registration key a register the product into matlab. So how do I have to install matlab with this AUR Package?

daniel_shub commented on 2016-03-02 14:45 (UTC)

MATLAB is proprietary software and you need to supply the iso in order to build the package. While some licenses do not provide you with a DVD or allow you to download an iso file, many licenses allow you to download the MATLAB installer zip file which can then be used to build the iso (see, the PKGBUILD and Wiki). If you do not have a license, or your license does not allow you to get the software, then you cannot use MATLAB.

darkanmoore commented on 2016-03-02 10:30 (UTC)

Hi, I have a problem with matlab installation: "Protocol for the unknown download : files". It's possible to resolve this problem, because I really need this program, and I can't download iso and install for it. Thanks

kyak commented on 2015-12-30 17:14 (UTC)

Thanks a lot for your reply and such a thorough approach to packaging! Didn't know about namcap - nice!

daniel_shub commented on 2015-12-30 16:51 (UTC)

I came up with the dependency list using a combination of namcap and my own test suite (basically the things listed on the Arch Wiki). I run namcap and remove any dependency it says is included and not needed and add any dependency it says is not included. I then run my test suite in a clean chroot. I then find the minimum set of packages needed to pass the suite and add them as dependencies. I do not keep a list of which dependencies are needed to pass the test suite. I do know that namcap does not think the libxp, libxpm, and ncursues5-compat-libs packages are needed, but they are needed to pass my test suite. My test suite is not comprehensive, so while namcap may be picking up dependencies that are not needed, passing the test without a namcap detected dependency, does not mean the dependency is not needed by some untested MATLAB function. At some point I would like to go through the namcap output and use that to build a better test suite so I could tell you the exact behavior that would demonstrate why a dependency is included. In regards to the gconf package, I can uninstall it and the test suite still passes. In otherwords, the gconf package is a dependency because namcap says it is needed. Specifically, namcap says: matlab E: Dependency gconf detected and not included (libraries ['usr/lib/libgconf-2.so.4'] needed in files ['opt/tmw/matlab/bin/glnxa64/libcef.so', 'opt/tmw/matlab/sys/jxbrowser/glnxa64/xulrunner/xulrunner-linux-64/components/libmozgnome.so', 'opt/tmw/matlab/sys/jxbrowser/glnxa64/xulrunner/xulrunner-linux-64/components/libnkgnomevfs.so'])

kyak commented on 2015-12-30 14:42 (UTC)

@daniel_shub: how did you come up with the list of package dependencies? For example, gconf - why is it needed? I don't have most of these packages, and doesn't seem to have problems. I'm installing manually, and just came across this PKGBUILD.

daniel_shub commented on 2015-10-26 16:18 (UTC)

@flying-sheep that is a real pain. I am not sure what the best strategy is. One option is to just not create the links at all and let people add /opt/tmw/matlab/bin to $PATH. I think mmex is confusing. I am also worried that deploytool, mbuild, and mcc might also end up with eventual name clashes. Maybe going with something like mex-matlab. For now, the workaround is pretty simple. You can delete "mex" from line 76 of the PKGBUILD or change "${pkgdir}/usr/bin/${_executable}" to "${pkgdir}/usr/bin/${_executable}-matlab" on line 77.

flying-sheep commented on 2015-10-26 13:22 (UTC)

much better yeah! my only problem is that /usr/bin/mex exists in texlive-bin – maybe we should rename matlabs “mex”? (into ‘mmex’ or something)

daniel_shub commented on 2015-10-22 22:31 (UTC) (edited on 2015-10-22 22:31 (UTC) by daniel_shub)

I have rewritten the PKGBUILD such that it now only supports the most recent version of MATLAB. I have also created version specific packages back to r2010b (https://aur.archlinux.org/packages/?O=0&SeB=n&K=matlab&outdated=&SB=n&SO=a&PP=50&do_Search=Go). If you want to install an older version, use one of the version specific packages. This change makes the PKGBUILD must easier to maintain and understand.

nivata commented on 2015-10-05 14:07 (UTC)

@daniel_shub When I run the command you gave it outputs 'false'. And I have Matlab 2015a installed using a modified version of this PKGBUILD: https://gist.github.com/anonymous/af28f52e890444dd643f Not sure how this helps though?

ido commented on 2015-09-25 21:44 (UTC)

@daniel_shub That's a great idea. I'd suggest using split packages and meta packages for this. For example, we can have the base package in the split package named "matlab" be a meta package for the latest version, and have it be a split package that generates all the matlab-r$versions ones... Shoot me an email and we can figure out if it's easier to do this via github PRs or comaintainership?

daniel_shub commented on 2015-09-25 21:42 (UTC)

I have been unable to get hardware based opengl working since r2014b and the switch to HG2. This has slowed me down from updated the PKGBUILD. I have tried it on different hardware, so I think it is either a missing package or a configuration issue. Can anyone get $ matlab -nodesktop -nosplash -r "opengl info; exit" | grep Software to output false with r2014b or newer?

daniel_shub commented on 2015-09-25 21:37 (UTC)

@ido I am happy to help out again. I never really intended to let it slip as bad as I did. I have never really been happy with the PKGBUILD and it is not the one I use. I think I tried to make it do too much in an attempt to avoid making multiple packages. I propose we simplify the PKGBUILD to only handle the current release and then create packages like matlab-r2015b, matlab-r2015a, ... matlab-r2010b for people who want older versions. This is in fact how I actually manage my installations of MATLAB so it would be simpler for me.

daniel_shub commented on 2015-09-25 21:33 (UTC)

@SibrenVasse I can build an uncompressed package with only a base MATLAB installation in about 10 minutes on my laptop. Adding toolboxes adds time. It takes me a couple of hours to build and compress the package with all the MATLAB toolboxes. The final package can be upwards of 5 GB.

daniel_shub commented on 2015-09-25 21:30 (UTC)

@flying-sheep the PKGBUILD explains that you will need both the software (an iso file) and a file installation key (a fik file) to build the package. To run MATLAB you will also need a license file (a lic file). Some people have reported that the license file is also required to create the package for network licenses. Do you have a copy of the software, a file installation key and the license?

lonaowna commented on 2015-09-21 13:37 (UTC)

As mentioned in the previous comment, this package should depend on ncurses5-compat-libs.

Awebb commented on 2015-09-18 11:47 (UTC)

There is a discussion on the bbs: https://bbs.archlinux.org/viewtopic.php?pid=1562934 It is possible, that even the old Matlab versions will not run anymore, because of a soname bump in ncurses.

SibrenVasse commented on 2015-09-10 12:38 (UTC)

I tested the pkgbuild against R2015b and it installs fine. (git patch - http://pastebin.com/8JtF3Z9y) However, while building the package it takes a very, very long time 'Removing static library files'. Am I doing something wrong? (http://pastebin.com/iwD8GZgt)

ido commented on 2015-09-04 16:10 (UTC)

This package needs co-maintainers as I'm not able to test against R2015b since I do not own it. If you own R2015b and are willing to give it a try please get in touch.

flying-sheep commented on 2015-09-04 15:51 (UTC)

sadly i can’t just add R2015b: your pkgbuild expects a license.txt which isn’t there