You are not logged in.

#26 2010-02-24 14:19:42

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

Re: [Request] Cn3D

I can't find solution for the 'Illegal Instruction', i'm gonna try another approach and instead compile Cn3D from source wich was in the source of NCBI C++ Toolbox wich in turn requires quite alot ;P.. Still working on it.

Offline

#27 2010-02-24 19:35:01

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

Re: [Request] Cn3D

I'm with you, keep up with the good work! 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

#28 2010-02-24 20:14:40

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

Re: [Request] Cn3D

Corex wrote:

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

It's possible that you need an older version of libpng uploaded on AUR wink

Offline

#29 2010-02-24 20:23:39

leepesjee
Member
Registered: 2008-11-06
Posts: 57

Re: [Request] Cn3D

Corex, I've been trying the same route. So far. I've been able to compile the C and C++ toolbox, but i'm having a hard time compiling the Cn3D app, due to wxwidgets issues. I've been following www.blueprint.org/Home/ncbi-toolkit-cou … d-on-linux mainly.

Offline

#30 2010-02-25 07:53:18

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

Re: [Request] Cn3D

yeah i'm following that too, made a patch for the errors in ncbitoolkit so that compiles correctly, made wxwidgets-wxall 2.8.10 (it's on AUR now) and now i'm on ncbi++ toolkit though not done with that yet, it doesn't seem to find the wxwidget files though everythings setup correctly wich i'm currently troubleshooting. So when that's done lastly i'll try compile cn3d see what i get..

I also made a fresh arch install in vm, and the cn3d binaries doesn't work there, but if i take the custom kernel config i've made for my media desktop when cn3d binaries work, cn3d runs on the arch vm, so the error seems to be kernel related, not lib related. (just alil update on that problem) but i'm no kernel guru so i have no clue what it depends on. We're forced anyway to compile Cn3D for it to prly work on arch and pray to god we don't get the same error in the end ^^

Offline

#31 2010-02-25 21:34:54

leepesjee
Member
Registered: 2008-11-06
Posts: 57

Re: [Request] Cn3D

From what i make of it, you have to set NCBI=/path/to/C-toolkit/ncbi
and make a softlink from $NCBI/wxwin to /usr.
It does find the wx headers and libs then. However, I still have complile errors, compiling either the C++ toolkit or the Cn3d app. Tried different wxwidgets versions, compiled with different settings, but no luck so far. My C++ knowledge is lacking to beat it.

Offline

#32 2010-02-26 04:23:16

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

Re: [Request] Cn3D

Same here, it's driving me nuts... Tried 2.8.10 and 2.6.4 and i install it (just for testing) the default location /usr/wx, no errors everythings fine but when configuring NCBI Toolkit C++ before Cn3D compile, the configure won't find wxWidgets nor wxWindows, wich gives Cn3D compile error that it requires wxWidgets, though the other apps in the toolkit compiles fine, just not the wxWidgets ones, also tried diffrent configure flags for wxWidgets just in case but no go... I'll probably install CentOS5 (check version try to pinpoint the problem) to see what it could depend on since the instructions are for that OS...

Offline

#33 2010-02-28 19:57:00

leepesjee
Member
Registered: 2008-11-06
Posts: 57

Re: [Request] Cn3D

I made some progress here. In fact I have a compiled and working program. Got a decisive hint from the building instructions of the ncbi Genome Workbench http://www.ncbi.nlm.nih.gov/projects/gb … nload.html
Wxwidgets has to be compiled with: --prefix=/usr --with-opengl --disable-unicode --disable-monolithic --disable-sockets --with-gtk
Some more hacks were needed, but now it works.
Wondering now how to make a PKGBUILD out of this. It's possible to put the complete build instructions in it, which will result in a 4.5 GB source tree and more than an hour of building or so.  Distributing it as a binary (as ncbi does) would be more appropriate, but i'am not sure if my home-build binary will run on other systems. At least there is the 32/64 bit issue, but there may be more complications (ldd gives a link to an nvidia-lib).
So, will try to put it all in a PKGBUILD. Still have to work out the install instructions though.

Offline

#34 2010-02-28 20:01:40

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

Re: [Request] Cn3D

Yeah i'm on the same track, so i'm trying to play around with the settings to compile minmum requirements for cn3d... The download will be big but i think it's possible to shrink the compile time...

Feel free to post a very short howto and i can make a PKGBUILD out of it... I know lots bout ncbi c, ncbi c++ and genome compile, but down many hours on it and patching.

Last edited by Corex (2010-02-28 20:03:17)

Offline

