Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

build failed (link error) because C object file (stdlib_system_subprocess.c.o) is architecture x86_64 and not arm64 #1020

Closed
Labels
bugSomething isn't working
@sto3014

Description

Description

  • in shell change to stdlib repository
  • cmake -B build -G Ninja
  • cmake --build build

error:
Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: archive member: src/libfortran_stdlib.a(stdlib_system_subprocess.c.o) cputype (16777223) does not match previous archive members cputype (16777228) (all members must match).

with -DCMAKE_VERBOSE_MAKEFILE=on one can see that the compile flag -arch is set to x86_64:

  • /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -DSTDLIB_EXTERNAL_BLAS -DSTDLIB_EXTERNAL_LAPACK -I"/Users/dieterstockhausen/Library/Mobile Documents/com(削除) apple (削除ここまで)CloudDocs/Projekte/ThirdParty/Fortran/stdlib/build/src/mod_files" -O2 -g -DNDEBUG -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.5.sdk -fPIC -MD -MT src/CMakeFiles/fortran_stdlib.dir/stdlib_system_subprocess.c.o -MF src/CMakeFiles/fortran_stdlib.dir/stdlib_system_subprocess.c.o.d -o src/CMakeFiles/fortran_stdlib.dir/stdlib_system_subprocess.c.o -c '/Users/dieterstockhausen/Library/Mobile Documents/com(削除) apple (削除ここまで)CloudDocs/Projekte/ThirdParty/Fortran/stdlib/src/stdlib_system_subprocess.c'

If I take this command and change -arch to arm64 and compile stdlib_system_subprocess.c the linker is able to link libfortran_stdlib.a (I used the link command from the previous CMAKE logging).

This issue does not occur on Ubuntu 24.04.2 LTS (arm64).

Expected Behaviour

Do we need a fix, or is there a workaround for setting the architecture to arm64?

Version of stdlib

latest

Platform and Architecture

MacOS/ARM

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /