[ptx] [OT?] Compile Problems pfstools x86_64 (amd64): recompile with -fPIC - partly solved?

Gerhard Gaussling ggrubbish at web.de
Fri Dec 16 19:58:38 GMT 2005


Am Donnerstag 15 Dezember 2005 20:39 schrieb Gerhard Gaussling:
> $ CFLAGS_=-fPIC  make
> gives the same error:

I got problems to compile pfstools under ubuntu breezy for amd64, this 
gives also the same error:

gerhard at ubuntu:~/download/pfstools/pfstools-1.2.1$ CFLAGS="-wall -fPIC"
gerhard at ubuntu:~/download/pfstools/pfstools-1.2.1$ CXXFLAGS="-wall 
-fPIC"
gerhard at ubuntu:~/download/pfstools/pfstools-1.2.1$ export CFLAGS
gerhard at ubuntu:~/download/pfstools/pfstools-1.2.1$ export CXXFLAGS_
gerhard at ubuntu:~/download/pfstools/pfstools-1.2.1$ auto-apt 
run ./configure --prefix=/usr/local
config.status: executing depfiles commands

libpfs is now configured for x86_64-unknown-linux-gnu

  Source directory:     /home/gerhard/download/pfstools/pfstools-1.2.1
  Installation prefix:  /usr/local
  C++ compiler:         g++   -O3

  Octave                yes
    octave-m-dir:       /usr/share/octave/2.1.71/site/m/pfstools
    
octave-oct-dir:     /usr/lib/octave/2.1.71/site/oct/x86_64-pc-linux-gnu/pfstools
    mkoctfile:          /usr/bin/mkoctfile

  PPM                   yes
    LIBS:               -lnetpbm
  TIFF                  yes
    LIBS:               -ltiff
  OpenEXR               yes
    CFLAGS:             -I/usr/include/OpenEXR
    LIBS:               -lIlmImf -lImath -lHalf -lIex -lz

  QT                    yes
    QTDIR:              /usr/share/qt3
    QTLIBS:             -lqt-mt
    MOC:                moc

  Debug mode            no


gerhard at ubuntu:~/download/pfstools/pfstools-1.2.1$ make clean
gerhard at ubuntu:~/download/pfstools/pfstools-1.2.1$ LANG=en make
[...]
make[3]: Leaving directory 
`/home/gerhard/download/pfstools/pfstools-1.2.1/src/filter'
Making all in octave
make[3]: Entering directory 
`/home/gerhard/download/pfstools/pfstools-1.2.1/src/octave'
echo

/usr/bin/mkoctfile -v -s -I. 
-I/home/gerhard/download/pfstools/pfstools-1.2.1/src/pfs/  -L../pfs/ 
-lpfs pfsread.cpp -o pfsread.oct
/usr/bin/g++ -c -fPIC -I/usr/include/octave-2.1.71 
-I/usr/include/octave-2.1.71/octave -O2 -I. 
-I/home/gerhard/download/pfstools/pfstools-1.2.1/src/pfs/ pfsread.cpp 
-o pfsread.o
/usr/bin/g++ -shared -Wl,-Bsymbolic -o pfsread.oct pfsread.o -L../pfs/ 
-lpfs -L/usr/lib/octave-2.1.71 -loctinterp -loctave -lcruft -s 
-llapack-3 -lblas-3 -lfftw3 -lreadline -lncurses -ldl -lhdf5 -lz -lm 
-L/usr/lib/gcc/x86_64-linux-gnu/3.4.5 
-L/usr/lib/gcc/x86_64-linux-gnu/3.4.5/../../../../lib 
-L/usr/lib/gcc/x86_64-linux-gnu/3.4.5/../../.. -L/lib/../lib 
-L/usr/lib/../lib -lhdf5 -lz -lfrtbegin -lg2c -lm -lgcc_s
/usr/bin/ld: ../pfs//libpfs.a(libpfs_a-pfs.o): relocation R_X86_64_32S 
against `vtable for pfs::Frame' can not be used when making a shared 
object; recompile with -fPIC
../pfs//libpfs.a: could not read symbols: Bad value
collect2: ld gab 1 als Ende-Status zur?ck
make[3]: *** [pfsread.oct] Error 1
make[3]: Leaving directory 
`/home/gerhard/download/pfstools/pfstools-1.2.1/src/octave'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory 
`/home/gerhard/download/pfstools/pfstools-1.2.1/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory 
`/home/gerhard/download/pfstools/pfstools-1.2.1'
make: *** [all] Error 2

Maybe it's necesary to compile octave with -fPIC ?

Ok, I did it manually by hand in every makefile.
I added -fPIC to CXXFLAGS:

