OrangeC icon indicating copy to clipboard operation
OrangeC copied to clipboard

[C++17] Build CopperSpice with Orange C

Open yh15kla9 opened this issue 6 months ago • 11 comments

The last C++17 version of CopperSpice is 1.9.2:

https://github.com/copperspice/copperspice/releases/tag/cs-1.9.2

Source code:

https://github.com/copperspice/copperspice/archive/refs/tags/cs-1.9.2.zip

The exact commit when they switched to C++20:

https://github.com/copperspice/copperspice/commit/11ed7a7c95a7c1905bb1408677b76eced7b64d38

So this is the last C++17 code (a bit newer than 1.9.2 release):

https://github.com/copperspice/copperspice/tree/149430495bbe956540dbcde83974dd1c9fa63d30

This command is used to build a truly minimal CopperSpice (only the non-GUI parts):

cmake -GNinja -DCMAKE_BUILD_TYPE=Release ^
-DWITH_GUI=NO ^
-DWITH_SVG=NO ^
-DWITH_MULTIMEDIA=NO ^
-DWITH_OPENGL=NO ^
-DWITH_SQL=NO ^
-DWITH_PSQL_PLUGIN=NO ^
-DWITH_MYSQL_PLUGIN=NO ^
-DWITH_ODBC_PLUGIN=NO ^
-DWITH_SCRIPT=NO ^
-DWITH_WEBKIT=NO ^
-DWITH_VULKAN=NO ^
-DWITH_XMLPATTERNS=YES ^
-DCMAKE_DISABLE_FIND_PACKAGE_OpenSSL=TRUE ^
-DCMAKE_DISABLE_FIND_PACKAGE_PostgreSQL=TRUE ^
-DCMAKE_DISABLE_FIND_PACKAGE_MySQL=TRUE ^
-DCMAKE_DISABLE_FIND_PACKAGE_ODBC=TRUE ^
-DCMAKE_DISABLE_FIND_PACKAGE_ZLIB=TRUE ^
-DCMAKE_INSTALL_PREFIX=C:/CopperSpice/deploycs ^
C:/CopperSpice/copperspice

(Source: https://github.com/copperspice/copperspice/issues/323)

yh15kla9 avatar May 29 '25 03:05 yh15kla9

We don't have a libatomic outright but do support some gcc atomic features and all(?) C11/C++11 atomic features.

I'm unsure of what would need to be changed but I don't see us needing, at least at the moment, the kind of atomic support library that gcc and clang with the numerous supported platforms need.

chuggafan avatar Jun 02 '25 21:06 chuggafan

so maybe if you make a dummy libatomic.l with maybe one object file in it that has nothing much to do with anything that could sidestep the issue? you could use the olib utility to do that....

LADSoft avatar Jun 02 '25 23:06 LADSoft

the libatomic shim is not needed because of OrangeC but because of the cmake setup of the project you want to compile... I suggest to either ask upstream that they check for the necessity of libatomic instead of unconditionally getting this in, or work around that upstream issue by creating a shim library

GitMensch avatar Jun 03 '25 07:06 GitMensch

If this is the case then you have your answer

work around that upstream issue by creating a shim library

:-)

GitMensch avatar Jun 03 '25 10:06 GitMensch

@yh15kla9 i intend to review this as maybe there is something I can do. I need to review though and I haven't gotten there yet, I'm going to go back to working on covscript for a while as I've lost track of it for about a week now... (i will push a fix for premake this evening I think).

Anyway I answered your question in the spirit I thought it was asked, that you were looking for a workaround so that you could proceed until I have answered it another way.....

LADSoft avatar Jun 03 '25 16:06 LADSoft