SPOOLES MT routines
Mark Brethen
mark.brethen at gmail.com
Fri Aug 5 22:45:48 UTC 2022
So, moving from a post-patch CFLAGS, etc to a pre-build build.args CalculiX now does not build. So I compared them.
Post-Patch:
:info:build Executing: cd "/opt/local/var/macports/build/_Users_marbre_ports_cad_CalculiX-ccx/CalculiX-ccx/work/ccx_2.18/src" && /usr/bin/make -j1 -w
:debug:build system: cd "/opt/local/var/macports/build/_Users_marbre_ports_cad_CalculiX-ccx/CalculiX-ccx/work/ccx_2.18/src" && /usr/bin/make -j1 -w
:info:build make: Entering directory `/opt/local/var/macports/build/_Users_marbre_ports_cad_CalculiX-ccx/CalculiX-ccx/work/ccx_2.18/src'
:info:build /opt/local/bin/mpicc-mpich-mp -Wall -O2 -pthread -Os -arch x86_64 -I../../SPOOLES.2.2 -DARCH="Linux" -DSPOOLES -DARPACK -DMATRIXSTORAGE -DUSE_MT=1 -DBLAS_LIBRARIES=vecLibFort -DLAPACK_LIBRARIES=vecLibFort -c ccx_2.18.c
Pre-Build:
:info:build Executing: cd "/opt/local/var/macports/build/_Users_marbre_ports_cad_CalculiX-ccx/CalculiX-ccx/work/ccx_2.18/src" && /usr/bin/make -j1 -w CFLAGS="-Os -arch x86_64" FFLAGS="-Os -m64 -fallow-argument-mismatch" LDFLAGS="-L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-rpath,/opt/local/lib/libgcc -arch x86_64"
:debug:build system: cd "/opt/local/var/macports/build/_Users_marbre_ports_cad_CalculiX-ccx/CalculiX-ccx/work/ccx_2.18/src" && /usr/bin/make -j1 -w CFLAGS="-Os -arch x86_64" FFLAGS="-Os -m64 -fallow-argument-mismatch" LDFLAGS="-L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-rpath,/opt/local/lib/libgcc -arch x86_64"
:info:build make: Entering directory `/opt/local/var/macports/build/_Users_marbre_ports_cad_CalculiX-ccx/CalculiX-ccx/work/ccx_2.18/src'
Note that the pre-build approach is overriding the makefile cflags, makefile was patched to cflags += , etc. How do I prevent this?
pre-build log: https://pastebin.com/2SrmjAv9 <https://pastebin.com/2SrmjAv9>
post-patch log is 1.8 MB — not uploaded
Mark Brethen
mark.brethen at gmail.com
> On Aug 5, 2022, at 3:04 PM, Ryan Schmidt <ryandesign at macports.org> wrote:
>
> On Aug 5, 2022, at 14:32, Mark Brethen wrote:
>>
>> pre-build {
>> set cflags "${configure.cflags} [get_canonical_archflags cc]"
>> set ldflags "${configure.ldflags} [get_canonical_archflags ld]"
>>
>> # workaround for Rank mismatch between actual argument
>> set ver [regsub -all {[[:alpha:]]+} ${compilers.gcc_default} {}]
>>
>> if { ${ver} >= 10 } {
>> set fflags "${configure.fflags} [get_canonical_archflags fc] -fallow-argument-mismatch"
>> } else {
>> set fflags "${configure.fflags} [get_canonical_archflags fc]"
>> }
>>
>> set args "CFLAGS=${cflags} FFLAGS=${fflags} LDFLAGS=${ldflags}"
>>
>> build.args-append ${args}
>>
>> # Build serial spooles library
>> ui_info "Building spooles"
>> system -W ${workpath}/spooles.2.2 "${args} ${build.cmd} lib"
>>
>> # Extend library with multi-threading (MT) subroutines
>> system -W ${workpath}/spooles.2.2/MT/src "${args} ${build.cmd} makeLib"
>> }
>>
>>
>> :info:build Building spooles
>> :debug:build system -W /opt/local/var/macports/build/_Users_marbre_ports_cad_CalculiX-ccx/CalculiX-ccx/work/spooles.2.2: CFLAGS=-Os -arch x86_64 FFLAGS=-Os -m64 -fallow-argument-mismatch LDFLAGS=-L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-rpath,/opt/local/lib/libgcc -arch x86_64 /usr/bin/make lib
>> :info:build sh: -arch: command not found
>>
>> It worked when I patched the makefile with the flags, but these should probably be passed at build. What did I miss?
>
> Quoting?
>
> set args "CFLAGS=\"${cflags}\" FFLAGS=\"${fflags}\" LDFLAGS=\"${ldflags}\""
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20220805/6af5667b/attachment-0005.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Portfile
Type: application/octet-stream
Size: 5439 bytes
Desc: not available
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20220805/6af5667b/attachment-0004.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20220805/6af5667b/attachment-0006.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Portfile.new
Type: application/octet-stream
Size: 5381 bytes
Desc: not available
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20220805/6af5667b/attachment-0005.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20220805/6af5667b/attachment-0007.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-ccx-build.diff
Type: application/octet-stream
Size: 7909 bytes
Desc: not available
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20220805/6af5667b/attachment-0006.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20220805/6af5667b/attachment-0008.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-spooles-make.inc.diff
Type: application/octet-stream
Size: 2031 bytes
Desc: not available
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20220805/6af5667b/attachment-0007.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20220805/6af5667b/attachment-0009.htm>
More information about the macports-dev
mailing list