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

mingw and clang error #1654

Closed
3rav opened this issue Jul 25, 2024 · 9 comments
Closed

mingw and clang error #1654

3rav opened this issue Jul 25, 2024 · 9 comments
Assignees
Labels
is:bug Something looks wrong. plat:windows This is related to the Windows Operating system

Comments

@3rav
Copy link

3rav commented Jul 25, 2024

I try to build msys2/mingw packages I have this error only for clang with dynamic library (static are ok):

lib/libginkgo_device.dll.a  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
  clang++: warning: argument unused during compilation: '-Wa,-mbig-obj' [-Wunused-command-line-argument]
  ld.lld: error: undefined symbol: gko::batch::matrix::Ell<float, int>::Ell(std::__1::shared_ptr<gko::Executor const>, gko::batch_dim<2ull, unsigned long long> const&, int)
@yhmtsai
Copy link
Member

yhmtsai commented Sep 10, 2024

Thanks for reporting this.
Unfortunately, we did not try clang on windows before.
Could you share your configure setup with us?

@MarcelKoch MarcelKoch added is:bug Something looks wrong. plat:windows This is related to the Windows Operating system labels Nov 6, 2024
@MarcelKoch
Copy link
Member

@3rav any updates from your side? If not we might close this issue soonish.

@3rav
Copy link
Author

3rav commented Nov 7, 2024

The error still occurs in clang64: https://github.com/3rav/MINGW-packages/actions/runs/11712157728/job/32622223182

  clang++: warning: argument unused during compilation: '-Wa,-mbig-obj' [-Wunused-command-line-argument]
  ld.lld: error: undefined symbol: gko::batch::matrix::Ell<float, int>::Ell(std::__1::shared_ptr<gko::Executor const>, gko::batch_dim<2ull, unsigned long long> const&, int)
  >>> referenced by reference/CMakeFiles/ginkgo_reference.dir/solver/batch_bicgstab_kernels.cpp.obj:(gko::EnablePolymorphicObject<gko::batch::matrix::Ell<float, int>, gko::batch::BatchLinOp>::create_default_impl(std::__1::shared_ptr<gko::Executor const>) const)
  >>> referenced by reference/CMakeFiles/ginkgo_reference.dir/solver/batch_bicgstab_kernels.cpp.obj:(gko::EnablePolymorphicObject<gko::batch::matrix::Ell<float, int>, gko::batch::BatchLinOp>::clear_impl())
  >>> referenced by reference/CMakeFiles/ginkgo_reference.dir/solver/batch_cg_kernels.cpp.obj
  
  ld.lld: error: undefined symbol: gko::batch::matrix::Dense<float>::Dense(std::__1::shared_ptr<gko::Executor const>, gko::batch_dim<2ull, unsigned long long> const&)
  >>> referenced by reference/CMakeFiles/ginkgo_reference.dir/solver/batch_bicgstab_kernels.cpp.obj:(gko::EnablePolymorphicObject<gko::batch::matrix::Dense<float>, gko::batch::BatchLinOp>::create_default_impl(std::__1::shared_ptr<gko::Executor const>) const)
  >>> referenced by reference/CMakeFiles/ginkgo_reference.dir/solver/batch_bicgstab_kernels.cpp.obj:(gko::EnablePolymorphicObject<gko::batch::matrix::Dense<float>, gko::batch::BatchLinOp>::clear_impl())
  >>> referenced by reference/CMakeFiles/ginkgo_reference.dir/solver/batch_cg_kernels.cpp.obj

@yhmtsai
Copy link
Member

yhmtsai commented Nov 13, 2024

Hi @3rav, we have a fix in #1724 for this issue.
Could you check whether branch batch_dynamic_cast works for you?

@yhmtsai yhmtsai self-assigned this Nov 15, 2024
@3rav
Copy link
Author

3rav commented Nov 15, 2024

With this develope version I have this error:

  -- Configuring done (7.9s)
  CMake Error at examples/file-config-solver/CMakeLists.txt:11 (target_link_libraries):
    Target "file-config-solver" links to:
  
      nlohmann_json::nlohmann_json
  
    but the target was not found.  Possible reasons include:
  
      * There is a typo in the target name.
      * A find_package call is missing for an IMPORTED target.
      * An ALIAS target is missing.
  
  
  
  CMake Generate step failed.  Build files cannot be regenerated correctly.
  -- Generating done (0.2s)
  ==> ERROR: A failure occurred in build().
      Aborting...

@yhmtsai
Copy link
Member

yhmtsai commented Nov 18, 2024

@3rav Thanks for trying it. you can disable the example build by -DGINKGO_BUILD_EXAMPLES=OFF.
It is also be tracked in #1727

@3rav
Copy link
Author

3rav commented Nov 18, 2024

@3rav Thanks for trying it. you can disable the example build by -DGINKGO_BUILD_EXAMPLES=OFF. It is also be tracked in #1727

Now is OK!:

image

@yhmtsai
Copy link
Member

yhmtsai commented Nov 18, 2024

Thank you for confirmation!

@yhmtsai
Copy link
Member

yhmtsai commented Nov 22, 2024

close this pr as #1724 merged.

@yhmtsai yhmtsai closed this as completed Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is:bug Something looks wrong. plat:windows This is related to the Windows Operating system
Projects
None yet
Development

No branches or pull requests

3 participants