Issue installing SDL on Mac - sdl

I have successfully installed libsdl in the past on my Mac OS X Leopard with macports, but now when I try to do it again (after it was uninstalled a while ago), macports produces this error when attempting to install the dependency "xorg-libXdmcp":
Error: org.macports.configure for port xorg-libXdmcp returned: configure failure: command execution failed
Please see the log file for port xorg-libXdmcp for details:
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_xorg-libXdmcp/xorg-libXdmcp/main.log
Error: Unable to upgrade port: 1
Error: Unable to execute port: upgrade xorg-libXext failed
main.log
EDIT: Okay, this has become a problem with installing xorg-libXdmcp: no matter what I do, it always produces this error. The log says that it couldn't find the xproto package.

After attempts to install it via Fink didn't actually seem to install it, I just built it from source.

Related

`brew install infer` error while updating infer

I recently updated facebook infer on my work laptop, and am trying to update infer on my personal laptop. It installed without an issue on my work laptop, but I am getting an error (see below) on my personal laptop. Both have opam 1.2.2 and ocaml 4.03.0 installed. If I execute opam init --comp=VERSION, I see that everything is already up-to-date. Any ideas why brew install infer could be failing?
[User]-MacBook-Pro:~ [User]$ brew install infer
==> Using the sandbox
==> Downloading https://github.com/facebook/infer/releases/download/v0.9.2/infer
Already downloaded: /Users/[User]/Library/Caches/Homebrew/infer-0.9.2.tar.xz
==> ./build-infer.sh all --yes
Last 15 lines from /Users/[User]/Library/Logs/Homebrew/infer/01.build-infer.sh:
initializing opam...
Checking for available remotes: rsync and local, git.
- you won't be able to use mercurial repositories unless you install the hg
command on your system.
- you won't be able to use darcs repositories unless you install the darcs
command on your system.
[WARNING] Recommended external solver aspcud not found.
[ERROR] No OCaml compiler found in path. You should use:
opam init --comp=VERSION
[ERROR] Initialisation failed
OpamGlobals.Exit(66)
READ THIS: https://git.io/brew-troubleshooting
If reporting this issue please do so at (not Homebrew/brew):
https://github.com/Homebrew/homebrew-core/issues
These open issues may also help:
infer 0.9.3 https://github.com/Homebrew/homebrew-core/pull/5130
My work laptop is on OS X El Capitan Version 10.11.6, and my personal laptop is on macOS Sierra Version 10.12.
https://github.com/facebook/infer/issues/467
Resolved in Infer version 0.9.4.1

Cannot install Core, unlikely download issues reported

I'm trying to install Janestreet's Core for OCaml using opam on Mac OsX to get started with the "Real world OCaml" book.
I get the following error:
===== ERROR while installing herelib.109.35.02 =====
Could not get the source for herelib.109.35.02:
# opam-version 1.1.1
# os darwin
Cannot download https://opam.ocaml.org/archives/herelib.109.35.02+opam.tar.gz,
please check your connection settings.
All other libraries after herelib fail as well.
I don't have connection problems, though, as the libraries up to herelib do download (last successful is type_conv as far as I can tell). Also, pasting the reported URL in Chrome starts a file download immediately, so it doesn't seem to be a server problem at the source.
Homebrew reports my Opam and Ocaml as up to date.
Any ideas?
Your version numbers for both herelib and opam looks quite outdated. The following may help:
Update your repository with opam update
Try to use more recent opam, it is available under macports and brew.

Mac OS X Yosemite C++ Eclipse error: "Error while launching command: gdb --version"

I am following a C++ Eclipse tutorial and learning how to debug. I filled in the sections of the Debug Configurations window as it said in the tutorial and clicked 'Debug'.
I get the error "Error while launching command: gdb --version". I found a similar post here: Mac C++/eclipse cannot debug: Error while launching command: gdb --version
and there the user said he already had GDB installed. I tried to install it using the instructions at this link: http://www.patosai.com/blog/post/installing-gdb-on-mac-os-x-yosemite
and when I entered the first command "brew install gdb" I got the following in my terminal:
Error: No available formula for gdb
==> Searching formulae...
cgdb gdbm pgdbf
==> Searching taps...
homebrew/dupes/gdb Caskroom/cask/macgdbp
I think there may have been a problem there because when I entered the final command of the "Installing GDB on Mac OS X Yosemite" tutorial above: "codesign -s gdb-cert /usr/local/bin/gdb" it said "no such file or directory.
Can anyone see where I've made an error please? Thanks :)
Seems like brew was unable to find gdb in its default search location.
The line 'Searching Taps...' means that brew is searching other git repositories for the software you are trying to install.
In this case it found two repositories that contain something useful.
homebrew/dupes/gdb and Caskroom/cask/macgdbp
homebrew/dupes/gdb would be the one you need as this is the gdb version apple used for xcode before it switched to other tools.
This site has a really good tutorial for installing gdb using either brew or macports http://ntraft.com/installing-gdb-on-os-x-mavericks/
I used this command to try to install gdb.
brew install homebrew/dupes/gdb
this should produce the following output
Installing gdb from homebrew/homebrew-dupes
Downloading http://ftpmirror.gnu.org/gdb/gdb-7.9.1.tar.xz
./configure --prefix=/usr/local/Cellar/gdb/7.9.1 --with-system-readline --with-lzma --with-python=/usr
make
config.status: creating Makefile
config.status: creating testsuite/Makefile
config.status: creating config.h
config.status: executing default commands**strong text**
make: *** [all] Error 2
The installation process failed on my macbook. This was most likely due to me using the os x 10.11 beta. But it might also be because the gdb version on brew does not work well with yosemite and higher. If this is the case you could try the macports install using the above tutorial.
I can't currently use macports because my os x version. but if you are using yosemite it should be fine.

