EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: 64-bit EPICS anyone?
From: "Ernest L. Williams Jr." <[email protected]>
To: [email protected]
Cc: EPICS tech-talk <[email protected]>
Date: Fri, 14 Oct 2005 14:48:13 -0400
On Fri, 2005-10-14 at 14:29 -0400, Zhijian Yin (ZY) wrote:
> Hi, Ernest,
> 
> Just like you, I am trying to compile epics for a AMD64 linux box.  I am 
> running Debian.
> 
> Compiling epics base stalls, because  
> $(EPICS)/base/startup/EpicsHostArch.pl(and EpicsHostArch shell script) 
> reports amd64 as "unsupported".
> 
> I found a quick and dirty fix is to add x86_64 to the cpu list for 
> x86-linux, i.e., change EpicsHostArch script to
> 
> case $sysname in
>     Linux )
>         os=linux
>                 cpu=`uname -m`
>         case $cpu in i386 | i486 | i586 | i686 | x86_64 )          ### 
> added x86_64
>             cpu=x86
> 
> And change the related lines in EpicsHostArch.pl to
> 
> 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/sun4-sunos/)    { return "sun4-68k";
>     } elsif ($arch =~ m/i[3-6]86-linux/)    { return "linux-x86";
>     } elsif ($arch =~ m/x86_64/)    { return 
> "linux-x86";                   ####this is a newly added line
>     } elsif ($arch =~ m/MSWin32-x86/)   { return "win32-x86";
>     } elsif ($arch =~ m/cygwin/)        { return "cygwin-x86";
>     } elsif ($arch =~ m/PA-RISC1.1/)    { return "hpux-parisc";
>     } elsif ($arch =~ m/darwin/)        { return "darwin-ppc";
>     } else { return "unsupported"; }
> }
> 
> 
> The idea is to have 'uname -m' (which reports as x86_64 for AMD64) as 
> linux-x86 for epics. 

I did not have to do the above.  My RedHat AMD64 machine just reports
the correct architecture with uname of course.

When I source 
/ade/epics/supTop/base/R3.14.7/startup/EpicsHostArch
every thing is set properly.

EPICS_HOST_ARCH=linux-x86_64

The next step was add configuration files in the
<EPICS_BASE>/configure/os area.
> 
> Recompilation works fine.  Since it uses x86_64 libs, the build is 64bit.

Compilation worked very well and was extremely fast, however, it is not
64-bit.  When the compilation is complete what you get is a 32-bit
application running on a 64-bit OS.  So basically, when we run EPICS it
the linux OS is in 32-bit compatibility mode.

To achieve the 64-bit mode we will have to throw the "-m64" flag to the
GCC compiler.

This is my next step but I sense there will be trouble as some of my
colleagues have forewarned me.

> 
> A better way probably is as what you suggested, add x86_64 as a seperate 
> architecture.  I think you can just copy the linux-x86 files.
Yes, copy them and rename them.  I also had to make a few modifications
inside some of the files.  For example, 
change ARCH_DEP_CPPFLAGS += -D_X86_
to ARCH_DEP_CPPFLAGS += -D_X86_64_

> 
> 
> ZY
> 
> 
> Ernest L. Williams Jr. wrote:
> 
> >Hi,
> >
> >I have an AMD64 linux box running redhat linux and want to build both a
> >32-bit and 64-bit version of EPICS BASE.
> >
> >Before we get started, I wanted to check the community for EPICS running
> >on AMD64 natively.  Is anyone doing this?
> >
> >I would like to start with just building EPICS R3.14 natively against an
> >ADM64 Opteron architecture.  Not interested in cross-compiling yet (i.e.
> >let's forget about vxWorks for now).
> >
> >Of course, we will need new configuration files in
> >"<EPICS_BASE/configure/os>"
> >
> >I supposed they would look like so:
> >================================================
> >CONFIG.Common.linux-x86_64
> >CONFIG.Common.linux-x86_64-debug
> >CONFIG.linux-x86_64.Common
> >CONFIG.linux-x86_64-debug.Common
> >CONFIG.linux-x86_64-debug.linux-x86_64-debug
> >CONFIG.linux-x86_64.linux-x86_64
> >CONFIG.linux-x86_64.linux-x86_64-debug
> >CONFIG_SITE.Common.linux-x86_64
> >CONFIG_SITE.linux-x86_64.Common
> >CONFIG_SITE.linux-x86_64-debug.linux-x86_64-debug
> >CONFIG_SITE.linux-x86_64.linux-x86_64
> >CONFIG_SITE.linux-x86_64.UnixCommon
> >=================================================
> >
> >Thanks,
> >Ernest L. Williams Jr.
> >SNS Control Systems Group
> >ORNL
> >
> >
> >
> >  
> >
> 


Replies:
Re: 64-bit EPICS anyone? Zhijian Yin (ZY)
References:
64-bit EPICS anyone? Ernest L. Williams Jr.
Re: 64-bit EPICS anyone? Zhijian Yin (ZY)

Navigate by Date:
Prev: Re: 64-bit EPICS anyone? Zhijian Yin (ZY)
Next: Re: 64-bit EPICS anyone? Zhijian Yin (ZY)
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: 64-bit EPICS anyone? Zhijian Yin (ZY)
Next: Re: 64-bit EPICS anyone? Zhijian Yin (ZY)
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·