IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changes between Initial Version and Version 1 of Installing_IPP_FAQ


Ignore:
Timestamp:
Feb 24, 2009, 4:23:56 PM (17 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Installing_IPP_FAQ

    v1 v1  
     1See also the list of [wiki:WikiStart Installation-related notes on the Main Page].
     2
     3== pschecklibs or pscheckperl complain about missing tar files ==
     4
     5This is the most painless way I found to build all dependencies in Heidelberg:
     6
     7# Download appropriate extlibs and extperl tarfiles from http://pan-starrs.ifa.hawaii.edu/project/IPP/software/
     8# Unpack both in your IPP root directory, i.e. in the same directory where you unpacked the ipp-2.6.1.tgz (or whatever) tarball. In Heidelberg, it's called /IPP
     9# Then
     10 cd /IPP/ipp-2.6.1/psconfig
     11 pschecklibs -build
     12 pscheckperl -build
     13
     14== The CFITSIO perl module doesn't build ==
     15
     16I found I needed to set an environment variable CFITSIO to the location of CFITSIO if it's non-standard, e.g.
     17
     18 # for bash:
     19 export CFITSIO=/IPP/ipp-2.6.1.lin64/lib
     20 # for csh:
     21 setenv CFITSIO /IPP/ipp-2.6.1.lin64/lib
     22
     23== psbuild complains about fftw3, but it's installed on my system! ==
     24
     25fftw3 needs to be built with both --enable-float and with -fPIC, but pschecklibs only tests whether fftw3 is present *somewhere* on the system, not whether it's been built correctly.
     26
     27To be sure you have the proper build of fftw3, and assuming the same directory structure as above, do this:
     28
     29 cd /IPP/extlibs/fftw-3.1.2/
     30 ./configure --enable-float --prefix=/IPP/ipp-2.6.1.lin64/ CFLAGS=-fPIC
     31 make && make install
     32
     33[http://pan-starrs.ifa.hawaii.edu/bugzilla/show_bug.cgi?id=993 Bug 993] asks for a fix inside the build system.
     34
     35== libtool says some library "was moved", but I didn't move anything! ==
     36
     37This error message from libtool must be one of the most frequently unanswered, or inaccurately answered, questions on the internet. The error looks like
     38
     39 libtool: link: warning: library
     40 `/kuiyun/ast/ipp-2.5/psconfig/default.lin64/lib/libpslib.la' was moved.
     41 libtool: link: cannot find the library `/usr/local/lib/libpslib.la'
     42
     43I ran into it because I had an environment variable D defined, which was referenced inside libtool, leading to unintended consequences. Thus, make sure you avoid single-letter environment variables in the shell where you're building IPP. Also, variables like F2C and F77 can be set by things like IRAF, sometimes leading to unintended consequences. Hence, to be on the safe side, do
     44
     45 unset D U F2C F77
     46
     47etc. before you psbuild.
     48
     49http://markmail.org/message/sinepfpepgj7tdff seems to have the real solution for the remaining cases:
     50The origin of this error is that /usr/local/lib/ (with or without libpslib.la appended) appears in a libslib.la file somewhere, in this case potentially in /kuiyun/ast/ipp-2.5/psconfig/default.lin64/lib/libpslib.la
     51
     52You can find these occurrences by going to the root directory of your IPP installation, once each for both the source/build tree and for the install tree (the one with .lin64 at the end of the directory name), and saying:
     53
     54 egrep '/usr/local/lib' `find ./ -name \*.la`
     55
     56then changing the offending paths by hand (i.e. in this case, change /usr/local/lib to /kuiyun/ast/ipp-2.5/psconfig/default.lin64/lib/ ).
     57
     58I have had a similar error, and in my case, it found
     59
     60./lib/libpslib.la:libdir='/usr/local/lib'
     61./lib/libpsmodules.la:dependency_libs=' -L/IPP/ipp-2.6.1.lin64/lib -lkapa -ldvo -lFITS -lohana -L/usr/lib64 /usr/lib64/libX11.la /usr/lib64/libXau.la /usr/lib64/libXdmcp.la -ldl /usr/lib64/libpng.la -L/usr/lib64/mysql /usr/local/lib/libpslib.la /usr/lib64/mysql/libmysqlclient.la -L/IPP/ipp-2.6.1.lin64//lib -lmysqlclient -lz -lcrypt -lnsl -lcfitsio /IPP/ipp-2.6.1.lin64/lib/libgsl.la /IPP/ipp-2.6.1.lin64/lib/libgslcblas.la -lm -ljpeg'
     62
     63in the install tree, and the dependency_libs was the problem.
     64
     65I have no ideas how where or when these get set wrongly by libtool, but it seems to be a common bug in libtool.
     66
     67==DBD::mysql build error: "CPU you selected does not support x86-64 instruction set"==
     68
     69The specific error looks something like:
     70<pre>
     71Running Mkbootstrap for DBD::mysql ()
     72dbdimp.c:1: error: CPU you selected does not support x86-64 instruction set
     73dbdimp.c:1: error: CPU you selected does not support x86-64 instruction set
     74/usr/bin/perl /usr/lib/perl5/5.8.5/ExtUtils/xsubpp  -typemap /usr/lib/perl5/5.8.5/ExtUtils/typemap  mysql.xs > mysql.xsc && mv mysql.xsc mysql.c
     75make: *** [dbdimp.o] Error 1
     76</pre>
     77
     78The problem is that the installed version of MySQL is 32-bit, but the CPU is 64-bit (yeah, the error doesn't reveal that, but see [http://objectmix.com/perl/318993-problem-installing-dbd-mysql.html this]).  You can see this by looking at the MySQL configuration:
     79
     80<pre>
     81% mysql_config
     82Usage: /usr/lib/mysql/mysql_config [OPTIONS]
     83Options:
     84        --cflags         [-I/usr/include/mysql -g -pipe -m32 -march=i386 -mtune=pentium4 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing]
     85[...]
     86</pre>
     87
     88The <code>-m32 -march=i386</code> indicate that MySQL was built for 32-bit machines.  Furthermore, the fact that the include files are being sucked in from <code>/usr/include/mysql</code> indicates that it's trying to use the system version, rather than one we've installed ourselves.
     89
     90The solution is to force MySQL to build:
     91<pre>
     92% pschecklibs -build -force libmysqlclient
     93</pre>
     94
     95Then you should be able to return and build the Perl modules.
     96
     97==libjpeg fails make==
     98
     99libjpeg fails the <code>configure</code> script, or <code>make</code>, and <code>pschecklibs</code> reports:
     100<pre>
     101problem building libjpeg : failure in make
     102</pre>
     103
     104libjpeg is an old library, and the bundled files for running the <code>configure</code> script pre-date several systems (e.g., Mac OS X, 64-bit Linux machines).  You can get around this by going into the directory containing libjpeg and doing:
     105<pre>
     106% cp /usr/share/libtool/config.guess .
     107% cp /usr/share/libtool/config.sub .
     108% psconfigure --enable-shared --enable-static
     109% make
     110% make install
     111</pre>
     112
     113==Missing shared library when running a binary==
     114
     115For example:
     116<pre>
     117% psphot
     118gcc: /usr/lib64/libjpeg.so: No such file or directory
     119</pre>
     120
     121If the IPP is built on one system, and the resultant binaries are used on a different system, then shared libraries that existed on the first system ''must'' be present on the second; if they are not, the above error will occur.  Since this isn't always the case, we recommend that when the IPP is built for a system of heterogeneous systems, ''all'' the external libraries are built:
     122<pre>
     123% pschecklibs -build -force all
     124% pscheckperl -build -force all
     125% psbuild -clean -rebuild
     126</pre>
     127
     128The above commands force the building of all external libraries (not just those that aren't present), and re-run the IPP build from scratch.