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

Compilation error when using -ipo flag with Intel Fortran Compiler (ifx) in fpm #1094

Open
xinzhi-suoxiang opened this issue Dec 25, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@xinzhi-suoxiang
Copy link

Description

When compiling a Fortran project using fpm with Intel Fortran Compiler (ifx), an error occurs when the -ipo flag is used.
Minimal Reproducible Example

# In a bash shell on Ubuntu 22.04 running under WSL2
> fpm new test
> cd test
> fpm run --compiler ifx --flag "-O3 -r8 -qopenmp -mprefer-vector-width=512 -xHost -ipo"
test.f90                               done.
libtest.a                              done.
main.f90                               done.
test                                   failed.
[100%] Compiling...
ld: build/ifx_1B8B1D3CC2C223B8/test/libtest.a: error adding symbols: archive has no index; run ranlib to add one
<ERROR> Compilation failed for object " test "
<ERROR> stopping due to failed compilation
STOP 1

Expected Behaviour

The program should compile successfully with the -ipo flag.

Version of fpm

0.10.1

Platform and Architecture

Ubuntu 22.04 running under WSL2

Additional Information

# in bash
>ifx -V
Intel(R) Fortran Compiler for applications running on Intel(R) 64, Version 2024.2.1 Build 20240711
Copyright (C) 1985-2024 Intel Corporation. All rights reserved.
@xinzhi-suoxiang xinzhi-suoxiang added the bug Something isn't working label Dec 25, 2024
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

1 participant