Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ArtOfWarfare

macrumors G3
Original poster
Nov 26, 2007
9,561
6,059
I'm trying to make the blackfin toolchain on OS X (normally it's for RedHat) and I'm hitting a snag when running the build script. It tries including X11/Xlib.h, but it's not finding it. I heard this file gets downloaded as part of the Xcode Command Line tools, which I've installed, but the file still isn't found.

The specific line trying to import the file is:

#include <X11/Xlib.h>

Where is X11/Xlib.h on my computer, currently (if at all... if it's not, it prompts the question, where can I get it?) and further, where do I need to put it or what do I need to change for the file to properly get imported?

Here's the blackfin toolchain source forge page, for those interested:
http://sourceforge.net/projects/adi-toolchain/files/2013R1/2013R1-RC1/src/

Edit:

Okay, after some more searching I found out that X11's library gets installed in /opt/X11.

Further, I found a suggestion to make a symlink to it like this:

ln -s /opt/X11/include/X11 /usr/local/include/X11

I did that, but I'm still running into these problems:

Code:
Checking for development packages (skip checks with the -D option)
usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
       mktemp [-d] [-q] [-u] -t prefix 
ld: warning: directory not found for option '-L/sw/lib'
usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
       mktemp [-d] [-q] [-u] -t prefix 
ld: warning: directory not found for option '-L/sw/lib'
usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
       mktemp [-d] [-q] [-u] -t prefix 
ld: warning: directory not found for option '-L/sw/lib'
ld: library not found for -lX11

Any idea what I'm missing now?

I found a suggestion that it might mean /usr/X11/lib/libX11.so or .a is missing. I checked that directory and didn't see either of those files, but I found these two:

/usr/X11/lib/libX11.6.dylib
/usr/X11/lib/libX11-xcb.1.dylib
 
Last edited:

MacUser2525

Suspended
Mar 17, 2007
2,097
377
Canada
I'm trying to make the blackfin toolchain on OS X (normally it's for RedHat) and I'm hitting a snag when running the build script. It tries including X11/Xlib.h, but it's not finding it. I heard this file gets downloaded as part of the Xcode Command Line tools, which I've installed, but the file still isn't found.

The specific line trying to import the file is:

#include <X11/Xlib.h>

Where is X11/Xlib.h on my computer, currently (if at all... if it's not, it prompts the question, where can I get it?) and further, where do I need to put it or what do I need to change for the file to properly get imported?

Here's the blackfin toolchain source forge page, for those interested:
http://sourceforge.net/projects/adi-toolchain/files/2013R1/2013R1-RC1/src/

Edit:

Okay, after some more searching I found out that X11's library gets installed in /opt/X11.

Further, I found a suggestion to make a symlink to it like this:

ln -s /opt/X11/include/X11 /usr/local/include/X11

I did that, but I'm still running into these problems:

Code:
Checking for development packages (skip checks with the -D option)
usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
       mktemp [-d] [-q] [-u] -t prefix 
ld: warning: directory not found for option '-L/sw/lib'
usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
       mktemp [-d] [-q] [-u] -t prefix 
ld: warning: directory not found for option '-L/sw/lib'
usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
       mktemp [-d] [-q] [-u] -t prefix 
ld: warning: directory not found for option '-L/sw/lib'
ld: library not found for -lX11

Any idea what I'm missing now?

It is looking for libraries in the /sw/lib & X11 directories. My copy of the file you originally needed is in the sdk directory of Xcode.

Code:
MacUser2525:~$ locate Xlib.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Tk.framework/Versions/8.4/Headers/X11/Xlib.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers/X11/Xlib.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Tk.framework/Versions/8.4/Headers/X11/Xlib.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers/X11/Xlib.h
 

ArtOfWarfare

macrumors G3
Original poster
Nov 26, 2007
9,561
6,059
It is looking for libraries in the /sw/lib & X11 directories. My copy of the file you originally needed is in the sdk directory of Xcode.

Code:
MacUser2525:~$ locate Xlib.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Tk.framework/Versions/8.4/Headers/X11/Xlib.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers/X11/Xlib.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Tk.framework/Versions/8.4/Headers/X11/Xlib.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers/X11/Xlib.h

I don't see an sw directory anywhere on my computer...? How can I help it find them? Is there something I need to install, move, or link? Or maybe I need to change the build script (I haven't even tried peaking inside it yet.)

Edit: I was able to clean up all of the X11 related errors by installing Homebrew and updating XQuartz. Regrettably, the build script got further along and then hit this new roadblock:

"you must use a case sensitive filesystem"

Why the hell did they make that a requirement of all things? That sounds so completely arbitrary... but... whatever, guess that rules out compiling this from OSX. And Windows. I wonder if this contributes to why nobody bothers with blackfin.
 
Last edited:

robvas

macrumors 68040
Mar 29, 2009
3,240
629
USA
I don't see an sw directory anywhere on my computer...? How can I help it find them? Is there something I need to install, move, or link? Or maybe I need to change the build script (I haven't even tried peaking inside it yet.)

Edit: I was able to clean up all of the X11 related errors by installing Homebrew and updating XQuartz. Regrettably, the build script got further along and then hit this new roadblock:

"you must use a case sensitive filesystem"

Why the hell did they make that a requirement of all things? That sounds so completely arbitrary... but... whatever, guess that rules out compiling this from OSX. And Windows. I wonder if this contributes to why nobody bothers with blackfin.

The reason is because a lot of Unix and Linux apps assume a case-sensitive file system. You could have README and readme as two different files, and you can't do that on a case-insensitive file system. Once in a while I'll run into this with git, and pull/push some changes that don't quite do what I expected them since I use a Mac.

Remember that OS X only uses the case-insensitive file system by default, because the classic OS wasn't case-sensitive and they needed to be backwards-compatible. The Adobe apps are the canonical example of applications that will not work on a case-sensitive file system.

Can't you just make a disk image, move your project to it, and use the case-sensitive file system for it?
 

MacUser2525

Suspended
Mar 17, 2007
2,097
377
Canada
The reason is because a lot of Unix and Linux apps assume a case-sensitive file system.

All but Apples implementation of *nix require case sensitive files. Don't know how many times I have cursed not being able to rename This to this and don't get me started on spaces in file names...
 

ArtOfWarfare

macrumors G3
Original poster
Nov 26, 2007
9,561
6,059
Can't you just make a disk image, move your project to it, and use the case-sensitive file system for it?

I wasn't sure of any solutions that would work, but that sounds like a pretty simple one. Should I need to compile this in the future, I'll give it a shot. (I gave up and just used a Linux machine at school that already had the project compiled.)
 

subsonix

macrumors 68040
Feb 2, 2008
3,551
79
All but Apples implementation of *nix require case sensitive files. Don't know how many times I have cursed not being able to rename This to this and don't get me started on spaces in file names...

It's not a requirement, if that's the case then it's not becuase of the Unix specification. As another example, ZFS has a case insensitive option, just like HFS+. There are applications that makes assumptions about case, which makes porting them harder as we have seen here. In this case I would categorize this as a bug, because it's unreasonable to expect a case sensitive filesystem on a Mac by default.
 

subsonix

macrumors 68040
Feb 2, 2008
3,551
79
Not only unreasonable it is impossible OSX defaults to case insensitive unlike other *nix that default to case sensitive is/was the point of my post.

The default depends on filesystem, and settings, you can set up HFS+ to be case sensitive, it's not impossible but it's unreasonable to expect that on OS X. My point is that the error message should therefore be considered a bug on OS X.
 

MacUser2525

Suspended
Mar 17, 2007
2,097
377
Canada
The default depends on filesystem, and settings, you can set up HFS+ to be case sensitive, it's not impossible but it's unreasonable to expect that on OS X. My point is that the error message should therefore be considered a bug on OS X.

You said default Apple installed defaults to case insensitive so it is impossible, anyways enough of this foolishness PLONK.
 

subsonix

macrumors 68040
Feb 2, 2008
3,551
79
You said default Apple installed defaults to case insensitive so it is impossible.

It does, but you can reformat the drive and install the OS again, this time with case sensitivity. It would be unreasonable to expect anyone to do that only to install a library, but not impossible.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.