LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-02-2009, 05:00 PM   #1
Alexvader
Member
 
Registered: Oct 2009
Location: Japan
Distribution: Arch, Debian, Slackware
Posts: 994

Rep: Reputation: 94
Installpkg of a package built w/ src2pkg places the executable in /tmp/...


Hi forum,

I am using src2pkg to build some stuff in Slackware, for instance GMSH ( a finite elements tetrahedral mesher ), http://www.geuz.org/gmsh/;

src2pkg builds the package allright...

bash-3.1# src2pkg gmsh-2.4.2-source.tgz
Found source archive: gmsh-2.4.2-source.tgz
Creating working directories:
PKG_DIR=/tmp/gmsh-2.4.2-pkg-1
SRC_DIR=/tmp/gmsh-2.4.2-src-1
Unpacking source archive - Done
Correcting source permissions - Done
Checking for patches - None found
Found 'cmake' configuration - Configuring using:
cmake -DCMAKE_INSTALL_PREFIX:PATH=/tmp/gmsh-2.4.2-pkg-1/usr
Compiling sources - Using: 'make'
Compiling has been - Successful!
Checking for 'install' rule - Okay
Checking for DESTDIR (or similar) support - Found DESTDIR
Installing using DESTDIR - Using:
make DESTDIR=/tmp/gmsh-2.4.2-pkg-1 install
Installation in DESTDIR - Successful
Processing package content:
Correcting package permissions - Done
Stripping ELF binaries - Using: strip -p --strip-unneeded Done
Checking for standard documents - Done
NOTICE - No man-pages installed by Makefile
Found man-pages in SRC_DIR - Installing in PKG_DIR
Compressing man pages - Done!
Creating slack-desc - From default text
Searching for links in PKG_DIR - None found
Rechecking package correctness:
Checking for misplaced dirs -
Notice - Package contains PKG_DIR directory.
This usually happens because of badly written Makefiles.
You may need to patch the Makefile(s) to correct this.
Or try using INSTALL_TYPE=JAIL to fix this problem.
Rechecking package permissions - Done
Making installable package - Done
Package Creation - Successful! - Package Location:
/tmp/gmsh-2.4.2-x86_64-1.tgz

But when I install this... instead of launching the app in /usr/bin or /usr/local/bin, it dumps it in /tmp/gmsh-2.4.2-src-1/build/gmsh :

bash-3.1# installpkg /tmp/gmsh-2.4.2-x86_64-1.tgz
Verifying package gmsh-2.4.2-x86_64-1.tgz.
Installing package gmsh-2.4.2-x86_64-1.tgz:
PACKAGE DESCRIPTION:
# gmsh
#
# No description was given for this package.
#
# Packaged by src2pkg
Package gmsh-2.4.2-x86_64-1.tgz installed.






