Bug 105058

Summary: Octave-devel build fails with strange link error
Product: Ports & Packages Reporter: Andrew Reilly <andrew-freebsd>
Component: Individual Port(s)Assignee: Maho Nakata <maho>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Andrew Reilly 2006-11-02 03:30:21 UTC
	Build of octave-devel on above system failed in what
	looked like the final link operation on liboctave.so
	with the error (see end of following tail)[the really
	long command-line was wrapped manually, to avoid mailer
	breakage]:

cc -c -I/usr/local/include -I/usr/local/include/metis -fPIC -I. -I.. -I../liboctave -I../src -I../libcruft/misc  -DHAVE_CONFIG_H  -Wall -W -Wshadow -O2 -fno-strict-aliasing -pipe  -I/usr/local/include -I/usr/local/include/metis kpse-xfns.c -o pic/kpse-xfns.o
kpse-xfns.c: In function `octave_basename':
kpse-xfns.c:62: warning: implicit declaration of function `basename'
kpse-xfns.c:62: warning: cast to pointer from integer of different size
rm -f liboctave.so
cc -shared -Wl,-x  -o liboctave.so \
        pic/Bounds.o pic/CollocWt.o pic/DASPK.o pic/DASRT.o
        pic/DASSL.o pic/FEGrid.o pic/LinConst.o pic/LPsolve.o
        pic/LSODE.o pic/NLEqn.o pic/ODES.o pic/Quad.o pic/Range.o
        pic/data-conv.o pic/dir-ops.o pic/file-ops.o pic/file-stat.o
        pic/glob-match.o pic/idx-vector.o pic/lo-ieee.o
        pic/lo-mappers.o pic/lo-specfun.o pic/lo-sysdep.o
        pic/lo-utils.o pic/mach-info.o pic/oct-alloc.o pic/oct-env.o
        pic/oct-fftw.o pic/oct-group.o pic/oct-passwd.o pic/oct-rand.o
        pic/oct-shlib.o pic/oct-spparms.o pic/oct-syscalls.o
        pic/oct-time.o pic/oct-uname.o pic/prog-args.o pic/so-array.o
        pic/sparse-sort.o pic/sparse-util.o pic/str-vec.o
        pic/Array.o pic/ArrayN.o pic/DiagArray2.o pic/MArray.o
        pic/MArray2.o pic/MArrayN.o pic/MDiagArray2.o pic/base-lu.o
        pic/oct-sort.o pic/sparse-base-lu.o pic/sparse-base-chol.o
        pic/sparse-dmsolve.o pic/Array-C.o pic/Array-b.o pic/Array-ch.o
        pic/Array-i.o pic/Array-d.o pic/Array-s.o pic/Array-so.o
        pic/Array-str.o pic/Array-idx-vec.o pic/MArray-C.o
        pic/MArray-ch.o pic/MArray-i.o pic/MArray-d.o pic/MArray-s.o
        pic/MSparse-C.o pic/MSparse-d.o pic/Sparse-C.o pic/Sparse-b.o
        pic/Sparse-d.o pic/oct-inttypes.o pic/Array-util.o
        pic/CColVector.o pic/CDiagMatrix.o pic/CMatrix.o pic/CNDArray.o
        pic/CRowVector.o pic/CmplxAEPBAL.o pic/CmplxCHOL.o
        pic/CmplxDET.o pic/CmplxHESS.o pic/CmplxLU.o pic/CmplxQR.o
        pic/CmplxQRP.o pic/CmplxSCHUR.o pic/CmplxSVD.o pic/EIG.o
        pic/boolMatrix.o pic/boolNDArray.o pic/chMatrix.o
        pic/chNDArray.o pic/dColVector.o pic/dDiagMatrix.o
        pic/dMatrix.o pic/dNDArray.o pic/dRowVector.o pic/dbleAEPBAL.o
        pic/dbleCHOL.o pic/dbleDET.o pic/dbleHESS.o pic/dbleLU.o
        pic/dbleQR.o pic/dbleQRP.o pic/dbleSCHUR.o pic/dbleSVD.o
        pic/boolSparse.o pic/CSparse.o pic/dSparse.o pic/MSparse.o
        pic/Sparse.o pic/SparseCmplxLU.o pic/SparsedbleLU.o
        pic/SparseCmplxCHOL.o pic/SparsedbleCHOL.o pic/SparseCmplxQR.o
        pic/SparseQR.o pic/MatrixType.o pic/int8NDArray.o
        pic/uint8NDArray.o pic/int16NDArray.o pic/uint16NDArray.o
        pic/int32NDArray.o pic/uint32NDArray.o pic/int64NDArray.o
        pic/uint64NDArray.o pic/mx-cdm-dm.o pic/mx-dm-cdm.o
        pic/mx-cs-cdm.o pic/mx-cs-dm.o pic/mx-cs-m.o pic/mx-cs-nda.o
        pic/mx-cdm-cs.o pic/mx-cdm-cm.o pic/mx-cdm-m.o pic/mx-cdm-s.o
        pic/mx-cm-cdm.o pic/mx-cm-dm.o pic/mx-cm-m.o pic/mx-cnda-nda.o
        pic/mx-cm-s.o pic/mx-cnda-s.o pic/mx-dm-cs.o pic/mx-dm-cm.o
        pic/mx-m-cs.o pic/mx-nda-cs.o pic/mx-m-cdm.o pic/mx-m-cm.o
        pic/mx-nda-cnda.o pic/mx-s-cdm.o pic/mx-s-cm.o pic/mx-s-cnda.o
        pic/mx-dm-m.o pic/mx-dm-s.o pic/mx-m-dm.o pic/mx-s-dm.o
        pic/mx-s-i8nda.o pic/mx-i8nda-s.o pic/mx-s-ui8nda.o
        pic/mx-ui8nda-s.o pic/mx-s-i16nda.o pic/mx-i16nda-s.o
        pic/mx-s-ui16nda.o pic/mx-ui16nda-s.o pic/mx-s-i32nda.o
        pic/mx-i32nda-s.o pic/mx-s-ui32nda.o pic/mx-ui32nda-s.o
        pic/mx-s-i64nda.o pic/mx-i64nda-s.o pic/mx-s-ui64nda.o
        pic/mx-ui64nda-s.o pic/mx-nda-i8.o pic/mx-i8-nda.o
        pic/mx-nda-ui8.o pic/mx-ui8-nda.o pic/mx-nda-i16.o
        pic/mx-i16-nda.o pic/mx-nda-ui16.o pic/mx-ui16-nda.o
        pic/mx-nda-i32.o pic/mx-i32-nda.o pic/mx-nda-ui32.o
        pic/mx-ui32-nda.o pic/mx-nda-i64.o pic/mx-i64-nda.o
        pic/mx-nda-ui64.o pic/mx-ui64-nda.o pic/mx-nda-i8nda.o
        pic/mx-i8nda-nda.o pic/mx-nda-ui8nda.o pic/mx-ui8nda-nda.o
        pic/mx-nda-i16nda.o pic/mx-i16nda-nda.o pic/mx-nda-ui16nda.o
        pic/mx-ui16nda-nda.o pic/mx-nda-i32nda.o pic/mx-i32nda-nda.o
        pic/mx-nda-ui32nda.o pic/mx-ui32nda-nda.o pic/mx-nda-i64nda.o
        pic/mx-i64nda-nda.o pic/mx-nda-ui64nda.o pic/mx-ui64nda-nda.o
        pic/mx-i8nda-ui8.o pic/mx-i8nda-i16.o pic/mx-i8nda-ui16.o
        pic/mx-i8nda-i32.o pic/mx-i8nda-ui32.o pic/mx-i8nda-i64.o
        pic/mx-i8nda-ui64.o pic/mx-i16nda-i8.o pic/mx-i16nda-ui8.o
        pic/mx-i16nda-ui16.o pic/mx-i16nda-i32.o pic/mx-i16nda-ui32.o
        pic/mx-i16nda-i64.o pic/mx-i16nda-ui64.o pic/mx-i32nda-i8.o
        pic/mx-i32nda-ui8.o pic/mx-i32nda-i16.o pic/mx-i32nda-ui16.o
        pic/mx-i32nda-ui32.o pic/mx-i32nda-i64.o pic/mx-i32nda-ui64.o
        pic/mx-i64nda-i8.o pic/mx-i64nda-ui8.o pic/mx-i64nda-i16.o
        pic/mx-i64nda-ui16.o pic/mx-i64nda-i32.o pic/mx-i64nda-ui32.o
        pic/mx-i64nda-ui64.o pic/mx-ui8nda-i8.o pic/mx-ui8nda-i16.o
        pic/mx-ui8nda-ui16.o pic/mx-ui8nda-i32.o pic/mx-ui8nda-ui32.o
        pic/mx-ui8nda-i64.o pic/mx-ui8nda-ui64.o pic/mx-ui16nda-i8.o
        pic/mx-ui16nda-ui8.o pic/mx-ui16nda-i16.o pic/mx-ui16nda-i32.o
        pic/mx-ui16nda-ui32.o pic/mx-ui16nda-i64.o pic/mx-ui16nda-ui64.o
        pic/mx-ui32nda-i8.o pic/mx-ui32nda-ui8.o pic/mx-ui32nda-i16.o
        pic/mx-ui32nda-ui16.o pic/mx-ui32nda-i32.o pic/mx-ui32nda-i64.o
        pic/mx-ui32nda-ui64.o pic/mx-ui64nda-i8.o pic/mx-ui64nda-ui8.o
        pic/mx-ui64nda-i16.o pic/mx-ui64nda-ui16.o pic/mx-ui64nda-i32.o
        pic/mx-ui64nda-ui32.o pic/mx-ui64nda-i64.o pic/mx-i8-ui8nda.o
        pic/mx-i8-i16nda.o pic/mx-i8-ui16nda.o pic/mx-i8-i32nda.o
        pic/mx-i8-ui32nda.o pic/mx-i8-i64nda.o pic/mx-i8-ui64nda.o
        pic/mx-i16-i8nda.o pic/mx-i16-ui8nda.o pic/mx-i16-ui16nda.o
        pic/mx-i16-i32nda.o pic/mx-i16-ui32nda.o pic/mx-i16-i64nda.o
        pic/mx-i16-ui64nda.o pic/mx-i32-i8nda.o pic/mx-i32-ui8nda.o
        pic/mx-i32-i16nda.o pic/mx-i32-ui16nda.o pic/mx-i32-ui32nda.o
        pic/mx-i32-i64nda.o pic/mx-i32-ui64nda.o pic/mx-i64-i8nda.o
        pic/mx-i64-ui8nda.o pic/mx-i64-i16nda.o pic/mx-i64-ui16nda.o
        pic/mx-i64-i32nda.o pic/mx-i64-ui32nda.o pic/mx-i64-ui64nda.o
        pic/mx-ui8-i8nda.o pic/mx-ui8-i16nda.o pic/mx-ui8-ui16nda.o
        pic/mx-ui8-i32nda.o pic/mx-ui8-ui32nda.o pic/mx-ui8-i64nda.o
        pic/mx-ui8-ui64nda.o pic/mx-ui16-i8nda.o pic/mx-ui16-ui8nda.o
        pic/mx-ui16-i16nda.o pic/mx-ui16-i32nda.o pic/mx-ui16-ui32nda.o
        pic/mx-ui16-i64nda.o pic/mx-ui16-ui64nda.o pic/mx-ui32-i8nda.o
        pic/mx-ui32-ui8nda.o pic/mx-ui32-i16nda.o pic/mx-ui32-ui16nda.o
        pic/mx-ui32-i32nda.o pic/mx-ui32-i64nda.o pic/mx-ui32-ui64nda.o
        pic/mx-ui64-i8nda.o pic/mx-ui64-ui8nda.o pic/mx-ui64-i16nda.o
        pic/mx-ui64-ui16nda.o pic/mx-ui64-i32nda.o pic/mx-ui64-ui32nda.o
        pic/mx-ui64-i64nda.o pic/mx-i8nda-ui8nda.o pic/mx-i8nda-i16nda.o
        pic/mx-i8nda-ui16nda.o pic/mx-i8nda-i32nda.o
        pic/mx-i8nda-ui32nda.o pic/mx-i8nda-i64nda.o
        pic/mx-i8nda-ui64nda.o pic/mx-i16nda-i8nda.o
        pic/mx-i16nda-ui8nda.o pic/mx-i16nda-ui16nda.o
        pic/mx-i16nda-i32nda.o pic/mx-i16nda-ui32nda.o
        pic/mx-i16nda-i64nda.o pic/mx-i16nda-ui64nda.o
        pic/mx-i32nda-i8nda.o pic/mx-i32nda-ui8nda.o
        pic/mx-i32nda-i16nda.o pic/mx-i32nda-ui16nda.o
        pic/mx-i32nda-ui32nda.o pic/mx-i32nda-i64nda.o
        pic/mx-i32nda-ui64nda.o pic/mx-i64nda-i8nda.o
        pic/mx-i64nda-ui8nda.o pic/mx-i64nda-i16nda.o
        pic/mx-i64nda-ui16nda.o pic/mx-i64nda-i32nda.o
        pic/mx-i64nda-ui32nda.o pic/mx-i64nda-ui64nda.o
        pic/mx-ui8nda-i8nda.o pic/mx-ui8nda-i16nda.o
        pic/mx-ui8nda-ui16nda.o pic/mx-ui8nda-i32nda.o
        pic/mx-ui8nda-ui32nda.o pic/mx-ui8nda-i64nda.o
        pic/mx-ui8nda-ui64nda.o pic/mx-ui16nda-i8nda.o
        pic/mx-ui16nda-ui8nda.o pic/mx-ui16nda-i16nda.o
        pic/mx-ui16nda-i32nda.o pic/mx-ui16nda-ui32nda.o
        pic/mx-ui16nda-i64nda.o pic/mx-ui16nda-ui64nda.o
        pic/mx-ui32nda-i8nda.o pic/mx-ui32nda-ui8nda.o
        pic/mx-ui32nda-i16nda.o pic/mx-ui32nda-ui16nda.o
        pic/mx-ui32nda-i32nda.o pic/mx-ui32nda-i64nda.o
        pic/mx-ui32nda-ui64nda.o pic/mx-ui64nda-i8nda.o
        pic/mx-ui64nda-ui8nda.o pic/mx-ui64nda-i16nda.o
        pic/mx-ui64nda-ui16nda.o pic/mx-ui64nda-i32nda.o
        pic/mx-ui64nda-ui32nda.o pic/mx-ui64nda-i64nda.o pic/vx-ccv-cv.o
        pic/vx-ccv-s.o pic/vx-crv-rv.o pic/vx-crv-s.o pic/vx-cs-cv.o
        pic/vx-cs-rv.o pic/vx-cv-ccv.o pic/vx-cv-cs.o pic/vx-rv-crv.o
        pic/vx-rv-cs.o pic/vx-s-ccv.o pic/vx-s-crv.o pic/smx-sm-cs.o
        pic/smx-cs-sm.o pic/smx-scm-s.o pic/smx-s-scm.o pic/smx-scm-sm.o
        pic/smx-sm-scm.o pic/smx-m-sm.o pic/smx-m-scm.o pic/smx-cm-sm.o
        pic/smx-cm-scm.o pic/smx-sm-m.o pic/smx-scm-m.o pic/smx-sm-cm.o
        pic/smx-scm-cm.o pic/smx-bm-sbm.o pic/smx-sbm-bm.o
        pic/f2c-main.o pic/filemode.o pic/getopt.o pic/getopt1.o
        pic/lo-cieee.o pic/lo-cutils.o pic/mkdir.o pic/oct-getopt.o
        pic/randgamma.o pic/randmtzig.o pic/randpoisson.o pic/rename.o
        pic/rmdir.o pic/strftime.o pic/strptime.o pic/tempname.o
        pic/tempnam.o pic/cmd-edit.o pic/cmd-hist.o pic/oct-rl-edit.o
        pic/oct-rl-hist.o pic/pathsearch.o pic/kpse-xfns.o -L../libcruft
        -L. -Wl,-rpath -Wl,/usr/local/lib/octave-2.9.8 -lcruft -lcholmod
        -lmetis -lumfpack -lamd -lcolamd -lccolamd -lcxsparse -lalapack
        -L/usr/local/lib -lf77blas -lcblas -latlas -lfftw3 -lreadline
        -lreadline -lncurses -lhdf5 -lz -lm -L/usr/local/lib -L/usr/lib
        -lhdf5 -lz -lg2c -lm -lpthread
/usr/bin/ld: /usr/local/lib/libcholmod.a(cholmod_common.o): relocation R_X86_64_32S can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libcholmod.a: could not read symbols: Bad value
gmake[2]: *** [liboctave.so] Error 1
gmake[2]: Leaving directory `/usr/ports/math/octave-devel/work/octave-2.9.8/liboctave'
gmake[1]: *** [liboctave] Error 2
gmake[1]: Leaving directory `/usr/ports/math/octave-devel/work/octave-2.9.8'
gmake: *** [all] Error 2
*** Error code 2

Stop in /usr/ports/math/octave-devel.

	libcholmod.a is part of math/suitesparse, but there
	doesn't appear to be any peculiar setting of CFLAGS in
	the port makefile...

Fix: 

Don't know yet, sorry.  Am looking into it.  What does
	the link error even mean?  Has the build tried to mix
	-m32 and -m64 code somehow?
How-To-Repeat: 	Be on an amd64 machine.
	cd /usr/ports/math/octave-devel
	[go out for the day, while it builds the ATLAS dependency]
	[do not check the "Use optimized CFLAGS" knob on the
	 fftw3 dependency, in case that matters]
	See the error message, above.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2006-11-02 03:40:24 UTC
Responsible Changed
From-To: freebsd-ports-bugs->maho

Over to maintainer
Comment 2 dfilter service freebsd_committer freebsd_triage 2006-11-19 03:42:34 UTC
maho        2006-11-19 03:42:27 UTC

  FreeBSD ports repository

  Modified files:
    math/suitesparse     Makefile 
  Added files:
    math/suitesparse/files patch-CSparse+Source+Makefile 
                           patch-CXSparse+Source+Makefile 
  Log:
  Workaround build failure of octave-devel for
  amd64. Passing -fPIC even though we build static lib.
  A correct fix for this might be building shared libs
  too.
  
  PR: 105058
  
  Revision  Changes    Path
  1.11      +18 -3     ports/math/suitesparse/Makefile
  1.1       +11 -0     ports/math/suitesparse/files/patch-CSparse+Source+Makefile (new)
  1.1       +11 -0     ports/math/suitesparse/files/patch-CXSparse+Source+Makefile (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 3 Maho Nakata freebsd_committer freebsd_triage 2006-11-19 03:44:23 UTC
State Changed
From-To: open->closed

Fixed. Thanks for your report.