Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

No SONAME/SOVERSION defined

Open
#2 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
c, cmake, ubuntu

Research direction

Start with src/CMakeLists.txt and review how the dfx target is installed. Build the shared library, inspect it with objdump -x for its SONAME, and verify that dpkg-shlibdeps can identify dfx-mgr's libdfx dependency. Done means releases define a consistent SONAME and the API/ABI guarantees are documented.

Written by the indexing model from the issue text.

Description

Hi!

libdfx.so currently has no SONAME/SOVERSION defined, which breaks a number of things when creating distro packages (e.g. Ubuntu packages in my case). For instance, when trying to compute shared library dependencies from dfx-mgr on libdfx, dpkg-shlibdeps wont be able to extract the name of the library from libdfx.so, and the dfx-mgr binary won't properly have a libdfx "NEEDED" dependency on the lib.

Typically, libraries shipped in linux distros will:

  • be shared libraries (really rare to have static libraries unless they change ABI all the time, and even then distros tend to prefer using shared libraries and rebuilding the reverse dependencies)
  • provide some guarantees on API stability
  • aim for ABI stability as long as possible, and bump the SONAME when an incompatible change really has to land

For now, while creating packaging aimed at Ubuntu, I've worked around this by defining an Ubuntu specific SONAME "0ubuntu1" with this change:

--- libdfx-2021.2.orig/src/CMakeLists.txt
+++ libdfx-2021.2/src/CMakeLists.txt
@@ -19,6 +19,8 @@ set(LIBDFX_INCLUDE_DIRS
 )
 
 add_library(dfx ${libdfx_sources})
-set_target_properties(dfx PROPERTIES PUBLIC_HEADER "include/libdfx.h")
+set_target_properties(dfx PROPERTIES
+	VERSION 0ubuntu1
+	PUBLIC_HEADER "include/libdfx.h")
 target_include_directories(dfx PUBLIC ${LIBDFX_INCLUDE_DIRS})
 install(TARGETS dfx ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} PUBLIC_HEADER ${CMAKE_INSTALL_INCLUDEDIR})

So now, the packaged library properly appears with a "SONAME" property (objdump -x libdfx.so | grep SONAME) of libdfx.0ubuntu1, and I also get a libdfx.so symlink that I can ship in the libdfx-dev package.

Obviously, having to track ABI/API downstream in the Ubuntu packaging is cumbersome as it creates Ubuntu specific binaries, extra work and a risk of errors, so it'd be awesome if you could document API/ABI guarantees and define a SONAME in your releases so that all projects downstream of libdfx use the same SONAME. :-)

Thanks!

Dominant language
C
Stars
13
Forks
8
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Xilinx/libdfx

All issues in Xilinx/libdfx

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.