Can't install fortran project on Github Action

Error while trying to execute “fpm install” command. “fpm build” compiles correctly.

      + mkdir -p /home/runner/work/Fortran77-Cloud-Model/Fortran77-Cloud-Model/build/python/lib
      # Update: build/gfortran_C084E46DFA825907/cloudsim/libcloudsim.a -> /home/runner/work/Fortran77-Cloud-Model/Fortran77-Cloud-Model/build/python/lib
      realloc(): invalid old size
      Program received signal SIGABRT: Process abort signal.
      
      Backtrace for this error:
      
      Could not print backtrace: unrecognized DWARF version in .debug_info at 6
      #0  0x7fec3321ce3a
      #1  0x7fec3321c013
      #2  0x7fec32a4251f
      #3  0x7fec32a969fc
      #4  0x7fec32a42475
      #5  0x7fec32a287f2
      #6  0x7fec32a89675
      #7  0x7fec32aa0cfb
      #8  0x7fec32aa4c6b
      #9  0x7fec32aa5861
      #10  0x5429b2
      #11  0x477ae3
      #12  0x54801b
      #13  0x40250e
      #14  0x7fec32a29d8f
      #15  0x7fec32a29e3f
      #16  0x40253e
      #17  `0xffffffffffffffff`

Expected Behaviour

It should execute the “fpm install” command correctly

Version of fpm

0.10.1

Platform and Architecture

Github Action, Ubuntu-Lastest

Additional Information

1 Like

Thanks for the bug report and welcome to the forum!

Can you post a link to your CI configuration and the failure? The failure that I can see at the CI link you sent is:

ERROR: Directory '.' is not installable. Neither 'setup.py' nor 'pyproject.toml' found.

Which is some other error.

Hi! Im sorry, wrong link.
This is the correct one: gcc 10 · Diegoolei/Fortran77-Cloud-Model@4798c07 (github.com)

Here is the relevant stacktrace:

[ 88%]                  libcloudsim.a  done.
[ 88%]                       main.f90
[ 94%]                       main.f90  done.
[ 94%]                          model
[100%]                          model  done.
[100%] Project compiled successfully.
 + mkdir -p build/python/lib
# Update: build/gfortran_63E63B2712D76620/cloudsim/libcloudsim.a -> build/python/lib
realloc(): invalid old size

Program received signal SIGABRT: Process abort signal.

Backtrace for this error:
#0  0x54b790 in ???
#1  0x54adc5 in ???
#2  0x59776f in ???
#3  0x5b7ebc in ???
#4  0x5976f5 in ???
#5  0x401333 in ???
#6  0x5b1bf5 in ???
#7  0x5b87ab in ???
#8  0x5bc6fb in ???
#9  0x5bd3c8 in ???
#10  0x500ed2 in __fpm_targets_MOD_filter_modules
	at ././src/fpm_targets.f90:1073
#11  0x4a6cd2 in install_module_files
	at ././src/fpm/cmd/install.f90:115
#12  0x4a6cd2 in __fpm_cmd_install_MOD_cmd_install
	at ././src/fpm/cmd/install.f90:67
#13  0x4026dd in MAIN__
	at app/main.f90:84
#14  0x401b4e in main
	at app/main.f90:13
/home/runner/work/_temp/7f40251b-c005-4e5f-87c9-2b9bcd03eeb0.sh: line 1:  4347 Aborted                 (core dumped) fpm install --profile release --prefix build/python
Error: Process completed with exit code 134.

I think this is a bug in fpm it seems, or it is miscompiled. Either way, can you please report it into an issue at the fpm repository?

Then it needs to be isolated (create a minimal reproducible example) and fixed.

1 Like

Hi! I’m working with @Diegoolei on this project, we intend to make a distributable Python API for his project using GitHub Actions to compile for different Python versions and OSs. fpm already proven to be a great tool for this on another project with the same kind of workflow.

What we found weird is that cloning the package and installing it locally didn’t give us any problem, this only happens when running on the GitHub Action so it is tough to isolate. What we can see is that it seems to be somehow related to how fpm manages the compiled modules paths at the moment of moving files from the build directory to the setup (or default) prefix

2 Likes