Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for older gcc versions #85

Open
thorade opened this issue Jul 5, 2023 · 4 comments
Open

support for older gcc versions #85

thorade opened this issue Jul 5, 2023 · 4 comments

Comments

@thorade
Copy link
Contributor

thorade commented Jul 5, 2023

Modelica Language Specification about Resources/Library directory and subdirectories:
https://specification.modelica.org/master/functions.html#annotations-for-external-libraries-and-include-files
modelica/ModelicaSpecification#1316

Sub-directories per platform:

Different versions of one object library can be provided (e.g., for Windows and for Linux) by 
providing a platform directory below the LibraryDirectory. 
If no platform directory is present, the object library must be present in the LibraryDirectory. 
The following platform names are standardized:
– "win32" (Microsoft Windows 32 bit)
– "win64" (Microsoft Windows 64 bit)
– "linux32" (Linux Intel 32 bit)
– "linux64" (Linux Intel 64 bit)

Sub-sub-directories per compiler and version:

The win32 or win64 directories may contain gcc47, vs2010, vs2012 for specific versions of these compilers 
and these are used instead of the general win32 or win64 directories, and similarly for other platforms.

The library on Windows may refer to a lib-file (static library), both a lib- and dll-file (in this case the lib-file is an import-library), 
or just a dll-file. It shall not refer to an obj-file.

If the directory for the specific compiler version is missing the platform specific directory is used.

[A tool may give a diagnostic if the directory corresponding to the selected compiler version is missing. 
The directories may use symbolic links or use a text-file as described below: 
e.g., a text-file vs2008 containing the text ../win32/vs2005 (or vs2005) suggesting that it is compatible with vs2005.]

It seems sub-sub-directories per gcc version are supported by Dymola 2020 and newer, I am somewhat unsure about other tools.
Would it be possible to pre-compile for multiple gcc versions (one new like gcc81, one old, like gcc48) and put them in the corresponding directories?

If gcc 4.8.5 is too old to compile CoolProp, clang can be used, it produces binaries compatible with gcc 4.8.5

@casella
Copy link
Collaborator

casella commented Jul 5, 2023

It seems sub-sub-directories per gcc version are supported by Dymola 2020 and newer, I am somewhat unsure about other tools. Would it be possible to pre-compile for multiple gcc versions (one new like gcc81, one old, like gcc48) and put them in the corresponding directories?

I guess so. I'm afraid we'll have time to do that from September onwards. If you know how to handle Github's CI scripts, you may try this on a branch and then test the binary artefacts yourself, it if works we can merge it into master in 1 second.

@jowr
Copy link
Collaborator

jowr commented Aug 28, 2023

Hi, I have now made a few changes and I need some feedback:

  • We can use GCC 9 to 12 and Clang 10 to 14. Is that what you are looking for @thorade ?
  • I cannot see the actions in the main repository, is that intentional @casella ?

@thorade
Copy link
Contributor Author

thorade commented Aug 28, 2023

I think we use gcc 4.8.5 currently, and might upgrade to 8.x later this year, but I am not entirely sure. I tested with clang 7.x and it does produce binaries that are compatible with gcc 4.8.
Let me test whether clang 10 to 14 also produces binaries that work with gcc 4.8 and/or gcc 8.x, but that might take me a while.

@jowr
Copy link
Collaborator

jowr commented Aug 30, 2023

Hi - I have tried addressing this, but the combination of CMake 3.8 and GCC 4.8 is not very common and I have problems getting the docker images to compile the sources. GCC 8 works well by the way.

jowr added a commit that referenced this issue Sep 5, 2023
- This closes #89 and possibly relates to #90. 
- The new manually triggered CI job uses the suggestions from #89 to find the minimum CMake version.
- Wrong version of cmake required to compile the library #89 to find the minimum CMake version.
- The minor adjustments in the CMakeLists.txt reduce the needed CMake version to 3.8 instead of 3.18
- The missing CoolProp include directories have also been fixed.
- As pointed out in #85, we may want to bring back the subdirectory notation for GCC and friends, this is also included here.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants