Opened 15 months ago
Closed 10 months ago
#71644 closed defect (fixed)
fpm install fails
| Reported by: | blueforceconsulting | Owned by: | barracuda156 |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | |
| Keywords: | Cc: | kamischi (Karl-Michael Schindler) | |
| Port: | fpm |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
Trying to install fpm
Sequoia 15.2
Xcode 16.2
sudo port install fpm gives fatal error:
There is no specific subroutine for the generic 'set_string' at (1)
I did a clean but problem persists.
Attachments (4)
Change History (36)
comment:1 follow-up: 4 Changed 15 months ago by blueforceconsulting
comment:2 Changed 15 months ago by ryandesign (Ryan Carsten Schmidt)
| Description: | modified (diff) |
|---|---|
| Owner: | set to barracuda156 |
| Port: | fpm added |
| Status: | new → assigned |
Please attach the main.log file.
Changed 15 months ago by blueforceconsulting
comment:4 Changed 15 months ago by barracuda156
Replying to blueforceconsulting:
FWIW, I get the same error with Homebrew
Unsurprisingly, since it is an upstream bug: https://github.com/fortran-lang/fpm/issues/1059
comment:5 Changed 15 months ago by barracuda156
Replying to blueforceconsulting:
Done
Thank you for reporting and the log.
Perhaps it may be helpful to ping upstream there so that they finally make a new release (the way how fpm is built makes it painful to use local patching). I opened an issue 6 months ago, and yet nothing so far.
comment:6 follow-up: 7 Changed 15 months ago by blueforceconsulting
Thank you. I will ping fpm.
Thanks for helping on a holiday. it is greatly appreciated.
comment:7 Changed 15 months ago by barracuda156
Replying to blueforceconsulting:
Thank you. I will ping fpm.
It is really desirable to move all Fortran ports to gcc14, otherwise they probably won't build on < 10.6 now, and otherwise require a whole of separate gcc, which required compilation time and disk space.
comment:8 follow-up: 10 Changed 15 months ago by blueforceconsulting
FYI. The official guidance on how to fix the problem on the FPM site is to drop back to 0.8.0 for now. My challenge is that I don't know enough about git and MacPorts to clone the right git and then force MacPorts to do its thing.
comment:9 Changed 15 months ago by ryandesign (Ryan Carsten Schmidt)
comment:10 Changed 15 months ago by barracuda156
Replying to blueforceconsulting:
FYI. The official guidance on how to fix the problem on the FPM site is to drop back to 0.8.0 for now. My challenge is that I don't know enough about git and MacPorts to clone the right git and then force MacPorts to do its thing.
Is gcc13 still broken on macOS 15 though? Or does it also fail with gcc13 on it?
comment:11 Changed 15 months ago by blueforceconsulting
I looked at the wiki howto, but I don't know enough about git to get it to work with 0.8.0
I have no idea about gcc13 and macOS 15. All I know is what is in the Main.log that I attached here.
I'm just trying to install fortran-csv-module from github and it needs fpm to install.
comment:12 Changed 15 months ago by blueforceconsulting
I bore down and read deeper into Macports and git and finally got to the point where I created the devel/fpm directory.
When I did the sudo port install from the /devel/fpm folder I saw the gcc12 warning.
Question: as you alluded to, I am running Gfortran 14. So what happens if I accept the risks and run the older 0.8.0 fpm install? Will the gcc12 effect ripple through all my other code? Or does it just affect what happens when I use fpm to install fortran-csv-module?
Changed 15 months ago by blueforceconsulting
| Attachment: | main.2.log added |
|---|
comment:13 follow-up: 14 Changed 15 months ago by blueforceconsulting
FWIW, I tried the gcc12 install of fpm, and it also failed. The main.log is attached here.
So, at this point, unless I try 0.9.0 I'm stuck and won't be able to install fortran-csv-module.
Jeff
comment:14 Changed 15 months ago by barracuda156
Replying to blueforceconsulting:
FWIW, I tried the gcc12 install of fpm, and it also failed. The main.log is attached here.
So, at this point, unless I try 0.9.0 I'm stuck and won't be able to install fortran-csv-module.
Jeff
Let me see if I can find a way to get the patch into the build system.
comment:15 follow-up: 16 Changed 15 months ago by blueforceconsulting
That would be incredible! Thank you so much for your help.
Jeff
comment:16 Changed 15 months ago by barracuda156
Replying to blueforceconsulting:
That would be incredible! Thank you so much for your help.
Unfortunately, contrary to the upstream statement in the ticket, it is still broken. I thought to make fpm-devel subport for you from the latest commit, but it also fails:
* tag 1.0.1 -> FETCH_HEAD
[ 0%] filesystem_utilities.c
[ 1%] filesystem_utilities.c done.
[ 1%] fpm_backend_console.f90
[ 2%] fpm_backend_console.f90 done.
[ 2%] fpm_os.c
[ 3%] fpm_os.c done.
[ 3%] fpm_strings.f90
[ 4%] fpm_strings.f90 done.
[ 4%] isatty.c
[ 5%] isatty.c done.
[ 5%] iscygpty.c
[ 6%] iscygpty.c done.
[ 6%] constants.f90
[ 7%] constants.f90 done.
[ 7%] version.f90
[ 8%] version.f90 done.
[ 8%] token.f90
[ 9%] token.f90 done.
[ 9%] M_CLI2.F90
[ 10%] M_CLI2.F90 done.
[ 10%] regex.f90
[ 12%] regex.f90 done.
[ 12%] version.f90
[ 13%] version.f90 done.
[ 13%] shlex_module.f90
[ 14%] shlex_module.f90 done.
[ 14%] error.f90
[ 15%] error.f90 done.
[ 15%] datetime.f90
[ 16%] datetime.f90 done.
[ 16%] error.f90
[ 17%] error.f90 done.
[ 17%] io.f90
[ 18%] io.f90 done.
[ 18%] fpm_environment.f90
[ 19%] fpm_environment.f90 done.
[ 19%] versioning.f90
[ 20%] versioning.f90 done.
[ 20%] utils.f90
[ 21%] utils.f90 done.
[ 21%] abc.f90
[ 23%] abc.f90 done.
[ 23%] fpm_filesystem.F90
[ 24%] fpm_filesystem.F90 done.
[ 24%] fpm_release.F90
[ 25%] fpm_release.F90 done.
[ 25%] terminal.f90
[ 26%] terminal.f90 done.
[ 26%] value.f90
[ 27%] value.f90 done.
[ 27%] lexer.f90
[ 28%] lexer.f90 done.
[ 28%] fpm_os.F90
[ 29%] fpm_os.F90 done.
[ 29%] installer.f90
[ 30%] installer.f90 done.
[ 30%] diagnostic.f90
[ 31%] diagnostic.f90 done.
[ 31%] list.f90
[ 32%] list.f90 done.
[ 32%] map.f90
[ 34%] map.f90 done.
[ 34%] node.f90
[ 35%] node.f90 done.
[ 35%] keyval.f90
[ 36%] keyval.f90 done.
[ 36%] sort.f90
[ 37%] sort.f90 done.
[ 37%] fpm_command_line.f90
[ 38%] fpm_command_line.f90 done.
[ 38%] context.f90
[ 39%] context.f90 done.
[ 39%] array_list.f90
[ 40%] array_list.f90 done.
[ 40%] ordered_map.f90
[ 41%] ordered_map.f90 done.
[ 41%] structure.f90
[ 42%] structure.f90 done.
[ 42%] lexer.f90
[ 43%] lexer.f90 done.
[ 43%] array.f90
[ 45%] array.f90 done.
[ 45%] table.f90
[ 46%] table.f90 done.
[ 46%] type.f90
[ 47%] type.f90 done.
[ 47%] ser.f90
[ 48%] ser.f90 done.
[ 48%] keyval.f90
[ 49%] keyval.f90 done.
[ 49%] merge.f90
[ 50%] merge.f90 done.
[ 50%] parser.f90
[ 51%] parser.f90 done.
[ 51%] ser.f90
[ 52%] ser.f90 done.
[ 52%] de.f90
[ 53%] de.f90 done.
[ 53%] array.f90
[ 54%] array.f90 done.
[ 54%] table.f90
[ 56%] table.f90 done.
[ 56%] path.f90
[ 57%] path.f90 done.
[ 57%] build.f90
[ 58%] build.f90 done.
[ 58%] tomlf.f90
[ 59%] tomlf.f90 done.
[ 59%] parser.f90
[ 60%] parser.f90 done.
[ 60%] jonquil.f90
[ 61%] jonquil.f90 done.
[ 61%] downloader.f90
[ 62%] downloader.f90 done.
[ 62%] toml.f90
[ 63%] toml.f90 done.
[ 63%] fpm_settings.f90
[ 64%] fpm_settings.f90 done.
[ 64%] git.f90
[ 65%] git.f90 done.
././src/fpm/git.f90:357:101:
357 | call set_string(table, "descriptor", descriptor_name(self%descriptor), error, 'git_target_t')
| 1
Error: There is no specific subroutine for the generic 'set_string' at (1)
<ERROR> Compilation failed for object " src_fpm_git.f90.o "
<ERROR> stopping due to failed compilation
STOP 1
Command failed: cd "/opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_fpm/fpm-devel/work/fpm-current" && FPM_CFLAGS="-Os -arch arm64" FPM_LDFLAGS="-L/opt/local/lib -Wl,-headerpad_max_install_names -arch arm64" /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_fpm/fpm-devel/work/fpm-current/install.sh
Exit code: 1
Error: Failed to build fpm-devel: command execution failed
Error: See /opt/local/var/macports/logs/_opt_svacchanda_SonomaPorts_devel_fpm/fpm-devel/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there
is a bug.
Error: Processing of port fpm-devel failed
I have replied in the issue now.
However, why don’t you try using gcc13, which seems to build on Sequoia: https://ports.macports.org/port/gcc13/details On Sonoma this works for me:
svacchanda@Sergeys-Air bin % port -v installed fpm The following ports are currently installed: fpm @0.10.1_0+gcc13 (active) requested_variants='+gcc13' platform='darwin 23' archs='arm64' date='2024-12-27T11:49:57+0800'
MacPorts does not respect compiler blacklist here, so what you should do instead is:
sudo port clean fpm sudo port install fpm +gcc13
And then install fortran-csv-module normally.
comment:17 Changed 15 months ago by blueforceconsulting
Thanks. I will try that right now. I didn't know that I could drop back to gcc13 just for the fpm build. Stand by. I will try it now.
Jeff
Changed 15 months ago by blueforceconsulting
| Attachment: | main.3.log added |
|---|
comment:18 follow-up: 19 Changed 15 months ago by blueforceconsulting
Just tried it. Still can't find set_string.
Main.log(3) attached.
comment:19 Changed 15 months ago by barracuda156
Replying to blueforceconsulting:
Just tried it. Still can't find set_string.
Main.log(3) attached.
Unless I miss something, it still uses gcc14.
To begin with, can you install gcc13? I mean, does it install? If it does, then either MacPorts unnecessarily prohibits from using it on macOS 15 or something went wrong locally (run port clean, try again).
comment:20 Changed 15 months ago by blueforceconsulting
Ahh ok. I just realized that. So I need to install gcc13?
comment:21 Changed 15 months ago by barracuda156
The log has fpm +gfortran, which would pick gcc14 (default compiler).
What you need is fpm +gcc13.
comment:22 follow-up: 23 Changed 15 months ago by blueforceconsulting
And will it just use gcc13 for the fpm install only? so that anything else I do will revert to 14?
comment:23 Changed 15 months ago by barracuda156
Replying to blueforceconsulting:
And will it just use gcc13 for the fpm install only? so that anything else I do will revert to 14?
All FPM packages default to +gcc13 anyway. Nothing else will be affected. You may need to edit the code here to allow using gcc13 though: https://github.com/macports/macports-ports/blob/master/_resources/port1.0/group/compilers-1.0.tcl (Assuming gcc13 installs.)
If gcc13 is broken on macOS 15 and FPM is broken with gcc14, then the only option seems to be to downgrade (or install in parallel) to Sonoma and avoid broken Xcode 16 (stay on Xcode 15).
comment:24 Changed 15 months ago by blueforceconsulting
Ahh I see. Let me try to install gcc13. I'll keep you posted.
Thanks for all your help.
Jeff
Changed 15 months ago by blueforceconsulting
| Attachment: | main.4.log added |
|---|
comment:25 Changed 15 months ago by blueforceconsulting
Ok. I did the gcc13 install. I do sudo port clean fpm. But when I do sudo port install fpm +gcc13 it apparently is not finding gcc13? Not sure.
Main.log(4) attached
comment:26 follow-up: 27 Changed 15 months ago by blueforceconsulting
Or do I need to drop back to Xcode15 too?
comment:27 Changed 15 months ago by barracuda156
Replying to blueforceconsulting:
Or do I need to drop back to Xcode15 too?
Sorry I was offline. If it is doable then yes, try that, and hopefully it is sufficient for the build time. I do not know why MacPorts still blacklists gcc13 when it builds fine. To make it available try editing compilers PortGroup in /opt/local/var/macports/sources, it should be in _resourses/port1.0/group. Or open a ticket here about gcc13 on macOS 15, so that the issue is fixed properly, and then you should be able to install fpm with it.
comment:28 Changed 15 months ago by blueforceconsulting
Hello. The fpm group came back to me with a fix (at least a workable, temporary one). They suggested that I git the latest fpm code (which has a fix for the set_string error as follows:
git clone https://github.com/fortran-lang/fpm.git cd fpm sh ./install.sh
That worked an installed a working fpm.
However, I had to then install fortran-csv outside of MacPorts by doing
git clone https://github.com/jacobwilliams/csv-fortran cd csv-fortran
the next step was weird though. I should have just been able to do: fpm build
However, terminal didn't recognize fpm so I had to create an instance of rpm inside the fortran-csv folder and invoke it with ./fpm build
What I don't understand is why fpm can't be invoked anywhere by just typing fpm with a command. Again, it's probably because I'm a relative newbie with coding at this level.
At any rate, fortran-csv is now working and is in my gfortran library.
Any guidance you can provide on the invoking of fpm would be most welcome. Otherwise, thank you for all your help!
I will open a ticket about gcc13 still being blacklisted in OS 15.
comment:29 Changed 15 months ago by barracuda156
If they finally fixed that in the master, it is better to make a -devel subport with it rather than create a total mess with your installation, IMO. To make a binary findable, its location should be on the PATH. I don’t think you should do that though. Enabling gcc13 will probably work, or I can make an updated port version for you (assuming the bug is fixed in upstream).
comment:30 Changed 15 months ago by blueforceconsulting
It's wonky with the kluged path. It does install, so it does appear that they fixed the master.
If you can make an updated port version that would be preferable for me.
Many thanks.
Jeff
comment:31 Changed 10 months ago by kamischi (Karl-Michael Schindler)
| Cc: | kamischi added |
|---|
comment:32 Changed 10 months ago by kamischi (Karl-Michael Schindler)
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |

FWIW, I get the same error with Homebrew