#35 2010-03-01 14:11:23

leepesjee
Member
Registered: 2008-11-06
Posts: 57

Re: [Request] Cn3D

OK here you go:

# Maintainer: leepesjee <lpeschier at xs4all dot nl>
pkgname=cn3d
pkgver=4.2
pkgrel=1
pkgdesc="A visualization tool for biomolecular structures, sequences, and sequence alignments."
arch=('i686' 'x86_64')
license=('custom')
url="http://www.ncbi.nlm.nih.gov/Structure/CN3D/cn3d.shtml"
depends=('wxwidgets-ncbi')
makedepends=('tcsh')
source=(ftp://ftp.ncbi.nlm.nih.gov/toolbox/ncbi_tools/ncbi.tar.gz
        ftp://ftp.ncbi.nlm.nih.gov/toolbox/ncbi_tools++/CURRENT/ncbi_cxx--May_15_2009.tar.gz
        context.cpp1.patch
        context.cpp2.patch
        cn3d
        cn3d.desktop
        ncbi.license)
md5sums=('7f6dcedc378dfd726933912b7ce6cb1e'
     'abf0f63132f270c363531ad0b486aac3'
         '76991ac1558545183170568f8af5e015'
         'bc4daf71c6eacce269edfd017de05cef'
         '70af38d704ad17ca219fadc4d960e1c2'
         'e8bf6ba0d335e27c312bc39ff7b485b9'
         '8cdf51908efacc8a8b055593fa063d09')

build() {
  cd ${srcdir}
  sed -i 's|-Wl,-Bstatic -lXm|-lXm|' ./ncbi/platform/linux*.ncbi.mk
  unset LS_COLORS
  ./ncbi/make/makedis.csh 2>&1 | tee out.makedis.txt
  cd ./ncbi_cxx*
  patch -Np1 -i ../../context.cpp1.patch
  patch -Np1 -i ../../context.cpp2.patch
  export NCBI=${srcdir}/ncbi
  ./configure --without-debug --with-wxwidgets=/usr --with-mesa --with-opengl 2>&1 | tee ../out.confcpp.txt
  make
  cd ./GCC443-Release64/build/app/cn3d
  make LDFLAGS="-lGLU -lGL"

# install the package in /opt
  install -dv -m755 $pkgdir/opt/ncbi/data
  install -dv -m755 $pkgdir/opt/ncbi/bin
  install -m755 $srcdir/ncbi_cxx*/GCC443-Release64/bin/$pkgname $pkgdir/opt/ncbi/bin
  install -m644 $srcdir/ncbi/data/* $pkgdir/opt/ncbi/data
  install -m644 $srcdir/ncbi_cxx*/src/app/$pkgname/cn3d_commands.htb $pkgdir/opt/ncbi/bin
  cd $pkgdir/opt/ncbi/bin
  ln -s ../data

# install a start script in /usr/bin
  install -dv -m755 $pkgdir/usr/bin
  install -m755 $startdir/cn3d $pkgdir/usr/bin

# Install license
  install -dv -m755 $pkgdir/usr/share/licenses/$pkgname
  install -m644 $startdir/ncbi.license $pkgdir/usr/share/licenses/$pkgname

# install icon
  install -m755 -d ${pkgdir}/usr/share/pixmaps
  install -m644 $srcdir/ncbi_cxx*/src/app/$pkgname/cn3d42App.xpm ${pkgdir}/usr/share/pixmaps
  install -m755 -d ${pkgdir}/usr/share/applications
  install -m644 $startdir/$pkgname.desktop ${pkgdir}/usr/share/applications/
}

As you can see, i've included a wxwidgets-ncbi depend, which i've just put on AUR, which has the configure flags needed.
Things are not perfect yet, but this seems to work and can be used to test.
Please note that the source tree will expand to 4.5GB!

We can put this on AUR. However there's allready a cn3d package. Corex, could you rename your package on AUR to cn3d-bin (as it's a binary package)?

Offline

#36 2010-03-01 14:16:56

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

Re: [Request] Cn3D

I'll ask to get it removed completly.. I'll do it now... Got some other packages that need to be removed also.

Offline

#37 2010-03-01 14:38:10

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

Re: [Request] Cn3D

Great guys, teamwork is powerful!
Let me know when the right PKGBUILD is uploaded to AUR and I will test it.

Thank you!


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

#38 2010-03-01 14:42:52

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

Re: [Request] Cn3D

Np, I've got VM's setup now so it'll be tested on a completely fresh install both i686 and x86_64, I've got so mad at this and i can't stop working with it.. Addictive, and very educational wich i need big time ;P Will anounce it here when ready and stable.

