You are not logged in.

#1 2018-07-08 13:10:56

Maverick89
Member
Registered: 2016-06-21
Posts: 8

[SOLVED] Build under makepkg results in shared libraries not built

Newbie to package maintenance here,

the package in question is https://aur.archlinux.org/packages/comedilib/ . If you remove "-disable-python-binding" from configure arguments in PKGBUILD, it is is supposed to use swig to generate a wrapper and link it into a _comedi.so library under /usr/lib/python3.6/site-packages .

If I run ./configure and make manually, the _comedi.so is generated. If I run makepkg however, I get an lib_comedi.a instead!

I'm not very familar with the build system (never used configure myself...), so I'm totally confused what could change the make targets that way...

Here is a part of build messages for manual (working) build:

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I../../include -I../../include -Wall -I/usr/include/python3.6m -I/usr/include/python3.6m -fno-strict-aliasing -Wno-unused-function -g -O2 -MT _comedi_la-comedi_python_wrap.lo -MD -MP -MF .deps/_comedi_la-comedi_python_wrap.Tpo -c comedi_python_wrap.c -o _comedi_la-comedi_python_wrap.o >/dev/null 2>&1
mv -f .deps/_comedi_la-comedi_python_wrap.Tpo .deps/_comedi_la-comedi_python_wrap.Plo

/bin/sh ../../libtool  --tag=CC   --mode=link gcc -I../../include -I../../include -Wall -I/usr/include/python3.6m -I/usr/include/python3.6m -fno-strict-aliasing -Wno-unused-function -g -O2 -module -avoid-version ../../lib/libcomedi.la -lm  -o _comedi.la -rpath /usr/local/lib/python3.6/site-packages _comedi_la-comedi_python_wrap.lo  

libtool: link: gcc -shared  -fPIC -DPIC  .libs/_comedi_la-comedi_python_wrap.o   -Wl,-rpath -Wl,/home/maverick/aur_maintaining/comedilib-git/src/comedilib-git/lib/.libs -Wl,-rpath -Wl,/usr/local/lib ../../lib/.libs/libcomedi.so -lm  -g -O2   -Wl,-soname -Wl,_comedi.so -o .libs/_comedi.so
libtool: link: ar cr .libs/_comedi.a  _comedi_la-comedi_python_wrap.o
libtool: link: ranlib .libs/_comedi.a
libtool: link: ( cd ".libs" && rm -f "_comedi.la" && ln -s "../_comedi.la" "_comedi.la" )

Here is the part from makepkg (failing) build:

/bin/sh ../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../..   -D_FORTIFY_SOURCE=2 -I../../include -I../../include -Wall -I/usr/include/python3.6m -I/usr/include/python3.6m -fno-strict-aliasing -Wno-unused-function -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -c -o _comedi_la-comedi_python_wrap.lo `test -f 'comedi_python_wrap.c' || echo './'`comedi_python_wrap.c

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -D_FORTIFY_SOURCE=2 -I../../include -I../../include -Wall -I/usr/include/python3.6m -I/usr/include/python3.6m -fno-strict-aliasing -Wno-unused-function -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -c comedi_python_wrap.c -o _comedi_la-comedi_python_wrap.o

/bin/sh ../../libtool  --tag=CC   --mode=link gcc -I../../include -I../../include -Wall -I/usr/include/python3.6m -I/usr/include/python3.6m -fno-strict-aliasing -Wno-unused-function -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -module -avoid-version ../../lib/libcomedi.la -lm -Wl,-O1,--sort-common,--as-needed,-z,relro -o _comedi.la -rpath /usr/lib/python3.6/site-packages _comedi_la-comedi_python_wrap.lo  

libtool: link: ar cru .libs/lib_comedi.a  _comedi_la-comedi_python_wrap.o
ar: `u' modifier ignored since `D' is the default (see `U')
libtool: link: ranlib .libs/lib_comedi.a
libtool: link: ( cd ".libs" && rm -f "_comedi.la" && ln -s "../_comedi.la" "_comedi.la" )

Any pointers?


On a side note: as the package just builds into python3.6 site packages automatically, will there be trouble as distribution goes to python3.7 I need to take care about?

Last edited by Maverick89 (2018-07-08 20:24:36)

Offline

#2 2018-07-08 16:18:27

loqs
Member
Registered: 2014-03-06
Posts: 17,197

Re: [SOLVED] Build under makepkg results in shared libraries not built

git diff
diff --git a/PKGBUILD b/PKGBUILD
index 8262e19..b8432e0 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,9 +7,9 @@ pkgrel=1
 pkgdesc="Comedi is the kernel-level driver code. Comedilib is the user-level API library code. This package does not include python bindings."
 arch=('i686' 'x86_64')
 url="http://comedi.org/"
-license=('GPL')
+license=('LGPL2')
 groups=('devel')
-depends=()
+make_depends=('swig')
 source=("http://www.comedi.org/download/comedilib-$pkgver.tar.gz")
 sha512sums=('bebf24161d145d077498db91e4fac92a962c33c6b7dce3e19b68b32814e44aafdf6b5f8f9c0dd5fdbf5cbbe3b150498bbe08c9307503e4c7be5e7699a68e1b34')
 
@@ -17,18 +17,15 @@ build() {
        cd $srcdir/$pkgname-$pkgver
 
        ./configure \
-               --host=$arch \
                --prefix=/usr \
-               --mandir=\$${prefix}/usr/share/man \
-               --datadir=\$${prefix}/usr/share/doc/ \
+               --sbindir=/usr/bin \
                --sysconfdir=/etc \
                --disable-firmware \
                --localstatedir=/var \
                --disable-dependency-tracking \
-               --disable-python-binding \
                --disable-ruby-binding \
                --with-pdf-backend=no\
-               --with-gnu-ld
+               --disable-static
 
        make
 }
@@ -37,6 +34,4 @@ package() {
        cd $srcdir/$pkgname-$pkgver
 
        make DESTDIR="$pkgdir/" install
-
-       mv ${pkgdir}/usr/sbin ${pkgdir}/usr/bin
 }

The relevant change is --disable-static the rest is just tidying up.  I would also suggest dropping it from the group devel as that is an official package group.

Offline

#3 2018-07-08 16:42:08

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [SOLVED] Build under makepkg results in shared libraries not built

Not much of one... the "devel" group contains one package, that package being "haxe". I'm not entirely sure what arodseth's intention in creating that group, was, but it's definitely got no relation to the "base-devel" group.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#4 2018-07-08 20:31:56

Maverick89
Member
Registered: 2016-06-21
Posts: 8

Re: [SOLVED] Build under makepkg results in shared libraries not built

Thank you!

I'm a bit confused why disabling static build enables the shared one o.O The group does not make sense indeed, I've removed it.

Offline

#5 2018-07-08 21:04:48

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [SOLVED] Build under makepkg results in shared libraries not built

Well, you need either static or shared builds... if static is the project default and you disable static, it should automatically enable shared to replace it. I don't know why it built shared libraries outside of makepkg though, maybe look at what each used flag enables?

Using --enable-shared would likely do the same, makepkg by default will remove the static libraries if both exist (but then the build stage will still compile them).

Last edited by eschwartz (2018-07-08 21:06:09)


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

Board footer

Powered by FluxBB