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

WIP: linux patchset #7

Merged
merged 1 commit into from
Aug 18, 2014
Merged

WIP: linux patchset #7

merged 1 commit into from
Aug 18, 2014

Conversation

ihnorton
Copy link
Contributor

Oh good, now I can segfault in Qt! 😄. I figured it makes more sense to just open this as a wip until it works and then refine it to something mergeable.

further changes from last night:

  • another missing libcxxffi in an eval'd ccall definition
  • RTLD_GLOBAL for the Qt libs

in Julia I also added:

extern "C" void *cjulia_type_to_llvm(jl_value_t* jt) { return (void*) julia_type_to_llvm(jt); }

because that function is otherwise C++ mangled, so could not be found.

@ihnorton
Copy link
Contributor Author

Ah, here we go! The segfault was due (apparently) to passing argc=0 into QApplication.

image

@jakebolewski
Copy link
Contributor

🎆

@ihnorton ihnorton mentioned this pull request Jul 28, 2014
@ihnorton
Copy link
Contributor Author

@Keno I'm not sure if clang_compiler->getHeaderSearchOpts().UseBuiltinIncludes = 1; and the following options are doing what we expect - I had to manually defineMacro("__linux") for the Qt example to work (otherwise Qt thinks it is on an unknown platform).

@Keno
Copy link
Collaborator

Keno commented Jul 29, 2014

Yeah, there's probably some other preprocessor options to set.

@Keno
Copy link
Collaborator

Keno commented Jul 29, 2014

Try 69a0f28

#endif

// TODO: use this to set triple. Right now on linux it gets x86_64-pc-linux-gnu which doesn't work with current libc++
//if (clang_compiler->getTargetOpts().Triple.empty())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was the problem here? I have just pushed a change which calls Triple::normalize before passing it in. Does that fix it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I missed normalize, good to know.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did too. I even submitted a patch to clang to fix all the triple settings, when it was pointed out to me that I had missed normalize.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It almost seems like the default behavior should be normalize and the current behavior should be called getUnhelpfulTargetTriple.

@ihnorton
Copy link
Contributor Author

Rebased, not much left :)

(I do still have to re-link Julia against LLVM3.5-svn to avoid missing symbols)

@Keno
Copy link
Collaborator

Keno commented Aug 18, 2014

Yes, I do to. But now the Makefile picks up USE_LLVM_SHLIB from Make.user, which makes it exceedingly convenient ;)

Keno added a commit that referenced this pull request Aug 18, 2014
@Keno Keno merged commit 3d0cfb1 into JuliaInterop:master Aug 18, 2014
@ihnorton
Copy link
Contributor Author

Ah, cool!

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

Successfully merging this pull request may close these issues.

3 participants