[Skiboot] [PATCH] pflash: compile fail due to version mismatch.

Stewart Smith stewart at linux.vnet.ibm.com
Mon Aug 1 18:58:01 AEST 2016

Patrick Williams <patrick at stwcx.xyz> writes:
> libflash.so is currently versioned using make_version.sh, which
> appends 'skiboot-' and optionally '-dirty' depending if the
> build is done within a git repository.  There seems to be a parallel
> build problem where 'make_version.sh' can return different results.
> Compiling with Yocto I sometimes see:
>     arm-openbmc-linux-gnueabi-gcc ... -shared -Wl,-soname,libflash.so
>         -o libflash.so.skiboot-5.2.5 ...
>     arm-openbmc-linux-gnueabi-gcc ...
>         ../shared/libflash.so.skiboot-5.2.5-dirty-da39a3e -lrt -o pflash
>     arm-openbmc-linux-gnueabi-gcc: error:
>         ../shared/libflash.so.skiboot-5.2.5-dirty-da39a3e: No such file or
>         directory
> Changed libflash.so versioning to be libflash.so.$(SKIBOOT_VERSION)
> whenever SKIBOOT_VERSION is defined.  This ensures a consistent and
> reasonable library version: libflash.so.5.2.5
> Signed-off-by: Patrick Williams <patrick at stwcx.xyz>
> CC: Joel Stanley <joel at jms.id.au>

I think I have a better approach, we should instead follow the libtool
guidelines and do things correctly, and basing so version on skiboot
version is totally not that.

Can you test if the following works for you with yocto?

If it does, and this looks good to others, i'll merge this in as the
final patch before pushing skiboot 5.3.0 up.

diff --git a/external/shared/rules.mk b/external/shared/rules.mk
index a4976a1..147c38f 100644
--- a/external/shared/rules.mk
+++ b/external/shared/rules.mk
@@ -1 +1,18 @@
-SHARED_NAME=libflash.so.$(shell ../../make_version.sh)
+# NOTE: shared lib versioning has *NOTHING* to do with software package version
+# If source code has changed, revision++
+# if any interfaces have been added, removed, or changed, current++, revision=0
+# if any interfaces have been added, age++
+# if any interfaces have been removed or changed, age=0
+# i.e. AGE refers to backwards compatibility.
+# e.g. If we start with 5.3.0 and we're releasing new version:
+#      - bug fix no api change: 5.4.0
+#      - new API call, backwards compatible otherwise: 6.0.1
+#      - API removed, or changed (i.e. not backwards compat): 6.0.0

Stewart Smith
OPAL Architect, IBM.

More information about the Skiboot mailing list