Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running ddd on Mac OS X

I tried to install and run ddd using the following commands:

brew install libtool
brew link lesstif
brew install ddd

And received the following error message when trying to run ddd:

cd@new-host:~$ ddd
dyld: Library not loaded: /opt/X11/lib/libSM.6.dylib
Referenced from: /usr/local/lib/libXm.2.dylib
Reason: image not found
Trace/BPT trap: 5

The following is my output from brew config:

HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew
HEAD: 7a427a6528c0aa123a43d3adf1c5944ab622c27e
Last commit: 2 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: dual-core 64-bit penryn
OS X: 10.7.5-i386
Xcode: 4.6.3
CLT: 4.6.0.0.1.1365549073
LLVM-GCC: build 2336
Clang: 4.2 build 425
X11: 2.6.5 => /usr/X11
System Ruby: 1.8.7-358
Perl: /usr/bin/perl
Python: /usr/bin/python
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby

And below is my output from brew doctor:

Warning: Some directories in /usr/local/share/man aren't writable. This can happen if you "sudo make install" software that isn't managed by Homebrew. If a brew tries to add locale information to one of these directories, then the install will fail during the link step. You should probably chown them:

/usr/local/share/man/de
/usr/local/share/man/de/man1
/usr/local/share/man/mann

Warning: Unbrewed dylibs were found in /usr/local/lib. If you didn't put them there on purpose they could cause problems when building Homebrew formulae, and may need to be deleted.

Unexpected dylibs:

/usr/local/lib/libtcl8.6.dylib
/usr/local/lib/libtk8.6.dylib

Warning: Unbrewed header files were found in /usr/local/include. If you didn't put them there on purpose they could cause problems when building Homebrew formulae, and may need to be deleted.

Unexpected header files:

/usr/local/include/fakemysql.h
/usr/local/include/fakepq.h
/usr/local/include/fakesql.h
/usr/local/include/itcl.h
/usr/local/include/itcl2TclOO.h
/usr/local/include/itclDecls.h
/usr/local/include/itclInt.h
/usr/local/include/itclIntDecls.h
/usr/local/include/itclMigrate2TclCore.h
/usr/local/include/itclTclIntStubsFcn.h
/usr/local/include/mysqlStubs.h
/usr/local/include/odbcStubs.h
/usr/local/include/pqStubs.h
/usr/local/include/tcl.h
/usr/local/include/tclDecls.h
/usr/local/include/tclOO.h
/usr/local/include/tclOODecls.h
/usr/local/include/tclPlatDecls.h
/usr/local/include/tclThread.h
/usr/local/include/tclTomMath.h
/usr/local/include/tclTomMathDecls.h
/usr/local/include/tdbc.h
/usr/local/include/tdbcDecls.h
/usr/local/include/tdbcInt.h
/usr/local/include/tk.h
/usr/local/include/tkDecls.h
/usr/local/include/tkPlatDecls.h

Warning: Unbrewed .pc files were found in /usr/local/lib/pkgconfig. If you didn't put them there on purpose they could cause problems when building Homebrew formulae, and may need to be deleted.

Unexpected .pc files:

/usr/local/lib/pkgconfig/tcl.pc
/usr/local/lib/pkgconfig/tk.pc

Warning: Unbrewed static libraries were found in /usr/local/lib. If you didn't put them there on purpose they could cause problems when building Homebrew formulae, and may need to be deleted.

Unexpected static libraries:

/usr/local/lib/libtclstub8.6.a
/usr/local/lib/libtkstub8.6.a

Warning: /usr/bin occurs before /usr/local/bin This means that system-provided programs will be used instead of those provided by Homebrew. The following tools exist at both paths:

dot

Consider setting your PATH so that /usr/local/bin occurs before /usr/bin. Here is a one-liner:

echo export PATH='/usr/local/bin:$PATH' >> ~/.bash_profile 

Are these brew doctor warnings ones I should actually attempt to rectify? All of my other brew installed programs are fine, so a bit reluctant to begin mucking around with those files. Thank you!


Edit: On macOS 10.14.4, I get this error:

Jamess-MacBook-Air:haskell-usaco james$ ddd
Error: Unresolved inheritance operation

Xt error (Unresolved inheritance operation).

Oops!  You have found a bug in DDD.

If you can reproduce this bug, please send a bug report
to <[email protected]>, giving a subject like

    DDD 3.3.12 (i386-apple-darwin18.0.0) gets Xt error

Launching DDD with LLDB prints out this error message:

XIO:  fatal IO error 35 (Resource temporarily unavailable) on X server "/private/tmp/com.apple.launchd.cxF3NWNYqR/org.macosforge.xquartz:0"
      after 5 requests (5 known processed) with 0 events remaining

X11 was installed from both Homebrew and from the XQuartz website.

like image 573
BeginnersMindTruly Avatar asked Oct 16 '14 13:10

BeginnersMindTruly


1 Answers

So I think Mac OS X 10.7.5. ships with XQuartz (it's only 10.8 and later that does not come with the installation).

Here's what eventually worked for me:

The unbrewed dylibs, header files, .pc files, and static libraries were placed there by a non-homebrew installation of R so I uninstalled R using the following commands:

rm -rf /Library/Frameworks/R.framework /Applications/R.app \
/usr/bin/R /usr/bin/Rscript

I then uninstalled ddd, unlinked lesstif, and uninstalled lesstif:

brew uninstall ddd
brew unlink lesstif
brew uninstall lesstif

Next, I installed tcl-tk:

brew tap homebrew/dupes
brew install tcl-tk

Then I built lesstif from source with brew install:

brew install --build-from-source lesstif

I relinked lesstif:

brew unlink lesstif && brew link lesstif

Finally, I installed ddd:

brew install ddd

And it worked! I'm not sure which one of these steps was the key step, but I'm guessing it was:

brew install --build-from-source lesstif

I'm still not sure what these two do differently:

brew install --build-from-source lesstif
brew install lesstif

I also looked for the following directory and files:

/opt/X11/lib/libSM.6.dylib exist

but they did not exist on my computer.

@new-host:~$ cd ~
@new-host:~$ cd /opt
-bash: cd: /opt: No such file or directory

Instead I found the X11 files in here:

@new-host:/usr/X11$ cd ~
@new-host:~$ cd /usr/X11/lib
@new-host:/usr/X11/lib$ ls
...
libSM.6.dylib
...

I think I could have solved this problem using some sort of symbolic link, but not entirely sure.

Finally, those unbrewed dylibs, header files, .pc files, and static libraries were placed there by a non-homebrew installation of R. But I'm not sure there is actually any way to safely remove them so as to eliminate the brew doctor warnings. (I probably will have to live with them).

The R installation consisted of three Apple packages:

org.r-project.R.x86_64.fw.pkg
org.r-project.R.x86_64.GUI.pkg
org.r-project.x86_64.tcltk.x11

Per the R website (http://cran.r-project.org/doc/manuals/r-release/R-admin.html#Uninstalling-under-OS-X): You can use pkgutil --unlink (not supported by Lion or later) to remove their files or pkgutil --forget if you want the Apple Installer to forget about the package without deleting its files (useful for the R framework when installing multiple R versions in parallel), or after you have deleted the files

Uninstalling the Tcl/Tk component (which is installed under /usr/local) is not simple. You can list the files it installed in a Terminal by

pkgutil --files org.r-project.x86_64.tcltk.x11

A bit too scary for me to tackle that removal so will live with the brew doctor warnings. Just happy that ddd finally worked.

like image 70
BeginnersMindTruly Avatar answered Sep 17 '22 12:09

BeginnersMindTruly