Skip to content

Loading…

Error: installing open-scene-graph [still has problems...] #11391

Closed
youngtaekoh opened this Issue · 30 comments

6 participants

@youngtaekoh

Despite of issue #11348, installing open-scene-graph is still not possible in OSX lion.

(I reported that --use-llvm also does not work)

following patch:
http://www.openscenegraph.org/projects/osg/changeset/12790/OpenSceneGraph/trunk/src/osgViewer/DarwinUtils.mm
may solve this problem.

[Build output]
https://gist.github.com/2285008
(is this right, adamv?)

@adamv

Please put build output in a gist and link it

@fhesse

Seems I have the same error.
Unfortunately the link youngtaekoh posted does not work anymore/during the last hours.

Wow, as I'm writing this the comment is now visible again :-D

Can I just patch this myself into openscengraph somehow?
Do you have a link with some info on where/how to do this?

Thanks in advance!

Build output:
https://gist.github.com/2291907

@gvarisco

fhesse,

have a look over there for including your own patches: https://github.com/mxcl/homebrew/wiki/Formula-Cookbook

@fhesse

Thanks for the link gvarisco!

@domoritz

I have the exact same problem.

@fhesse Does the osg patch work and if yes, do you plan to submit a patch to homebrew in the next few days?

@fhesse

@domoritz

yes the patch works, but since I'm a newbie to Homebrew I just applied it "manually" to the osg sources, not using the formula.
Actually I'm interested in knowing how to do such a patch, so I could try to make one, but I can't promise anything ...

@domoritz

@fhesse It worked. It would be great if you create a patch. I have never created a formula but I'll try to help you with debugging or testing.

@fhesse

So, I tried my best ;-)
Try installing with the following command:

brew install https://github.com/fhesse/homebrew/raw/fix-displayBitsPerPixel/Library/Formula/open-scene-graph.rb

@domoritz: you should probably uninstall before you can try ;-)

PS: Feedback is welcome.

@domoritz

Congratulations, it took some time to compile but works nicely.

@fhesse

Nice ;-)
Seems you have a faster machine than me, the install reported: built in 41.4 minutes, you must have been below 20 mins ;-)

When checking the osg link of youngtaekoh, the patch seems only necessary for OSX 10.7 users.
Do you think a pull request makes sense?

@domoritz

It took about 15 minutes :-P

Anyway, I think you can make a pull request and say that you have tested the patch on two systems running Lion. If it's accepted everything is fine, otherwise some more testing mat be necessary.

Oh and don't forget to mention that this will fix Issue #11391.

@fhesse

@domoritz
could you try again with the inline version of the patch?
It worked on my machine, but I'm not sure if the first patch was installed correctly, maybe the comment in between the diff's has to go away. Could you have a look at that?
Or maybe the first patch is not required anymore ;-) (but I didn't try).
The install command above should point to the most recent version.

@domoritz

@fhesse
Building works but I have some issues with osgDB::readNodeFile which does not work on mac. However, I think that is unrelated to the build.

So, good work.

@domoritz

Since the 3.0.1 Version seems to have some problem to use osgDB::readNodeFile I added the developer version 3.1.1 to the formula. It compiles and my application works with the new build. You just have to pass --devel to brew install.

Can you please try it and let me know if something fails to work?

brew install --devel https://raw.github.com/domoritz/homebrew/master/Library/Formula/open-scene-graph.rb

I only get some warnings when installing.

Warning: Could not fix install names for /usr/local/Cellar/open-scene-graph/3.1.1/lib/libosgQt.3.1.1.dylib
Warning: Could not fix install names for /usr/local/Cellar/open-scene-graph/3.1.1/lib/libosgQt.3.1.1.dylib
Warning: Could not fix install names for /usr/local/Cellar/open-scene-graph/3.1.1/lib/libosgQt.3.1.1.dylib
@fhesse

@domoritz: I will try, maybe today ;-) In this case also the patch is not necessary, right? Could you also have a look at the pull request #11788, maybe you have an idea about the error.

@domoritz

