Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have symlinked two libraries - libfreetype and libpng from the /usr/local/lib/ directory and the binary I am running now displays the "to open you need to install X11 ...". Before that it used to complain that libfreetype and libpng were not found (at /usr/local/lib).

The thing is I do not want to install XQuartz, and my binary simply needs PNG and Freetype support. Surely, these libraries wouldn't need XQuartz either.

Is there a way to obtain these binaries without installing XQuartz? Let's assume I do not have administrator access to the computer. And yes, I own it ;-) I just don't want to install system wide stuff, and so far I have managed quite well - I have a working compiler and GNU make binary running very well.

I downloaded the standalone libpng, but it seems that at least libfreetype which resides in /usr/X11/lib is a sort of placeholder which causes the mentioned dialog to display. A dummy, that is.

share|improve this question
    
You might be asking the wrong question. Why wouldn't you want to install XQuartz in the first place? What program is it you want to run, which seems to depend on XQuartz? –  slhck Feb 4 '13 at 22:20
    
That's the thing - the program is completely unrelated to XQuartz, and does not depend on it. It only needs libpng and libfreetype. –  amn Feb 5 '13 at 11:54
    
And what is "the program"? Homebrew has both of these libraries. –  slhck Feb 5 '13 at 11:55
    
I do not want to disclose the program exactly because it shouldn't matter. It only wants libpng and libfreetype. Homebrew is too much for me, as I only need the program myself, and I have installed it in my per-user binaries directory that's in my PATH. Everything works now, I am writing an answer right now, so that perhaps others might benefit from it. –  amn Feb 5 '13 at 11:57

1 Answer 1

up vote 0 down vote accepted

Actually, I solved the problem myself. Long suspecting that explicit dependency listings are a human construct and do not really correspond to actual dependency for a program to function, I decided to dig deeper and in the end ended up with the following:

I downloaded the XQuartz package from the official site, but instead of installing it, I opened it with the program called Pacifist, a [shareware] package explorer. I then extracted two files - libfreetype.6.dylib and libpng.12.0.dylib, copied them to the same directory as the program, and it all has worked fine ever after.

Granted XQuartz is perhaps not much more than a set of libraries and a set of binaries, but I really have no need for it. When I do, I can install it, and remove the two aforementioned files, having the program instead rely on system-wide libraries having been installed by XQuartz. Until then, I am happy to live without XQuartz. I am on a Macbook Air with 64GB SSD, and I prefer the free space I have on it for my own files.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.