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 issue between GCC 13.3 and yafyaml 1.3.0 #77

Open
mathomp4 opened this issue Jun 24, 2024 · 1 comment
Open

Build issue between GCC 13.3 and yafyaml 1.3.0 #77

mathomp4 opened this issue Jun 24, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@mathomp4
Copy link
Collaborator

In trying to build Baselibs today on my Mac, yaFyaml did not build successfully:

[ 94%] Built target yafyaml
[ 95%] Linking Fortran executable to_json.x
Undefined symbols for architecture arm64:
  "_is_recursive.18.6", referenced from:
      ___fy_string_MOD_copyfromstring in libyafyaml.a[6](String.F90.o)
      ___fy_string_MOD_copyfromstring in libyafyaml.a[6](String.F90.o)
      ___fy_string_MOD_copyfromstring in libyafyaml.a[6](String.F90.o)
  "_is_recursive.22.5", referenced from:
      ___fy_string_MOD_copyself in libyafyaml.a[6](String.F90.o)
      ___fy_string_MOD_copyself in libyafyaml.a[6](String.F90.o)
      ___fy_string_MOD_copyself in libyafyaml.a[6](String.F90.o)
  "_is_recursive.9.12", referenced from:
      ___fy_stringnode_MOD_clone in libyafyaml.a[38](StringNode.F90.o)
      ___fy_stringnode_MOD_clone in libyafyaml.a[38](StringNode.F90.o)
      ___fy_stringnode_MOD_clone in libyafyaml.a[38](StringNode.F90.o)
ld: symbol(s) not found for architecture arm64
collect2: error: ld returned 1 exit status
make[2]: *** [yaFyaml/src/to_json.x] Error 1
make[1]: *** [yaFyaml/src/CMakeFiles/to_json.x.dir/all] Error 2
make: *** [all] Error 2

The odd thing is, yaFyaml had been building just fine with gfortran-13. But, recently, Homebrew (where I get gfortran-13) has updated to gfortran 13.3 and I'm guessing a brew upgrade pulled that down.

Further tests show that gfortran 12.3 and NAG Fortran 7.2 are fine still.

I'm trying to build on a Linux box gfortran 13.3 there and see if this is a macOS only issue or compiler issue. I'm leaning toward the latter only because the usual "Things are broken on macOS" fix of LDFLAGS=-Wl,-ld_classic didn't help here.

@mathomp4 mathomp4 added the bug Something isn't working label Jun 24, 2024
@mathomp4 mathomp4 changed the title Build issue between GCC 13.3 and yafyaml 1.3.0 on macOS Build issue between GCC 13.3 and yafyaml 1.3.0 Jun 24, 2024
@mathomp4
Copy link
Collaborator Author

I have confirmed this on Linux with spack and gcc 13.3:

     212    /usr/bin/ld: libyafyaml.a(StringNode.F90.o): in function `__fy_stringnode_MOD_clone':
  >> 213    /home/ubuntu/tmpdir/spack-stage/spack-stage-yafyaml-1.3.0-liavynzepcx6bhtpp5eiyh34r5bcm7cb/spack-src/src/Nodes/StringNode.F90:134:(.text+0x44e): undefined r
            eference to `is_recursive.9.12'
  >> 214    /usr/bin/ld: /home/ubuntu/tmpdir/spack-stage/spack-stage-yafyaml-1.3.0-liavynzepcx6bhtpp5eiyh34r5bcm7cb/spack-src/src/Nodes/StringNode.F90:151:(.text+0x463)
            : undefined reference to `is_recursive.9.12'
  >> 215    /usr/bin/ld: /home/ubuntu/tmpdir/spack-stage/spack-stage-yafyaml-1.3.0-liavynzepcx6bhtpp5eiyh34r5bcm7cb/spack-src/src/Nodes/StringNode.F90:149:(.text+0x544)
            : undefined reference to `is_recursive.9.12'
     216    /usr/bin/ld: libyafyaml.a(String.F90.o): in function `__fy_string_MOD_copyself':
  >> 217    /home/ubuntu/tmpdir/spack-stage/spack-stage-yafyaml-1.3.0-liavynzepcx6bhtpp5eiyh34r5bcm7cb/spack-src/src/String.F90:84:(.text+0x44a): undefined reference to
             `is_recursive.20.5'
  >> 218    /usr/bin/ld: /home/ubuntu/tmpdir/spack-stage/spack-stage-yafyaml-1.3.0-liavynzepcx6bhtpp5eiyh34r5bcm7cb/spack-src/src/String.F90:99:(.text+0x45c): undefined
             reference to `is_recursive.20.5'
  >> 219    /usr/bin/ld: /home/ubuntu/tmpdir/spack-stage/spack-stage-yafyaml-1.3.0-liavynzepcx6bhtpp5eiyh34r5bcm7cb/spack-src/src/String.F90:90:(.text+0x4f9): undefined
             reference to `is_recursive.20.5'
     220    /usr/bin/ld: libyafyaml.a(String.F90.o): in function `__fy_string_MOD_copyfromstring':
  >> 221    /home/ubuntu/tmpdir/spack-stage/spack-stage-yafyaml-1.3.0-liavynzepcx6bhtpp5eiyh34r5bcm7cb/spack-src/src/String.F90:93:(.text+0x54e): undefined reference to
             `is_recursive.18.6'
  >> 222    /usr/bin/ld: /home/ubuntu/tmpdir/spack-stage/spack-stage-yafyaml-1.3.0-liavynzepcx6bhtpp5eiyh34r5bcm7cb/spack-src/src/String.F90:108:(.text+0x560): undefine
            d reference to `is_recursive.18.6'
  >> 223    /usr/bin/ld: /home/ubuntu/tmpdir/spack-stage/spack-stage-yafyaml-1.3.0-liavynzepcx6bhtpp5eiyh34r5bcm7cb/spack-src/src/String.F90:99:(.text+0x5ee): undefined
             reference to `is_recursive.18.6'
  >> 224    collect2: error: ld returned 1 exit status
  >> 225    make[2]: *** [src/CMakeFiles/to_json.x.dir/build.make:102: src/to_json.x] Error 1
     226    make[2]: Leaving directory '/home/ubuntu/tmpdir/spack-stage/spack-stage-yafyaml-1.3.0-liavynzepcx6bhtpp5eiyh34r5bcm7cb/spack-build-liavynz'
  >> 227    make[1]: *** [CMakeFiles/Makefile2:353: src/CMakeFiles/to_json.x.dir/all] Error 2
     228    make[1]: Leaving directory '/home/ubuntu/tmpdir/spack-stage/spack-stage-yafyaml-1.3.0-liavynzepcx6bhtpp5eiyh34r5bcm7cb/spack-build-liavynz'
  >> 229    make: *** [Makefile:149: all] Error 2

So it's a compiler issue.

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

No branches or pull requests

2 participants