OSX: sddsplots, mpl_motif, & architecture x86_64 issue

Moderators: cyao, soliday

Post Reply
JoelFrederico
Posts: 60
Joined: 05 Aug 2010, 11:32
Location: SLAC National Accelerator Laboratory

OSX: sddsplots, mpl_motif, & architecture x86_64 issue

Post by JoelFrederico » 04 Sep 2013, 17:48

Hi,

Just having a problem with mpl_motif and architecture apparently:

Code: Select all

clang++ -o mpl_motif  -L/Users/joelfrederico/src/epics/extensions/lib/darwin-x86 -L/opt/X11/lib       -arch x86_64                mpl_motif.o xwdfunc.o   -lmdbplt -lSDDS1 -lmdbmth -lmdblib -llzma -lXmu -lXt -lX11  -lgd -lpng -lz
Undefined symbols for architecture x86_64:
  "_XmCreateCascadeButton", referenced from:
      _main in mpl_motif.o
  "_XmCreateDrawingArea", referenced from:
      _main in mpl_motif.o
  "_XmCreateForm", referenced from:
      _main in mpl_motif.o
  "_XmCreateFormDialog", referenced from:
      _menucb in mpl_motif.o
      _choosecolors in mpl_motif.o
      _mtracksetup in mpl_motif.o
      _printsetup in mpl_motif.o
  "_XmCreateInformationDialog", referenced from:
      _xinfomsg in mpl_motif.o
  "_XmCreateLabel", referenced from:
      _main in mpl_motif.o
      _mtracksetup in mpl_motif.o
      _printsetup in mpl_motif.o
  "_XmCreateMainWindow", referenced from:
      _main in mpl_motif.o
  "_XmCreateMenuBar", referenced from:
      _main in mpl_motif.o
  "_XmCreateOptionMenu", referenced from:
      _mtracksetup in mpl_motif.o
  "_XmCreatePromptDialog", referenced from:
      _navigatecb in mpl_motif.o
      _zoomfactorcb in mpl_motif.o
  "_XmCreatePulldownMenu", referenced from:
      _main in mpl_motif.o
      _mtracksetup in mpl_motif.o
  "_XmCreatePushButton", referenced from:
      _main in mpl_motif.o
      _menucb in mpl_motif.o
      _addspectrumcolors in mpl_motif.o
      _choosecolors in mpl_motif.o
      _mtracksetup in mpl_motif.o
      _printsetup in mpl_motif.o
  "_XmCreateRowColumn", referenced from:
      _choosecolors in mpl_motif.o
      _mtracksetup in mpl_motif.o
      _printsetup in mpl_motif.o
  "_XmCreateScrolledText", referenced from:
      _menucb in mpl_motif.o
  "_XmCreateSeparator", referenced from:
      _main in mpl_motif.o
      _choosecolors in mpl_motif.o
      _printsetup in mpl_motif.o
  "_XmCreateSimpleRadioBox", referenced from:
      _printsetup in mpl_motif.o
  "_XmCreateTextField", referenced from:
      _mtracksetup in mpl_motif.o
      _printsetup in mpl_motif.o
  "_XmCreateToggleButton", referenced from:
      _main in mpl_motif.o
      _choosecolors in mpl_motif.o
      _printsetup in mpl_motif.o
  "_XmCreateWarningDialog", referenced from:
      _xerrmsg in mpl_motif.o
  "_XmMainWindowSetAreas", referenced from:
      _main in mpl_motif.o
  "_XmMessageBoxGetChild", referenced from:
      _xerrmsg in mpl_motif.o
      _xinfomsg in mpl_motif.o
  "_XmSelectionBoxGetChild", referenced from:
      _navigatecb in mpl_motif.o
      _zoomfactorcb in mpl_motif.o
  "_XmStringCreate", referenced from:
      _main in mpl_motif.o
      _menucb in mpl_motif.o
      _choosecolors in mpl_motif.o
      _mtracksetup in mpl_motif.o
      _printsetup in mpl_motif.o
  "_XmStringCreateLtoR", referenced from:
      _xerrmsg in mpl_motif.o
      _status in mpl_motif.o
      _xinfomsg in mpl_motif.o
  "_XmStringCreateSimple", referenced from:
      _navigatecb in mpl_motif.o
      _zoomfactorcb in mpl_motif.o
  "_XmStringFree", referenced from:
      _main in mpl_motif.o
      _xerrmsg in mpl_motif.o
      _menucb in mpl_motif.o
      _navigatecb in mpl_motif.o
      _zoomfactorcb in mpl_motif.o
      _choosecolors in mpl_motif.o
      _status in mpl_motif.o
      ...
  "_XmStringGetLtoR", referenced from:
      _navigatecb in mpl_motif.o
      _getzoomfactor in mpl_motif.o
  "_XmTextFieldGetString", referenced from:
      _readprinttext in mpl_motif.o
  "_XmTextGetString", referenced from:
      _menucb in mpl_motif.o
  "_XmTextSetString", referenced from:
      _menucb in mpl_motif.o
  "_XmToggleButtonGetState", referenced from:
      _printcb in mpl_motif.o
      _menucb in mpl_motif.o
      _colorcb in mpl_motif.o
  "_XmToggleButtonSetState", referenced from:
      _main in mpl_motif.o
      _eventgraph in mpl_motif.o
      _choosecolors in mpl_motif.o
      _printsetup in mpl_motif.o
  "_XmUpdateDisplay", referenced from:
      _xerrmsg in mpl_motif.o
      _gnuplot in mpl_motif.o
      _movie in mpl_motif.o
      _gnuplot_new in mpl_motif.o
  "__XmStrings", referenced from:
      _main in mpl_motif.o
      _xerrmsg in mpl_motif.o
      _menucb in mpl_motif.o
      _navigatecb in mpl_motif.o
      _zoomfactorcb in mpl_motif.o
      _colorcb in mpl_motif.o
      _addspectrumcolors in mpl_motif.o
      ...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [mpl_motif] Error 1
make[2]: Leaving directory `/Users/joelfrederico/src/epics/extensions/src/SDDS/SDDSaps/sddsplots/motifDriver/O.darwin-x86'
make[1]: *** [install.darwin-x86] Error 2
make[1]: Leaving directory `/Users/joelfrederico/src/epics/extensions/src/SDDS/SDDSaps/sddsplots/motifDriver'
make: *** [SDDSaps/sddsplots/motifDriver.install] Error 2
I don't know what to do about what seems to be the main line:

Code: Select all

ld: symbol(s) not found for architecture x86_64
Any help?

Joel

JoelFrederico
Posts: 60
Joined: 05 Aug 2010, 11:32
Location: SLAC National Accelerator Laboratory

Re: OSX: sddsplots, mpl_motif, & architecture x86_64 issue

Post by JoelFrederico » 04 Sep 2013, 18:59

I'm really just trying to compile python support: sddsdatamodule.so for OSX 10.8.4. How would I go about doing that?

soliday
Posts: 405
Joined: 28 May 2008, 09:15

Re: OSX: sddsplots, mpl_motif, & architecture x86_64 issue

Post by soliday » 05 Sep 2013, 10:06

If you made it to building mpl_motif, you have already built the SDDS libraries that are needed for SDDSPython. You would just need to run make in the Python directory. I had never tried building SDDSPython on OSX before but I just did and it works. I am posting my version online for you to use.

http://www.aps.anl.gov/asd/oag/download ... hon.tar.gz

You would need to unpack this into /Library/Python/2.7/site-packages/

Hopefully there shouldn't be a need to compile SDDS yourself because is it not very easy on OSX. I have decided not to use Fink and instead use MacPorts because it allows me to create universal binaries which makes my job easier.

JoelFrederico
Posts: 60
Joined: 05 Aug 2010, 11:32
Location: SLAC National Accelerator Laboratory

Re: OSX: sddsplots, mpl_motif, & architecture x86_64 issue

Post by JoelFrederico » 05 Sep 2013, 15:51

Thanks so much. I've discovered how difficult it is to build anything EPICS-related many many many times. Is there any description or guide for doing it? It almost seems like a black box - just email somebody at ANL to build it for you, it's easier that way?

JoelFrederico
Posts: 60
Joined: 05 Aug 2010, 11:32
Location: SLAC National Accelerator Laboratory

Re: OSX: sddsplots, mpl_motif, & architecture x86_64 issue

Post by JoelFrederico » 05 Sep 2013, 16:42

I know this is more of a python issue, but this works on Red Hat:

Code: Select all

import sdds.sddsdata as sddsdata
On OSX it complains that it can't find a module named sddsdata. This works on OSX:

Code: Select all

import sddsdata
On Red Hat, it complains that it can't find a module named sddsdata. Is import working differently on OSX and RedHat? What's going on??

EDIT: Nevermind. This is the result of a custom install I did where I put sdds.py and sddsdatamodule.so in its own directory sdds in site-packages, and then included an __init__.py of "from sdds import *" to turn it into a package of its own... I don't remember why I did that. It might have been to make the demo code work, but my memory's fuzzy...

Post Reply