AdaCore / gnatcoll-core

GNAT Components Collection – Core packages
Other
44 stars 29 forks source link

Mac Ventura GNATCOLL 23 compilation fails #68

Closed rogermc2 closed 1 year ago

rogermc2 commented 1 year ago

Mac OSX 13.0.1 (22A400) XCode Version 14.1 (14B47b) GNAT 12.1.0

Attempts to build GNATCOLL with gnatcoll_23.0.0_29478a20/gnatcoll.gpr fail:

gprbuild -q -c -f -gnatc -u -P/opt/alire/gnatcoll_23.0.0_29478a20/gnatcoll.gpr -XXMLADA_BUILD=static -XLIBRARY_TYPE=static -XGPR_BUILD=static -XGNATCOLL_OS=unix -XGNATCOLL_BUILD_MODE=DEBUG -XBUILD=DEBUG -XGNATCOLL_MADVISE=yes -XGNATCOLL_MMAP=yes process-wrappers.c
<built-in>: error: unknown value '13.0.0' of '-mmacosx-version-min'
gprbuild: *** compilation phase failed
Fabien-Chouteau commented 1 year ago

Hi @rogermc2

This is most likely and issue with the toolchain and not GNATcoll itself. Can you try to compile with GNAT FSF 12.2?

rogermc2 commented 1 year ago

Yes, I've since tried a few other things and get the same error so I'm sure it is an issue with the toolchain and not GNATcoll itself. I'm currently using gnat-x86_64-darwin-12.1.0-2. I'll try and obtain GNAT FSF 12.2. I'm no expert in this area, so a lot of bungling occurs! Also, I've just started trying to use alr so I may be messing things up with that. Thanks for your advice.

rogermc2 commented 1 year ago

I finally located gnat-x86_64-darwin-12.1.0-2. With GPS 2019 the C files compiled OK and I now get as far as:

   [Ada]          gnatcoll-scripts-files.adb
   [Ada]          gnatcoll-projects-normalize.adb
gnatcoll-projects-normalize.adb:33:06: warning: license of withed unit "GPR" may be inconsistent
gnatcoll-projects-normalize.adb:34:09: warning: license of withed unit "GPR.Output" may be inconsistent
gnatcoll-projects-normalize.adb:35:09: warning: license of withed unit "GPR.Com" may be inconsistent
gnatcoll-projects-normalize.adb:36:09: warning: license of withed unit "GPR.Tree" may be inconsistent
gnatcoll-projects-normalize.adb:37:09: warning: license of withed unit "GPR.Snames" may be inconsistent
gnatcoll-projects-normalize.adb:38:09: warning: license of withed unit "GPR.Names" may be inconsistent
gnatcoll-projects-normalize.adb:1710:19: "Get_Lower_Name_Id" is undefined
gprbuild: *** compilation phase failed

However, GNAT Studio won't open the gnatcoll project but fails with:

[2022-11-18 13:56:03] /opt/alire/gnatcoll_23.0.0_29478a20/gnatcoll.gpr:24:06: imported project file "gpr" not found
[2022-11-18 13:56:04] Language server: Unable to load project file: /opt/alire/gnatcoll_23.0.0_29478a20/empty.gpr
/opt/alire/gnatcoll_23.0.0_29478a20/empty.gpr is not a regular file
Fabien-Chouteau commented 1 year ago

I finally located gnat-x86_64-darwin-12.1.0-2. With GPS 2019 the C files compiled OK and I now get as far as:

GNATcoll 23 cannot be compiled with GNAT Community 2019.

[2022-11-18 13:56:03] /opt/alire/gnatcoll_23.0.0_29478a20/gnatcoll.gpr:24:06: imported project file "gpr" not found

This means you have missing dependencies. We recommend to use Alire here. You just have to add gnatcoll to the dependencies of your Alire crate:

alr with gnatcoll
rogermc2 commented 1 year ago

GNATcoll 23 cannot be compiled with GNAT Community 2019. Clarification. I wasn't trying to compile with GNAT Community 2019. I was only using GPS 2019 as GUI. The actual compilation was with gnat-x86_64-darwin-12.1.0-2

/opt/alire/gnatcoll_23.0.0_29478a20/gnatcoll.gpr:24:06: imported project file "gpr" not found occurs when trying to build gnatcoll itself.

Perhaps I am not reporting my problem very well?

Fabien-Chouteau commented 1 year ago

Indeed that was not my understanding. But my last comment still holds:

[2022-11-18 13:56:03] /opt/alire/gnatcoll_23.0.0_29478a20/gnatcoll.gpr:24:06: imported project file "gpr" not found

This means you have missing dependencies. We recommend to use Alire here. You just have to add gnatcoll to the dependencies of your Alire crate:

alr with gnatcoll