Opened 7 months ago

Closed 7 months ago

Last modified 7 months ago

#69857 closed defect (fixed)

R-RoBMA @3.1.0: ld: library 'gfortran' not found

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: barracuda156
Priority: Normal Milestone:
Component: ports Version: 2.9.3
Keywords: Cc:
Port: R-RoBMA

Description

https://build.macports.org/builders/ports-14_x86_64-builder/builds/36673/steps/install-port/logs/stdio

ld: warning: search path '/opt/local/lib/gcc13/gcc/x86_64-apple-darwin23/13.2.0' not found
ld: warning: search path '/opt/local/lib/gcc13' not found
ld: library 'gfortran' not found
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [RoBMA.so] Error 1
ERROR: compilation failed for package ‘RoBMA’
* removing ‘/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_R_R-RoBMA/R-RoBMA/work/.tmp/Rtmpb3wYzj/Rinst90d345761037/RoBMA’
      -----------------------------------
ERROR: package installation failed

Change History (5)

comment:1 Changed 7 months ago by barracuda156

Well, the fix is easy, adding compilers.setup require_fortran into the portfile.

What I do not understand (and I have noticed this happenning a couple of times with some ports) is why only some configurations all of a sudden decide to link to libgfortran but not others. This port passed CI earlier, which means it did not ask for libgfortran that time.

comment:2 Changed 7 months ago by barracuda156

Resolution: fixed
Status: assignedclosed

In 044ec35eb1fe87785d5fc4c2e797fd0cdf6c7a95/macports-ports (master):

R-RoBMA: link to libgfortran, revbump

Closes: #69857

comment:3 Changed 7 months ago by kencu (Ken)

the problem is likely in the R portgroup.

this build asked for the (newly updated) +gcc13 variant of this port, was told that a +gcc13 variant does not exist, and then failed when it couldn’t link against it.

If you’ve seen this elsewhere as well, then there is something to sort out in that PG.

comment:4 in reply to:  3 Changed 7 months ago by barracuda156

Replying to kencu:

the problem is likely in the R portgroup.

this build asked for the (newly updated) +gcc13 variant of this port, was told that a +gcc13 variant does not exist, and then failed when it couldn’t link against it.

If you’ve seen this elsewhere as well, then there is something to sort out in that PG.

+gcc13 is only added when there is compiler.setup configure_fortran in the portfile. Which is handled by compilers PG, not R PG.

comment:5 Changed 7 months ago by kencu (Ken)

gcc13 was requested in the first failed build, which was before you added this to the Portfile:

compiler.setup configure_fortran

https://build.macports.org/builders/ports-14_x86_64-builder/builds/36673/steps/install-port/logs/stdio

right here:

DEBUG: Requested variant +gcc13 is not provided by port R-RoBMA.

and -- the R PortGroup includes the compilers PortGroup when it runs:

https://github.com/macports/macports-ports/blob/4bb83723f6773121eca03ac297b8963c1aaa7c51/_resources/port1.0/group/R-1.0.tcl#L8

So -- back to what I said -- if you are seeing this issue in other places as you said you were, and if you have no idea what might be wrong as you said -- the issue looks likely to be somewhere in the R PortGroup.

Note: See TracTickets for help on using tickets.