osg 3.2 - working with qt 5.2 #25332

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
6 participants
Contributor

Kelloggs commented Dec 19, 2013

First: sorry for leaving Issue #22283 abandoned. Since qt has been updated to 5.2, qt5 is working on Mavericks.

I fixed the formula of osg to work with qt 5.2 such that osgQt is compiled.

@MikeMcQuaid MikeMcQuaid commented on an outdated diff Dec 19, 2013

Library/Formula/open-scene-graph.rb
@@ -52,6 +60,12 @@ def install
args << "-DCOLLADA_INCLUDE_DIR=#{HOMEBREW_PREFIX}/include/collada-dom"
end
+ if Formula.factory('qt5').installed?
+ args << "-DCMAKE_PREFIX_PATH=#{Formula.factory('qt5').opt_prefix}"
+ elsif Formula.factory('qt').installed?
+ args << "-DCMAKE_PREFIX_PATH=#{Formula.factory('qt').opt_prefix}"
@MikeMcQuaid

MikeMcQuaid Dec 19, 2013

Owner

Use build.with? 'qt instead.

Contributor

Kelloggs commented Dec 19, 2013

Sorry, the options are missing. However, if i add an option for qt5, with this syntax i get an error when compiling since qt5 was built with libstdc++, which is discourage i guess?+

Long story short: do not yet review, i am still working on it.

Contributor

Kelloggs commented Dec 19, 2013

Okay, i verified this. Is there a way to use the suggested syntax 'build.with?' without running into the problem mentioned above? How can I handle this?

Owner

MikeMcQuaid commented Dec 19, 2013

That problem is a problem with the package, not with Homebrew. The other syntax will just avoid detecting it rather than avoiding the problem. It's pointing out that the two packages are being compiled with different C++ standard libraries which will break things, unfortunately.

Contributor

Kelloggs commented Dec 19, 2013

I see. What is the standard library that is usually used in Homebrew universe? I read that libc++ is the weapon of choice. In this case, it would be necessary to recompile qt5, or should i just revise this formula in order to match the standard library used for qt5?

Contributor

mistydemeo commented Dec 19, 2013

Homebrew uses the default C++ stdlib for the compiler and OS - that's libc++ on clang in OS X 10.9+, and a flavour of libstdc++ otherwise.

I had thought that the qt5 formula now builds with libc++. Was the issue that qt5 was built with libstdc++, or that osg was?

Contributor

Kelloggs commented Dec 19, 2013

@mistydemeo The qt5 formula is build with libstdc++. Using 2af4344 and --with-qt5 ends up in this error:

Error: open-scene-graph dependency qt5 was built with the following
C++ standard library: libstdc++ (from clang)

This is incompatible with the standard library being used
to build open-scene-graph: libc++ (from clang)

I could now build osg with libstdc++, but i think the better way would be to build qt5 with libc++, or am i wrong?

Contributor

mfitzp commented Dec 20, 2013

Just to confirm the qt5 bottle is currently built using libstdc++ (I ran into the same problem trying to install pyqt5). Strangely, based on the build mkspecs for mac-clang it should be using libc++

I'm currently building qt5 from source to see if it makes any difference.

Contributor

Kelloggs commented Dec 20, 2013

@mfitzp Did that make a difference?

Owner

MikeMcQuaid commented Dec 20, 2013

qt5's crappy buildsystem is still using libstdc++ for bin/qmake and lib/QtScript.framework/Versions/5/QtScript. Will need patched (and upstreamed) to fix this I guess.

Owner

MikeMcQuaid commented Dec 20, 2013

Tracking in #25348.

Contributor

mfitzp commented Dec 22, 2013

Sorry for the delay @Kellogs Qt takes an age to compile on this machine (in the meantime I've flown to another country!) But it finished just now and yes rebuilding Qt5 with --build-from-source then allowed PyQt5 to install without complaining about libraries, although brew irb Keg.new(:qt5.f.prefix).detect_cxx_stdlibs still reports both libc++ and libstdc++.

Contributor

Kelloggs commented Jan 13, 2014

@MikeMcQuaid Since the qt5 issue is fixed now, this formula also works. Is there anything else i can do to get 2af4344 merged?

Owner

MikeMcQuaid commented Jan 13, 2014

@BrewTestBot test this please

Contributor

Kelloggs commented Jan 17, 2014

@MikeMcQuaid Rocket science! Is the bot also testing optional flags?

Owner

MikeMcQuaid commented Jan 17, 2014

@Kelloggs Nope. This needs rebased now, it seems.

Contributor

Kelloggs commented Jan 17, 2014

@MikeMcQuaid Excuse me? I didn't get that. You were answering my question or asking me to rebase?

Owner

MikeMcQuaid commented Jan 17, 2014

Sorry, both. I was kicking off a new build to see if it was working but it seems it needs rebased now before it can be merged. Once that's done and the build is green I think we're good to go. Thanks for your patience, apologies for confusion!

@Kelloggs Kelloggs osg 3.2 - working with qt 5.2
Use build.with? 'qt' instead
de5d49f
Contributor

Kelloggs commented Jan 17, 2014

@MikeMcQuaid Been there. Done that.

Contributor

Kelloggs commented Feb 10, 2014

Oops. I just now see, that the build failed. But I cannot see details about the failure.

Owner

MikeMcQuaid commented Feb 10, 2014

It needs to be rebased on master. While it says We can’t automatically merge this pull request. it can't be pulled.

Contributor

adamv commented Mar 10, 2014

If this is rebased on master and re-pushed, it will trigger a new build (so we can see the build error).

Contributor

jacknagel commented May 9, 2014

Closing due to inactivity

jacknagel closed this May 9, 2014

Kelloggs referenced this pull request Jun 16, 2014

Closed

osg 3.2 - using qt 5.3 #30193

xu-cheng locked and limited conversation to collaborators Feb 17, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.