bash-3.1# find / -name gmsh
find: `/proc/4293/net': Invalid argument
/tmp/gmsh-2.4.2-src-1/build/gmsh
/tmp/gmsh-2.4.2-pkg-1/usr/include/gmsh
/tmp/gmsh-2.4.2-pkg-1/usr/bin/gmsh
/tmp/gmsh-2.4.2-pkg-1/usr/share/doc/gmsh
/tmp/gmsh-2.4.2-pkg-1/tmp/gmsh-2.4.2-pkg-1/usr/include/gmsh
/tmp/gmsh-2.4.2-pkg-1/tmp/gmsh-2.4.2-pkg-1/usr/bin/gmsh
/tmp/gmsh-2.4.2-pkg-1/tmp/gmsh-2.4.2-pkg-1/usr/share/doc/gmsh
bash-3.1# ./tmp/gmsh-2.4.2-src-1/build/gmsh

This was not what I had in mind... what can I do to install this in its default prefix... ?

BRGDS

Alex
 
Old 11-02-2009, 05:28 PM   #2
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-15.0
Posts: 2,687

Rep: Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375
That is odd, it could be the directory structure of the source thats causing problems, I'm not sure I would have to look, but you can pass configure arguments in src2pkg with the -e. Like so...

src2pkg -e='--libdir-/usr/lib64 --prefix=whatever' pathtosource.tar.gz

Also, you should try using -VV, this is verbose mode, it will show all output from each step, its useful for watching the build in progress and can make it easier to spot errors if there are any.

src2pkg -VV -e='--prefix=whatever' pathtosource.tar.gz
 
Old 11-02-2009, 05:31 PM   #3
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-15.0
Posts: 2,687

Rep: Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375
You can also try trackinstall, it comes with src2pkg, it works a lot like the old checkinstall program. Instead of just running src2pkg with trackinstall you can manually configure and make your package and then just use trackinstall to finish the package. Here is an example

tar xzvf pathtosource.tar.gz
./configre --prefix=/usr
make

now instead of "make install" you would run

trackinstall -i='make install'

and it will finish making the package for you.
 
Old 11-02-2009, 05:51 PM   #4
Alexvader
Member
 
Registered: Oct 2009
Location: Japan
Distribution: Arch, Debian, Slackware
Posts: 994

Original Poster
Rep: Reputation: 94
Quote:
Originally Posted by Daedra View Post
... Like so...

src2pkg -e='--libdir-/usr/lib64 --prefix=whatever' pathtosource.tar.gz
...no avail...
bash-3.1# ls | grep gmsh
gmsh-2.4.2-source.tgz
bash-3.1# src2pkg -e='--prefix=/usr/local' gmsh-2.4.2-source.tgz
Found source archive: gmsh-2.4.2-source.tgz
Deleting old build files - Done
Creating working directories:
PKG_DIR=/tmp/gmsh-2.4.2-pkg-1
SRC_DIR=/tmp/gmsh-2.4.2-src-1
Unpacking source archive - Done
Correcting source permissions - Done
Checking for patches - None found
Found 'cmake' configuration - Configuring using:
cmake -DCMAKE_INSTALL_PREFIX:PATH=/tmp/gmsh-2.4.2-pkg-1/usr --prefix=/usr/local
Skipping compile_source -
FAILED!! No INSTALL_LINE given.
bash-3.1#

...I will now try the trackinstall thing...


BRGDS

Alex
 
Old 11-02-2009, 05:56 PM   #5
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-15.0
Posts: 2,687

Rep: Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375
also it look like from your output that the source is using cmake so the traditional --prefix=/usr wont work, you will need something like...


src2pkg -VV -e='-DCMAKE_INSTALL_PREFIX=/usr'

However src2pkg usually automatically sets the install prefix to /usr for you. Hopefully Gnashley will see this post and fill in my gaps
 
Old 11-02-2009, 06:04 PM   #6
tuxdev
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 2,012

Rep: Reputation: 115Reputation: 115
You *can* change the prefix by setting $PRE_FIX, but DON'T. Using /usr/local as a prefix is wrong and the packages produced are not correct, valid Slackware packages. Slackware conventionally puts anything tracked by pkgtools into /usr and reserves /usr/local for applications that aren't packaged but installed directly from source. This is so that there is less in /usr/local to trudge through if you ever want to remove an app installed there.

src2pkg's handling of CMake sources have been rather problematic.. I believe it should pass -DCMAKE_INSTALL_PREFIX=$PRE_FIX into cmake and DESTDIR=$PKG_DIR/$PRE_FIX into make

Last edited by tuxdev; 11-02-2009 at 06:07 PM.
 
Old 11-02-2009, 06:04 PM   #7
Alexvader
Member
 
Registered: Oct 2009
Location: Japan
Distribution: Arch, Debian, Slackware
Posts: 994

Original Poster
Rep: Reputation: 94
Hi ppl,

... success, :-D

Trackinstall did the job...

I guess that cmake packages are not correctly built w/ src2pkg...

just built the paraview thing, and it created

bash-3.1# ls /tmp | grep paraview
paraview-3.6.1-pkg-1
paraview-3.6.1-src-1
paraview-3.6.1-x86_64-1.tgz

Guess it won't build in the default prefix too...

BRGDS

Alex
 
Old 11-02-2009, 09:22 PM   #8
acummings
Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 615

Rep: Reputation: 50
Hi,

That's (normal) where it builds the packages, in /tmp

However, as root, have you:

root# which paraview

root# which the_pkg_that_I_just_installed

that returns the actual installed location of the executable.

--
Alan.
 
Old 11-03-2009, 01:10 AM   #9
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
I was looking at this package a couple of days ago when you started your other thread and found what was cauign a problem there. If you add '-REAL' to the options it should build the package proeprly. Unfortunately, I don't build many sources which use cmake, so it is never tested as well as other types of sources. ANd a while back we discovered some problems depending on which version of cmake you are using. Since gmsh won't build without cmake 2.6 I had to install that first and then gmsh was the first thing I've built with it.

src2pkg is able to use several different kinds of DESTDIR and CMAKE_INSTALL_PREFIX is one of them, but it is a sepcial case so it must be handled differently. src2pkg tries to detect which kind of DESTDIR should be used -with the 'normal' DESTDIR being first. It turns out cmake Makefiles may also contain DESTDIR and so src2pkg 'sees' that first. That causes the problem because as you can see CMAKE_INSTALL_PREFIX is bot DESTDIR and PRE_FIX together.
Anyway, I found the way to fix it and you can make a quick change to one file to do the same -pending the next release of src2pkg.

Find the file /usr/libexec/src2pkg/08-fake_install and open with a text editor. Scroll down to line 147 and change it from this:
Code:
DESTDIR BUILDROOT INSTALLROOT INSTALL_ROOT install_root instroot DIST_ROOT MAKE_INSTALL_PREFIX
to this:
Code:
MAKE_INSTALL_PREFIX DESTDIR BUILDROOT INSTALLROOT INSTALL_ROOT install_root instroot DIST_ROOT
That fixes it so that it gets handled correctly. Or using the -REAL option makes it install correctly.
 
Old 11-03-2009, 08:30 AM   #10
Alexvader
Member
 
Registered: Oct 2009
Location: Japan
Distribution: Arch, Debian, Slackware
Posts: 994

Original Poster
Rep: Reputation: 94
Hi Gnashley

Thks for your explanation, you mean like src2pkg -e='-REAL' MyPkg.tar.gz... ?

Kawaiiii :-D

Gnumeric, Gmsh, Paraview, BRL-CAD 7.16, MBDyn and Syrthes-3.4.2, are already built...

Some more to build/install before I shift to Slackware as my work OS... OpenDx http://www.opendx.org/index2.php, Scilab 4.x or 5.x http://www.scilab.org/, OpenFOAM-1.6.x http://www.opencfd.co.uk/openfoam/, Dakota http://www.cs.sandia.gov/DAKOTA/, Code-Aster-10.x http://www.code-aster.org/V2/spip.php?rubrique18, Intel Compilers, AVL and XFoil http://web.mit.edu/drela/Public/web/xfoil/, and installing Salome Platform http://www.salome-platform.org/... ;

OpenDx, never tried it... will do it late this afternoon... but as well as Dakota with --enable-graphic, it requires motif widgets... don't know it the OpenMotif enables all it takes...

Scilab 4.x Keeps complaining about not finding libtcl.so.4 ( ...libtcl.so.5 lives there allright...) And did not try building Scilab 5.1.1 again...

OpenFOAM-1.6.x will be (hopefully) built with the gnu toolchain, there is a build script that takes care of all the precedences in building the ~80s libs, and ~200s apps

Dakota should pose no problem ( this is a standard ./conf make install app )

Code-Aster an F.E.A. solver uses a python script to build its system, placing it in /opt/aster, and using an environment sourcing file to set some variables. This is very CPU intensive in its use, this is why I want to use icc/ifort/mkl to buld it instead of gcc/gfortran and blas/lapack ... the speed gains are outstanding ( 3 to 4 fold faster in a debian Lenny amd64)

AVL and XFoil, never even tried... only did it in Lenny...

Intel Compilers are shipped as tared packages that unpack to a folder with an install script, and the binaries are shipped as rpms... I have read somewhere that if you run the install script with the -norpm option it goes allright ( in debian it is enough just to install alien... )

Salome Platform can be built... although i never heard about anyone that has actually done it outside the development workstations of EDF... :-)

It is shipped as tarball with precompiled binaries and sources ( if one is man enough to build it from sources ) and an install/Build script... the python script fails to find a directory in the source tree even though it is there.... :-(


But I think I will manage to Install all this in slackware and build slackware packages for the apps that can be packaged, like GMSH, Paraview, BRLCAD, XFoil, AVL, OpenDX, and Dakota...

Thanks for the hint with src2pkg.... :-D


BRGDS

Alex
 
Old 11-03-2009, 08:30 AM   #11
Alexvader
Member
 
Registered: Oct 2009
Location: Japan
Distribution: Arch, Debian, Slackware
Posts: 994

Original Poster
Rep: Reputation: 94
Hi Gnashley

Thks for your explanation, you mean like src2pkg -e='-REAL' MyPkg.tar.gz... ?

Kawaiiii :-D

Gnumeric, Gmsh, Paraview, BRL-CAD 7.16, MBDyn and Syrthes-3.4.2, are already built...

Some more to build/install before I shift to Slackware as my work OS... OpenDx http://www.opendx.org/index2.php, Scilab 4.x or 5.x http://www.scilab.org/, OpenFOAM-1.6.x http://www.opencfd.co.uk/openfoam/, Dakota http://www.cs.sandia.gov/DAKOTA/, Code-Aster-10.x http://www.code-aster.org/V2/spip.php?rubrique18, Intel Compilers, AVL and XFoil http://web.mit.edu/drela/Public/web/xfoil/, and installing Salome Platform http://www.salome-platform.org/... ;

OpenDx, never tried it... will do it late this afternoon... but as well as Dakota with --enable-graphic, it requires motif widgets... don't know it the OpenMotif enables all it takes...

Scilab 4.x Keeps complaining about not finding libtcl.so.4 ( ...libtcl.so.5 lives there allright...) And did not try building Scilab 5.1.1 again...

OpenFOAM-1.6.x will be (hopefully) built with the gnu toolchain, there is a build script that takes care of all the precedences in building the ~80s libs, and ~200s apps

Dakota should pose no problem ( this is a standard ./conf make install app )

Code-Aster an F.E.A. solver uses a python script to build its system, placing it in /opt/aster, and using an environment sourcing file to set some variables. This is very CPU intensive in its use, this is why I want to use icc/ifort/mkl to buld it instead of gcc/gfortran and blas/lapack ... the speed gains are outstanding ( 3 to 4 fold faster in a debian Lenny amd64)

AVL and XFoil, never even tried... only did it in Lenny...

Intel Compilers are shipped as tared packages that unpack to a folder with an install script, and the binaries are shipped as rpms... I have read somewhere that if you run the install script with the -norpm option it goes allright ( in debian it is enough just to install alien... )

Salome Platform can be built... although i never heard about anyone that has actually done it outside the development workstations of EDF... :-)

It is shipped as tarball with precompiled binaries and sources ( if one is man enough to build it from sources... :-| ) and an install/Build script... the python script fails to find a directory in the source tree even though it is there.... :-(


But I think I will manage to Install all this in slackware and build slackware packages for the apps that can be packaged, like GMSH, Paraview, BRLCAD, XFoil, AVL, OpenDX, and Dakota...

Thanks for the hint with src2pkg.... :-D


BRGDS

Alex

PS How do I rm a double post...? :-(

Last edited by Alexvader; 11-03-2009 at 08:32 AM.
 
Old 11-03-2009, 08:49 AM   #12
Lufbery
Senior Member
 
Registered: Aug 2006
Location: Harrisburg, PA
Distribution: Slackware 64 14.2
Posts: 1,180
Blog Entries: 29

Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by Alexvader View Post
PS How do I rm a double post...? :-(
You should just be able to delete it.

 
Old 11-03-2009, 08:56 AM   #13
Lufbery
Senior Member
 
Registered: Aug 2006
Location: Harrisburg, PA
Distribution: Slackware 64 14.2
Posts: 1,180
Blog Entries: 29

Rep: Reputation: 135Reputation: 135
FWIW, I ran into some snags with Cmake and src2pkg a while back too. I'm seeing a lot more packages built with Cmake, so I'm happy to see more of us testing src2pkg with Cmake so Gilbert can refine and improve his utility.

There's a bit on the src2pkg wiki about using the -REAL variable that might be helpful (in a general information sort of way) to supplement Gilbert's fix posted above.

Regards,

Last edited by Lufbery; 11-03-2009 at 08:58 AM.
 
Old 11-03-2009, 12:43 PM   #14
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
The usage is:
src2pkg -REAL [other_options]
There 5 different options called INSTALL_TYPE: -DESTDIR, -JAIL, -REAL, -SAFE and -UNION.
REAL and SAFE are the same thing excpet SAFE creates bacjups of any files before they are overwritten and then restores them. You could use that method all the time as it is the most reliable, but it is also the most intrusive since does a real 'make install' to your real '/' directory. You also must be root to run REAl or SAFE. That's why there are other options.

I think the cmake stuff is fixed now (with the change I suggested above and of course that change will be out in a release soon).

cmake builds used to work, using a different syntax and then cmake itself changed so we had to change with it -but only after some hit-and-miss builds.

If you have nay builds that need special commands that src2pkg doesn't know about, you can always code those in manually in a src2pkg build script.
src2pkg -N -Q name-of-tarball will produce a generic script which can then be edited. Look in the examples directory of the docs for several examples -some pretty complex, which should help you get started. Or you can always ask for help here or email me. Some of that stuff you want to build sounds pretty unusual.
 
Old 11-04-2009, 02:56 PM   #15
Alexvader
Member
 
Registered: Oct 2009
Location: Japan
Distribution: Arch, Debian, Slackware
Posts: 994

Original Poster
Rep: Reputation: 94
Hi Gnashley,

Built some more stuff w/ src2pkg... Libraries, BRLCAD latest version besides of GMSH and PARAVIEW, Will try to build OpenDX, OpenCACADE, and Deal2 http://www.dealii.org/ tonite...

Dakota failed to compile, dropped an error message to a xterm... I will have to ./configure --help to see what options i should pass in the -e=' stuff '...

OUTSTANDING TOOL MAN.... :-) Thx a lot... !

One more question, how does src2pkg handle python install scripts, like those one finds in FeniCS support libraries...?

http://www.fenics.org/wiki/FEniCS_Project
http://www.fenics.org/wiki/Download#...C_Mac_OS_X_etc.

U r right, I really use weird software pieces, the most "normal" stuff I use is xmgrace, Scilab ( will try to build the 5.1.2 tonite btw... ), QtOctave and Gnumeric... :-)

Thanks in advance

Alex



:-D pc@world#apt-get remove -purge windows*

Last edited by Alexvader; 11-04-2009 at 03:02 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Installpkg error: Package is corrupt jmoris VectorLinux 2 07-29-2009 04:32 PM
Article about Slackware's 'Magic Package Maker( src2pkg) gnashley Slackware 22 12-01-2007 09:11 PM
installpkg: package does not end in .tgz? chike Slackware 16 05-22-2007 12:40 AM
Package for 'installpkg,removepkg,makepkg," bongski55 Slackware 4 09-15-2003 07:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration