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

/usr/bin/ld error when building Fortran interface code #675

Closed
strandwg opened this issue Oct 4, 2022 · 9 comments
Closed

/usr/bin/ld error when building Fortran interface code #675

strandwg opened this issue Oct 4, 2022 · 9 comments

Comments

@strandwg
Copy link

strandwg commented Oct 4, 2022

I'm getting an error when building my Fortran code against CMOR3.7:

/usr/bin/ld: /glade/work/strandwg/conda-envs/CMOR/lib/libcmor.a(cmor.o): unable to initialize decompress status for section .debug_info
/usr/bin/ld: /glade/work/strandwg/conda-envs/CMOR/lib/libcmor.a(cmor.o): unable to initialize decompress status for section .debug_info
/usr/bin/ld: /glade/work/strandwg/conda-envs/CMOR/lib/libcmor.a(cmor_fortran_interface.o): unable to initialize decompress status for section .debug_info
/usr/bin/ld: /glade/work/strandwg/conda-envs/CMOR/lib/libcmor.a(cmor_fortran_interface.o): unable to initialize decompress status for section .debug_info
/glade/work/strandwg/conda-envs/CMOR/lib/libcmor.a: error adding symbols: File format not recognized

I've never seen this kind of error. Any hints from anyone?

Thanks!

@durack1
Copy link
Contributor

durack1 commented Oct 4, 2022

@strandwg is this that same "gcc was built with disable-multilib on" error we hit back in early September?

@mauzey1
Copy link
Collaborator

mauzey1 commented Oct 4, 2022

@strandwg I'm not sure how exactly you are building your Fortran code with CMOR 3.7, but looking on Google for the "unable to initialize decompress status for section .debug_info" error shows several results talking about binutils-2.32. Which version of binutils are you using in your environment?

An example of the issue: https://wiki.gentoo.org/wiki/Project:Toolchain/Binutils_2.32_upgrade_notes/elfutils_0.175:_unable_to_initialize_decompress_status_for_section_.debug_info

@durack1
Copy link
Contributor

durack1 commented Oct 4, 2022

For reference - this was identified as a env/compiler conflict:

On Thu, Sep 8, 2022 at 4:35 PM Durack, Paul J. wrote:

This looks like an environment/platform/version issue to me

https://stackoverflow.com/questions/62405518/weird-error-when-compiling-32-bit-programs-with-gcc

Are you using a recent version of gfortran, and is this version aligned with the version used to compile CMOR on conda-forge (10.4.0 – see here)?

P

@strandwg
Copy link
Author

strandwg commented Oct 11, 2022 via email

@durack1
Copy link
Contributor

durack1 commented Oct 11, 2022

@strandwg any luck with gfortran 12.1.0?

@strandwg
Copy link
Author

The gfortran version doesn't matter - I get the same set of errors:

/usr/bin/ld: /glade/work/strandwg/conda-envs/CMOR/lib/libcmor.a(cmor.o): unable to initialize decompress status for section .debug_info
/usr/bin/ld: /glade/work/strandwg/conda-envs/CMOR/lib/libcmor.a(cmor.o): unable to initialize decompress status for section .debug_info
/usr/bin/ld: /glade/work/strandwg/conda-envs/CMOR/lib/libcmor.a(cmor_fortran_interface.o): unable to initialize decompress status for section .debug_info
/usr/bin/ld: /glade/work/strandwg/conda-envs/CMOR/lib/libcmor.a(cmor_fortran_interface.o): unable to initialize decompress status for section .debug_info
/glade/work/strandwg/conda-envs/CMOR/lib/libcmor.a: error adding symbols: File format not recognized

The other interesting thing is that I get the same errors simply linking in a "Hello, world" Fortran90 program, without calling any CMOR routines at all.

@durack1
Copy link
Contributor

durack1 commented Oct 12, 2022

@strandwg just to confirm have you tried to build with disable-multilib=on? see #675 (comment)

@mauzey1
Copy link
Collaborator

mauzey1 commented Oct 14, 2022

@strandwg

If you are using a conda environment to build your CMOR programs, then could you provide us a listing of packages in your environment? Use the command conda list -n <env_name>.

You might also want to try cleaning your build directory by running make distclean.

@durack1
Copy link
Contributor

durack1 commented Nov 28, 2022

@strandwg this issue seems to have become stale, so will close this out - please reopen if you still have a problem that requires attention

@durack1 durack1 closed this as completed Nov 28, 2022
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

3 participants