Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linux-aarch64 support #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

hinxx
Copy link

@hinxx hinxx commented Sep 22, 2020

Tested on the RPi4 aarch64 image from https://github.com/TheRemote/Ubuntu-Server-raspi4-unofficial/releases.
Managed to compile and run medm from git master.
Had to manually compile and install lesstif from https://launchpad.net/ubuntu/+source/lesstif2/1:0.95.2-1.

Screenshot_2020-09-22_21-30-21

@Kymain
Copy link

Kymain commented Jan 19, 2024

Hello,

I'm writing from the Duke University Free Electron Laser Lab. I came across this from your post on the Argonne forums here while looking for ways on how to install MEDM on a Raspberry Pi. Do you still possess the notes detailing the installation process? If so, I would greatly appreciate if you would be willing to share them.

Thank you in advance.

@hinxx
Copy link
Author

hinxx commented Jan 20, 2024

Sorry, don't know anymore where I put that.. Looks like I compiling the whole thing on the RPi.

Are you facing a specific problem?

@Kymain
Copy link

Kymain commented Jan 24, 2024

Hi,

Thank you for your response; the specific problem we're running into is an error that occurs when running the makefile in the MEDM directory: "error: to generate dependencies you must specify either ‘-M’ or ‘-MM’". The full pastebin of the output can be seen here.

Like you did in the Argonne forum thread, we made our own CONFIG_SITE file for linux_aarch64, but even after doing so we continued to run into this issue. We believe that the problem is that we're lacking one of the dependencies; specifically, Motif. We're currently in the process of trying to implement lessmotif as a dependency replacement, but there is still some uncertainty on whether or not the lack of Motif is actually the issue. Do you recall if, in fixing this issue, you had to do anything other than installing lessmotif and creating the CONFIG_SITE file in order to get MEDM to install correctly?

Thank you once again.

@hinxx
Copy link
Author

hinxx commented Jan 25, 2024

Judging from the pastebin it seems you are using RPi 2 board? If so, it means you can not use linux_aarch64 (64-bit) but linux-arm (32-bit). You might want to change the settings in the CONFIG_SITE for linux-arm instead and see if that helps.

I also noticed that you are using quite old epics base (3.15.9). I was using 7.0. Additionally, my gcc version was 7.5.0 on ubuntu 18.04 image for RPi 4.

Here a couple of lines is my compile output for medm on my RPi 4:

make[2]: Entering directory '/home/ubuntu/extensions/src/medm'
make -C ./printUtils install
make[3]: Entering directory '/home/ubuntu/extensions/src/medm/printUtils'
perl -CSD /home/ubuntu/epics-base/bin/linux-aarch64/makeMakefile.pl O.linux-aarch64 ../../../..
mkdir -p O.Common
make -C O.linux-aarch64 -f ../Makefile TOP=../../../.. \
    T_A=linux-aarch64 install
make[4]: Entering directory '/home/ubuntu/extensions/src/medm/printUtils/O.linux-aarch64'

