Discussion:
Can't build debian packages of libosmocore
Ciaby
2014-08-31 20:07:58 UTC
Permalink
I'm having this problem with the latest code from git:

root at boxie:~/gsm# git clone git://git.osmocom.org/libosmocore.git
Cloning into 'libosmocore'...
remote: Counting objects: 8770, done.
remote: Compressing objects: 100% (4055/4055), done.
remote: Total 8770 (delta 5642), reused 6765 (delta 4265)
Receiving objects: 100% (8770/8770), 1.62 MiB | 142 KiB/s, done.
Resolving deltas: 100% (5642/5642), done.
root at boxie:~/gsm# cd libosmocore
root at boxie:~/gsm/libosmocore# autoreconf -fi
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./config.guess'
libtoolize: copying file `./config.sub'
libtoolize: copying file `./install-sh'
libtoolize: copying file `./ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
configure.ac:5: installing `./missing'
src/Makefile.am: installing `./depcomp'
root at boxie:~/gsm/libosmocore# dpkg-buildpackage
dpkg-buildpackage: export CFLAGS from dpkg-buildflags (origin: vendor): -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security
dpkg-buildpackage: export CPPFLAGS from dpkg-buildflags (origin: vendor): -D_FORTIFY_SOURCE=2
dpkg-buildpackage: export CXXFLAGS from dpkg-buildflags (origin: vendor): -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security
dpkg-buildpackage: export FFLAGS from dpkg-buildflags (origin: vendor): -g -O2
dpkg-buildpackage: export LDFLAGS from dpkg-buildflags (origin: vendor): -Wl,-Bsymbolic-functions -Wl,-z,relro
dpkg-buildpackage: source package libosmocore
dpkg-buildpackage: source version 0.7.0
dpkg-buildpackage: source changed by Harald Welte <laforge at gnumonks.org>
dpkg-buildpackage: host architecture amd64
dpkg-source --before-build libosmocore

[...]

make[1]: Entering directory `/home/rhizomatica/gsm/libosmocore'
sed -i "/dependency_libs/ s/'.*'/''/" `find . -name '*.la'`
dh_install
dh_install: usr/lib/libosmogsm.so.5.1.0 exists in debian/tmp but is not installed to anywhere
dh_install: usr/lib/libosmogsm.so.5 exists in debian/tmp but is not installed to anywhere
dh_install: usr/lib/libosmoctrl.so.0.0.0 exists in debian/tmp but is not installed to anywhere
dh_install: usr/lib/libosmoctrl.so.0 exists in debian/tmp but is not installed to anywhere
dh_install: missing files, aborting
make[1]: *** [override_dh_install] Error 2
make[1]: Leaving directory `/home/rhizomatica/gsm/libosmocore'
make: *** [binary] Error 2
dpkg-buildpackage: error: debian/rules binary gave error exit status 2

So, it looks like it's trying to build a libosmogsm6 package, but only libosmogsm5.1.0 gets built.
I looked around, and the only reference I found is in src/gsm/Makefile.am, and it's correct (6:0:1).
What am I doing wrong? :)
Cheers

Ciaby
Ciaby
2014-08-31 21:02:17 UTC
Permalink
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
[...]
Post by Ciaby
So, it looks like it's trying to build a libosmogsm6 package, but
only libosmogsm5.1.0 gets built. I looked around, and the only
reference I found is in src/gsm/Makefile.am, and it's correct
(6:0:1). What am I doing wrong? :)
This is a tentative patch to fix the issue. It works for me,
libosmogsm6 and libosmoctrl0 are built successfully, however I'm not
sure if that's the right thing to do.
Cheers

Ciaby
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iF4EAREKAAYFAlQDjVAACgkQC30ZhxNccpEJNAD/Z5uiLUwGkKfEfl331bOk7yRo
1rG1g1qDJsz7InEEzZwA/RC24KagL8xZDSNtRjl6i+mU97XqoL+BoFsvqV2M6c/2
=o+xL
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-debian-fix-build-errors-with-libosmogsm-and-libosmoc.patch
Type: text/x-patch
Size: 2301 bytes
Desc: not available
URL: <http://lists.osmocom.org/pipermail/openbsc/attachments/20140831/0e1aa739/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-debian-fix-build-errors-with-libosmogsm-and-libosmoc.patch.sig
Type: application/octet-stream
Size: 96 bytes
Desc: not available
URL: <http://lists.osmocom.org/pipermail/openbsc/attachments/20140831/0e1aa739/attachment.obj>
Holger Hans Peter Freyther
2014-09-01 18:43:47 UTC
Permalink
On Sun, Aug 31, 2014 at 04:02:17PM -0500, Ciaby wrote:

Hi!
Post by Ciaby
Post by Ciaby
So, it looks like it's trying to build a libosmogsm6 package, but
only libosmogsm5.1.0 gets built. I looked around, and the only
reference I found is in src/gsm/Makefile.am, and it's correct
(6:0:1). What am I doing wrong? :)
This is a tentative patch to fix the issue. It works for me,
libosmogsm6 and libosmoctrl0 are built successfully, however I'm not
sure if that's the right thing to do.
can you try to use the -M option? It will show plain renames.
Post by Ciaby
--- a/src/gsm/Makefile.am
+++ b/src/gsm/Makefile.am
@@ -1,6 +1,6 @@
# This is _NOT_ the library release version, it's an API version.
# Please read Chapter 6 "Library interface versions" of the libtool documentation before making any modification
-LIBVERSION=6:0:1
+LIBVERSION=6:0:0
that is odd. What build issue do you get without the versioning?
Ciaby
2014-09-02 17:46:14 UTC
Permalink
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Post by Holger Hans Peter Freyther
Hi!
Post by Ciaby
Post by Ciaby
So, it looks like it's trying to build a libosmogsm6 package,
but only libosmogsm5.1.0 gets built. I looked around, and the
only reference I found is in src/gsm/Makefile.am, and it's
correct (6:0:1). What am I doing wrong? :)
This is a tentative patch to fix the issue. It works for me,
libosmogsm6 and libosmoctrl0 are built successfully, however I'm
not sure if that's the right thing to do.
can you try to use the -M option? It will show plain renames.
Ok, will do.
Post by Holger Hans Peter Freyther
Post by Ciaby
@@ # This is _NOT_ the library release version, it's an API
version. # Please read Chapter 6 "Library interface versions" of
the libtool documentation before making any modification
-LIBVERSION=6:0:1 +LIBVERSION=6:0:0
that is odd. What build issue do you get without the versioning?
libosmogsm gets built as libosmogsm.so.5.1.0, which of course doesn't
work if you try to package libosmogsm6. Also, libosmoctrl is missing
libosmoctrl0.install in debian/ and the package declaration in
debian/rules.
My build box is Ubuntu 12.04, 64-bit, all packages updated.
This is the updated patch.
Cheers

Ciaby

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iF4EAREKAAYFAlQGAlwACgkQC30ZhxNccpERYAD+J0WCn/Oo01sVsVmz3Dq+f0cK
r9eTGhhfEi2ZVCVXGlwA/1tv0Wl53be5R5UKGNF01OJ0Jp7xXBErJ5PLV88guTJ2
=qGdK
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-debian-fix-build-errors-with-libosmogsm-and-libosmoc.patch
Type: text/x-patch
Size: 2301 bytes
Desc: not available
URL: <http://lists.osmocom.org/pipermail/openbsc/attachments/20140902/4ea98dd6/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-debian-fix-build-errors-with-libosmogsm-and-libosmoc.patch.sig
Type: application/octet-stream
Size: 96 bytes
Desc: not available
URL: <http://lists.osmocom.org/pipermail/openbsc/attachments/20140902/4ea98dd6/attachment.obj>
Ciaby
2014-09-02 17:56:20 UTC
Permalink
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On 09/02/2014 12:46 PM, Ciaby wrote:
[...]
Post by Ciaby
This is the updated patch.
Ops, wrong patch :)
Cheers

Ciaby

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iF4EAREKAAYFAlQGBLoACgkQC30ZhxNccpHc8AEAhXc4BIfNFLNzLzhi0U00hOJk
yh210vyL8RZ28XhjeB0BAJkntG4W4QwnTPndniPW6IjXHq1hKkAiusUtLfpQoMUM
=dn6b
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-debian-fix-build-errors-with-libosmogsm-and-libosmoc.patch
Type: text/x-patch
Size: 2088 bytes
Desc: not available
URL: <http://lists.osmocom.org/pipermail/openbsc/attachments/20140902/319d6bb9/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-debian-fix-build-errors-with-libosmogsm-and-libosmoc.patch.sig
Type: application/octet-stream
Size: 96 bytes
Desc: not available
URL: <http://lists.osmocom.org/pipermail/openbsc/attachments/20140902/319d6bb9/attachment.obj>
Holger Hans Peter Freyther
2014-09-03 06:13:14 UTC
Permalink
Post by Ciaby
Post by Holger Hans Peter Freyther
Post by Ciaby
-LIBVERSION=6:0:1 +LIBVERSION=6:0:0
that is odd. What build issue do you get without the versioning?
libosmogsm gets built as libosmogsm.so.5.1.0, which of course doesn't
work if you try to package libosmogsm6. Also, libosmoctrl is missing
libosmoctrl0.install in debian/ and the package declaration in
debian/rules.
5 vs. 6 and missing libosmoctrl is obvious. But why doesn't 6.0.1
as version work? I would be a bit surprised if that doesn't work.

$ dpkg -S /usr/lib/liblwres.so.90.0.7
liblwres90: /usr/lib/liblwres.so.90.0.7

I will probably just build the package and then drop that hunk.

holger
Ciaby
2014-09-03 09:21:13 UTC
Permalink
On 09/03/2014 01:13 AM, Holger Hans Peter Freyther wrote:
[...]
Post by Holger Hans Peter Freyther
5 vs. 6 and missing libosmoctrl is obvious. But why doesn't 6.0.1
as version work? I would be a bit surprised if that doesn't work.
/usr/lib/liblwres.so.90.0.7
I will probably just build the package and then drop that hunk.
I know, it doesn't make sense... but that's what I got out of building
it with 6.0.1 as version. 6.0.0 works fine. Can you reproduce it?
Cheers

Ciaby
Holger Hans Peter Freyther
2014-09-03 13:25:27 UTC
Permalink
Post by Ciaby
Post by Holger Hans Peter Freyther
I will probably just build the package and then drop that hunk.
I know, it doesn't make sense... but that's what I got out of building
it with 6.0.1 as version. 6.0.0 works fine. Can you reproduce it?
yes, it is odd. 6:0:1 gives me a so where the major version is 5
something :)

There seems to be a similar issue with the libosmocore library as
well. Did you see the warning generated by lintian?
Vasil Velichkov
2014-09-03 15:57:50 UTC
Permalink
Hi Holger, Ciaby,
Post by Holger Hans Peter Freyther
Post by Ciaby
I know, it doesn't make sense... but that's what I got out of building
it with 6.0.1 as version. 6.0.0 works fine. Can you reproduce it?
yes, it is odd. 6:0:1 gives me a so where the major version is 5
something :)
There seems to be a similar issue with the libosmocore library as
well. Did you see the warning generated by lintian?
It is normal that 6:0:1 gives a so with major version 5, because 6:0:1
means that the library supports interfaces 5 and 6

See
http://www.gnu.org/software/libtool/manual/html_node/Libtool-versioning.html

So, libtool library versions are described by three integers:
current
The most recent interface number that this library implements.
revision
The implementation number of the current interface.
age
The difference between the newest and oldest interfaces that
this library implements.
In other words, the library implements all the interface
numbers in the range from number current - age to current.

Vasil
Ciaby
2014-09-03 23:01:31 UTC
Permalink
Post by Vasil Velichkov
Hi Holger, Ciaby,
Post by Holger Hans Peter Freyther
Post by Ciaby
I know, it doesn't make sense... but that's what I got out of
building it with 6.0.1 as version. 6.0.0 works fine. Can you
reproduce it?
yes, it is odd. 6:0:1 gives me a so where the major version is 5
something :)
There seems to be a similar issue with the libosmocore library
as well. Did you see the warning generated by lintian?
It is normal that 6:0:1 gives a so with major version 5, because
6:0:1 means that the library supports interfaces 5 and 6
Ok, that's what I found as well. So, what's the solution here?
Keep packaging it as 5, or move to 6-only?
Cheers

Ciaby
Holger Hans Peter Freyther
2014-09-04 06:10:19 UTC
Permalink
Post by Ciaby
Ok, that's what I found as well. So, what's the solution here?
Keep packaging it as 5, or move to 6-only?
-#define OSMO_NUM_DLIB 7
+#define DLCTRL -8
+#define OSMO_NUM_DLIB 8

might break ABI, so let's stick with 6:0:0. Could you updated
your patch to address the libosmocore4 warning as well?

thanks
holger
Pablo Neira Ayuso
2014-09-04 09:35:07 UTC
Permalink
Post by Vasil Velichkov
Hi Holger, Ciaby,
Post by Holger Hans Peter Freyther
Post by Ciaby
I know, it doesn't make sense... but that's what I got out of building
it with 6.0.1 as version. 6.0.0 works fine. Can you reproduce it?
yes, it is odd. 6:0:1 gives me a so where the major version is 5
something :)
There seems to be a similar issue with the libosmocore library as
well. Did you see the warning generated by lintian?
It is normal that 6:0:1 gives a so with major version 5, because
6:0:1 means that the library supports interfaces 5 and 6
See http://www.gnu.org/software/libtool/manual/html_node/Libtool-versioning.html
current
The most recent interface number that this library implements.
revision
The implementation number of the current interface.
age
The difference between the newest and oldest interfaces that
this library implements.
In other words, the library implements all the interface
numbers in the range from number current - age to current.
Right.

A new library version that still supports the previous interfaces
needs to bump current and age, if the base is 6:0:0, then the update
needs to be 7:0:1.

If you remove interfaces you don't want anymore, ie. you break
backward compatibility, you have to reset age and bump current, ie.
7:0:0

Loading...