Code Monkey home page Code Monkey logo

Comments (12)

darksylinc avatar darksylinc commented on August 21, 2024 1

Yes of course!

Untick OGRE_BUILD_RENDERSYSTEM_GL3PLUS from the CMake GUI tool, or run with -DOGRE_BUILD_RENDERSYSTEM_GL3PLUS=0 from the command line

from ogre-next.

darksylinc avatar darksylinc commented on August 21, 2024 1

I am extremely busy but managed to get quick peek at the build issues. Unfortunately I could not run my own samples because I had trouble (I always did) setting up SDL2 from source:

  1. Remotery build issues fixed
  2. OIS bugs do not happen in XCode 9.4; looks like 10 complains. Nonetheless, OIS is not used by Ogre 2.1; and I think it's already getting removed from 1.11 as well, so it may as well be thought as deprecated and should be removed. Just build ogredeps without OIS support
  3. GL3+ bugs, I could not repro in 9.4; looks like a problem with XCode 10
  4. Your final error while running the samples indicates the Metal library was either not built or not copied correctly to the intended location (or its missing the .dylib extension from what I can see in the error msg). I noticed the macOS version of the XCode project for some reason does not setup all build dependencies correctly, thus if you hit "Run" at one of the samples, it's possible XCode just skipped building Metal. Try compiling the target "ALL_BUILD" which builds everything (or select Metal RenderSystem target explicitly and build it). If after that it still complaints, then 99% sure it wasn't copied correctly. Try locatling RenderSystem_Metal inside the CMake folder and manually pasting into the location the message tells you its looking for.

I'm sorry you're having so many troubles to build Ogre 2.1 on Mac. As you may have noticed, building for macOS (not iOS) is our least polished experience, but usually you don't run into this many errors.

I will look into this again once I have more time

from ogre-next.

crookedbard avatar crookedbard commented on August 21, 2024

I get these errors when using Xcode > File> Project settings > Legacy Build system.
If I use New Build system (Default) I get other errors:

error: Multiple commands produce '/Users/dkr/Documents/Bitbucket/ogre/ogre2.1/build/lib/macosx/Debug/RenderSystem_GL3Plus.framework/Versions/2.1.0/Headers/OgreGL3PlusVertexArrayObject.h':

  1. Target 'RenderSystem_GL3Plus' has copy command from '/Users/dkr/Documents/Bitbucket/ogre/ogre2.1/RenderSystems/GL3Plus/include/OgreGL3PlusVertexArrayObject.h' to '/Users/dkr/Documents/Bitbucket/ogre/ogre2.1/build/lib/macosx/Debug/RenderSystem_GL3Plus.framework/Versions/2.1.0/Headers/OgreGL3PlusVertexArrayObject.h'
  2. Target 'RenderSystem_GL3Plus' has copy command from '/Users/dkr/Documents/Bitbucket/ogre/ogre2.1/RenderSystems/GL3Plus/include/Vao/OgreGL3PlusVertexArrayObject.h' to '/Users/dkr/Documents/Bitbucket/ogre/ogre2.1/build/lib/macosx/Debug/RenderSystem_GL3Plus.framework/Versions/2.1.0/Headers/OgreGL3PlusVertexArrayObject.h'

from ogre-next.

darksylinc avatar darksylinc commented on August 21, 2024

Takes a deep breath ....aaahhh Apple breaking things again.

I'm going to guess this sounds like XCode 10 Beta? I have XCode 9.4, I will try compiling there, it's been a while since I've tried.

The error you're getting "expected function body after function declarator" is inside one of XCode's own headers which is confusing me a little.

The only few ways this could happen is if:

  • Apple headers are broken (has happened in the past...)
  • OPENGL_DEPRECATED is literally causing this (or is broken or missing an include header)
  • We (or one of our headers) are defining a macro with the same name as either GLAPI, APIENTRY or OPENGL_DEPRECATED and it is conflicting with Apple's
  • Our code, before including the header contains a syntax error, like an extra { or a missing semi-colon. If this is the case then the XCode 9.4 version should have the error too.

I will have to google what the multiple command error is, but it looks weird that XCode is basically saying that two RenderSystem_GL3Plus targets are conflicting with each other

from ogre-next.

crookedbard avatar crookedbard commented on August 21, 2024

Correct, I am using XCode 10 Beta on Macbook 12.
Is it possible to configure cmake so it would generate just metal renderer, without GL3PLUS?

from ogre-next.

crookedbard avatar crookedbard commented on August 21, 2024

Without GL3PLUS I still get a lot of build errors when building with Xcode...
OISInputManager.cpp Line 123
id obj = (id)strtoul(i->second.c_str(), 0, 10);

Cast of 'unsigned long' to 'id' is disallowed with ARC

Ogre 2.1 needs changes to work on macOS. And better guides how to build the source so it would work with xcode.

from ogre-next.

crookedbard avatar crookedbard commented on August 21, 2024

Also:

-- Configuring done
CMake Error at Dependencies/src/Remotery/CMakeLists.txt:12 (add_library):
Cannot find source file:

src/Remotery.mm

Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
.hxx .in .txx

CMake Error: CMake can not determine linker language for target: Remotery

I managed to fix this by editing: Dependencies/src/Remotery/CMakeList.txt Line 6

from:
set( Remotery_SOURCES ${Remotery_SOURCES} src/Remotery.mm )
to:
set( Remotery_SOURCES ${Remotery_SOURCES} src/RemoteryMetal.mm )

but then I get a different error:
-- Configuring done
CMake Warning (dev):
Policy CMP0042 is not set: MACOSX_RPATH is enabled by default. Run "cmake
--help-policy CMP0042" for policy details. Use the cmake_policy command to
set the policy and suppress this warning.

MACOSX_RPATH is not specified for the following targets:

Remotery

--
Undefined symbols for architecture x86_64:
"rmtMetal_usGetTime()", referenced from:
SetTimestamp(void*) in RemoteryMetal.o
"_rmtMetal_MeasureCommandBuffer", referenced from:
_MetalTimestamp_Begin in Remotery.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

from ogre-next.

crookedbard avatar crookedbard commented on August 21, 2024

And I have problems building OIS...

from ogre-next.

crookedbard avatar crookedbard commented on August 21, 2024

When running Samples_Tutorial01_Initialization
I get this error:

Loading library RenderSystem_Metal
An exception has occured: OGRE EXCEPTION(7:InternalErrorException): 
Could not load dynamic library RenderSystem_Metal.  System Error: 
dlopen(/Users/dkr/Documents/Bitbucket/ogre/Build/bin/Debug/Sample_Tutorial01_Initialization.app/Contents/Frameworks//RenderSystem_Metal.framework/RenderSystem_Metal, 9): 
image not found in DynLib::load at /Users/dkr/Documents/Bitbucket/ogre/OgreMain/src/OgreDynLib.cpp (line 112)
Program ended with exit code: 255

from ogre-next.

scpeters avatar scpeters commented on August 21, 2024

We (or one of our headers) are defining a macro with the same name as either GLAPI, APIENTRY or OPENGL_DEPRECATED and it is conflicting with Apple's

I see #define APIENTRY and #define GLAPI in the following header:

https://github.com/OGRECave/ogre/blob/master/RenderSystems/GL3Plus/include/GL/glcorearb.h#L46-L54

from ogre-next.

scpeters avatar scpeters commented on August 21, 2024
  • OPENGL_DEPRECATED is literally causing this (or is broken or missing an include header)

I think this is the problem; the fix for us is to include <OpenGL/OpenGLAvailability.h> before <OpenGL/gl3ext.h> in OgreGL3PlusPrerequisites.h.

https://bitbucket.org/sinbad/ogre/pull-requests/857/include-openglavailabilityh-before-gl3exth/diff

from ogre-next.

darksylinc avatar darksylinc commented on August 21, 2024

I'm closing it since Ogre-Next is building with XCode 13 now.

from ogre-next.

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.