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

Cannot build in either Windows or linux #75

Open
lokitkhemka opened this issue Oct 26, 2024 · 3 comments
Open

Cannot build in either Windows or linux #75

lokitkhemka opened this issue Oct 26, 2024 · 3 comments

Comments

@lokitkhemka
Copy link

While building with windows, I keep getting error ´module not found´ for both netgen and ngsolve.

ln linux, while building with GUI I get python not found error, while it finds python just fine without gui.

I don't know if the codebase is dumb, or I am. Maybe that is why I don't deserve to live. I wish I were dead.....

@mhochsteger
Copy link
Member

Did you compile yourself or install with pip?
For self-compiled versions the errors could mean that cmake found one python version and you are using another at run-time.

You can check this on Linux with ldd, for instance on my machine:

ldd /opt/netgen/lib/python3.12/site-packages/ngsolve/ngslib.so | grep python

On Windows you can use dependencywalker and check ngslib.pyd.

No need to give up hope, I'm sure we can figure this out 😄

@lokitkhemka
Copy link
Author

lokitkhemka commented Oct 27, 2024

Thanks, I guess. My problem is bigger than one FEM repo. I love reading and learning FEA repos as a hobby, but only because I have tried and failed to get a job in this space. Is it any wonder I feel utterly useless?

During build process, I am getting error:

CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Python3 (missing: Development.Module)
Call Stack (most recent call first):
  /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.22/Modules/FindPython/Support.cmake:3180 (find_package_handle_standard_args)
  /usr/share/cmake-3.22/Modules/FindPython3.cmake:490 (include)
  CMakeLists.txt:89 (find_package)

I have python3, python3-dev all installed in my machine. So, I don't understand the error.

EDIT: As an added context, this only happens when USE_GUI is turned on in CMake.

@lokitkhemka
Copy link
Author

lokitkhemka commented Oct 27, 2024

When I try to build with USE_GUI turned off, I get bunch of error, trying to build pybind11. I hope this helps.

The error is as follows:

error: ‘PyUnicode_AsUTF8AndSize’ was not declared in this scope; did you mean ‘PyUnicode_AsUTF8String’?
  411 |    = reinterpret_cast<const CharT *>(PyUnicode_AsUTF8AndSize(load_src.ptr(), &size));
      |                                      ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~

This is just one of many errors, but it is indicative of the error. BTW, it is building pybind11, which is included in the repo.

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