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

[Build] cannot create ALIAS target "nsync::nsync_cpp" #22092

Closed
zwillikon opened this issue Sep 13, 2024 · 1 comment · Fixed by #20413
Closed

[Build] cannot create ALIAS target "nsync::nsync_cpp" #22092

zwillikon opened this issue Sep 13, 2024 · 1 comment · Fixed by #20413
Labels
build build issues; typically submitted using template stale issues that have not been addressed in a while; categorized by a bot

Comments

@zwillikon
Copy link

zwillikon commented Sep 13, 2024

Describe the issue

ONNXRuntime's CMake can't configure nsync_cpp, despite it exists at my system at /usr/lib/cmake/nsync_cpp/nsync_cppConfig.cmake

The ArchLinux package has this patch and git master too meant to fix exactly my issue.

Urgency

stalling me from working with ONNX

Target platform

Linux

Build script

  cmake -S cmake \
    -B build \
    -Wno-dev \
    -G Ninja \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -Donnxruntime_ENABLE_PYTHON=ON \
    -Donnxruntime_BUILD_SHARED_LIB=ON \
    -Donnxruntime_BUILD_UNIT_TESTS=OFF \
    -DBUILD_TESTING=OFF
  cmake --build build

Error / output

CMake Error at external/onnxruntime_external_deps.cmake:352 (add_library):
  add_library cannot create ALIAS target "nsync::nsync_cpp" because target
  "nsync_cpp" does not already exist.
Call Stack (most recent call first):
  CMakeLists.txt:598 (include)

Visual Studio Version

No response

GCC / Compiler Version

14.2.1

@zwillikon zwillikon added the build build issues; typically submitted using template label Sep 13, 2024
Copy link
Contributor

This issue has been automatically marked as stale due to inactivity and will be closed in 30 days if no further activity occurs. If further support is needed, please provide an update and/or more details.

@github-actions github-actions bot added the stale issues that have not been addressed in a while; categorized by a bot label Oct 14, 2024
This was referenced Oct 18, 2024
snnn added a commit that referenced this issue Oct 21, 2024
### Description
1. Remove the onnxruntime::OrtMutex class and replace it with
~absl::Mutex~ std::mutex.
2. After this change, most source files will not include <Windows.h>
indirectly.


### Motivation and Context
To reduce the number of deps we have, and address some Github issues
that are related to build ONNX Runtime from source.
In PR #3000 , I added a custom implementation of std::mutex . It was
mainly because at that time std::mutex's default constructor was not
trivial on Windows. If you had such a mutex as a global var, it could
not be initialized at compile time. Then VC++ team fixed this issue.
Therefore we don't need this custom implementation anymore.

This PR also removes nsync. I ran several models tests on Linux. I
didn't see any perf difference.
This PR also reverts PR #21005 , which is no longer needed since conda
has updated its msvc runtime DLL.

This PR unblocks #22173 and resolves #22092 . We have a lot of open
issues with nsync. This PR can resolve all of them.
ishwar-raut1 pushed a commit to ishwar-raut1/onnxruntime that referenced this issue Nov 19, 2024
### Description
1. Remove the onnxruntime::OrtMutex class and replace it with
~absl::Mutex~ std::mutex.
2. After this change, most source files will not include <Windows.h>
indirectly.


### Motivation and Context
To reduce the number of deps we have, and address some Github issues
that are related to build ONNX Runtime from source.
In PR microsoft#3000 , I added a custom implementation of std::mutex . It was
mainly because at that time std::mutex's default constructor was not
trivial on Windows. If you had such a mutex as a global var, it could
not be initialized at compile time. Then VC++ team fixed this issue.
Therefore we don't need this custom implementation anymore.

This PR also removes nsync. I ran several models tests on Linux. I
didn't see any perf difference.
This PR also reverts PR microsoft#21005 , which is no longer needed since conda
has updated its msvc runtime DLL.

This PR unblocks microsoft#22173 and resolves microsoft#22092 . We have a lot of open
issues with nsync. This PR can resolve all of them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build build issues; typically submitted using template stale issues that have not been addressed in a while; categorized by a bot
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant