<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class="">Having looked at the examples, this one is similar to what I tried (and fails to build):</div><div class=""><br class=""></div><div class=""><div class="">compilers.choose fc cc</div><div class="">compilers.setup require_fortran -g95 -clang</div></div><div class=""><br class=""></div><div class="">:info:build make: *** [ccx_2.18.a] Error 1</div><div class=""><div class="">:info:build make: Leaving directory `/opt/local/var/macports/build/_Users_marbre_ports_cad_CalculiX-ccx/CalculiX-ccx/work/ccx_2.18/src'</div><div class="">:info:build Command failed: cd "/opt/local/var/macports/build/_Users_marbre_ports_cad_CalculiX-ccx/CalculiX-ccx/work/ccx_2.18/src" && /usr/bin/make -j1 -w CC=/usr/bin/clang FC= CFLAGS="-O2 -I../../spooles-2.2/ -DARCH=Linux -DSPOOLES -DARPACK -DMATRIXSTORAGE -DUSE_MT=1" DIR="../../spooles-2.2" </div><div class="">:info:build Exit code: 2</div><div class="">:error:build Failed to build CalculiX-ccx: command execution failed</div><div class="">:debug:build Error code: CHILDSTATUS 48534 2</div><div class="">:debug:build Backtrace: command execution failed</div><div class="">:debug:build while executing</div><div class="">:debug:build "system {*}$notty {*}$callback {*}$nice $fullcmdstring"</div><div class="">:debug:build invoked from within</div><div class="">:debug:build "command_exec -callback portprogress::target_progress_callback build"</div><div class="">:debug:build (procedure "portbuild::build_main" line 8)</div><div class="">:debug:build invoked from within</div><div class="">:debug:build "$procedure $targetname"</div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">whereas adding a whitelist succeeds (using gfortran):</div><div class=""><br class=""></div><div class=""><div class="">compiler.whitelist macports-gcc-11</div><div class="">compilers.choose fc cc</div><div class="">compilers.setup require_fortran -g95 -clang</div></div><div class=""><br class=""></div><div class="">Is this a difference between mp and apple gcc?</div><div class=""><br class=""></div><br class=""><div class="">
<div class="">Mark Brethen</div><div class=""><a href="mailto:mark.brethen@gmail.com" class="">mark.brethen@gmail.com</a></div><div class=""><br class=""></div><br class="Apple-interchange-newline">
</div>
<div><br class=""><blockquote type="cite" class=""><div class="">On Jul 3, 2022, at 2:50 PM, David Strubbe <<a href="mailto:dstrubbe@macports.org" class="">dstrubbe@macports.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hello Mark,<div class=""><br class=""></div><div class="">I think you may have a basic misunderstanding here. The compilers portgroup provides variants that select compilers, rather than being a way to select the compiler in the portfile. It will provide gcc/gfortran (in specific versions). If something like clang doesn't work, you remove it from the variants list. "active_variants" is about compatibility of compilers used by dependences. As far as I know, variants are definitely still the recommended way of handling compiler selection. I suggest you look at some examples to see how to use compilers portgroup. I made many in the science category, such as octopus, sparskit, berkeleygw, libxc.</div><font color="#888888" class=""><div class=""><br class=""></div><div class="">David</div></font></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jul 2, 2022 at 4:20 PM Mark Brethen <<a href="mailto:mark.brethen@gmail.com" class="">mark.brethen@gmail.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">This port does not have config, so I’m having to pass the build args. How do I specify a gcc (gfortran) compiler? Clang doesn’t work.<br class="">
<br class="">
Thanks,<br class="">
Mark<br class="">
<br class="">
<br class="">
<br class="">
> On Jul 2, 2022, at 2:21 PM, Mark Brethen <<a href="mailto:mark.brethen@gmail.com" target="_blank" class="">mark.brethen@gmail.com</a>> wrote:<br class="">
> <br class="">
> Still not working…<br class="">
> <main.log><br class="">
> <br class="">
> <br class="">
> Mark Brethen<br class="">
> <a href="mailto:mark.brethen@gmail.com" target="_blank" class="">mark.brethen@gmail.com</a><br class="">
> <br class="">
> <br class="">
> <br class="">
>> On Jul 2, 2022, at 2:15 PM, Mark Brethen <<a href="mailto:mark.brethen@gmail.com" target="_blank" class="">mark.brethen@gmail.com</a>> wrote:<br class="">
>> <br class="">
>> I should have looked at the active-variants tcl:<br class="">
>> <br class="">
>> require_active_variants arpack accelerate mpich<br class="">
>> <br class="">
>> should be<br class="">
>> <br class="">
>> require_active_variants arpack "accelerate mpich"<br class="">
>> <br class="">
>> Mark Brethen<br class="">
>> <a href="mailto:mark.brethen@gmail.com" target="_blank" class="">mark.brethen@gmail.com</a><br class="">
>> <br class="">
>> <br class="">
>> <br class="">
>>> On Jul 2, 2022, at 1:48 PM, Mark Brethen <<a href="mailto:mark.brethen@gmail.com" target="_blank" class="">mark.brethen@gmail.com</a>> wrote:<br class="">
>>> <br class="">
>>> Attaching log<br class="">
>>> <main.log><br class="">
>>> <br class="">
>>> Mark<br class="">
>>> <br class="">
>>> <br class="">
>>> <br class="">
>>>> On Jul 2, 2022, at 9:22 AM, Mark Brethen <<a href="mailto:mark.brethen@gmail.com" target="_blank" class="">mark.brethen@gmail.com</a>> wrote:<br class="">
>>>> <br class="">
>>>> I looked at the compilers PortGroup tcl but can’t figure out how to set up gcc (for gfortran). I tried setting "compilers.choose cc” and “compilers.setup require_fortran” but it continues to use clang.<br class="">
>>>> <br class="">
>>>> Thanks<br class="">
>>>> Mark<br class="">
>>>> <br class="">
>>>> <br class="">
>>> <br class="">
>> <br class="">
> <br class="">
<br class="">
</blockquote></div>
</div></blockquote></div><br class=""></body></html>