You are not logged in.

#1 2010-02-21 21:45:25

rent0n
Member
From: Italy
Registered: 2009-10-29
Posts: 457
Website

[Request] Cn3D

Hi there smile

Is there anyone interested in making a package for Cn3D?

Cn3D is a simple and intuitive protein visualization software made by the NCBI.
Unlike other similar programs, Cn3D is mainly aimed at biologists and not at chemists and focuses on sequence-to-structure relationships rather than on the atomic structure itself.

Unfortunately, it seems to depends on some old gtk, jpeg, png and tiff libraries and I am still not able to run it on Arch: a working PKGBUILD would really be very useful.
[ Here's my experience with it: http://bbs.archlinux.org/viewtopic.php?pid=711826 ]

However, Ubuntu has a ncbi-x11-tools package with Cn3D that works out of the box, so it should be possible to make a package.

Thank you very much!

Last edited by rent0n (2010-02-21 21:59:57)


rent0n@deviantART | rent0n@bitbucket | rent0n@identi.ca | LRU #337812
aspire: Acer Aspire 5920 Arch Linux x86_64 | beetle: Gericom Beetle G733 Arch Linux i686

Offline

#2 2010-02-22 17:03:24

Corex
Member
From: Sweden
Registered: 2010-01-31
Posts: 63

Re: [Request] Cn3D

Hey, i'm currently making a package for you but ran into some trouble, in the PKGBUILD we have to set under what license the application is licensed under and I can't find that information anywhere =/ Do you know what license or could ya find out?

Offline

#3 2010-02-22 17:14:48

rent0n
Member
From: Italy
Registered: 2009-10-29
Posts: 457
Website

Re: [Request] Cn3D

Wow, thank you for your effort!
I can't find an official license but there is a Copyright page on the Ubuntu package page: http://changelogs.ubuntu.com/changelogs … .copyright

Is this enough?


rent0n@deviantART | rent0n@bitbucket | rent0n@identi.ca | LRU #337812
aspire: Acer Aspire 5920 Arch Linux x86_64 | beetle: Gericom Beetle G733 Arch Linux i686

Offline

#4 2010-02-22 17:18:21

Corex
Member
From: Sweden
Registered: 2010-01-31
Posts: 63

Re: [Request] Cn3D

license (array)
This field specifies the license(s) that apply to the package. Commonly-used licenses are found in /usr/share/licenses/common. If you see the package's license there, simply reference it in the license field (e.g. license=('GPL')). If the package provides a license not found in /usr/share/licenses/common, then you should include the license in the package itself and set license=('custom') or license=('custom:LicenseName'). The license should be placed in $pkgdir/usr/share/licenses/$pkgname when building the package. If multiple licenses are applicable for a package, list all of them: license=('GPL' 'FDL').

I think in this case we have to put a custom license and add the license to the package... I'm not really good at that though since i'm Swedish ^^ No clue what rules applies hehe.

EDIT: Usually there's a LICENSE file in the package that one downloads but there's none there, no clue how to solve that for not breaking any rules.. Anyone else knows?

Last edited by Corex (2010-02-22 17:29:51)

Offline

#5 2010-02-22 17:30:57

rent0n
Member
From: Italy
Registered: 2009-10-29
Posts: 457
Website

Re: [Request] Cn3D

I would place license=('custom') and put the following text in $pkgdir/usr/share/licenses/$pkgname:

copyright wrote:

This package was originally debianized by Stephane Bortzmeyer
<bortzmeyer@pasteur.fr> on Tue, 22 Sep 1998 17:23:12 +0200.
Subsequent maintainers have been Dr. Guenter Bechly
<gbechly@debian.org> and Aaron M. Ucko <ucko@debian.org>, who
conveniently happens to work at NCBI. ;-)

It was downloaded from ftp://ncbi.nlm.nih.gov/toolbox/ncbi_tools/

The reference Web server is http://www.ncbi.nlm.nih.gov/BLAST/

The upstream authors are several: see the README. The contact address
is toolbox@ncbi.nlm.nih.gov.


Copyright:

The NCBI toolkit has been put into the public domain, completely unfettered:

                          PUBLIC DOMAIN NOTICE
             National Center for Biotechnology Information

This software/database is a "United States Government Work" under the
terms of the United States Copyright Act.  It was written as part of
the author's official duties as a United States Government employee and
thus cannot be copyrighted.  This software/database is freely available
to the public for use. The National Library of Medicine and the U.S.
Government have not placed any restriction on its use or reproduction.

Although all reasonable efforts have been taken to ensure the accuracy
and reliability of the software and data, the NLM and the U.S.
Government do not and cannot warrant the performance or results that
may be obtained by using this software or data. The NLM and the U.S.
Government disclaim all warranties, express or implied, including
warranties of performance, merchantability or fitness for any particular
purpose.

Please cite the author in any work or product based on this material.

It should be fine.


rent0n@deviantART | rent0n@bitbucket | rent0n@identi.ca | LRU #337812
aspire: Acer Aspire 5920 Arch Linux x86_64 | beetle: Gericom Beetle G733 Arch Linux i686

Offline

#6 2010-02-22 17:32:21

Corex
Member
From: Sweden
Registered: 2010-01-31
Posts: 63

Re: [Request] Cn3D

K thx, i'm on it

Offline

#7 2010-02-22 21:06:18

Corex
Member
From: Sweden
Registered: 2010-01-31
Posts: 63

Re: [Request] Cn3D

Sorry for the delay but here it is:

Cn3D.install

post_install() {
        ln -s /usr/lib/libpng.so /usr/lib/libpng.so.2
        ln -s /usr/lib/libjpeg.so /usr/lib/libjpeg.so.62
        echo "env CN3D_HOME=/usr/share/Cn3D-4.1" >> ~/.bashrc
        echo "export CN3D_HOME=/usr/share/Cn3D-4.1" >> ~/.bashrc
}

post_remove() {
        rm /usr/lib/libpng.so.2
        rm /usr/lib/libjpeg.so.62
        cat <<- EOM
        ==>  You might wan't to remove the following two lines in ~/.bashrc
        ==>       env CN3D_HOME=/usr/share/Cn3D-4.1
        ==>       export CN3D_HOME=/usr/share/Cn3D-4.1
        EOM
        /bin/true
}

PKGBUILD

# Maintainer: Erol Grahm <erol at grahm dot nu>

pkgname=Cn3D
pkgver=4.1
pkgrel=1
pkgdesc="Allows you to view 3D structures from NCBI's Entrez retrieval service."
arch=('i686')
url="http://www.ncbi.nlm.nih.gov/Structure/CN3D/cn3d.shtml"
license=('custom')
depends=('gtk<=1.2.10' 'libpng' 'zlib' 'libjpeg' 'libtiff')
install=$pkgname.install
source=(ftp://ftp.ncbi.nih.gov/cn3d/$pkgname-$pkgver.Linux.tar.gz)
md5sums=('c9dc58316ffe4b30694a339af3dbb3df')

build() {
  install -d $pkgdir/usr/bin
  install -d $pkgdir/usr/share/$pkgname-$pkgver
  cp -r $srcdir/$pkgname-$pkgver/data $pkgdir/usr/share/$pkgname-$pkgver/
  cp $srcdir/$pkgname-$pkgver/cn3d_commands.htb $pkgdir/usr/share/$pkgname-$pkgver/
  cp $srcdir/$pkgname-$pkgver/Cn3D $pkgdir/usr/bin/
}

Not on AUR yet but soon after i fix the license stuff.. Still not fixed =/ But this will work, just can't put it up yet...

Steps to install manually:

Execute following commands as regular user in term (not root or su/sudo)
mkdir ~/Cn3D
cd ~/Cn3D
nano Cn3D.install (and past the first code above in this file, save and exit)
nano PKGBUILD (and past the second code above in this file, save and exit)
makepkg -s -i -c
cd ..
rm -r ~/Cn3D

All done, to run the program type "Cn3D"
To uninstall Cn3D just "pacman -R Cn3D"
Short explanation for the makepkg flags, -s = makepkg as super user, -i = install package after successful build, -c = clean pkg and src files after successful install.

Lemme know how it works. Cheers

Last edited by Corex (2010-02-22 21:22:58)

Offline

#8 2010-02-23 14:50:42

rent0n
Member
From: Italy
Registered: 2009-10-29
Posts: 457
Website

Re: [Request] Cn3D

Thank you very much for your work Corex.

There are some problems:

1. During the install (last part) I get these warnings:

(1/1) installing Cn3D                               100%
/tmp/alpm_EXjAi1/.INSTALL: line 17: warning: here-document at line 11 delimited by end-of-file (wanted `EOM')
/tmp/alpm_EXjAi1/.INSTALL: line 18: syntax error: unexpected end of file
/tmp/alpm_EXjAi1/.INSTALL: line 18: warning: syntax errors in . or eval will cause future versions of the shell to abort as Posix requires

2. If I try to run the program I get:

$ Cn3D
Illegal instruction

and the program doesn't start.

3. For some reason, after installing Cn3D every time I open my terminal I get:

GREP_COLOR=1;33
LESS_TERMCAP_mb=
CN3D_HOME=/usr/share/Cn3D-4.1
LESS_TERMCAP_md=
XDG_DATA_HOME=/home/enrico/.local/share
LESS_TERMCAP_me=
TERM=xterm
SHELL=/bin/bash
XDG_SESSION_COOKIE=d3dc79e484e0da5d8c2ac7624ae2b748-1266915525.648016-574093626
HISTSIZE=1000
WINDOWID=39846961
LESS_TERMCAP_ue=
USER=enrico
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:
OOO_FORCE_DESKTOP=gnome
MOZ_PLUGIN_PATH=/usr/lib/mozilla/plugins
XDG_CONFIG_DIRS=/etc/xdg
LESS_TERMCAP_us=
MAIL=/var/mail/enrico
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/bin/perlbin/site:/usr/bin/perlbin/vendor:/usr/bin/perlbin/core
PWD=/home/enrico
INPUTRC=/etc/inputrc
JAVA_HOME=/usr/lib/jvm/java-6-openjdk
EDITOR=/usr/bin/nano
LANG=en_GB.UTF-8
PS1=\[\e[1m\]┌─[\u@\h][\W]\n\[\e[1m\]└─[\$]\[\e[0m\] 
PS3=> 
PS2=> 
HISTCONTROL=erasedups
HOME=/home/enrico
SHLVL=1
PS4=+ 
XDG_CONFIG_HOME=/home/enrico/.config
XDG_CACHE_HOME=/home/enrico/.cache
LOGNAME=enrico
LESS=-R
VISUAL=/usr/bin/nano
XDG_DATA_DIRS=/usr/share:/usr/local/share
LESS_TERMCAP_so=
J2SDKDIR=/usr/lib/jvm/java-6-openjdk
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-ns9U1u5clE,guid=7a35073592cf7b8f716113254b8398c5
PKG_CONFIG_PATH=/usr/lib/pkgconfig
PROMPT_COMMAND=echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"
DISPLAY=:0.0
J2REDIR=/usr/lib/jvm/java-6-openjdk/jre
G_BROKEN_FILENAMES=1
XAUTHORITY=/home/enrico/.Xauthority
COLORTERM=Terminal
LESS_TERMCAP_se=
_=/usr/bin/env

This is probably related to these lines added in ~/.bashrc, because removing them makes the terminal behave normally:

env CN3D_HOME=/usr/share/Cn3D-4.1
export CN3D_HOME=/usr/share/Cn3D-4.1

Can you confirm these issues?
Thanks smile

Last edited by rent0n (2010-02-23 14:51:41)


rent0n@deviantART | rent0n@bitbucket | rent0n@identi.ca | LRU #337812
aspire: Acer Aspire 5920 Arch Linux x86_64 | beetle: Gericom Beetle G733 Arch Linux i686

Offline

#9 2010-02-23 15:32:38

Corex
Member
From: Sweden
Registered: 2010-01-31
Posts: 63

Re: [Request] Cn3D

http://aur.archlinux.org/packages.php?ID=34971

Uploaded to AUR for easier testing. i've remove 'env' from bash see if that works better and replace EOM with EndOfMessage instead (strange both works for me though). Lemme know

Offline

#10 2010-02-23 15:33:25

Corex
Member
From: Sweden
Registered: 2010-01-31
Posts: 63

Re: [Request] Cn3D

Also namcap complained about capital letter in package name so i've modified that too. If the terminal still shows messages like that could you also post your .bashrc file that's modified by the package.

Last edited by Corex (2010-02-23 15:43:26)

Offline

#11 2010-02-23 15:51:28

rent0n
Member
From: Italy
Registered: 2009-10-29
Posts: 457
Website

Re: [Request] Cn3D

Removed the old version and installed the AUR one. No more strange messagges on the teminal, but I can't run the program, it returns:

Illegal Instruction

Can you run the program on your system?


rent0n@deviantART | rent0n@bitbucket | rent0n@identi.ca | LRU #337812
aspire: Acer Aspire 5920 Arch Linux x86_64 | beetle: Gericom Beetle G733 Arch Linux i686

Offline

#12 2010-02-23 15:53:31

Corex
Member
From: Sweden
Registered: 2010-01-31
Posts: 63

Re: [Request] Cn3D

Yeah sure... Is the only message "Illegal Instruction" ?

I did a fresh install of Cn3D and it runs fine for some odd reason google'ing the message it seems several people has the same problem, i'll see if i can figure out what the reason is.

cn3d.gif

Last edited by Corex (2010-02-23 16:06:26)

Offline

#13 2010-02-23 16:46:47

rent0n
Member
From: Italy
Registered: 2009-10-29
Posts: 457
Website

Re: [Request] Cn3D

I want it!

Removed and reinstalled, now I get a different error via a popup GUI message:

Severe Error
Fatal: Cannot open dictionary file '/home/enrico/data/bstdt.vl'

EDIT:
After relogin I get the Illegal Instruction error and nothing more.
There's something wrong...:(

Last edited by rent0n (2010-02-23 16:53:28)


rent0n@deviantART | rent0n@bitbucket | rent0n@identi.ca | LRU #337812
aspire: Acer Aspire 5920 Arch Linux x86_64 | beetle: Gericom Beetle G733 Arch Linux i686

Offline

#14 2010-02-23 16:51:48

Corex
Member
From: Sweden
Registered: 2010-01-31
Posts: 63

Re: [Request] Cn3D

Puh then your in luck wink That's really odd, are your arch linux updated? My bash works fine but yours doesn't really act the same way.

$ bash --version
GNU bash, version 4.1.2(2)-release (i686-pc-linux-gnu)

It's what mine says

Last edited by Corex (2010-02-23 16:54:20)

Offline

#15 2010-02-23 16:53:36

toad
Member
From: if only I knew
Registered: 2008-12-22
Posts: 1,775
Website

Re: [Request] Cn3D

And what does ls -la /home/enrico/data/ say? Anything in there which might help you along?


never trust a toad...
::Grateful ArchDonor::
::Grateful Wikipedia Donor::

Offline

#16 2010-02-23 16:59:22

Corex
Member
From: Sweden
Registered: 2010-01-31
Posts: 63

Re: [Request] Cn3D

The application doesn't create /home/enrico/data, on their website you have to set:
Set the CN3D_HOME environment variable to your Cn3D-4.1 directory. For example, if you are using (t)csh, you can put setenv CN3D_HOME /home/myuserid/Cn3D-4.1 in your .cshrc file.

And Arch Linux uses bash as default so i tried to convert setenv CN3D_HOME to bash style env, but if he puts env in he's .bashrc it echo's everything to terminal everytime it's opened.

The application itself will always search in homedir for the datafiles, but aur packages should not be installed in home dir so we gotta tell bash somehow to look in /usr/share/cn3d-4.1/data/ instead... Works on my machine, both "CN3D_HOME=/usr/share/cn3d-4.1" and "env CN3D_HOME=/usr/share/cn3d-4.1" get registered in my bash correctly...

Hey btw rent0n, when you've installed Cn3D, you gotta open a NEW terminal window for the new lines to get registered in bash.

Offline

#17 2010-02-23 16:59:55

rent0n
Member
From: Italy
Registered: 2009-10-29
Posts: 457
Website

Re: [Request] Cn3D

bash --version
GNU bash, version 4.1.2(2)-release (i686-pc-linux-gnu)

There's no a /home/enrico/data directory at all.


rent0n@deviantART | rent0n@bitbucket | rent0n@identi.ca | LRU #337812
aspire: Acer Aspire 5920 Arch Linux x86_64 | beetle: Gericom Beetle G733 Arch Linux i686

Offline

#18 2010-02-23 17:07:52

Corex
Member
From: Sweden
Registered: 2010-01-31
Posts: 63

Re: [Request] Cn3D

Yeah i think that's the problem, after install open a new terminal window and execute $ Cn3D

Offline

#19 2010-02-23 17:56:29

Corex
Member
From: Sweden
Registered: 2010-01-31
Posts: 63

Re: [Request] Cn3D

That's weird, i installed the package on my laptop also running archlinux, but i keep getting illegal instruction too, rebooted but that didn't help.. Did you do anything particular to solve that?

Last edited by Corex (2010-02-23 18:12:10)

Offline

#20 2010-02-23 21:41:25

rent0n
Member
From: Italy
Registered: 2009-10-29
Posts: 457
Website

Re: [Request] Cn3D

No, because I haven't solved it yet!
That's weird indeed. What are the differeneces between your desktop and your laptop? I think the problem might be related to some missing libraries maybe?

However I've got some news: if I run 'Cn3D' the program seems to start but then exits immediately, displaying 'Illegal instruction' on the terminal. But if I run 'Cn3D something' I get an error message saying that the format is not recognized but I can see the GUI and navigate through the menus. When I try to open  a Cn3D file it exits and displays 'Illegal instruction'.

Have you got any ideas? wink


rent0n@deviantART | rent0n@bitbucket | rent0n@identi.ca | LRU #337812
aspire: Acer Aspire 5920 Arch Linux x86_64 | beetle: Gericom Beetle G733 Arch Linux i686

Offline

#21 2010-02-23 22:06:20

Staerseus
Member
From: Prague
Registered: 2009-11-07
Posts: 109
Website

Re: [Request] Cn3D

can you add x86_64 to the PKGBUILD, please for the 64 bit users? :-) Thank you very much, Corex


Thanks for the GNU/Linux. EDIT:Thanks for the GNU/Linux, Linux guru, for the manuals and wikis.

Offline

#22 2010-02-24 04:04:27

Corex
Member
From: Sweden
Registered: 2010-01-31
Posts: 63

Re: [Request] Cn3D

rent0n wrote:

No, because I haven't solved it yet!
That's weird indeed. What are the differeneces between your desktop and your laptop? I think the problem might be related to some missing libraries maybe?

However I've got some news: if I run 'Cn3D' the program seems to start but then exits immediately, displaying 'Illegal instruction' on the terminal. But if I run 'Cn3D something' I get an error message saying that the format is not recognized but I can see the GUI and navigate through the menus. When I try to open  a Cn3D file it exits and displays 'Illegal instruction'.

Have you got any ideas? wink

That's weird, on my media desktop i have arch linux + openbox, custom kernel but on my laptop i have arch linux + openbox, generic kernel, that's the only difference... I'll try to compare the libraries to pinpoint if one is causing the problem.

can you add x86_64 to the PKGBUILD, please for the 64 bit users? :-) Thank you very much, Corex

To be honest i have no experience or knowledge at all for the 64bit architecture sad

Offline

#23 2010-02-24 04:11:40

flamelab
Member
From: Athens, Hellas (Greece)
Registered: 2007-12-26
Posts: 2,160

Re: [Request] Cn3D

OH, wait...

post_install() {
    ln -s /usr/lib/libpng.so /usr/lib/libpng.so.2
    ln -s /usr/lib/libjpeg.so /usr/lib/libjpeg.so.62
    echo "CN3D_HOME=/usr/share/cn3d-4.1" >> ~/.bashrc
    echo "export CN3D_HOME=/usr/share/cn3d-4.1" >> ~/.bashrc

WHAT ?! yikes

The .install file violates an AUR packaging guideline (we never touch user's $HOME through a package install or through PKGBUILD) and a general linux one (we never symlink .so files).

What must be done:

1)Add libjpeg6 and libpng12 to the depends.
2)Remove the ~/.bashrc lines and add them as a comment to the user to add them himself in ~/.bashrc or /etc/profile.

Last edited by flamelab (2010-02-24 04:12:36)

Offline

#24 2010-02-24 06:00:04

Corex
Member
From: Sweden
Registered: 2010-01-31
Posts: 63

Re: [Request] Cn3D

Thanks flamelab, i'll fix it immediately.

Offline

#25 2010-02-24 06:23:05

Corex
Member
From: Sweden
Registered: 2010-01-31
Posts: 63

Re: [Request] Cn3D

I did as you suggested, it installs correctly though error appears when trying to launch Cn3D:

Cn3D: error while loading shared libraries: libpng.so.2: cannot open shared object file: No such file or directory

So the custom packages didn't seem to solve the linking problem hmm

Theese libpng's exist now:
/usr/lib/libpng.so
/usr/lib/libpng.so.3
/usr/lib/libpng.so.3.40.0

Last edited by Corex (2010-02-24 06:25:57)

Offline

Board footer

Powered by FluxBB