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) fix a bunch of weird link failures with ifort on Mac OS #420

Merged
merged 2 commits into from
May 17, 2023

Conversation

danieljprice
Copy link
Owner

Type of PR:
Build failures fixed, closes #292 and #293

Description:
A bunch of phantom utilities fail to compile using ifort on Mac OS, with typical errors like:

Undefined symbols for architecture x86_64:
  "_options_mp_alpha_", referenced from:
      _readwrite_dumps_fortran_mp_fill_header_ in libphantom.a(readwrite_dumps_fortran.o)
      _readwrite_dumps_fortran_mp_write_smalldump_fortran_ in libphantom.a(readwrite_dumps_fortran.o)
      _readwrite_dumps_fortran_mp_write_fulldump_fortran_ in libphantom.a(readwrite_dumps_fortran.o)
      _readwrite_dumps_common_mp_check_arrays_ in libphantom.a(readwrite_dumps_common.o)
  "_options_mp_alphab_", referenced from:
      _readwrite_dumps_fortran_mp_fill_header_ in libphantom.a(readwrite_dumps_fortran.o)
      _readwrite_dumps_fortran_mp_write_smalldump_fortran_ in libphantom.a(readwrite_dumps_fortran.o)
      _readwrite_dumps_fortran_mp_write_fulldump_fortran_ in libphantom.a(readwrite_dumps_fortran.o)
  "_options_mp_alphau_", referenced from:
      _readwrite_dumps_fortran_mp_fill_header_ in libphantom.a(readwrite_dumps_fortran.o)
      _readwrite_dumps_fortran_mp_write_smalldump_fortran_ in libphantom.a(readwrite_dumps_fortran.o)
      _readwrite_dumps_fortran_mp_write_fulldump_fortran_ in libphantom.a(readwrite_dumps_fortran.o)

this is a weird failure as these .o files are clearly present in the library being linked. It is ONLY an issue with ifort and ONLY on a Mac, possibly due to some conflict with the linker being used?

the workaround in any case is to add the relevant .o files explicitly in the object file list for the utilities being linked. This is rather ugly but better than the build failing. It also seems random which .o files need to be added

Testing (on an intel Mac):

export SYSTEM=ifort
export SETUP=test
make setup
make analysis
make moddump
make utils

Did you run the bots? no

Did you update relevant documentation in the docs directory? no

@danieljprice danieljprice merged commit 3b47a74 into master May 17, 2023
177 checks passed
@danieljprice danieljprice deleted the ifort-mac branch May 17, 2023 20:02
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

Successfully merging this pull request may close these issues.

moddump build failure with SETUP=tde
1 participant