Difficulty in executing basic OpenCV example on Mac

System Information: Mac OSX 10.7.3
I am trying to execute basic opencv example. The program is getting compiled but when I try to execute I receive this error msg:
dyld: Library not loaded: /opt/local/lib/libx264.118.dylib
Referenced from: /opt/local/lib/libavcodec.dylib
Reason: image not found
Trace/BPT trap: 5
Before it was working fine. But yesterday I just reinstalled my Xcode 4.3 version and I don't know why suddenly I get this error for this example.
Can someone please help me with that?
Thanks!
I figured out myself. So either try simply this:
sudo port -nR upgrade --force ffmpeg
because I think these lib files mentioned below may belongs to ffmpeg and maybe ffmpeg package might have broken.
libx264.118.dylib
libavcodec.dylib
Or you can do this for all outdated ports. It will most probably fix all the bugged ports
sudo port outdated
sudo port -nR upgrade --force outdated

installing c++ boost on mac osx leopard -- port fails

I'm not much of a c++ programmer, just an end-user trying to install an existing project from source.
One of the project dependencies is the boost library.
When I tried to install boost on my osx 10.5.7 using "sudo port install boost", I got the following error message:
---> Building boost with target all
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_boost/work/boost_1_35_0" && gmake all " returned error 2
Command output: Makefile:2: *** missing separator. Stop.
Error: Status 1 encountered during processing.
help?
EDIT: I suspect something is wrong with my system, though I am not sure what -- it's just a plain osx installation + the xcode CD that came with it, nothing fancy. [things are just so much easier on this front on linux!)
I did "sudo port selfupdate" and "sudo port upgrade outdated" as suggested in an answer,
and the second one ran about all night, then failed with many errors, the last few are:
Error: The following dependencies failed to build: db46
Error: Unable to upgrade port: 1
---> Extracting tiff
On Mac OS X 10.5, tiff 3.8.2 requires Xcode 3.1 or later but you have Xcode 3.0.
Error: Target org.macports.extract returned: incompatible Xcode version
Error: Unable to upgrade port: 1
---> Activating xorg-renderproto #0.9.3_0
Error: Target org.macports.activate returned: Image error: /opt/local/include/X11/extensions/render.h is being used by the active render port. Please deactivate this port first, or use 'port -f activate xorg-renderproto' to force the activation.
Error: The following dependencies failed to build: xorg-renderproto
Error: Unable to upgrade port: 1
In my experience you can easily do things with other installers that can break the port command from working correctly. Not to mention that MacPorts just breaks at the most random of times for me. Once I removed perl using the port command. It broke the whole port installation, don't even try this.
If you can I would just build Boost from source using gcc.It is actually not that difficult.
I have written an article on how to do this with some detail here.
It has a specific focus on how to do this on Mac OS X but says how to do this on Windows as well.
The two commands you will need are:
Build debug libs using GCC:
bjam toolset= darwin variant=debug threading=multi link=static
Build release libs using GCC:
bjam toolset=darwin variant=release threading=multi link=static
More detailed info on doing this here.
On Mac OS X 10.5, tiff 3.8.2 requires Xcode 3.1 or later but you have Xcode 3.0.
Isn't that the cause of port upgrade outdated failure?
Try running 'sudo port selfupdate'. You are using an outdated version of MacPorts. Once this is done run 'port upgrade outdated' to update the ports you have and then try to install boost again.
Update:
Update XCode as Paul mentioned in a post below. You can get it on the Apple Developer Site. You will probably have to signup to get a download link. As for the bug about the active render port you can safely disable this port as it has been replaced by xorg-renderproto. Deactivate it by running 'sudo port deactivate render'. Once that is done you can update again using 'port upgrade outdated' and it shouldn't take as long this time.
My experiences with MacPorts are a mixed blessing at best. Sometimes ports are out of date, or only half-done, it's very nice when it works, but unfortunatly doesn't always, so I kind of gave up on port to be honest...
That said, the default configure, bjam, ... combo from the boost distribution works flawlessly on os x, any reason you specifically want to get it working via port ?