/usr/bin/gcc  -D_GNU_SOURCE -D_DEFAULT_SOURCE            -DUNIX  -Dlinux      -O3 -g   -Wall            -fPIC -I. -I../O.Common -I. -I. -I.. -I../../../../include/compiler/gcc -I../../../../include/os/Linux -I../../../../include -I../../../../../epics-base/include/compiler/gcc -I../../../../../epics-base/include/os/Linux -I../../../../../epics-base/include          -I/usr/include/X11    -M -MM -MF xwd2ps.d  ../xwd2ps.c
/usr/bin/gcc  -D_GNU_SOURCE -D_DEFAULT_SOURCE            -DUNIX  -Dlinux      -O3 -g   -Wall            -fPIC -I. -I../O.Common -I. -I. -I.. -I../../../../include/compiler/gcc -I../../../../include/os/Linux -I../../../../include -I../../../../../epics-base/include/compiler/gcc -I../../../../../epics-base/include/os/Linux -I../../../../../epics-base/include          -I/usr/include/X11    -M -MM -MF xwd.d  ../xwd.c
/usr/bin/gcc  -D_GNU_SOURCE -D_DEFAULT_SOURCE            -DUNIX  -Dlinux      -O3 -g   -Wall            -fPIC -I. -I../O.Common -I. -I. -I.. -I../../../../include/compiler/gcc -I../../../../include/os/Linux -I../../../../include -I../../../../../epics-base/include/compiler/gcc -I../../../../../epics-base/include/os/Linux -I../../../../../epics-base/include          -I/usr/include/X11    -M -MM -MF utilPrint.d  ../utilPrint.c
/usr/bin/gcc  -D_GNU_SOURCE -D_DEFAULT_SOURCE            -DUNIX  -Dlinux      -O3 -g   -Wall            -fPIC -I. -I../O.Common -I. -I. -I.. -I../../../../include/compiler/gcc -I../../../../include/os/Linux -I../../../../include -I../../../../../epics-base/include/compiler/gcc -I../../../../../epics-base/include/os/Linux -I../../../../../epics-base/include          -I/usr/include/X11    -M -MM -MF ps_utils.d  ../ps_utils.c
/usr/bin/gcc  -D_GNU_SOURCE -D_DEFAULT_SOURCE            -DUNIX  -Dlinux      -O3 -g   -Wall            -fPIC -I. -I../O.Common -I. -I. -I.. -I../../../../include/compiler/gcc -I../../../../include/os/Linux -I../../../../include -I../../../../../epics-base/include/compiler/gcc -I../../../../../epics-base/include/os/Linux -I../../../../../epics-base/include          -I/usr/include/X11    -M -MM -MF pUtils.d  ../pUtils.c
/usr/bin/gcc  -D_GNU_SOURCE -D_DEFAULT_SOURCE            -DUNIX  -Dlinux      -O3 -g   -Wall            -fPIC -I. -I../O.Common -I. -I. -I.. -I../../../../include/compiler/gcc -I../../../../include/os/Linux -I../../../../include -I../../../../../epics-base/include/compiler/gcc -I../../../../../epics-base/include/os/Linux -I../../../../../epics-base/include          -I/usr/include/X11    -M -MM -MF getopt.d  ../getopt.c
/usr/bin/gcc  -D_GNU_SOURCE -D_DEFAULT_SOURCE            -DUNIX  -Dlinux      -O3 -g   -Wall            -fPIC -I. -I../O.Common -I. -I. -I.. -I../../../../include/compiler/gcc -I../../../../include/os/Linux -I../../../../include -I../../../../../epics-base/include/compiler/gcc -I../../../../../epics-base/include/os/Linux -I../../../../../epics-base/include          -I/usr/include/X11    -c ../getopt.c
/usr/bin/gcc  -D_GNU_SOURCE -D_DEFAULT_SOURCE            -DUNIX  -Dlinux      -O3 -g   -Wall            -fPIC -I. -I../O.Common -I. -I. -I.. -I../../../../include/compiler/gcc -I../../../../include/os/Linux -I../../../../include -I../../../../../epics-base/include/compiler/gcc -I../../../../../epics-base/include/os/Linux -I../../../../../epics-base/include          -I/usr/include/X11    -c ../pUtils.c
/usr/bin/gcc  -D_GNU_SOURCE -D_DEFAULT_SOURCE            -DUNIX  -Dlinux      -O3 -g   -Wall            -fPIC -I. -I../O.Common -I. -I. -I.. -I../../../../include/compiler/gcc -I../../../../include/os/Linux -I../../../../include -I../../../../../epics-base/include/compiler/gcc -I../../../../../epics-base/include/os/Linux -I../../../../../epics-base/include          -I/usr/include/X11    -c ../ps_utils.c
/usr/bin/gcc  -D_GNU_SOURCE -D_DEFAULT_SOURCE            -DUNIX  -Dlinux      -O3 -g   -Wall            -fPIC -I. -I../O.Common -I. -I. -I.. -I../../../../include/compiler/gcc -I../../../../include/os/Linux -I../../../../include -I../../../../../epics-base/include/compiler/gcc -I../../../../../epics-base/include/os/Linux -I../../../../../epics-base/include          -I/usr/include/X11    -c ../utilPrint.c
/usr/bin/gcc  -D_GNU_SOURCE -D_DEFAULT_SOURCE            -DUNIX  -Dlinux      -O3 -g   -Wall            -fPIC -I. -I../O.Common -I. -I. -I.. -I../../../../include/compiler/gcc -I../../../../include/os/Linux -I../../../../include -I../../../../../epics-base/include/compiler/gcc -I../../../../../epics-base/include/os/Linux -I../../../../../epics-base/include          -I/usr/include/X11    -c ../xwd.c
/usr/bin/gcc  -D_GNU_SOURCE -D_DEFAULT_SOURCE            -DUNIX  -Dlinux      -O3 -g   -Wall            -fPIC -I. -I../O.Common -I. -I. -I.. -I../../../../include/compiler/gcc -I../../../../include/os/Linux -I../../../../include -I../../../../../epics-base/include/compiler/gcc -I../../../../../epics-base/include/os/Linux -I../../../../../epics-base/include          -I/usr/include/X11    -c ../xwd2ps.c

At a glance my compile lines include -I/usr/include/X11 while yours do not which makes me think that the CONFIG_SITE for linux-arm does not specify them; which might be root cause for your compile issues.

@Kymain
Copy link

Kymain commented Jan 26, 2024

Thank you; switching the CONFIG_SITE file to linux-arm fixed that error, and we've managed to install MEDM after hunting down a few more missing dependencies on the internet.

While we're actually using a Raspberry pi 3, which is running aarch-64, we have been telling EPICS to act as if this is a linux-arm device since there is no installation rule set for arch in EPICS 3.15.9. In hindsight, this was a rather glaring oversight, so thank you for pointing this out.

Have a great day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants