[Arch Linux] [iv-17] Architecture in file paths and NAMCAP

Post Reply
dcampbell

[Arch Linux] [iv-17] Architecture in file paths and NAMCAP

Post by dcampbell » Mon Sep 06, 2010 8:39 pm

Can anyone explain why the Architecture is part of the path in files? It leads to things getting installed in non-standard places, which I am not sure how to fix. Also, any help with getting rid of some of these warnings and errors that follow would be appreciated. I know that the install directions say to install in $HOME and then edit your $PATH, but why is neuron designed to be installed in $HOME instead of standard locations?

NAMCAP warnings and errors:

Code: Select all

$ namcap interviews-17-1-x86_64.pkg.tar.xz
interviews W: Referenced library 'libUnidrawhines.so.3' is an uninstalled dependency
interviews W: Referenced library 'libIVhines.so.3' is an uninstalled dependency
interviews W: File (usr/x86_64) exists in a non-standard directory.
interviews W: File (usr/x86_64/bin) exists in a non-standard directory.
interviews W: File (usr/x86_64/lib) exists in a non-standard directory.
interviews W: File (usr/x86_64/lib/libIVhines.la) exists in a non-standard directory.
interviews W: File (usr/x86_64/lib/libIVhines.so) exists in a non-standard directory.
interviews W: File (usr/x86_64/lib/libUnidrawhines.so) exists in a non-standard directory.
interviews W: File (usr/x86_64/lib/libUnidrawhines.so.3) exists in a non-standard directory.
interviews W: File (usr/x86_64/lib/libIVhines.so.3.0.3) exists in a non-standard directory.
interviews W: File (usr/x86_64/lib/libUnidrawhines.so.3.0.3) exists in a non-standard directory.
interviews W: File (usr/x86_64/lib/libUnidrawhines.la) exists in a non-standard directory.
interviews W: File (usr/x86_64/lib/libIVhines.so.3) exists in a non-standard directory.
interviews W: File (usr/x86_64/bin/iclass) exists in a non-standard directory.
interviews W: File (usr/x86_64/bin/idraw) exists in a non-standard directory.
interviews W: File (usr/x86_64/bin/idemo) exists in a non-standard directory.
interviews E: ELF file ('usr/x86_64/bin/idraw') outside of a valid path.
interviews E: ELF file ('usr/x86_64/bin/iclass') outside of a valid path.
interviews E: ELF file ('usr/x86_64/bin/idemo') outside of a valid path.
interviews E: ELF file ('usr/x86_64/lib/libUnidrawhines.so.3') outside of a valid path.
interviews E: ELF file ('usr/x86_64/lib/libUnidrawhines.so') outside of a valid path.
interviews E: ELF file ('usr/x86_64/lib/libIVhines.so.3.0.3') outside of a valid path.
interviews E: ELF file ('usr/x86_64/lib/libUnidrawhines.so.3.0.3') outside of a valid path.
interviews E: ELF file ('usr/x86_64/lib/libIVhines.so') outside of a valid path.
interviews E: ELF file ('usr/x86_64/lib/libIVhines.so.3') outside of a valid path.
interviews W: File (usr/x86_64/lib/libIVhines.la) is a libtool file
interviews W: File (usr/x86_64/lib/libUnidrawhines.la) is a libtool file
interviews E: Insecure RPATH '/usr/x86_64/lib' in file ('usr/x86_64/bin/idraw')
interviews E: Insecure RPATH '/usr/x86_64/lib' in file ('usr/x86_64/bin/iclass')
interviews E: Insecure RPATH '/usr/x86_64/lib' in file ('usr/x86_64/bin/idemo')
Here is my PKGBUILD:

Code: Select all

# Maintainer: David Campbell <davekong@archlinux.us>
pkgname=interviews
pkgver=17
pkgrel=1
pkgdesc="GUI for neuron"
arch=('i686' 'x86_64')
url="http://www.neuron.yale.edu"
license=('custom')
depends=('libx11' 'gcc-libs')
makedepends=()
source=("http://www.neuron.yale.edu/ftp/neuron/versions/v7.1/iv-$pkgver.tar.gz")
md5sums=('7816b911b3ea3990ff54a786a73861bc')

build() {
  cd "$srcdir/iv-$pkgver"

  ./configure --prefix=/usr
  make
}

package() {
  cd "$srcdir/iv-$pkgver"

  install -Dm644 Copyright $pkgdir/usr/share/licenses/$pkgname/COPYING
  make DESTDIR="$pkgdir/" install
}

ted
Site Admin
Posts: 5623
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: [Arch Linux] [iv-17] Architecture in file paths and NAMCAP

Post by ted » Tue Sep 07, 2010 10:27 pm

dcampbell wrote:I know that the install directions say to install in $HOME and then edit your $PATH, but why is neuron designed to be installed in $HOME instead of standard locations?
AFAIK it isn't. Michael recomments putting it in $HOME because that makes it easer to have multiple versions installed (useful for NEURON support and development) and easier for users who may not have privileges to write elsewhere. If you don't like $HOME, put it somewhere else. I always do some variation on
./configure --prefix=/usr/local/nrn . . . other config options . . .
but I still have to add it to my PATH.

hines
Site Admin
Posts: 1580
Joined: Wed May 18, 2005 3:32 pm

Re: [Arch Linux] [iv-17] Architecture in file paths and NAMCAP

Post by hines » Wed Sep 08, 2010 3:19 am

The configure script allows you the ability to avoid the use of ARCH for architecture
specific bin and lib names through the use of --bindir=... and --libdir=... options. eg
--prefix=/usr --bindir=/usr/bin --libdir=/usr/lib
( /usr/share will also be used)
but manual uninstallation will be more difficult because of
the many NEURON files sprinkled
in the hundreds of files already in those locations. Also note that $ARCH will still
be created in the folder where the user launches nrnivmodl

The default installation location is /usr/local/nrn (/usr/local/iv for InterViews).
I prefer $HOME/neuron/(nrnxxx iv) as the build directory with a prefix
of --prefix=`pwd` since uninstalling and starting over becomes
rm -r -f $HOME/neuron/nrnxxx
and I'm always using the same sources on $HOME/neuron/nrn regardless of
the configuration or architecture I am using. I agree that there is not
much use in having $ARCH be a part of the path to bin and lib although I see that
many machines have a /usr/lib and /usr/lib64. But if one is manually installing
in a shared file system environment looked at by various architectures, it is
one way to factor the installation subsidiary to --prefix

In summary, I think the flexibility of configure options allows paths conforming
to current standards. I'm just not sure what those standards are in the context
of a program like NEURON in which multiple versions with different configurations
and different architectures are surprisingly often useful.

dcampbell

Re: [Arch Linux] [iv-17] Architecture in file paths and NAMCAP

Post by dcampbell » Sun Sep 12, 2010 6:45 pm

Thanks for the feedback. I updated my PKGBUILD script and most of the errors/warnings went away and the application appears to be working.
Note that I deleted libtool files that were hanging around after the build as they do not appear to be needed and Arch does not think they are good to have around: http://www.archlinux.org/news/174/

I still get errors about rpath, which I found this page from debian saying they are bad: http://wiki.debian.org/RpathIssue.

Code: Select all

$ namcap interviews-17-1-x86_64.pkg.tar.xz 
interviews E: Insecure RPATH '/usr/x86_64/lib' in file ('usr/bin/idraw')
interviews E: Insecure RPATH '/usr/x86_64/lib' in file ('usr/bin/iclass')
interviews E: Insecure RPATH '/usr/x86_64/lib' in file ('usr/bin/idemo')
Building neuron the same way, I don't get any warnings or errors at all.

hines
Site Admin
Posts: 1580
Joined: Wed May 18, 2005 3:32 pm

Re: [Arch Linux] [iv-17] Architecture in file paths and NAMCAP

Post by hines » Mon Sep 13, 2010 9:54 am

Thanks. I was unaware of the libtool and RPATH issues. I do use a more recent libtool that 1.5.2. If you modified any
Makefile.am or *.in files to handle these issues, please send them to me <michael dot hines at yale dot edu> and I will start
making use of them myself.

Post Reply