Giter VIP home page Giter VIP logo

Comments (11)

SimonDanisch avatar SimonDanisch commented on May 23, 2024

I'm not sure about the built, but to me it sounds as if you run into: JuliaGL/GLVisualize.jl#116

from glfw.jl.

drjrkuhn avatar drjrkuhn commented on May 23, 2024

I believe the issue in GLVisualize.jl is really an issue with GLFW.jl, since I get the same error of opening "opengl32" when running either Pkg.test("GLFW") or Pkg.test("GLVisualize") or Pkg.test("GLWindow") or even Pkg.test("ModernGL").

  • Pkg.test("GLVisualize") reports

    ERROR: LoadError: error compiling #create_glcontext#42: error compiling glDebugMessageCallbackARB: error compiling getprocaddress_e: error compiling getprocaddress: could not load library "opengl32"
    dlopen(opengl32.dylib, 1): image not found
    in (::GLWindow.#kw##create_glcontext)(::Array{Any,1}, ::GLWindow.#create_glcontext, ::String) at ./:0
    ...

  • Pkg.test("ModernGL") reports

    ERROR: LoadError: error compiling anonymous: error compiling createcontextinfo: error compiling glGetString: error compiling getprocaddress_e: error compiling getprocaddress: could not load library "opengl32"
    ...

  • Pkg.test("GLWindow") reports an error in create_glcontext, which calls GLFW

    ERROR: LoadError: error compiling #create_glcontext#42: error compiling glDebugMessageCallbackARB: error compiling getprocaddress_e: error compiling getprocaddress: could not load library "opengl32"
    dlopen(opengl32.dylib, 1): image not found
    in (::GLWindow.#kw##create_glcontext)(::Array{Any,1}, ::GLWindow.#create_glcontext, ::String) at ./:0
    ...

  • Pkg.test("GLFW") reports

    ERROR: LoadError: LoadError: error compiling glGenVertexArrays: error compiling getprocaddress_e: error compiling getprocaddress: could not load library "opengl32"
    dlopen(opengl32.dylib, 1): image not found
    in include_from_node1(::String) at ./loading.jl:488
    ...

GLVisualize calls ModernGL.getprocaddress, which calls GLFW for the context, which triggers loading of opengl32.dylib. Similarly, GLWindow also calls GLFW for a context which tries to load opengl32.dylib.

To get GLFW to work, the homebrew package needs to be rebuilt if the proper bottle for v"10.12" does not exist during the build step in GLFW.jl/deps/build.jl if is_apple() section.

from glfw.jl.

drjrkuhn avatar drjrkuhn commented on May 23, 2024

Actually, I believe this is a separate issue from the one in JuliaGL/GLVisualize.jl#116.

from glfw.jl.

jayschwa avatar jayschwa commented on May 23, 2024

The quick fix is to add an extra line that downloads the bottle for Sierra. I presume one is available in Homebrew's appveyor.

Agreed that it would be nice to leverage Homebrew instead. I made an attempt a couple years ago, but found it was harder than I expected for reasons I no longer remember.

from glfw.jl.

drjrkuhn avatar drjrkuhn commented on May 23, 2024

There is not a bottle for sierra yet. I have been checking for the last few days.

from glfw.jl.

jayschwa avatar jayschwa commented on May 23, 2024

Weird. I expected that would happen auto-magically. Maybe the library's formula doesn't build cleanly on it.

from glfw.jl.

drjrkuhn avatar drjrkuhn commented on May 23, 2024

from Homebrew/brew/docs/Bottles.md

Bottle creation is not done automatically. The glfw3 package maintainer has to update the formula bottle do block and then submit a pull request before a new bottle is built by the bot. GLFW will always be a bit behind each release if it relies on prebuilt bottles.

from glfw.jl.

SimonDanisch avatar SimonDanisch commented on May 23, 2024

So have you tried checking out ModernGL? Since GLVisualize, GLWindow, ModernGL and GLFW rely on the same feature in ModernGL for the tests, they should fail with the same error.... As far as I know, there is no opengl32 dylib in OSX, so the only way it could get in here is over that ModernGL bug....

from glfw.jl.

SimonDanisch avatar SimonDanisch commented on May 23, 2024

Please reopen if Pkg.checkout("ModernGL") doesn't fix this.

from glfw.jl.

drjrkuhn avatar drjrkuhn commented on May 23, 2024

Yes. Thanks!

After dumping all of my julia libraries and doing a Pkg.update() to repopulate the package folders, I tried a Pkg.checkout("ModernGL") followed by Pkg.test("GLFW"). The tests ran OK after that. GLVisualize also tested OK. Thanks for your help!

Before I tried that, I made a stab at using rewriting GLFW/deps/build.jl to use BinDeps and Homebrew to download libglfw3 in a more "regular" way. I based it on the GSL.jl example recommended by BinDeps. I forked GLFW.jl to github.com/drjrkuhn/GLFW.jl to try it out. The OSX version builds and tests find. The binaries are placed in the Homebrew package folder instead of the GLFW package folder.

Unfortunately, the fork is not yet ready for prime time. I tried the same fork of GLFW on an Ubuntu machine and ran into a bug in BinDeps where it tries to install packages in sudo mode.

from glfw.jl.

jayschwa avatar jayschwa commented on May 23, 2024

Your fork inspired me to take another pass at it myself in #95. It works for me on Windows and OS X. I haven't tried it in Linux yet, but the Travis build is passing.

from glfw.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.