Last edited by Corex (2010-03-01 14:43:27)

Offline

#39 2010-03-01 15:11:21

leepesjee
Member
Registered: 2008-11-06
Posts: 57

Re: [Request] Cn3D

rentOn, just realize now that you'll need the patches etc also to build (otherwise you could have just copied the text, name it PKGBUILD and run makepkg).

context.cpp1.patch

--- ./src/dbapi/driver/dblib/context.cpp.orig    2010-03-01 01:26:18.000000000 +0100
+++ ./src/dbapi/driver/dblib/context.cpp    2010-03-01 01:26:32.000000000 +0100
@@ -781,7 +781,7 @@
 #  elif NCBI_FTDS == 8
 #    define NCBI_FTDS_DRV_NAME    "ftds8"
 #    define NCBI_FTDS_ENTRY_POINT DBAPI_E_ftds8
-#  elif
+#  else
 #    error "This version of FreeTDS is not supported"
 #  endif
 #endif

context.cpp2.patch

--- ./src/dbapi/driver/ftds8/context.cpp.orig    2010-03-01 02:18:31.000000000 +0100
+++ ./src/dbapi/driver/ftds8/context.cpp    2010-03-01 02:19:34.000000000 +0100
@@ -647,7 +647,7 @@
 #  elif NCBI_FTDS == 8
 #    define NCBI_FTDS_DRV_NAME    "ftds8"
 #    define NCBI_FTDS_ENTRY_POINT DBAPI_E_ftds8
-#  elif
+#  else
 #    error "This version of FreeTDS is not supported"
 #  endif
 #endif

cn3d

#!/bin/bash
cd /opt/ncbi/bin
./cn3d

We've to wait till the current cn3d entry in aur is removed. If you want to test (and are impatient), put these all in text files with the given names, put them in the same dir as the PKGBUILD and run makepkg. For the time being, you can comment out (put a # in front) the install lines for the license and icon. You probably also have to remove cn3d.desktop and ncbi.license in the source line and the corresponding md5sums.
To run, just type cn3d in a terminal.

Offline

#40 2010-03-01 15:15:54

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

Re: [Request] Cn3D

Cn3D removed from AUR now.

Offline

#41 2010-03-01 15:24:46

leepesjee
Member
Registered: 2008-11-06
Posts: 57

Re: [Request] Cn3D

Wow, arch is fast!
New version placed on AUR.

Offline

#42 2010-03-01 15:27:18

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

Re: [Request] Cn3D

Yeah alil freaky ;P Arch pwns.

Offline

#43 2010-03-01 16:12:34

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

Re: [Request] Cn3D

If you don't mind could you add this patch to replace the X11 paths and replaced -mcpu in the ncbi.tar.gz sources:

ncbi.patch

diff -aur ncbi/platform/linux-x86.ncbi.mk ncbi.fix/platform/linux-x86.ncbi.mk
--- ncbi/platform/linux-x86.ncbi.mk    2009-02-04 15:24:03.000000000 +0100
+++ ncbi.fix/platform/linux-x86.ncbi.mk    2010-03-01 17:08:30.983780232 +0100
@@ -11,19 +11,19 @@
 NCBI_AR=ar
 NCBI_CC = gcc -pipe -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_GNU_SOURCE
 NCBI_CFLAGS1 = -c
-NCBI_LDFLAGS1 = -O3 -mcpu=pentium4
-NCBI_OPTFLAG = -O3 -mcpu=pentium4
+NCBI_LDFLAGS1 = -march=generic -mtune=generic -O3
+NCBI_OPTFLAG = -march=generic -mtune=generic -O3
 NCBI_BIN_MASTER = /home/coremake/ncbi/bin
 NCBI_BIN_COPY = /home/coremake/ncbi/bin
 NCBI_INCDIR = /home/coremake/ncbi/include
 NCBI_LIBDIR = /home/coremake/ncbi/lib
 NCBI_ALTLIB = /home/coremake/ncbi/altlib
 #will work only when you have Motif installed!
-NCBI_VIBFLAG = -I/usr/X11R6/include -L/usr/X11R6/lib -DWIN_MOTIF
+NCBI_VIBFLAG = -I/usr/include/X11 -L/usr/lib/X11 -DWIN_MOTIF
 NCBI_VIBLIBS = -lXmu -lXm -lXt -lSM -lICE -lXext -lXp -lX11 -ldl
 #warning! If you have only dynamic version of Motif or Lesstif
 #you should delete -Wl,-Bstatic sentence from the next line:
-NCBI_DISTVIBLIBS = -L/usr/X11R6/lib -lXmu -lXm -lXt -lSM -lICE -lXext -lXp -lX11 -ldl
+NCBI_DISTVIBLIBS = -L/usr/lib/X11 -lXmu -lXm -lXt -lSM -lICE -lXext -lXp -lX11 -ldl
 NCBI_OTHERLIBS = -lm
 NCBI_RANLIB = ranlib
 # Used by makedis.csh
@@ -37,9 +37,9 @@
 # OPENGL_INCLUDE and OPENGL_LIBS to suit local environment
 # OPENGL_TARGETS = Cn3D
 OPENGL_NCBI_LIBS = LIB400=libvibrantOGL.a LIB3000=libncbicn3dOGL.a
-OPENGL_INCLUDE = -I/usr/X11R6/include
-OPENGL_LIBS = -L/usr/X11R6/lib -lGL -lGLU
-NCBI_OGLLIBS = -L/usr/X11R6/lib -lGL -lGLU
+OPENGL_INCLUDE = -I/usr/include/X11
+OPENGL_LIBS = -L/usr/lib/X11 -lGL -lGLU
+NCBI_OGLLIBS = -L/usr/lib/X11 -lGL -lGLU
 
 # uncomment (and change appropriately) these lines to build PNG
 # output support into Cn3D (OpenGL version only)

Offline

#44 2010-03-01 16:44:13

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

Re: [Request] Cn3D

Also i noticed that on 2 places the GCC443-Release64 folder will fail to install on i686, it'll be named GCC443-Release

Offline

#45 2010-03-01 18:31:15

leepesjee
Member
Registered: 2008-11-06
Posts: 57

Re: [Request] Cn3D

Have just been out for a bike ride and just this issue crossed my mind. I'll change the reference to GCC443-Release*
I missed the old-style X11 path's. It doesn't seem to give problems though, but it's better to put in the right path's. Would it be OK to change X11R6/include to include/X11 and X11R6/lib to lib/X11 with two sed lines? In that way we can tackle all the linux*.ncbi.mk files together.

Just a question. I've seen in the logs that the C++ toolkit build does not find the C toolkit, although it seems to look at the right location. I guess that's the reason that some the files cn3d needs from the C-toolkit are not found out of the box. Any thoughts?

Offline

#46 2010-03-01 18:45:04

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

Re: [Request] Cn3D

Well firstly i know nothing about sed sad( i've tried to learn but haven't found a good tutorial i can learn from, wanna learn sed like hell but seems hard ^^...

Second, yeah i had that problem too, found some info:

NCBI="/path/to/ncbi/"
NCBI_C_PATH="$NCBI" # Path to the NCBI C Toolkit Source: http://www.ncbi.nlm.nih.gov/bookshelf/b … ocalizatio

Some intresting flags i read so i got the idea maybe if one read this it's possible to shrink compile time:
http://www.ncbi.nlm.nih.gov/bookshelf/b … l_Projects

Offline

#47 2010-03-01 18:47:27

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

Re: [Request] Cn3D

Oh and i noticed the src / include links (the second posted link) and there's sources to skip the large sources, but have no clue how to download that, their SVN guest read access haven't been activated yet.. But they will, someday ^^..

Last edited by Corex (2010-03-01 18:47:59)

Offline

#48 2010-03-01 21:39:20

leepesjee
Member
Registered: 2008-11-06
Posts: 57

Re: [Request] Cn3D

Sed is powerful and there's a lot learn. I just know a few nice tricks, which i use from time to time. Especially the s(ubstitution). I found this tutorial helpful: http://www.grymoire.com/Unix/Sed.html
I had a look at the table with the variables too. The settings as they are now should work. There seems to be something wrong with the test in configure.
I don't know a lot about the compiler flags. Had a peek at http://gcc.gnu.org/onlinedocs/gcc/i386- … 64-Options and a the Makepkg.conf archlinux wiki. Wouldn't -march=native be more appropriate?

Offline

#49 2010-03-01 22:07:21

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

Re: [Request] Cn3D

Yeah prly right, i just wen't with that in the default makepkg.conf i had mtune generic and march uses info from mtune i think, was more just to get rid of the errormsg's so i could check for errors easier.

Very nice link, thx.. Yeay gonna learn sed basics ^^

Offline

#50 2010-03-01 22:19:52

leepesjee
Member
Registered: 2008-11-06
Posts: 57

Re: [Request] Cn3D

Put the updated PKGBUILD on aur.

Offline

Board footer

Powered by FluxBB