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

NINJA/MacOS: warning: multiple rules generate ... builds involving this target will not be correct; #145

Closed
crjc opened this issue Oct 7, 2020 · 2 comments

Comments

@crjc
Copy link

crjc commented Oct 7, 2020

Hi,

I'm trying to set up the latest release of Ogre to build via Vcpkg on MacOS.

Ninja is complaining quite a bit so I can't get the build working. I'm not sure if anyone knows why there's multiple rules generating the following files?

I'm hoping its a simple fix that someone could help with, I need Vcpkg builds to work on MacOS before I can get my hands dirty with ogre-next!

Log from a modified version of Vcpkg to use an old version of ninja

ninja: warning: multiple rules generate lib/macosx/OgreMainStatic.framework/Versions/2.2.4/Headers/OgreTagPoint.h. builds involving this target will not be correct; continuing anyway [-w dupbuild=warn]
ninja: warning: multiple rules generate lib/macosx/OgreMainStatic.framework/Versions/2.2.4/Headers/OgreAabb.h. builds involving this target will not be correct; continuing anyway [-w dupbuild=warn]
ninja: warning: multiple rules generate lib/macosx/OgreMainStatic.framework/Versions/2.2.4/Headers/OgreArrayAabb.h. builds involving this target will not be correct; continuing anyway [-w dupbuild=warn]
ninja: warning: multiple rules generate lib/macosx/OgreMainStatic.framework/Versions/2.2.4/Headers/OgreArrayMatrix4.h. builds involving this target will not be correct; continuing anyway [-w dupbuild=warn]
ninja: warning: multiple rules generate lib/macosx/OgreMainStatic.framework/Versions/2.2.4/Headers/OgreArrayMatrixAf4x3.h. builds involving this target will not be correct; continuing anyway [-w dupbuild=warn]
ninja: warning: multiple rules generate lib/macosx/OgreMainStatic.framework/Versions/2.2.4/Headers/OgreArrayQuaternion.h. builds involving this target will not be correct; continuing anyway [-w dupbuild=warn]
ninja: warning: multiple rules generate lib/macosx/OgreMainStatic.framework/Versions/2.2.4/Headers/OgreArraySphere.h. builds involving this target will not be correct; continuing anyway [-w dupbuild=warn]
ninja: warning: multiple rules generate lib/macosx/OgreMainStatic.framework/Versions/2.2.4/Headers/OgreArrayVector3.h. builds involving this target will not be correct; continuing anyway [-w dupbuild=warn]
ninja: warning: multiple rules generate lib/macosx/OgreMainStatic.framework/Versions/2.2.4/Headers/OgreBooleanMask.h. builds involving this target will not be correct; continuing anyway [-w dupbuild=warn]
ninja: warning: multiple rules generate lib/macosx/OgreMainStatic.framework/Versions/2.2.4/Headers/OgreArrayAabb.h. builds involving this target will not be correct; continuing anyway [-w dupbuild=warn]
ninja: warning: multiple rules generate lib/macosx/OgreMainStatic.framework/Versions/2.2.4/Headers/OgreArrayMatrix4.h. builds involving this target will not be correct; continuing anyway [-w dupbuild=warn]
ninja: warning: multiple rules generate lib/macosx/OgreMainStatic.framework/Versions/2.2.4/Headers/OgreArrayMatrixAf4x3.h. builds involving this target will not be correct; continuing anyway [-w dupbuild=warn]
ninja: warning: multiple rules generate lib/macosx/OgreMainStatic.framework/Versions/2.2.4/Headers/OgreArrayQuaternion.h. builds involving this target will not be correct; continuing anyway [-w dupbuild=warn]
ninja: warning: multiple rules generate lib/macosx/OgreMainStatic.framework/Versions/2.2.4/Headers/OgreArraySphere.h. builds involving this target will not be correct; continuing anyway [-w dupbuild=warn]
ninja: warning: multiple rules generate lib/macosx/OgreMainStatic.framework/Versions/2.2.4/Headers/OgreArrayVector3.h. builds involving this target will not be correct; continuing anyway [-w dupbuild=warn]
ninja: warning: multiple rules generate lib/macosx/OgreMainStatic.framework/Versions/2.2.4/Headers/OgreBooleanMask.h. builds involving this target will not be correct; continuing anyway [-w dupbuild=warn]
ninja: warning: multiple rules generate lib/macosx/OgreMainStatic.framework/Versions/2.2.4/Headers/OgreArrayAabb.inl. builds involving this target will not be correct; continuing anyway [-w dupbuild=warn]
ninja: warning: multiple rules generate lib/macosx/OgreMainStatic.framework/Versions/2.2.4/Headers/OgreArrayMatrix4.inl. builds involving this target will not be correct; continuing anyway [-w dupbuild=warn]
ninja: warning: multiple rules generate lib/macosx/OgreMainStatic.framework/Versions/2.2.4/Headers/OgreArrayMatrixAf4x3.inl. builds involving this target will not be correct; continuing anyway [-w dupbuild=warn]
ninja: warning: multiple rules generate lib/macosx/OgreMainStatic.framework/Versions/2.2.4/Headers/OgreArrayQuaternion.inl. builds involving this target will not be correct; continuing anyway [-w dupbuild=warn]
ninja: warning: multiple rules generate lib/macosx/OgreMainStatic.framework/Versions/2.2.4/Headers/OgreArraySphere.inl. builds involving this target will not be correct; continuing anyway [-w dupbuild=warn]
ninja: warning: multiple rules generate lib/macosx/OgreMainStatic.framework/Versions/2.2.4/Headers/OgreArrayVector3.inl. builds involving this target will not be correct; continuing anyway [-w dupbuild=warn]
ninja: warning: multiple rules generate lib/macosx/OgreMainStatic.framework/Versions/2.2.4/Headers/OgreBooleanMask.inl. builds involving this target will not be correct; continuing anyway [-w dupbuild=warn]

Log from latest Vcpkg:

CMake Error:
  Running

   '.../vcpkg/downloads/tools/ninja-1.10.1-osx/ninja' '-C' '.../vcpkg/buildtrees/ogre-next/x64-osx-mixed-dbg' '-t' 'cleandead'

  failed with:

   ninja: error: build.ninja:788: multiple rules generate lib/macosx/OgreMainStatic.framework/Versions/2.2.4/Headers/OgreTagPoint.h [-w dupbuild=err]


CMake Error:
  Running

   '.../vcpkg/downloads/tools/ninja-1.10.1-osx/ninja' '-C' '.../vcpkg/buildtrees/ogre-next/x64-osx-mixed-dbg' '-t' 'recompact'

  failed with:

   ninja: error: build.ninja:788: multiple rules generate lib/macosx/OgreMainStatic.framework/Versions/2.2.4/Headers/OgreTagPoint.h [-w dupbuild=err]

@darksylinc
Copy link
Member

darksylinc commented Oct 7, 2020

Hi!

This error started when the new XCode build system appeared (I think it was in XCode 11? or was it 10?)

The new XCode build system has trouble dealing with two files with identical names but in different folders.

This happens with our SIMD implementation when we add both SSE and NEON when OGRE_SIMD_SSE2 and OGRE_SIMD_NEON are both set; and pick the proper one using macros at compile time.

One workaround is to untick both options from CMake.

The proper solution would be automatically choose between C, SSE and NEON at CMake-time and merge OGRE_SIMD_SSE2 and OGRE_SIMD_NEON into a single flag OGRE_SIMD.

Edit: It also seems we have two files named OgreTagPoint.h in different folders :(

@crjc
Copy link
Author

crjc commented Oct 9, 2020

Hi, thanks for your reply :)

I've since got the latest Ogre building fine on macOS via Vcpkg (with hacky patches)

A few of the files under OgreMain/include/Math/Array share duplicate names - as a temporary fix I patched the C files to use an original name
e.g. OgreMain/include/Math/Array/OgreArrayAabb.h and OgreMain/include/Math/Array/C/OgreArrayAabb.h
became OgreMain/include/Math/Array/OgreArrayAabb.h and OgreMain/include/Math/Array/C/OgreArrayAabbC.h

I also renamed the OgreTagPoint.h file that used the v1 namespace to OgreTagPointV1.h, although I think I've spotted a convention in Ogre where the legacy file keeps the original name and the new version appends '2' (e.g. OgreTagPoint2.h).

Also I'd like to check - should the GL3Plus render system be building for Mac?

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

No branches or pull requests

2 participants