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

Chris Jones jonesc at hep.phy.cam.ac.uk
Wed Jul 27 12:30:29 UTC 2022



On 27/07/2022 1:14 pm, Mark Brethen wrote:
> log for gcc build: https://pastebin.com/qbmWHm1M 
> <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 XFunktions.o badelems.o 
bodyMesh2.o bsort.o bsortf.o bsorti.o calcNormalen.o calcPrinc.o 
calcPvector.o calcWeight.o checkIfNumber.o cgx.o compare.o copyEntity.o 
corrad.o dataGeo.o dataMesh.o defineEntity.o dispLists.o elemChecker.o 
extFunktions.o extGL.o fillBody2.o frecord.o foamFaces.o gl3grades.o 
getGeoDataTria.o graph.o ifind.o iinsert.o improveBadTr3.o improveMesh.o 
iniMeshData.o intpol.o intpol2.o intpol3.o iremove.o linelength.o 
m_copy.o m_sub.o mergEntity.o mesh2d.o meshSet.o meshSurf.o messages.o 
near3d.o normdist.o nurbl2seq.o orient.o p_angle.o parser.o 
pickFunktions.o plotFunktions.o readAnsysList.o readEdges.o readfrd.o 
readFoam.o readStdCmap.o readStl.o readccx.o readDuns.o readNastran.o 
readNG.o readTG.o readIsaac.o readstep.o readWf.o rectcyl.o 
renumberfrd.o selectDisplayFaces.o sendMpc.o sendSet.o setFunktions.o 
shapeFunctions.o spline.o splitElementsToTets.o stof.o stoi.o 
stopClock.o stos.o strfind.o strsplt.o sins.o surfMesh2.o sword.o 
trackball.o v_distA.o v_rec2cyl.o v_add.o v_angle.o v_angle_ref.o 
v_betrag.o v_matmult.o v_norm.o v_prod.o v_result.o v_scal.o v_rot.o 
v_sprod.o m_prod.o m_prodtr.o write2aba.o write2ansys.o write2aster.o 
write2darwin.o write2dolfyn.o write2isaac.o write2duns.o write2frd.o 
write2foam.o write2nas.o write2samcef.o write2tochnog.o writefbd.o 
writebp.o contact.o makeTriFromElems.o uselibSNL.cpp generateTet.cpp 
../../libSNL/src/*.cpp  -O2 -Wall -Wno-narrowing -I./ 
-I/opt/local/include -I/opt/local/include/GL -I../../libSNL/src 
-I../../glut-3.5/src  -L/opt/local/lib -lGL -lGLU -lglut -lX11 -lXi 
-lXmu -lXext -lXt -lSM -lICE -lm -lpthread -o  cgx

this is not really supported. Your time would be better spent fixing the 
issues with using clang++ to build.

Chris

> 
> log for clang12 build: https://pastebin.com/4WG7VsfA 
> <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 -I/opt/local/include/GL -I../../libSNL/src 
> -I../../glut-3.5/src    -c -o parser.o parser.c
> :info:build parser.c:85:5: error: implicit declaration of function 
> 'DrawCommandLine' is invalid in C99 
> [-Werror,-Wimplicit-function-declaration]
> :info:build     DrawCommandLine(keystroke, strlen(keystroke)+*curshft);
> :info:build     ^
> :info:build 1 error generated.
> :info:build make: *** [parser.o] Error 1
> 
> Mark Brethen
> mark.brethen at gmail.com <mailto:mark.brethen at gmail.com>
> 
> 
> 
>> On Jul 27, 2022, at 3:49 AM, Chris Jones <jonesc at hep.phy.cam.ac.uk 
>> <mailto:jonesc at hep.phy.cam.ac.uk>> wrote:
>>
>>
>> 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 versions now actually support building against 
>> libc++, the clang runtime, which would make this possible in theory. 
>> It needs support in base though 
>> (https://github.com/macports/macports-base/pull/275 
>> <https://github.com/macports/macports-base/pull/275>) so cannot be 
>> used until that is available.
>>
>> On 27/07/2022 1:15 am, Mark Brethen wrote:
>>> 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 order
>>> You can always run 'port rev-upgrade' again to fix errors.
>>> The following ports will be rebuilt: CalculiX @2.18+docs+examples+gcc12
>>> Continue? [Y/n]:
>>> Choosing ‘Y’ puts it into and endless re-install. Adding 
>>> 'configure.cxx_stdlib macports-libstdc++’ seems to fix things.
>>> 1. What is causing this?
>>> 2. Should the compilers group be removed and stick with clang?
>>> 3. What changes to the portfile would need to made to permit either 
>>> compiler variant?
>>> Thanks,
>>> Mark
> 


More information about the macports-dev mailing list