Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pwd() == usr/lib #39

Closed
vtjnash opened this issue Nov 12, 2013 · 3 comments
Closed

pwd() == usr/lib #39

vtjnash opened this issue Nov 12, 2013 · 3 comments

Comments

@vtjnash
Copy link
Collaborator

vtjnash commented Nov 12, 2013

My copy of clang has trouble finding it's builtin headers if it isn't started from the usr/lib directory (actually, it expected usr/bin aka the location of the clang executable, but lib will work just as well). Not certain if there's anything you can do about this, but chdir works for me.

julia> top=cindex.parse_header("",args=["-v"])
clang version 3.3 (tags/RELEASE_33/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
ignoring nonexistent directory "../lib/clang/3.3/include"
@ihnorton
Copy link
Collaborator

Yeah, this is kind of annoying. I usually add the headers to the search path with something like this:

top = parse_header("/usr/include/jpeglib.h"; diagnostics=true,
       includes=["/cmn/julia/usr/bin/", joinpath(JULIA_HOME, "../lib/clang/3.3/include")],
       args=["-v", "-DJPEG_INTERNALS"])

I should probably use find_library get the libclang.so path and make this try harder to do the right thing.

@vtjnash
Copy link
Collaborator Author

vtjnash commented Nov 12, 2013

I was about to open an issue saying diagnostics=true should be the default. It was confusing to have it fail without any message. And when it succeeds, diagnostics seems to be silent anyways.

It would also be cool if you could integrate pkg-config in some meaningful way. My application worked pretty well with: args=ASCIIString["-v",split(readall(pkg-config --cflags gtk+-2.0),' ')...], but it was pretty awful until i used that.

It would be nice if args could be any type of string array. But I understand that ASCIIString is the only type you can reasonably expect work everywhere (even UTF8 string may not parse correctly, e.g. on windows)

@vtjnash
Copy link
Collaborator Author

vtjnash commented Nov 12, 2013

I wonder if the feature request for a Base.libpath is still around? It would be nice to be able to convert a library name or pointer to a file system path. I wrote the code to do this on windows in Tk.jl, but linux is a bit more difficult and less standardized

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants