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

Problem when creating dictionary in Osx 12.7, Xcode 14.2 #14595

Closed
1 task
atolosadelgado opened this issue Feb 5, 2024 · 9 comments · Fixed by #14619
Closed
1 task

Problem when creating dictionary in Osx 12.7, Xcode 14.2 #14595

atolosadelgado opened this issue Feb 5, 2024 · 9 comments · Fixed by #14619
Assignees
Labels

Comments

@atolosadelgado
Copy link
Contributor

atolosadelgado commented Feb 5, 2024

Check duplicate issues.

  • Checked for duplicates

Description

Dear experts,

The tutorial that shows how to create a dictionary root-master/tutorials/tree/dictionary do not compile in newer versions of Osx / Xcode. The error happens during the configuration:

cmake .. -G Xcode 
-- The C compiler identification is AppleClang 14.0.0.14000029
-- The CXX compiler identification is AppleClang 14.0.0.14000029
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done (12.8s)
-- Generating done (0.0s)
CMake Error in CMakeLists.txt:
  The custom command generating

    /Users/agramunt/Downloads/root-master/tutorials/tree/dictionary/xcode/G__data2Tree.cxx

  is attached to multiple targets:

    G__data2Tree
    data2TreeLib

  but none of these is a common dependency of the other(s).  This is not
  allowed by the Xcode "new build system".


CMake Generate step failed.  Build files cannot be regenerated correctly.

Reproducer

Try to compile the tutorial root-master/tutorials/tree/dictionary

ROOT version

fails with several versions in the same manner

------------------------------------------------------------------
  | Welcome to ROOT 6.26/14                        https://root.cern |
  | (c) 1995-2021, The ROOT Team; conception: R. Brun, F. Rademakers |
  | Built for macosx64 on Nov 28 2023, 00:39:39                      |
  | From tags/v6-26-14@v6-26-14                                      |
  | With Apple clang version 14.0.0 (clang-1400.0.29.202)            |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q'       |
   ------------------------------------------------------------------

Installation method

pre-built binary

Operating system

MacOS

Additional context

No response

@dpiparo
Copy link
Member

dpiparo commented Feb 6, 2024

Hi, I cannot reproduce.
If I follow the instructions in the readme (below point 1 and 2 together) the example configures, builds and runs fine: perhaps I am missing something?

cmake -B build -S . 
cmake --build build 
./build/treeExample

outputs

-> cmake -B build -S .
-- The C compiler identification is AppleClang 15.0.0.15000040
-- The CXX compiler identification is AppleClang 15.0.0.15000040
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Vdt: /foo/bar/baz (found version "0.4") 
-- Configuring done (6.9s)
-- Generating done (0.1s)
-- Build files have been written to: /foo/bar/eggs/build/tutorials/tree/dictionary/build

-> cmake --build build 
[ 11%] Generating G__data2Tree.cxx, libdata2Tree_rdict.pcm, libdata2Tree.rootmap
[ 22%] Building CXX object CMakeFiles/data2TreeLib.dir/data2Tree.cxx.o
[ 33%] Building CXX object CMakeFiles/data2TreeLib.dir/G__data2Tree.cxx.o
[ 44%] Linking CXX shared library libdata2TreeLib.dylib
[ 44%] Built target data2TreeLib
[ 55%] Building CXX object CMakeFiles/treeExample.dir/main.cpp.o
[ 66%] Building CXX object CMakeFiles/treeExample.dir/writeTree.cxx.o
[ 77%] Building CXX object CMakeFiles/treeExample.dir/readTree.cxx.o
[ 88%] Building CXX object CMakeFiles/treeExample.dir/readTreeDF.cxx.o
[100%] Linking CXX executable treeExample
[100%] Built target treeExample

-> ./build/treeExample
Starting writeTree()...
******************************************************************************
*Tree    :myTree    :                                                        *
*Entries :       10 : Total =            8451 bytes  File  Size =          0 *
*        :          : Tree compression factor =   1.00                       *
<snip>

@dpiparo dpiparo self-assigned this Feb 6, 2024
@atolosadelgado
Copy link
Contributor Author

Hi,

thanks for checking it! Could you try with the cmake builder for Xcode,

cmake -G Xcode -B build -S . 
cmake --build build 
./build/treeExample

@vepadulano
Copy link
Member

@atolosadelgado I can reproduce it (and many more similar errors) using the XCode generator. We need to investigate if this is possible to fix at all within our current build system. Would you perhaps know a bit more about why it behaves differently from traditional ones (e.g. Unix Makefiles, Ninja)?

@atolosadelgado
Copy link
Contributor Author

atolosadelgado commented Feb 7, 2024

It is fixed, I am opening a PR right now :)
Edit: here it is the PR #14619

@vepadulano
Copy link
Member

Thank you for the PR! I want to try it out on my Mac, but I never get to that same error actually, I am greeted by this one much before that (and multiple times)

CMake Error in core/clingutils/CMakeLists.txt:
  The custom command generating

    /Users/vpadulan/Programs/rootproject/rootbuild/gh-14595-minimal/core/clingutils/dummy.cxx

  is attached to multiple targets:

    vectorDict
    listDict
    forward_listDict
    dequeDict
    mapDict
    map2Dict
    unordered_mapDict
    multimapDict
    multimap2Dict
    unordered_multimapDict
    setDict
    unordered_setDict
    multisetDict
    unordered_multisetDict
    complexDict
    valarrayDict

  but none of these is a common dependency of the other(s).  This is not
  allowed by the Xcode "new build system".

Did you not get this error as well? That would be surprising

Copy link

Hi @vepadulano, @dpiparo,

It appears this issue is closed, but wasn't yet added to a project. Please add upcoming versions that will include the fix, or 'not applicable' otherwise.

Sincerely,
🤖

3 similar comments
Copy link

Hi @vepadulano, @dpiparo,

It appears this issue is closed, but wasn't yet added to a project. Please add upcoming versions that will include the fix, or 'not applicable' otherwise.

Sincerely,
🤖

Copy link

Hi @vepadulano, @dpiparo,

It appears this issue is closed, but wasn't yet added to a project. Please add upcoming versions that will include the fix, or 'not applicable' otherwise.

Sincerely,
🤖

Copy link

Hi @vepadulano, @dpiparo,

It appears this issue is closed, but wasn't yet added to a project. Please add upcoming versions that will include the fix, or 'not applicable' otherwise.

Sincerely,
🤖

@dpiparo dpiparo added this to Issues in Fixed in 6.32.00 via automation Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

3 participants