Skip to content

Build dynamic library with a Linux-qualified name(s) #28

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

Closed
dvrogozh opened this issue Aug 14, 2018 · 0 comments
Closed

Build dynamic library with a Linux-qualified name(s) #28

dvrogozh opened this issue Aug 14, 2018 · 0 comments

Comments

@dvrogozh
Copy link
Contributor

By convention on Linux if library is going to be linked against it should have:

  • real name, which is usually libigdgmm.so.x.y.z, x.y.z is a library version
  • soname which is libigdgmm.so.x, usually that's a symbolic link to real name
  • linker name which is libigdgmm.so, usually that's a symbolic link to soname
    Building library without the above convention is applicable only if library is supposed to be dlopen(), i.e. for drivers and similar things.

Since gmmlib will be linked against rahter than dlopen-ed it should qualify to the above Linux convention. This fix makes exactly that. CMake will automatically create required symbolc links (soname and linker name).

Mind also that it is typical to break these target in the following way for the packages:

  • real name and soname goes to runtime package (the one without *.h and *.pc files)
  • linker name goes to devel package (the one with *.h and *.pc files)

This can be achieved setting the following targets over the cmake target:

set_target_properties(${GMM_LIB_DLL_NAME} PROPERTIES VERSION ${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION})
set_target_properties(${GMM_LIB_DLL_NAME} PROPERTIES SOVERSION ${MAJOR_VERSION})

Could you, please, make such a change?

dvrogozh added a commit to dvrogozh/gmmlib that referenced this issue Aug 14, 2018
Fixes: intel#28

By convention on Linux if library is going to be linked against it should have:
 * real name, which is usually libigdgmm.so.x.y.z, x.y.z is a library version
 * soname which is libigdgmm.so.x, usually that's a symbolic link to real name
 * linker name which is libigdgmm.so, usually that's a symbolic link to soname
Building library without the above convention is applicable only if library is
supposed to be dlopen(), i.e. for drivers and similar things.

Since gmmlib will be linked against rahter than dlopen-ed it should qualify to
the above Linux convention. This fix makes exactly that. CMake will automatically
create required symbolc links (soname and linker name).

Signed-off-by: Dmitry Rogozhkin <[email protected]>
dvrogozh added a commit to dvrogozh/gmmlib that referenced this issue Sep 27, 2018
Fixes: intel#28

By convention on Linux if library is going to be linked against it should have:
 * real name, which is usually libigdgmm.so.x.y.z, x.y.z is a library version
 * soname which is libigdgmm.so.x, usually that's a symbolic link to real name
 * linker name which is libigdgmm.so, usually that's a symbolic link to soname
Building library without the above convention is applicable only if library is
supposed to be dlopen(), i.e. for drivers and similar things.

Since gmmlib will be linked against rahter than dlopen-ed it should qualify to
the above Linux convention. This fix makes exactly that. CMake will automatically
create required symbolc links (soname and linker name).

This commit also bumps up the version of gmmlib.

Signed-off-by: Dmitry Rogozhkin <[email protected]>
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

Successfully merging a pull request may close this issue.

1 participant