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 failed for object " example_falseloc.exe " on Windows #941

Closed
Beliavsky opened this issue Feb 24, 2025 · 2 comments
Closed

Compilation failed for object " example_falseloc.exe " on Windows #941

Beliavsky opened this issue Feb 24, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@Beliavsky
Copy link

Description

On Windows, using GNU Fortran (GCC) 15.0.0 20241215 from equation.com,

python config/fypp_deployment.py --build

gave

...
[ 61%]                    libstdlib.a
[ 61%]                    libstdlib.a  done.
[ 61%]           example_falseloc.exe
[ 61%]           example_falseloc.exe  done.

C:/equation/bin/../lib/gcc/x86_64-w64-mingw32/15.0.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build\gfortran_354723F25F6374E2\stdlib\libstdlib.a: error adding symbols: archive has no index; run ranlib to add one
collect2.exe: error: ld returned 1 exit status
<ERROR> Compilation failed for object " example_falseloc.exe "
<ERROR> stopping due to failed compilation
STOP 1
Traceback (most recent call last):
  File "c:\fortran\public_domain\github\stdlib\config\fypp_deployment.py", line 174, in <module>
    fpm_build(args,unknown)
    ~~~~~~~~~^^^^^^^^^^^^^^
  File "c:\fortran\public_domain\github\stdlib\config\fypp_deployment.py", line 133, in fpm_build
    subprocess.run("fpm build"+
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^
                   " --compiler "+FPM_FC+
                   ^^^^^^^^^^^^^^^^^^^^^^
                   " --c-compiler "+FPM_CC+
                   ^^^^^^^^^^^^^^^^^^^^^^^^
                   " --cxx-compiler "+FPM_CXX+
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^
                   " --flag \"{}\"".format(flags), shell=True, check=True)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\Programs\Python313\Lib\subprocess.py", line 577, in run
    raise CalledProcessError(retcode, process.args,
                             output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command 'fpm build --compiler gfortran --c-compiler gcc --cxx-compiler gcc --flag "-cpp "' returned non-zero exit status 1.

Expected Behaviour

to compile

Version of stdlib

current

Platform and Architecture

Windows

Additional Information

No response

@Beliavsky Beliavsky added the bug Something isn't working label Feb 24, 2025
@jalvesz
Copy link
Contributor

jalvesz commented Mar 1, 2025

@Beliavsky I tested the latest snapshop of version 15 from equation.com, and got a different error:
stdlib_linalg_pinv.fypp line 77

do concurrent (i=1:m,j=1:k); u(i,j) = s(j)*u(i,j); end do

after changing this into its 3 lines

do concurrent (i=1:m,j=1:k)
     u(i,j) = s(j)*u(i,j)
end do

it compiled and the tests passed.

It seems to me as an instability on the snapshop side, the latest stable version 14 has no issues.

@Beliavsky
Copy link
Author

I downloaded the latest version of fpm, and the problem has disappeared. So this issue can be closed.

@jalvesz jalvesz closed this as completed Mar 18, 2025
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