Using IUP on Mac OS X - macos

Are you guys suffered from this question when using IUP on MacOS?
Gizak-Pro:iup-3.6_MacOS107_bin Gizak$ ./iupview
dyld: Library not loaded: /sw/lib/fontconfig2/lib/libfontconfig.1.dylib
Referenced from: /Users/Gizak/Downloads/iup-3.6_MacOS107_bin/./iupview
Reason: image not found
Trace/BPT trap: 5
So..How to make it work? That would be very helpful!
OS:Mac OS X 10.7.5
install lua5.1 by port
IUP version:3.6

That application depends on some libraries that are not installed on your system.
In the IUP documentation you will be able to find a guide how to run IUP on MacOSX. The relevant section is in IUP / System / Drivers / GTK.

The binary you're using is linking to a path provided by Fink, check the README.md in the download directory of IUP sf project.
You could either:
install Fink and fullfill the dependencies
rewrite the dependency using install_name_tool
set DYLD_FALLBACK_LIBRARY_PATH to match dependencies installed by another source

Related

Error loading FTDI dylib on Mac OSX

I developed an application in Xojo that uses a third party library to control a device. It works on one mac, but then when I try to run it on the other it gives me the following error:
Application Specific Information:
dyld: launch, loading dependent libraries
Dyld Error Message:
Library not loaded: /usr/local/lib/libftd2xx.1.2.2.dylib
Referenced from: /Users/USER/Downloads/*/libuFCoder.dylib
Reason: no suitable image found. Did find:
/usr/local/lib/libftd2xx.1.2.2.dylib: stat() failed with errno=62
/usr/local/lib/libftd2xx.1.2.2.dylib: stat() failed with errno=62
The Macs are both updated with the latest OSX El Capitan, and have the FTDI drivers installed. Any help would be appreciated.
I have installed the drivers on El Capitan and it worked for me, even with an absolute path with Xojo 2012.21. Try reinstalling the D2XX 1.2.2 driver in /usr/local/lib (as instructed in the ReadMe file) and remove all old "libftd2xx" files.
Also remember you need to install D2xxHelper for the driver to work properly on El Capitan.
To check if the uFCoder library properly links against libftd2xx, open the Terminal, type "otool -L <path to the uFCoder lib>"; the 2nd line should start with "/usr/local/lib/libftd2xx.1.2.2.dylib".
HTH

Tesseract and dylib on OSX Mountain Lion

I just installed imagemagick and tesseract through brew, everything went well. When I try tesseract -l eng decrypted.png output, though, I get the following error:
dyld: Library not loaded: /opt/local/lib/libpng15.15.dylib
Referenced from: /usr/local/bin/tesseract
Reason: Incompatible library version: tesseract requires version 32.0.0 or later, but libpng15.15.dylib provides version 29.0.0
Trace/BPT trap: 5
I searched everywhere but I couldn't find any place where it is explained how to update that dynamic library to version 32 (or higher). Any suggestions? Thanks!
Done by cleaning my installation of both the softwares and re-installing them through brew. Mind that if there is some linking problem, you have to execute brew link --overwrite tesseract to solve them.

dyld: Symbol not found: _jpeg_resync_to_restart

I'm trying to run a simple OpenGL tutorial for my class, but the C++ code was made to run for Windows and Linux. I'm trying to make it run under Mac OS X Mountain Lion.
I found the proper library headers, it now compiles OK (with scons), but the build gives this error when run:
dyld: Symbol not found: _jpeg_resync_to_restart
Referenced from: /usr/local/lib/libIL.1.dylib
Expected in: flat namespace
in /usr/local/lib/libIL.1.dylib
Trace/BPT trap: 5
Searching online gave me nothing but python imaging library problems. I have a libjpeg and DevIL installed through homebrew.
Judging from the Google searches, the built-in libjpeg library in Mac OS X has the
__cg_jpeg_resync_to_restart while if you use MacPorts, Fink, or maybe compile it yourself you get - _jpeg_resync_to_restart.
In this case the DevIL library, gotten through Homebrew was searching for the symbol not coming from the Mac OS X library, so I assumed that I should install libjpeg through homebrew. However it turns out that libjpeg was already installed through homebrew. So I guessed that maybe there were problems with the linking of libjpeg, I unlinked and linked again, and yes there were problems with the initial linking of the library.
However this did not seam to solve the problem. I again made the assumption that now that the libjpeg has symbolic links at the right places if I built the DevIL library again it will link against the proper library at the proper place. So I did a brew uninstall devil and then brew install devil which compiled with from source again. Aaand voila :)
It worked for me just changing the DYLD_LIBRARY_PATH to the correct path.

Plotting with Octave after most recent MAC OSX update

Hi I just recently downloaded the most recent snow leopard update. Then I tried to plot something using Octave which has been installed on my computer for months (and plotting has worked all that time) Even since I installed the update, and I try to plot using octave I get the following error:
dyld: Library not loaded: /usr/X11/lib/libfreetype.6.dylib
Referenced from: /usr/X11R6/lib/libfontconfig.1.dylib
Reason: Incompatible library version: libfontconfig.1.dylib requires version 13.0.0 or later, but libfreetype.6.dylib provides version 10.0.0
dyld: Library not loaded: /usr/X11/lib/libfreetype.6.dylib
Referenced from: /usr/X11R6/lib/libfontconfig.1.dylib
Reason: Incompatible library version: libfontconfig.1.dylib requires version 13.0.0 or later, but libfreetype.6.dylib provides version 10.0.0
/Applications/Gnuplot.app/Contents/Resources/bin/gnuplot: line 71: 865 Trace/BPT trap GNUTERM="${GNUTERM}" GNUPLOT_HOME="${GNUPLOT_HOME}" PATH="${PATH}" DYLD_LIBRARY_PATH="${DYLD_LIBRARY_PATH}" HOME="${HOME}" GNUHELP="${GNUHELP}" DYLD_FRAMEWORK_PATH="${DYLD_FRAMEWORK_PATH}" GNUPLOT_PS_DIR="${GNUPLOT_PS_DIR}" DISPLAY="${DISPLAY}" GNUPLOT_DRIVER_DIR="${GNUPLOT_DRIVER_DIR}" "${ROOT}/bin/gnuplot-4.2.6" "$#"
/Applications/Gnuplot.app/Contents/Resources/bin/gnuplot: line 71: 871 Trace/BPT trap GNUTERM="${GNUTERM}" GNUPLOT_HOME="${GNUPLOT_HOME}" PATH="${PATH}" DYLD_LIBRARY_PATH="${DYLD_LIBRARY_PATH}" HOME="${HOME}" GNUHELP="${GNUHELP}" DYLD_FRAMEWORK_PATH="${DYLD_FRAMEWORK_PATH}" GNUPLOT_PS_DIR="${GNUPLOT_PS_DIR}" DISPLAY="${DISPLAY}" GNUPLOT_DRIVER_DIR="${GNUPLOT_DRIVER_DIR}" "${ROOT}/bin/gnuplot-4.2.6" "$#"
error: you must have gnuplot installed to display graphics; if you have gnuplot installed in a non-standard location, see the 'gnuplot_binary' function
I'm really not sure what to do. I'm way out of my league here.
The "note for MacOSX users" is no longer on the Octave homepage, and the workaround described in Marco's post didn't work for me either, but this did:
Open /Applications/Gnuplot.app/Contents/Resources/bin/gnuplot in a text
editor. Use the editor search-and-replace feature to replace
"DYLD_LIBRARY_PATH" with "DYLD_FALLBACK_LIBRARY_PATH". There are four
instances that need to be replaced.
This is from the readme for the Octave MacOSX Binary. Note that it says it's for Lion users, but I'm running 10.6.8 and it worked for me.
I've recently build Octave and GNUplot on Lion using homebrew. Seems to work well. Here are some notes
Install Xcode from AppStore and HomeBrew (see Link)
Run 'brew install octave" and wait until graphicsmagick fails to compile
Run the command "brew install --use-clang --HEAD graphicsmagick". You might be asked to install Mercurial, just follow the instructions. You may also be asked to install fortran, so "brew install gfortran"
Run the command "brew install octave" again
Install Aquaterm
Now run "brew install gnuplot"
You now have the latest Octave installed. Just type octave from the terminal
To test the install run the following commands at the Octave command prompt
setenv("GNUTERM", "x11");
x = linspace(-10, 10, 100);
y = sin(x);
plot(x,y);
See the note for users of Mac OS X 10.6 on http://octave.sourceforge.net/. The changes solve the problem also in 10.5.8.
We updated freetype in OSX 10.6.5 and fontconfig, which links against freetype, wants this newer version. Gnuplot is failing to load because their developers are setting DYLD_LIBRARY_PATH which is forcing our libfontconfig to try using their libfreetype, which it cant.
This is a bug in Gnuplot.app ... developers should NEVER be setting DYLD_LIBRARY_PATH in shipping products!
I had the same problem and took me a while to find the "note for users of Mac OS X 10.6". I copy them here:
NOTES FOR SNOW LEOPARD USERS
1 - mkoctfile
Since OSX 10.6 the Apple shipped version of gcc builds by default 64bit binaries
As the libraries included with Octave.app version 3.2.3 are 32bit, you need to apply
the following patch in order for mkoctfile to work:
1.1) open the folder /Applications in the finder
1.2) right-click on Octave.app and select "show package contents"
1.3) navigate to /Applications/Octave.app/Contents/Resources/bin
1.4) right-click on the file "mkoctfile" and select "Open with -> Other ... -> TextEdit.app"
1.5) right after the line:
# along with this program; If not, see <http://www.gnu.org/licenses/>.
add the lines
CFLAGS="-m32 ${CFLAGS}"
FFLAGS="-m32 ${FFLAGS}"
CPPFLAGS="-m32 ${CPPFLAGS}"
CXXFLAGS="-m32 ${CXXFLAGS}"
LDFLAGS="-m32 ${LDFLAGS}"
and save.
2 - Gnuplot.app
An update to system libraries introduced with OSX 10.6.5 has broken the functionality
of the Gnuplot.app included with the Octave.app distribution, in order to use Gnuplot.app
on OSX 10.6.5 and later, you can use the fix described below:
2.1) open the folder /Applications in the finder
2.2) right-click on Gnuplot.app and select "show package contents"
2.3) navigate to /Applications/Gnuplot.app/Contents/Resources/bin
2.4) right-click on the file "gnuplot" and select "Open with -> Other ... -> TextEdit.app"
2.5) change the line:
DYLD_LIBRARY_PATH="${ROOT}/lib:${DYLD_LIBRARY_PATH}"
to
DYLD_LIBRARY_PATH="${ROOT}/lib"
and save.
NOTES FOR LEOPARD USERS
An update to system libraries introduced with OSX 10.5.8 has broken the functionality
of the Gnuplot.app included with the Octave.app distribution, in order to use Gnuplot.app
on OSX 10.5.8 and later, you can use the same fix described above for OSX 10.6.5.
I tried the above and it did not help. The source of the problem seems to be the version of gnuplot that comes with the Octave.app install.
I installed gnuplot directly with 'brew' and then I removed gnuplot from my Applications folder. Once that change was made, Octave was able to find the newer version of gnuplot that was compiled with the correct dependencies.
If you don't mind using MacPorts, you can install octave by the following command. And it will be a 64-bit version.
sudo port install octave-devel
I just want to share my experience regarding this issue.
I had similar problem today when I tried to use Octave/Gnuplot in Mac OS X (10.7.5, Lion) and none of the solutions above worked for me.
However I found another solution that did work, which is described in https://github.com/jyr/MNPP/issues/28. Basically, I did the following:
sudo cp /usr/X11/lib/libfreetype.* /Applications/Gnuplot.app/Contents/Resources/lib
Mountain Lions can also install Octave 3.4.0 with the dmg and throw in the older 4.2 gnuplot instead from the Maxima dmg. Easiest, but not the most recent version. (A classmate's idea which worked.)
Replacing the 4 instances of "DYLD_LIBRARY_PATH" with "DYLD_FALLBACK_LIBRARY_PATH" did not work for me on Mac OS X 10.9.
However, the second option given here:
http://sourceforge.net/projects/octave/files/Octave%20MacOSX%20Binary/2011-04-21%20binary%20of%20Octave%203.4.0/
did work. i.e. using Gnuplot-4.2.6 that is bundled with Maxima DMG. Link below. http://sourceforge.net/projects/maxima/files/Maxima-MacOS/5.26.0-MacOSX/
I just copied Gnuplot.app into /Applications.

Where is sdl-config installed on MacOS 10.6 (Snow Leopard)

After installing SDL and SDL-devel in MacOS X 10.6 (Snow Leopard), trying to configure some source code that requires SDL yields:
checking for sdl-config... no
checking for SDL - version >= 1.2.0... no
*** The sdl-config script installed by SDL could not be found
*** If SDL was installed in PREFIX, make sure PREFIX/bin is in
*** your path, or set the SDL_CONFIG environment variable to the
*** full path to sdl-config.
configure: error: *** SDL version 1.2.0 not found!
Does anyone know where to find sdl-config? I guess I can build SDL from source, but why should I have to, when there exist pre-built packages?
you can use macports to install libsdl or libsdl-devel (v1.2 or v1.3)
http://www.macports.org/
after installing macports to install libsdl type
port install libsdl
it will install sdl-config at /opt/local/bin
I had the exact same problem.
I found out that sdl-config was installed in two locations:
/sw/bin/sdl-config
and
/opt/local/bin/sdl-config
In the one located in /sw/bin I changed the prefix to /opt/local — then it worked.
The output you're showing is from a unix style configure for automake. According to this site: http://www.libsdl.org/faq.php?action=listentries&category=7 (second and third questions) you can't use the dmg (which you showed the link for) as a unix style installation directly. See the links on the above page for a DarwinPorts or Fink installation or, indeed, you'll have to build it from source as described on the page.
To directly answer your question, you should find the libraries in /Library/Frameworks/.

Resources