Installing MCUXpresso IDE as a .rpm in Fedora 34

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Installing MCUXpresso IDE as a .rpm in Fedora 34

2,132 Views
JuhaniJaakola
Contributor I

The MCUXpresso is officially supported only as a Debian .deb package. I use mainly Fedora 34, which is a .rpm based system. Below I describe how the .deb package can be extracted from the official installation file, how it is converted to a .rpm package and how it can be installed and how to load the SDK. I don't use the IDE after the SDK is installed, command line is enough for me.

There are instructions (google MCUXpresso Fedora) on how to extract contents of the .deb package to a Fedora system. However, those methods do not register those files into the RPM database. I don't like having orphan files on my system, that's why I use a .rpm package.

There are some errors during the process. However, after these steps I can install the SDK and build OpenGD77 firmware with the make command.

 

$ mkdir tmp
$ cd tmp/
$ chmod +x ~/Big/Downloads/MCUXpresso/mcuxpressoide-11.4.0_6224.x86_64.deb.bin
$ ~/Big/Downloads/MCUXpresso/mcuxpressoide-11.4.0_6224.x86_64.deb.bin --tar xvf ./mcuxpressoide-11.4.0_6224.x86_64.deb
$ sudo dnf install alien
$ sudo alien -r --scripts mcuxpressoide-11.4.0_6224.x86_64.deb
mcuxpressoide-11.4.0-2.x86_64.rpm generated

 

If I try install the .rpm now, it will give errors on failed dependencies and conflicting directories:

libjli.so()(64bit) is needed by mcuxpressoide-11.4.0-2.x86_64
libncurses.so.5()(64bit) is needed by mcuxpressoide-11.4.0-2.x86_64
libpython2.7.so.1.0()(64bit) is needed by mcuxpressoide-11.4.0-2.x86_64
libtinfo.so.5()(64bit) is needed by mcuxpressoide-11.4.0-2.x86_64
...
file /lib from install of mcuxpressoide-11.4.0-2.x86_64 conflicts with file from package filesystem-3.14-5.fc34.x86_64
file /usr/lib from install of mcuxpressoide-11.4.0-2.x86_64 conflicts with file from package filesystem-3.14-5.fc34.x86_64

The failed dependencies can be ignored with the --nodeps flag. The conflicting directories require using rpmrebuild:

$ sudo dnf install rpmrebuild
$ sudo rpmrebuild -ep mcuxpressoide-11.4.0-2.x86_64.rpm

This opens your editor (see environment variable EDITOR) on the spec file of the .rpm package. At minimum, the following two lines (/lib and /usr/lib) must be deleted:

$ sudo diff /root/.tmp/rpmrebuild.52722/work/spec.*
138d137
< %dir %attr(0755, root, root) "/lib"
144d142
< %dir %attr(0755, root, root) "/usr/lib"

However, there are other problematic directories as well. For example, if you do not remove the line for /lib/udev, it will be owned by two packages:

$ rpm -qf /lib/udev/
systemd-udev-248.7-1.fc34.x86_64
mcuxpressoide-11.4.0-2.x86_64

For details, see: https://forums.fedoraforum.org/showthread.php?320722-lib-conflict

After deleting the lines, save the spec file and exit. The .rpm will be rebuilt. Then you can install the .rpm file:

$ sudo rpm -ivh --nodeps /root/rpmbuild/RPMS/x86_64/mcuxpressoide-11.4.0-2.x86_64.rpm

 

Now the IDE starts, but gives various errors when trying to install a SDK. The IDE has a peculiar feature of changing the ownership of its own files to the non-root user running the IDE. This works in lubuntu, but not in Fedora. So you have to change the ownership manually, then you can start the IDE (replace jj by your own username):

$ sudo chown -R jj /usr/local/mcuxpressoide-11.4.0_6224/ide/
$ cd /usr/local/mcuxpressoide-11.4.0_6224/ide
$ env SWT_GTK3=0 /usr/local/mcuxpressoide-11.4.0_6224/ide/mcuxpressoide
***WARNING: Detected: GTK_IM_MODULE=xim. This input method is unsupported and can cause graphical issues.
***WARNING: Unset GTK_IM_MODULE or set GTK_IM_MODULE=ibus if flicking is experienced.
...

 

I have only used the IDE for installing a SDK, because I use mainly the command line (make etc).

 

Tags (1)
5 Replies

393 Views
nixrunner
Contributor II

This does not work in 2023, Fedora 39. Alien is throwing me this error:

Control file couldn't be read! at /usr/share/perl5/vendor_perl/Alien/Package/Deb.pm line 234.
 

I will post a fix If I find one.

0 Kudos

397 Views
nixrunner
Contributor II

I would like to request NXP to package MCUXpresso IDE as a flatpak, snap or AppImage application format. This way we can use these ides across multiple GNU/Linux distribution without breaking compatibility.

0 Kudos

1,376 Views
JustMe1
Contributor II

How about NXP just makes an .rpm release?

2,122 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello JuhaniJaakola,

Thank you for this contribution. While Fedora is not an officially supported Linux distribution for MCUXpresso, there are many Fedora users that will find this workaround helpful.

Regards,
Gustavo

0 Kudos

393 Views
nixrunner
Contributor II
For the love of God, just package the ide as flatpak like Arduino
0 Kudos