You are not logged in.

#1 2019-02-25 08:19:15

ilyes24
Member
Registered: 2019-02-25
Posts: 3

unable to locate libpthread_nonshared.a

in instalation of oracle 12C R2 64bit in my latest version of archlinux 64bit i got erro of not finding libpthread_nonshared.a, i did a locate libpthread and got this :


========================
/usr/lib/libpthread-2.28.so
/usr/lib/libpthread.a
/usr/lib/libpthread.so
/usr/lib/libpthread.so.0
/usr/lib32/libpthread-2.28.so
/usr/lib32/libpthread.a
/usr/lib32/libpthread.so
/usr/lib32/libpthread.so.0
========================

i have also installed libpthread-stubs 0.4-1 and nothing has changed .. so what i need to install so i can find the libpthread_nonshared.a ?

Offline

#2 2019-02-25 08:48:47

loqs
Member
Registered: 2014-03-06
Posts: 13,701

Re: unable to locate libpthread_nonshared.a

Offline

#3 2019-02-25 08:56:55

ilyes24
Member
Registered: 2019-02-25
Posts: 3

Re: unable to locate libpthread_nonshared.a

sorry but i havn't undrstand nothing from all those topics you direct me to, more help please.

Offline

#4 2019-02-25 09:15:00

loqs
Member
Registered: 2014-03-06
Posts: 13,701

Re: unable to locate libpthread_nonshared.a

Makepkg#Usage

# This is an example PKGBUILD file. Use this as a start to creating your own,
# and remove these comments. For more information, see 'man PKGBUILD'.
# NOTE: Please fill out the license field for your package! If it is unknown,
# then please put 'unknown'.

# Maintainer: Your Name <youremail@domain.com>
pkgname=libpthread_nonshared
pkgver=1
pkgrel=1
pkgdesc=""
arch=('x86_64')
url=""
license=('GPL')

build() {
  ar cr libpthread_nonshared.a
}

package() {
  install -dm 0755  "$pkgdir/usr/lib"
  install -m 0644 libpthread_nonshared.a "$pkgdir/usr/lib/libpthread_nonshared.a"
}

Offline

#5 2019-02-25 10:38:12

ayekat
Member
Registered: 2011-01-17
Posts: 1,455
Website

Re: unable to locate libpthread_nonshared.a

By default, makepkg removes static libs from packages. So even if you do an explicit "install the darn .a into $pkgdir, will ya!?", makepkg will still remove it before creating the package archive.

You need to set the `staticlibs` option in your PKGBUILD (see also /etc/makepkg.conf for a short description of that option):

options=(staticlibs)

EDIT
Ah wait, I was talking out of my lower back—the .a file is there, but isn't found. Please ignore my message.

Last edited by ayekat (2019-02-25 10:39:48)


{,META,RE}PKGBUILDSpacman-hacks (includes makemetapkg and remakepkg) │ dotfiles

Offline

#6 2019-02-25 10:43:09

ilyes24
Member
Registered: 2019-02-25
Posts: 3

Re: unable to locate libpthread_nonshared.a

loqs wrote:

Makepkg#Usage

# This is an example PKGBUILD file. Use this as a start to creating your own,
# and remove these comments. For more information, see 'man PKGBUILD'.
# NOTE: Please fill out the license field for your package! If it is unknown,
# then please put 'unknown'.

# Maintainer: Your Name <youremail@domain.com>
pkgname=libpthread_nonshared
pkgver=1
pkgrel=1
pkgdesc=""
arch=('x86_64')
url=""
license=('GPL')

build() {
  ar cr libpthread_nonshared.a
}

package() {
  install -dm 0755  "$pkgdir/usr/lib"
  install -m 0644 libpthread_nonshared.a "$pkgdir/usr/lib/libpthread_nonshared.a"
}

thank you, that helped me.

Offline

#7 2019-02-25 19:27:03

eschwartz
Trusted User/Bug Wrangler
Registered: 2014-08-08
Posts: 4,097

Re: unable to locate libpthread_nonshared.a

ayekat wrote:

By default, makepkg removes static libs from packages. So even if you do an explicit "install the darn .a into $pkgdir, will ya!?", makepkg will still remove it before creating the package archive.

You need to set the `staticlibs` option in your PKGBUILD (see also /etc/makepkg.conf for a short description of that option):

options=(staticlibs)

EDIT
Ah wait, I was talking out of my lower back—the .a file is there, but isn't found. Please ignore my message.

It only does this when it detects both a static and shared library of the same name: "if they have a shared counterpart" as the manpage says.

It's a common mistake to think that makepkg abolishes the use of static libraries ever, but that would break packages that exclusively ship static libraries in the first place. big_smile And there is no need for a special flag to do what should be the default behavior for those packages.


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

Offline

Board footer

Powered by FluxBB