Page 1 of 1

sddsplot issue in macOS 10.14

Posted: 03 Oct 2018, 03:15
by duanz
Hi,

I've upgraded my MacBook to the latest macOS 10.14, but I could no longer run sddsplot properly. For example, when I run "sddsplot -col=s,betax Basic.twi", I got an warning of "Warning: XmManager ClassInitialize: XmeTraitSet failed", followed by the following Error info:

Error: attempt to add non-widget child "DropSiteManager" to parent "mpl_motif" which supports only widgets

and no plot was shown in the mpl_motif environment.

However, I could still export the sddsplot results to a png file using "sddsplot -col=s,betax Basic.twi -device=png -output=s_betax.png".

I tried to recompile the SDDS (3.6.1) from source, and also downloaded the binary executables (darwin-x86_SDDS.tar.gz (February 22, 2018)), both attempts failed to solve this issue.

Does anyone know the cause of such an issue?

Thanks very much!


Zhe

Re: sddsplot issue in macOS 10.14

Posted: 03 Oct 2018, 10:05
by soliday
I am currently running MacOS 10.11.6 and am scheduled to get upgraded to MacOS 10.12 this week. A far cry from 10.14 unfortunately. Perhaps the trick of getting sddsplot to work on 10.12 will work on 10.14. Try first running:
export DYLD_LIBRARY_PATH=/opt/X11/lib/flat_namespace

Re: sddsplot issue in macOS 10.14

Posted: 03 Oct 2018, 10:19
by duanz
Hi Soliday,

Thank you for your prompt reply!

I have set "export DYLD_LIBRARY_PATH=/opt/X11/lib/flat_namespace" by default, and this worked for macOS 10.13 before I upgraded to macOS 10.14.

Anyway, I can still export the sddsplot results to png files, just a little bit inconvenient.

Best,

Zhe

Re: sddsplot issue in macOS 10.14

Posted: 06 May 2022, 19:20
by duanz
Hi Soliday,

Are there any updates regarding the solution of the sddsplot issue as I mentioned in this post, on macOS 10.14 or later versions?

Thanks!

Best,

Zhe

Re: sddsplot issue in macOS 10.14

Posted: 10 May 2022, 09:03
by soliday
I believe this workaround is no longer required. However I don't have access to my MacOS laptop till next Monday so I can't confirm this. I'll make a note to check when I get back.

Re: sddsplot issue in macOS 10.14

Posted: 01 Jun 2022, 12:19
by GPenn
Hi,

I am running Mac OS 10.15.7, and I wound up getting elegant and SDDS to install by using homebrew to install motif:
brew install openmotif

Before I tried that, I did
brew install --cask xquartz
which helped with some errors but wasn't enough. I'm not sure if openmotif will include xquartz or if you will have to do both.

-Gregg

Re: sddsplot issue in macOS 10.14

Posted: 01 Jun 2022, 18:17
by soliday
System: MacOS Mojave 10.14.6
Intel CPU
XQuartz 2.8.1
MacPorts 2.7.2
openmotif 2.3.8
Results from "otool -L mpl_motif" verify it is using the X11 libraries from /opt/X11/lib which is where XQuartz puts them and not /opt/local/lib which is where MacPorts has it's own versions.
Previously it required DYLD_LIBRARY_PATH to be set and point to /opt/X11/lib/flat_namespace. This doesn't appear to be required anymore. I also verified that I hadn't overwritten my /opt/X11/lib/libXt.6.dylib with /opt/X11/lib/flat_namespace/libXt.6.dylib. These should be different sizes.

System: MacOS Monterey 12.4
M1 CPU
XQuartz 2.8.1
MacPorts 2.7.2
openmotif 2.3.8
The results are the same on this system as well.

Re: sddsplot issue in macOS 10.14

Posted: 03 Jun 2022, 06:45
by duanz
Hi,

I spent some time recompiling SDDS on my Mac OS 10.15.6. Following Gregg's approach, I did

brew install --cask xquartz & then brew install openmotif

This installed XQuartz 2.8.1 and openmotif 2.3.8

After that, I had to modify epics/extensions/configure/os/CONFIG_SITE.darwin-x86.darwin-x86 changing MOTIF_LIB & MOTIF_INC to where homebrew installed openmotif.

then I had to resolve the issue that /usr/X11/include/X11/extensions/Print.h cannot be found by copying the file "Print.h" from another linux machine, and I had to modify /Users/duanz/Applications/elegant/elegant-2021.1.0/epics/extensions/src/SDDS/SDDSaps/sddsplots/motifDriver/Makefile by removing Xp from PROD_SYS_LIBS_Darwin. Both Print.h and Xp are no longer part of Xquartz 2.8.1. And I guess these are not used in sddsplot either.

