You are not logged in.
I am creating a package for udunits2 library using PKGBUILD. When I compile the library from the source I get the following libraries
libudunits2.a
libudunits2.la
libudunits2.so
libudunits2.so.0
libudunits2.so.0.1.0But when I create a package with the very same configuration using PKGBUILD, I only get
libudunits2.so
libudunits2.so.0
libudunits2.so.0.1.0Configure outputs of two cases are identical so I'd expect to have the identical outcome when they are built. I am attaching the configure script and PKGBUILD.
configure script
#!/bin/bash
CC=clang FC=flang CFLAGS='-O3 -march=znver2' FCFLAGS='-O3 -march=znver2' ./configure --prefix=/usrPKGBUILD
pkgname=udunits
pkgver=2.2.28
pkgrel=1
pkgdesc="aocc compiled udunits"
url="https://www.unidata.ucar.edu/downloads/udunits"
arch=("x86_64")
license=("custom")
depends=("zlib")
provides=("udunits2")
source=("https://artifacts.unidata.ucar.edu/repository/downloads-udunits/${pkgver}/${pkgname}-${pkgver}.tar.gz")
sha256sums=("590baec83161a3fd62c00efa66f6113cec8a7c461e3f61a5182167e0cc5d579e")
build() {
cd ${pkgname}-${pkgver}
CC=clang FC=flang CFLAGS="-O3 -march=znver2" FCFLAGS="-O3 -march=znver2" ./configure --prefix=/usr
make -j4
}
check() {
cd ${pkgname}-${pkgver}
make check
}
package() {
make DESTDIR="${pkgdir}" install -C ${pkgname}-${pkgver}
}Am I doing something wrong?
Thanks.
Last edited by redshoe (2022-07-14 04:50:40)
Offline
See the `OPTIONS` entry in your makepkg.conf and the status of the staticlibs option. If your package explicitly requires static libs to not be discarded, `options` array in PKGBUILD should be set acccordingly.
If not that, keep in mind makepkg also defines LDFLAGS, which hipothetically could affect the configure script. LDFLAGS is also defined in makepkg.conf.
Paperclips in avatars? | Sometimes I seem a bit harsh — don’t get offended too easily!
Offline
See the `OPTIONS` entry in your makepkg.conf and the status of the staticlibs option. If your package explicitly requires static libs to not be discarded, `options` array in PKGBUILD should be set acccordingly.
If not that, keep in mind makepkg also defines LDFLAGS, which hipothetically could affect the configure script. LDFLAGS is also defined in makepkg.conf.
Thank you.
Editing the OPTION in the makepkg.conf did the trick!
Offline
Editing the OPTION in the makepkg.conf did the trick!
If your package explicitly requires static libs to not be discarded, `options` array in PKGBUILD should be set acccordingly.
!!!
Paperclips in avatars? | Sometimes I seem a bit harsh — don’t get offended too easily!
Offline
redshoe wrote:Editing the OPTION in the makepkg.conf did the trick!
mpan wrote:If your package explicitly requires static libs to not be discarded, `options` array in PKGBUILD should be set acccordingly.
!!!
Uh oh.. lol.
Offline
makepkg.conf is there to set user’s preferred defaults. Most packages will (and IMO should) work with any options set there. But if a package really requires specific behavior for whatever reason, it should be explicitly declared in the PKGBUILD for just that single package.
Paperclips in avatars? | Sometimes I seem a bit harsh — don’t get offended too easily!
Offline
makepkg.conf is there to set user’s preferred defaults. Most packages will (and IMO should) work with any options set there. But if a package really requires specific behavior for whatever reason, it should be explicitly declared in the PKGBUILD for just that single package.
Thanks. I changed the makepkg.conf to how it was and added the `options` array into my PKGBUILD.
Offline