Re: CalculiX is using libstdc++ (this installation is configured to use libc++)

2022-07-28 Thread Mark Brethen
cgx.h already had a call to extUtil.h, so I replaced it in parser.c. Build completed without further errors. Thanks, Mark > On Jul 28, 2022, at 11:22 AM, Chris Jones wrote: > > > >> On 28 Jul 2022, at 5:21 pm, Chris Jones wrote: >> >>  >> >> >>> On 28 Jul 2022, at 5:17 pm, Mark

Re: CalculiX is using libstdc++ (this installation is configured to use libc++)

2022-07-28 Thread Chris Jones
> On 28 Jul 2022, at 5:21 pm, Chris Jones wrote: > >  > > >>> On 28 Jul 2022, at 5:17 pm, Mark Brethen wrote: >>> >>  >> ~ $ cd >> /opt/local/var/macports/build/_Users_marbre_ports_cad_CalculiX/CalculiX/work/CalculiX/cgx_2.18/src >> src $ sudo ack DrawCommandLine >> Password: >> cgx.c

Re: CalculiX is using libstdc++ (this installation is configured to use libc++)

2022-07-28 Thread Chris Jones
> On 28 Jul 2022, at 5:17 pm, Mark Brethen wrote: > >  > ~ $ cd > /opt/local/var/macports/build/_Users_marbre_ports_cad_CalculiX/CalculiX/work/CalculiX/cgx_2.18/src > src $ sudo ack DrawCommandLine > Password: > cgx.c > 5009: DrawCommandLine(keystroke, strlen(keystroke)+curshft); > 5071:

Re: CalculiX is using libstdc++ (this installation is configured to use libc++)

2022-07-28 Thread Mark Brethen
~ $ cd /opt/local/var/macports/build/_Users_marbre_ports_cad_CalculiX/CalculiX/work/CalculiX/cgx_2.18/src src $ sudo ack DrawCommandLine Password: cgx.c 5009: DrawCommandLine(keystroke, strlen(keystroke)+curshft); 5071:DrawCommandLine(keystroke, strlen(keystroke)+curshft); 5799:

Re: CalculiX is using libstdc++ (this installation is configured to use libc++)

2022-07-27 Thread Ryan Schmidt
On Jul 27, 2022, at 07:41, Mark Brethen wrote: > > As the source does not use configure, I pass the compiler args: > > pre-build { >build.args-appendCXX=${configure.cxx} \ > CC=${configure.cc} > } > > For reasons I don’t understand, If I don’t put it in a

Re: CalculiX is using libstdc++ (this installation is configured to use libc++)

2022-07-27 Thread Joshua Root
There's only one -Wimplicit-function-declaration warning in the log, so it doesn't look like there's a lot that needs fixing. Just say yes to function prototypes. :) - Josh On 2022-7-28 07:12 , Mark Brethen wrote: 1. :debug:configure Preferred compilers: clang macports-clang-14

Re: CalculiX is using libstdc++ (this installation is configured to use libc++)

2022-07-27 Thread Mark Brethen
:debug:configure Preferred compilers: clang macports-clang-14 macports-clang-13 macports-clang-12 macports-clang-11 macports-clang-10 macports-clang-9.0It does build with macports-clang*: https://pastebin.com/vmKFHatf Portfile Description: Binary data Thanks,Mark On Jul 27, 2022, at 10:39 AM,

Re: CalculiX is using libstdc++ (this installation is configured to use libc++)

2022-07-27 Thread Mark Brethen
I suppose it dies on the first error… there could be others downstream, which turns into an exhaustive cycle. Mark Brethen mark.bret...@gmail.com > On Jul 27, 2022, at 9:58 AM, Chris Jones wrote: > > patch the code to remove the improper implicit declaration

Re: CalculiX is using libstdc++ (this installation is configured to use libc++)

2022-07-27 Thread Chris Jones
oK, so that didn't help... The better fix is anyway to patch the code to remove the improper implicit declaration, so suggest you look more to that direction. On 27/07/2022 3:53 pm, Mark Brethen wrote: Clang12 w/-std=c99: :info:build parser.c:85:5: warning: implicit declaration of function

Re: CalculiX is using libstdc++ (this installation is configured to use libc++)

2022-07-27 Thread Mark Brethen
Clang12 w/-std=c99: :info:build parser.c:85:5: warning: implicit declaration of function 'DrawCommandLine' is invalid in C99 [-Wimplicit-function-declaration] Clang14 w/-std=c89: :info:build /usr/bin/clang -std=c89 -Os -arch x86_64 -I./ -I/opt/local/include -I/opt/local/include/GL

Re: CalculiX is using libstdc++ (this installation is configured to use libc++)

2022-07-27 Thread Mark Brethen
I tried setting CFLAGS in he pre-build before, which negates the includes in the patch, and the build fails. :info:build Executing: cd "/opt/local/var/macports/build/_Users_marbre_ports_cad_CalculiX/CalculiX/work/CalculiX/cgx_2.18/src" && /usr/bin/make -j4 -w CXX=/usr/bin/clang++

Re: CalculiX is using libstdc++ (this installation is configured to use libc++)

2022-07-27 Thread Chris Jones
On 27/07/2022 1:49 pm, Mark Brethen wrote: As you can see in the makefile (post-patch), it only makes use of CFLAGS and LDFLAGS. Then you should at least set these as well pre-build CFLAGS="${configure.cflags} [get_canonical_archflags cc]" LDFLAGS="${configure.ldflags}

Re: CalculiX is using libstdc++ (this installation is configured to use libc++)

2022-07-27 Thread Mark Brethen
As you can see in the makefile (post-patch), it only makes use of CFLAGS and LDFLAGS. Makefile Description: Binary data Mark Brethenmark.bret...@gmail.com On Jul 27, 2022, at 7:41 AM, Joshua Root wrote:It's also not passing in the MacPorts CFLAGS, CXXFLAGS, and LDFLAGS. If

Re: CalculiX is using libstdc++ (this installation is configured to use libc++)

2022-07-27 Thread Mark Brethen
As the source does not use configure, I pass the compiler args: pre-build { build.args-appendCXX=${configure.cxx} \ CC=${configure.cc} } For reasons I don’t understand, If I don’t put it in a pre-build override it’s ignored. Mark Brethen mark.bret...@gmail.com

Re: CalculiX is using libstdc++ (this installation is configured to use libc++)

2022-07-27 Thread Joshua Root
On 2022-7-27 22:30 , Chris Jones wrote: On 27/07/2022 1:14 pm, Mark Brethen wrote: log for gcc build: https://pastebin.com/qbmWHm1M above shows gcc is indeed being used to build c++ code :info:build /opt/local/bin/g++-mp-12  userFunction.o  AsplitA.o

Re: CalculiX is using libstdc++ (this installation is configured to use libc++)

2022-07-27 Thread Chris Jones
On 27/07/2022 1:14 pm, Mark Brethen wrote: log for gcc build: https://pastebin.com/qbmWHm1M above shows gcc is indeed being used to build c++ code :info:build /opt/local/bin/g++-mp-12 userFunction.o AsplitA.o AsplitL.o adjustMidsideNode.o compareStrings.o

Re: CalculiX is using libstdc++ (this installation is configured to use libc++)

2022-07-27 Thread Chris Jones
just to add. the "implicit declaration of function" issue is something a lot of ports hit, which clang started being stricter on this (which started with macOS11 as its a technical requirement to do this on arm). These sorts of issues are definitely things upstream should address, by

Re: CalculiX is using libstdc++ (this installation is configured to use libc++)

2022-07-27 Thread Chris Jones
Latest clang compilers probably default to a 'recent' c standard, unless otherwise told. If the code in question only builds using the less restrictive older standards, then the builds should specify this using -std=c89 for instance.. ( Note the c99 is that new, its over 20 years old

Re: CalculiX is using libstdc++ (this installation is configured to use libc++)

2022-07-27 Thread Mark Brethen
log for gcc build: https://pastebin.com/qbmWHm1M log for clang12 build: https://pastebin.com/4WG7VsfA clang14 is more restrictive on C implementation: :info:build /usr/bin/clang -O2 -Wall -Wno-narrowing -I./ -I/opt/local/include

Re: CalculiX is using libstdc++ (this installation is configured to use libc++)

2022-07-27 Thread Chris Jones
Please post a complete, clean, build log for the port in question. In general GCC should not be used to build c++ (*) as doing so leads to these c++ runtime mis-matches. You should use clang for c++ (and c as well, although there is no runtime issues there). cheers Chris * The latest GCC

CalculiX is using libstdc++ (this installation is configured to use libc++)

2022-07-26 Thread Mark Brethen
Installing CalculiX with a clang variant is successful, however when selecting a gcc variant:--->  Scanning binaries for linking errors--->  No broken files found.CalculiX is using libstdc++ (this installation is configured to use libc++)--->  Found 1 broken port, determining rebuild orderYou can