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

error when install pycrtm #15

Open
Shaofei-Wang224 opened this issue Dec 31, 2023 · 3 comments
Open

error when install pycrtm #15

Shaofei-Wang224 opened this issue Dec 31, 2023 · 3 comments
Assignees
Labels
bug Something is not working

Comments

@Shaofei-Wang224
Copy link

Hi,

When I installed pycrtm, some errors occurred. The information are shown in
install.log
setup.txt

Can you help me to solve this problem?

Thanks!

@karpob karpob self-assigned this Jan 4, 2024
@karpob
Copy link
Collaborator

karpob commented Jan 4, 2024

Could you list the contents of the following directory?
/home/wsf/mambaforge-pypy3/envs/pyarts-dev/include

I suspect the automatic netcdf locator may not work correctly depending on how netcdf is installed. I have not committed it to the master branch, but you may want to checkout and try the following bugfix:
bugfix/splitNetcdfInstallsSpack

https://github.com/JCSDA/pycrtm/tree/bugfix/splitNetcdfInstallsSpack

@karpob karpob added the bug Something is not working label Jan 4, 2024
@Shaofei-Wang224
Copy link
Author

Hi, @karpob

Thank you very much for you reply.

The contents of the /home/wsf/mambaforge-pypy3/envs/pyarts-dev/include are:
ls.log

I have tried the bugfix/splitNetcdfInstallsSpack, it works but another error occurred with the following information:
install.log

@karpob
Copy link
Collaborator

karpob commented Jan 5, 2024

The CRTM library you compiled needs an additional "-fPIC" flag in cmake/compiler_flags_GNU_Fortran.cmake
You can see this in the log:

pp/pycrtm/crtm/lib//libcrtm.a(CRTM_Atmosphere_Define.o): relocation R_X86_64_PC32 against symbol `__crtm_atmosphere_define_MOD_climatology_model_name' can not be used when making a shared object; recompile with -fPIC

You may have better luck with a more recent CRTM 2.4.0 release (if it is indeed alpha, it's a bit dated), however, for a quick fix I would check that -fPIC is in the CRTM library build in cmake/compiler_flags_GNU_Fortran.cmake

set( CMAKE_Fortran_LINK_FLAGS    "-fopenmp -fPIC" )

You may also need to add it to CMAKE_FORTRAN_FLAGS:

set( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS}  ...

Once you have added -fPIC you will need to recompile the CRTM library. Afterward proceed with the pyCRTM setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working
Projects
None yet
Development

No branches or pull requests

2 participants