After that I could compile SDDS from source succesfully.

Then I did otool -L mpl_motif, I got:

mpl_motif:
/usr/local/opt/openmotif/lib/libXm.4.dylib (compatibility version 5.0.0, current version 5.4.0)
/usr/local/opt/jpeg/lib/libjpeg.9.dylib (compatibility version 15.0.0, current version 15.0.0)
/opt/X11/lib/libXmu.6.dylib (compatibility version 9.0.0, current version 9.0.0)
/opt/X11/lib/libXt.6.dylib (compatibility version 7.0.0, current version 7.0.0)
/opt/X11/lib/libXft.2.dylib (compatibility version 6.0.0, current version 6.3.0)
/opt/X11/lib/libXext.6.dylib (compatibility version 11.0.0, current version 11.0.0)
/opt/X11/lib/libX11.6.dylib (compatibility version 11.0.0, current version 11.0.0)
/opt/X11/lib/libfontconfig.1.dylib (compatibility version 14.0.0, current version 14.0.0)
/usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11)
/usr/local/opt/readline/lib/libreadline.8.dylib (compatibility version 8.0.0, current version 8.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.100.1)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 902.1.0)


However, when I do a simple test like sddsplot -col=s,betax parTwiss.twi, I got the following warnings and no plot was seen:

Warning: ... found while parsing '<BtnMotion>: ManagerGadgetButtonMotion()'
Warning: String to TranslationTable conversion encountered errors
Warning: translation table syntax error: Unknown event type : EnterWindow
Warning: ... found while parsing '<EnterWindow>: ManagerEnter()'
Warning: String to TranslationTable conversion encountered errors
Warning: translation table syntax error: Unknown event type : EnterWindow
Warning: ... found while parsing '<EnterWindow>: ManagerEnter()'
Warning: String to TranslationTable conversion encountered errors


Any suggestions to solve this issue? Thanks!

Best,

Zhe

Re: sddsplot issue in macOS 10.14

Posted: 03 Jun 2022, 09:31
by soliday
Well my first suggestion would be to try to download and run the pre-compiled MacOS binaries for SDDS. I have taken care of ensuring to link to as many static libraries as possible to avoid the issues similar to what you are seeing.
As for Print.h, I have a copy that I think was installed with openmotif in /opt/local/include/Xm/Print.h
I have libXp in /opt/local/lib/libXp.a
I moved /opt/local/lib/libXp.dylib to /opt/local/lib/libXp.dylib.orig to avoid linking to the dynamic library. I have a bunch of other dynamic libraries in this directory I did the same thing to:
/opt/local/lib/libXm.dylib.orig
/opt/local/lib/libXp.dylib.orig
/opt/local/lib/libgd.dylib.orig
/opt/local/lib/libhdf5.dylib.orig
/opt/local/lib/libiconv.dylib.orig
/opt/local/lib/libjpeg.dylib.orig
/opt/local/lib/liblzma.dylib.orig
/opt/local/lib/libncurses.dylib.orig
/opt/local/lib/libpng.dylib.orig
/opt/local/lib/libtiff.dylib.orig
/opt/local/lib/libxml2.a.orig
/opt/local/lib/libxml2.dylib.orig
/opt/local/lib/libz.dylib.orig
/opt/local/lib/libzstd.dylib.orig

I make sure to link with the libraries in /opt/local/lib and not /opt/X11/lib by setting:
MOTIF_LIB=/opt/local/lib
MOTIF_INC=/opt/local/include
X11_LIB=/opt/local/lib
X11_INC=/opt/local/include


% otool -L mpl_motif
mpl_motif:
/opt/X11/lib/libXmu.6.dylib (compatibility version 9.0.0, current version 9.0.0)
/opt/X11/lib/libXt.6.dylib (compatibility version 7.0.0, current version 7.0.0)
/opt/X11/lib/libXau.6.dylib (compatibility version 7.0.0, current version 7.0.0)
/opt/X11/lib/libXft.2.dylib (compatibility version 6.0.0, current version 6.3.0)
/opt/X11/lib/libXext.6.dylib (compatibility version 11.0.0, current version 11.0.0)
/opt/X11/lib/libX11.6.dylib (compatibility version 11.0.0, current version 11.0.0)
/opt/X11/lib/libfontconfig.1.dylib (compatibility version 14.0.0, current version 14.0.0)
/opt/X11/lib/libpng16.16.dylib (compatibility version 55.0.0, current version 55.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1311.100.3)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1300.23.0)

% otool -L sddsplot
sddsplot:
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1311.100.3)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1300.23.0)