-
Notifications
You must be signed in to change notification settings - Fork 6
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
EPICS host arch guess doesn't work on ARM #2
Comments
Perl is used with EPICS build system I think. Recently, I have created an IOC which can read EPICS DB. With this IOC, one can develop an EPICS IOC without touching any C/C++, any EPICS build system component, and any Perl. Also, Perl might not need to be even installed. So far, epicsdbbuilder requires just the EPICS binaries and DBD. Is the automatic guess by EPICS worth a new dependency on the Perl? |
Good point, am happy to avoid a Perl dependency. But do we really ever have an installation of EPICS without the complete build system? Certainly an alternative fix to this issue would simply be to do a better job at emulating use Config;
use POSIX;
$suffix="";
$suffix="-".$ARGV[0] if ($ARGV[0] ne "");
$EpicsHostArch = GetEpicsHostArch();
print "$EpicsHostArch$suffix";
sub GetEpicsHostArch { # no args
$arch=$Config{'archname'};
if ($arch =~ /sun4-solaris/) { return "solaris-sparc";
} elsif ($arch =~ m/i86pc-solaris/) { return "solaris-x86";
} elsif ($arch =~ m/i[3-6]86-linux/){ return "linux-x86";
} elsif ($arch =~ m/x86_64-linux/) { return "linux-x86_64";
} elsif ($arch =~ m/arm-linux/) { return "linux-arm";
} elsif ($arch =~ m/MSWin32-x86/) { return "win32-x86";
} elsif ($arch =~ m/MSWin32-x64/) { return "windows-x64";
} elsif ($arch =~ m/cygwin/) {
my($kernel, $hostname, $release, $version, $cpu) = POSIX::uname();
if ($cpu =~ m/x86_64/) { return "cygwin-x86_64"; }
return "cygwin-x86";
} elsif ($arch =~ m/darwin/) {
my($kernel, $hostname, $release, $version, $cpu) = POSIX::uname();
if ($cpu =~ m/Power Macintosh/) { return "darwin-ppc"; }
elsif ($cpu =~ m/i386/) { return "darwin-x86"; }
elsif ($cpu =~ m/x86_64/) { return "darwin-x86"; }
else { return "unsupported"; }
} else { return "unsupported"; }
} Think the main challenge will be to find the right Python calls to get the appropriate architecture fields. |
About a use case. I think I might a have a use of for EPICS without an EPICS Build System. Consider you want to develop an IOC which talks to a device over TCP/IP. The device supports simple ASCII-based protocol. And, this can be handled by StreamDevice. Thus, the only thing you need is a pre-built IOC which supports StreamDevice. On you got those, you can start working on your integration and control loops immediately. About a script. It looks like the script is not able to guess cross-compilation (win32-x86-mingw). I think Python is able to tell you details about the processor. However, I do not have access to an ARM machine in order to tell whether this is usable there. |
I have access to classic 32-bit ARM machines, but not an 64-bit ARMv8 yet. I think it's worth looking at a pure Python version of this script then. |
Maybe, a solution could be to guess what the script can guess and if the script is uncertain, print out the evidence available and fail with a suggestion to extend the script. I think this should be sufficient to make a change in future. |
The code in
mydbstatic.py
at https://github.com/Araneidae/epicsdbbuilder/blob/84846091f6faccbc61bb6499a0f7835f4d829d89/epicsdbbuilder/mydbstatic.py#L57 used to figure out the path to the EPICS libraries fails for alinux-arm
architecture. The key problem is that we're trying to second guess the computation ofEPICS_HOST_ARCH
in$EPICS_BASE/lib/perl/EpicsHostArch.pl
.Maybe it'll be simpler to literally just call this script!
The text was updated successfully, but these errors were encountered: