KratosMultiphysics / Kratos

Kratos Multiphysics (A.K.A Kratos) is a framework for building parallel multi-disciplinary simulation software. Modularity, extensibility and HPC are the main objectives. Kratos has BSD license and is written in C++ with extensive Python interface.
https://kratosmultiphysics.github.io/Kratos/
Other
1k stars 244 forks source link

[GeoMechanicsApplication] Embed Versioning into built DLL files #10901

Closed mcgicjn2 closed 1 year ago

mcgicjn2 commented 1 year ago

Embed versioning in at the geomechanics DLL's but preferably in all generated files from Kratos.

Achievable through CMAKE, liaise with CIMNE.

mcgicjn2 commented 1 year ago

@roigcarlo : Is this possible from your side ?

mcgicjn2 commented 1 year ago

i.e. in the file meta data.

roigcarlo commented 1 year ago

@mcgicjn2 Could you develop more. Not sure to follow.

Do you want the versioning to be accessible by the code? to be directly embedded or accessible via the binary strings etc..? If it is only metadata added by CMake there should be no problem.

Right now we have a KratosVersion object which is build along the core and makes the following info accessible:

KRATOS_MAJOR_VERSION
KRATOS_MINOR_VERSION
KRATOS_PATCH_VERSION
KRATOS_SHA1_NUMBER
KRATOS_BUILD_TYPE
mcgicjn2 commented 1 year ago

File_Versions

mcgicjn2 commented 1 year ago

@roigcarlo would this be a problem if I did it environment wide, or would you prefer if I limit it to our own application ?

philbucher commented 1 year ago

looks like a cool feature for the entire Kratos to me Didnt even know this existed

Is this a windows-only feature?

matekelemen commented 1 year ago

Is this a windows-only feature?

version info is usually baked into shared object names on Linux :(

$ ls -l /lib/*.so*

lrwxrwxrwx 1 root root        22  3. Feb 19:27 /lib/ld-linux.so.2 -> ../lib32/ld-linux.so.2
-rwxr-xr-x 1 root root    216192  3. Feb 19:27 /lib/ld-linux-x86-64.so.2
lrwxrwxrwx 1 root root        17  2. Dez 20:49 /lib/lib2geom.so -> lib2geom.so.1.2.0
-rwxr-xr-x 1 root root    882552  2. Dez 20:49 /lib/lib2geom.so.1.2.0
lrwxrwxrwx 1 root root        15 27. Dez 01:13 /lib/liba52.so -> liba52.so.0.0.0
lrwxrwxrwx 1 root root        15 27. Dez 01:13 /lib/liba52.so.0 -> liba52.so.0.0.0
-rwxr-xr-x 1 root root     68328 27. Dez 01:13 /lib/liba52.so.0.0.0
lrwxrwxrwx 1 root root        14 27. Dez 01:10 /lib/libaa.so -> libaa.so.1.0.4
lrwxrwxrwx 1 root root        14 27. Dez 01:10 /lib/libaa.so.1 -> libaa.so.1.0.4
-rwxr-xr-x 1 root root    122784 27. Dez 01:10 /lib/libaa.so.1.0.4
lrwxrwxrwx 1 root root        37  4. Sep 2022  /lib/libabsl_bad_any_cast_impl.so -> libabsl_bad_any_cast_impl.so.2206.0.0
-rwxr-xr-x 1 root root     13936  4. Sep 2022  /lib/libabsl_bad_any_cast_impl.so.2206.0.0
lrwxrwxrwx 1 root root        39  4. Sep 2022  /lib/libabsl_bad_optional_access.so -> libabsl_bad_optional_access.so.2206.0.0
-rwxr-xr-x 1 root root     13936  4. Sep 2022  /lib/libabsl_bad_optional_access.so.2206.0.0
lrwxrwxrwx 1 root root        38  4. Sep 2022  /lib/libabsl_bad_variant_access.so -> libabsl_bad_variant_access.so.2206.0.0
-rwxr-xr-x 1 root root     13936  4. Sep 2022  /lib/libabsl_bad_variant_access.so.2206.0.0
lrwxrwxrwx 1 root root        24  4. Sep 2022  /lib/libabsl_base.so -> libabsl_base.so.2206.0.0
...

note the resulting symlink hell

philbucher commented 1 year ago

@matekelemen sure, didnt think of this, thx

roigcarlo commented 1 year ago

If it is compatible (even if not used) with Linux no problem

mcgicjn2 commented 1 year ago

Perhaps this is windows only, as it usually requires the compilation of the rc (resource file) in order to work. I (We) will look into this further, before preparing a solution.