@fhesse Right, the patch is not needed anymore since it is included in the 3.1.1. However, this is not the stable version. Is there a way to include a patch just for the stable version but not the dev version? I don't know what went wrong at the pull request but I recommend that you try to add -vd to brew install and take a look at the debug output or try /usr/bin/patch -f -p1 -i 000-homebrew.diff separately.

@fhesse

@domoritz
I did:

brew uninstall open-scene-graph
Uninstalling /usr/local/Cellar/open-scene-graph/3.0.1...

and then:

brew install --devel https://raw.github.com/domoritz/homebrew/master/Library/Formula/open-scene-graph.rb

which resulted in:

######################################################################## 100,0%
==> Installing open-scene-graph dependency: pango
==> Downloading http://ftp.gnome.org/pub/GNOME/sources/pango/1.28/pango-1.28.4.t
######################################################################## 100,0%
==> Downloading patches
######################################################################## 100,0%
==> Patching
patching file modules/hebrew/hebrew-shaper.c
...
patching file pango/pangox-fontmap.c
==> ./configure --disable-debug --prefix=/usr/local/Cellar/pango/1.28.4 --enable
==> make
==> make install
Error: Nothing was installed to /usr/local/Cellar/pango/1.29.4

This seems to be related to issue #11267. Something with the devel option seems to be wrong. Why didn't it happen on your machine? ;-) lol

PS: Thanks for the hints for the pull-request issue, I'll try that ...

@domoritz

@fhesse
Have you tried the methods from the comments on issue #11267?

@domoritz

@fhesse do you think a pull request with the developer version of osg makes sense at this time?

@fhesse

@domoritz I did not manage to try the comments from the other issue so far. What about making the pull request in another tab, like alt, which should contain alternative installs as far as I remember. (Maybe there is some more info here: https://github.com/mxcl/homebrew/wiki/Homebrew-0.9 )

@domoritz domoritz added a commit that referenced this issue
@domoritz domoritz Added developer version 3.1.1 to open-scene-graph formula.
This fixes install and runtime issues on Lion. Issue #11391
e2f45e4
@adamv

I've merged the --devel pull request; presumably this gets us past this issue for now?

@adamv adamv closed this
@domoritz

So for everyone that has the problems described above. Use this to install the developer release of OpenSceneGraph instead of the stable release.

brew install open-scene-graph --devel
@jctull

It appears that the patches are now failing with the --devel flag. I got this:

brew install open-scene-graph --devel 17:23:39
Warning: Formula will not build with Clang, trying LLVM
==> Downloading http://www.openscenegraph.org/downloads/developer_releases/OpenSceneGraph-3.1.1.zip
Already downloaded: /Library/Caches/Homebrew/open-scene-graph-3.1.1.zip
==> Patching
patching file CMakeModules/FindCOLLADA.cmake
Hunk #1 succeeded at 237 (offset 2 lines).
Hunk #2 succeeded at 253 (offset 2 lines).
patching file src/osgViewer/DarwinUtils.mm
Hunk #1 succeeded at 43 with fuzz 1 (offset -5 lines).
Hunk #2 FAILED at 328.
Hunk #3 FAILED at 417.
Hunk #4 FAILED at 447.
3 out of 4 hunks FAILED -- saving rejects to file src/osgViewer/DarwinUtils.mm.rej
Error: Failure while executing: /usr/bin/patch -f -p1 -i 000-homebrew.diff

@fhesse

@domoritz I guess the patches (for the stable version) are also applied for the --devel install. Does that hurt here?

@domoritz

@fhesse I'm pretty sure that this is the case. Merging our two commits probably created this issue.
@jctull For now you should try

brew install --devel https://raw.github.com/domoritz/homebrew/master/Library/Formula/open-scene-graph.rb
@fhesse

@domoritz What a pitty.

Can it somehow be set that the 2. patch should only be used for the stable version?

@jctull
@domoritz

@jctull Actually that is the old formula :-P
@fhesse As far as I can tell from the Formula Cookbook this does not seem possible. But I may be wrong. I set up an Issue #12649 for that.

@domoritz

@fhesse @jctull I just patched the Formula. It would be great if you could try

brew install https://raw.github.com/domoritz/homebrew/master/Library/Formula/open-scene-graph.rb --devel -v
@fhesse

sorry, I was quite a while absent, how is the current state, everything finished? ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.