Now I get this error:
Making all in doc
make[2]: Gehe in Verzeichnis 
»/home/gerhard/download/pfstools/pfstools-1.2.1/doc«
This is pdfeTeX, Version 3.14159-1.10b-2.1 (Web2C 7.4.5)
entering extended mode
(./pfs_format_spec.tex{/usr/share/texmf/pdftex/config/pdftex.cfg}
LaTeX2e <2001/06/01>
Babel <v3.7h> and hyphenation patterns for american, french, german, 
ngerman, b
ahasa, basque, catalan, croatian, czech, danish, dutch, finnish, greek, 
iceland
ic, irish, italian, latin, magyar, norsk, norsk, portuges, romanian, 
russian, s
lovak, slovene, spanish, swedish, turkish, ukrainian, nohyphenation, 
loaded.
(/usr/share/texmf/tex/latex/base/article.cls
Document Class: article 2001/04/21 v1.4e Standard LaTeX document class
(/usr/share/texmf/tex/latex/base/size12.clo))
(/usr/share/texmf/tex/generic/babel/babel.sty
(/usr/share/texmf/tex/generic/babel/english.ldf
(/usr/share/texmf/tex/generic/babel/babel.def)))
(/usr/share/texmf/tex/latex/graphics/graphicx.sty
(/usr/share/texmf/tex/latex/graphics/keyval.sty)
(/usr/share/texmf/tex/latex/graphics/graphics.sty
(/usr/share/texmf/tex/latex/graphics/trig.sty)
(/usr/share/texmf/tex/latex/config/graphics.cfg)
(/usr/share/texmf/tex/latex/graphics/pdftex.def)))
No file pfs_format_spec.aux.
(/usr/share/texmf/tex/context/base/supp-pdf.tex
(/usr/share/texmf/tex/context/base/supp-mis.tex
loading : Context Support Macros / Missing
)
loading : Context Support Macros / PDF
)

LaTeX Warning: No \author given.

(/usr/share/texmf/tex/latex/base/omscmr.fd) [1
{/var/lib/texmf/dvips/config/pdft
ex.map}]

LaTeX Warning: Reference `cap:data-model' on page 2 undefined on input 
line 65.



LaTeX Warning: File `data_model.png' not found on input line 71.


Error: pdflatex (file data_model.png): cannot find image file
 ==> Fatal error occurred, the output PDF file is not finished!
make[2]: Verlasse Verzeichnis 
»/home/gerhard/download/pfstools/pfstools-1.2.1/doc«
make[2]: Gehe in Verzeichnis 
»/home/gerhard/download/pfstools/pfstools-1.2.1«
make[2]: Verlasse Verzeichnis 
»/home/gerhard/download/pfstools/pfstools-1.2.1«
make[1]: Verlasse Verzeichnis 
»/home/gerhard/download/pfstools/pfstools-1.2.1«
gerhard at ubuntu:~/download/pfstools/pfstools-1.2.1$

But I think it works now, but I got this error when compiling 
pfscalibration:
 PFS_LIBS=/usr/local/lib/libpfs-1.2.so sudo ./configure 
--prefix=/usr/local
[...]
checking for pfs library... checking for 
pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for PFS_CFLAGS...
checking for PFS_LIBS... /usr/local/lib/libpfs-1.2.so
configure: error: Package requirements (pfs-1.0 >= 1.0) were not met.
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively you may set the PFS_CFLAGS and PFS_LIBS environment 
variables
to avoid the need to call pkg-config.  See the pkg-config man page for
more details.
gerhard at ubuntu:~/download/pfstools/pfscalibration-1.1$
$ PFS_LIBS=/usr/local/lib sudo ./configure --prefix=/usr/local
does not work either.

gerhard at ubuntu:~/download/pfstools/pfscalibration-1.1$ dpkg -L 
pfstools-1.2.1 |grep lib
/usr/lib
/usr/lib/octave
/usr/lib/octave/2.1.71
/usr/lib/octave/2.1.71/site
/usr/lib/octave/2.1.71/site/oct
/usr/lib/octave/2.1.71/site/oct/x86_64-pc-linux-gnu
/usr/lib/octave/2.1.71/site/oct/x86_64-pc-linux-gnu/pfstools
/usr/lib/octave/2.1.71/site/oct/x86_64-pc-linux-gnu/pfstools/pfsclose.oct
/usr/lib/octave/2.1.71/site/oct/x86_64-pc-linux-gnu/pfstools/pfsget.oct
/usr/lib/octave/2.1.71/site/oct/x86_64-pc-linux-gnu/pfstools/pfsopen.oct
/usr/lib/octave/2.1.71/site/oct/x86_64-pc-linux-gnu/pfstools/pfsput.oct
/usr/lib/octave/2.1.71/site/oct/x86_64-pc-linux-gnu/pfstools/pfsread.oct
/usr/lib/octave/2.1.71/site/oct/x86_64-pc-linux-gnu/pfstools/pfstransform_colorspace.oct
/usr/lib/octave/2.1.71/site/oct/x86_64-pc-linux-gnu/pfstools/pfswrite.oct
/usr/local/lib
/usr/local/lib/libpfs-1.2.a
/usr/local/lib/libpfs-1.2.la
/usr/local/lib/libpfs-1.2.so.0.0.0
/usr/local/lib/pkgconfig
/usr/local/lib/pkgconfig/pfs.pc
/usr/local/lib/libpfs-1.2.so
/usr/local/lib/libpfs-1.2.so.0

Hmmm... any hints? I often got these kind of problems due to my lack of 
understanding the compile process, and the linker... 

And what is the recomended method to compile pfstools? Edit manually the 
makefiles??

Any help or hint is much appreciate 

Kind regards

Gerhard Gaußling


More information about the ptx mailing list