Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017 
<== Date ==> <== Thread ==>

Subject: Re: MEDM installation instructions
From: Andrew Wagner <apwagner@u.washington.edu>
To: Noboru Yamamoto <noboru.yamamoto@kek.jp>
Cc: EPICS Tech Talk <tech-talk@aps.anl.gov>
Date: Wed, 23 Jun 2010 00:53:01 -0700
Thanks again everyone for the help, 

I finally succeeded in compiling openmotif and medm. The problem was that openmotif is by default compiled in 64 bit architecture in OS X 10.6 . The darwin-x86 host arch defined in EPICS is 32 bit. Since medm compiles with options inherited from EPICS there will arise a conflict when medm is linked. The solution that I found was to modify CONFIG_SITE.Common.darwin-x86 to define ARCH_CLASS=x86_64 and recompile EPICS. I now have consistent 64 bit architecture and the entire compilation worked start to finish. This solution works for me since I don't foresee the need to use or export binaries to an old ppc. If this is the case for you I suggest looking at Noboru's python script for an alternate solution. 

Cheers, 

Andrew

On Jun 22, 2010, at 7:55 PM, Noboru Yamamoto wrote:

> Hi Andrew,
> 
> Please look an attached python script.
> I use this script to build openmotif2.2.3 library on MacOSX 10.6(Snow
> Leopard).
> 
> I create 4 sub directories, build-ppc, build-i386, build-x86_64 and
> build-universl in open motif directory, then put mk_univesl.py in the
> build-universl directory.
> 
> In buil-universl directory, start python and in the python interpreter,run :
>>> from mk_universl import *
>>> setup_configure()
>>> run_make()
>>> main()
> 
> If everything goes well, you will have universal binary under
> build-x86_64. Then run "make install" (or "sudo make install") in
> ./build-x86_64 directory.
> 
> You may need to run
> 
>>> run_make()
>>> main()
> 
> repeatedly to build universal binary library.
> 
> I wrote this script just for me, so you might encounter rough edge.
> Anyway, I build openmotif library for MacOSX 10.6 with this script and
> medm with it.
> 
>> EPICS compiles with i386 (see -arch i386 above)
> Set EPICS_HOST_ARCH=darwin-ppcx86 then EPICS make system creates
> universal binary library.
> 
> regards,
> Noboru Yamamoto
> 
> J-PARC control group
> KEK,JAPAN
> 
> 
> (10/06/23 9:28), Andrew Wagner wrote:
>> Thanks for the warning Ralph,
>> 
>> I think I'm almost there. I discovered that the openmotif Makefile puts your libs and headers exactly where they should be to be broadly accessible. /usr/X11R6/lib and /usr/X11R6/include . I can now almost compile MEDM. The problem is:
>> 
>> make -C O.darwin-x86 -f ../Makefile TOP=../../../.. T_A=darwin-x86 install
>> /usr/bin/c++ -o medm  -L/Users/andrewwagner/EPICS/base-3-14-11/lib/darwin-x86 -L/Users/andrewwagner/EPICS/extensions/lib/darwin-x86 -L/usr/X11R6/lib       -arch i386     (etc ....)
>> 
>> ld: warning: in /usr/X11R6/lib/libXm.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
>> Undefined symbols:
>> 
>> This is due to the fact that openmotif compiles with default gcc (i.e. i686-apple-darwin10-gcc-4.2.1) but EPICS compiles with i386 (see -arch i386 above). How do I hack the EPICS Makefiles to build something other than i386? I believe that if all -arch options are unset then it should use the default 64 bit compiler. How do I do this? Alternatively I could recompile openmotif in i386.
>> 
>> Cheers,
>> 
>> Andrew
>> 
>> 
>> On Jun 22, 2010, at 1:40 PM, Ralph Lange wrote:
>> 
>>> Andrew,
>>> 
>>> did you check the results of searching the tech-talk archives [1] for "openmotif"?
>>> Have a look and then reconsider how much you want to get involved.....
>>> 
>>> Cheers,
>>> Ralph
>>> 
>>> [1] http://www.aps.anl.gov/epics/tech-talk/index.php
>>> 
>>> 
>>> On Tue 22 Jun 2010 16:30:11 Andrew Wagner wrote:
>>>> Thanks Eric,
>>>> Unfortunately I ran into the pitfall of attempting to install openmotif form source via http://www.openmotif.org/ . I was able to compile openmotif and install the programs but unfortunately its Makefile and the EPICS/extensions Makefile are incompatible. They seem to expect libraries to be built with different rules and put in different locations. The .h files medm needed where in openmotif-2.3.0/lib not /include and a library file libXm.a appears to never be built with the Makefile from openmotif.org<http://openmotif.org>  . I get the error:
>>>> No rule to make target `/Users/andrewwagner/OpenMotif/openmotif-2.3.0/lib/libXm.a'
>>>> 
>>>> Does anyone have experience installing openmotif from source? There must be a way to do this on a Linux box. For the time being I can just delete openmotif and reinstall from Darwin ports.
>>>> Cheers,
>>>> Andrew
>>>> 
>>>> 
>>>> 
>>>> On Jun 22, 2010, at 9:16 AM, Eric Norum wrote:
>>>> 
>>>>> I have the fink openmotif3 2.2.4-4 package installed on my OS X machine.  Seems to work well with MEDM, EDM, StripTool and SDDSplot.
>>>>> 
>>>>> MEDM is an extension:
>>>>> Download  the extensions configuration files from EPICS Extensions Config Files<http://www.aps.anl.gov/epics/extensions/configure/index.php>
>>>>> Unpack the config file tarball. cd to the extensions  directory created by unpacking the tarball.  This directory will be referred to as the extensions<TOP>  from now on
>>>>> Edit the configure/RELEASE file top refer to where you have EPICS base installed.
>>>>> Edit the configure/os/CONFIG_SITE.darwin-x86.darwin-x86 file and set up the correct references to your X11 and Motif packages.
>>>>> cd to the<TOP>  directory and run make
>>>>> 
>>>>> Now to download and build an extension -- medm in this case:
>>>>> Download the medm tarball:  MEDM 3.1.4<http://www.aps.anl.gov/epics/download/extensions/medm3_1_4.tar.gz>
>>>>> cd to the<TOP>/src directory and unpack the medm tarball
>>>>> cd to the<TOP>/src/medm directory and run make
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> On Jun 21, 2010, at 6:06 PM, Andrew Wagner wrote:
>>>>> 
>>>>>> Hey guys,
>>>>>> 
>>>>>> I'm new to EPICS and have compiled both EPICS base and Asyn successfully on my OS X 10.6.3 MacBook Pro. It seems that much of the driver support includes pre-made MEDM screens. Is there a good how-to manual for installing MEDM on OS X (or any os)? I've searched tech-talk and there definitely seem to be some pitfalls. For instance Motif 2.30 should be used instead of 2.32 to avoid some odd behavior. Thanks very much for the help.
>>>>>> 
>>>>>> Andrew Wagner
>>>>>> 
>>>>>> 
>>>>> 
>>>>> -- 
>>>>> Eric Norum
>>>>> eric@norum.ca<mailto:eric@norum.ca>
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>> 
>> 
>> 
> 
> <mk_universl.py>



References:
MEDM installation instructions Andrew Wagner
Re: MEDM installation instructions Eric Norum
Re: MEDM installation instructions Andrew Wagner
Re: MEDM installation instructions Ralph Lange
Re: MEDM installation instructions Andrew Wagner
Re: MEDM installation instructions Noboru Yamamoto

Navigate by Date:
Prev: Re: MEDM installation instructions Noboru Yamamoto
Next: Re: No monitor refresh [SOLVED] Hinko Kocevar
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017 
Navigate by Thread:
Prev: Re: MEDM installation instructions Noboru Yamamoto
Next: Re: MEDM installation instructions Pelaia II, Tom
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·