bugGNU Octave - Bugs: bug #42810, mxe-octave native build problem:...

 
 

bug #42810: mxe-octave native build problem: arpack, cholmod and umfpack were not correctly built

Submitter:  Tatsuro MATSUOKA <tmacchant>
Submitted:  Sat 19 Jul 2014 05:46:55 AM UTC
   
 
Category:  Configuration and Build System Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Build Failure
Status:  Fixed Assigned to:  lostbard
Originator Name:  Open/Closed:  * Closed
Release:  * 3.8.1 Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Tue 29 Jul 2014 11:34:46 PM UTC, comment #8: 

With changeset 95454fa2df8b, cholmod and umfpack were built successfully.  Thank you for your efforts and patience.
So please close this post.

Tatsuro MATSUOKA <tmacchant>
Tue 29 Jul 2014 01:46:48 AM UTC, comment #7: 
John Donoghue <lostbard>
Group Member
Mon 28 Jul 2014 08:29:59 PM UTC, comment #6: 

The issue will be the same as arpack.

Try this patch.


(file #31788)

John Donoghue <lostbard>
Group Member
Mon 28 Jul 2014 10:45:40 AM UTC, comment #5: 

Reopened



Check in the mxe-octave/usr folder for:
bin/libblas.dll
lib/libblass.dll.a

You cant change the libs that are linked with there, or you mess up the rest of the linking that goes on - as some of the libs in this package require more that just lapack and blas.

With suitesparse back to its original state, can you remake and attach the log file?

John Donoghue <lostbard>
Group Member
Mon 28 Jul 2014 05:28:13 AM UTC, comment #4: 

This post is closed but cholmod and umfpack problem is not net solved.
(See the first submission for cholmod and umfpack)

I have tried the below:
(add LDFLAGS)


--- suitesparse.orig.mk 2014-07-25 10:39:39 +0900
+++ suitesparse.mk      2014-07-25 15:37:44 +0900
@@ -98,7 +98,7 @@
         if [ -n "$deplibs" ]; then \
           echo "  deplibs = $$deplibs"; \
         fi; \
-        $(MAKE_SHARED_FROM_STATIC) --ar '$(MXE_AR)' --ld '$(MXE_CXX)' $$f --install '$(INSTALL)' --libdir '$(3)$(HOST_LIBDIR)' --bindir '$(3)$(HOST_BINDIR)' $$deplibs; \
+        $(MAKE_SHARED_FROM_STATIC) --ar '$(MXE_AR)' --ld '$(MXE_CXX)' $$f --install '$(INSTALL)' --libdir '$(3)$(HOST_LIBDIR)' --bindir '$(3)$(HOST_BINDIR)' $$deplibs '$(LDFLAGS)' -llapack -lblas; \
       fi; \
     done


but however the error in making dynamic link library of cholmod and umfpack did not generated.


cholmod

building and installing shared libraries for libcholmod
  deplibs = -lamd -lcamd -lcolamd -lccolamd -lsuitesparseconfig -llapack -lblas
c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -llapack
c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lblas
collect2.exe: error: ld returned 1 exit status
building and installing shared libraries for libspqr
  deplibs = -lcholmod -lsuitesparseconfig -llapack -lblas
c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lcholmod
c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -llapack
c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lblas


umfpack

building and installing shared libraries for libumfpack
  deplibs = -lcholmod -lamd -lsuitesparseconfig -lblas
c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lcholmod
c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lblas
collect2.exe: error: ld returned 1 exit status


Perhaps my modification was not enough but I cannot find why the modification were not effective.

Tatsuro MATSUOKA <tmacchant>
Fri 25 Jul 2014 09:01:59 AM UTC, comment #3: 

Thanks! With the changeset ec301e1de20f I confirmed libarpack.dll was generated.

Referring the changeset, I will try suuitespase building.

Tatsuro MATSUOKA <tmacchant>
Thu 24 Jul 2014 11:02:43 PM UTC, comment #2: 
John Donoghue <lostbard>
Group Member
Sat 19 Jul 2014 11:22:28 AM UTC, comment #1: 

Applying this patch fixes that for me - I had doe similar change to a few other packages, but had missed this one.

(file #31748)

John Donoghue <lostbard>
Group Member
Sat 19 Jul 2014 05:46:55 AM UTC, original submission:  

With great help by John Donoghue, I could build negatively octave-stable branch using mxe-octave.

References:
http://octave.1599824.n4.nabble.com/Re-Windows-Octave-compilation-td4665267.html

http://octave.1599824.n4.nabble.com/How-can-I-make-patch-for-mxe-build-was-Re-Windows-Octave-compilation-td4665542.html

However, the configure reported that some dependencies were not recognized.

Full log is attached.


configure: WARNING: UNEXPECTED: found nth_element working in g++ 4.8.2.  Has it been patched on your system?
configure: WARNING: CHOLMOD library not found.  This will result in some lack of functionality for sparse matrices.
configure: WARNING: UMFPACK not found.  This will result in some lack of functionality for sparse matrices.
configure: WARNING: ARPACK not found.  The eigs function will be disabled.
configure: WARNING: JAVA_HOME environment variable not initialized.  Auto-detection will proceed but is unreliable.
configure: WARNING: No javac compiler or jar executable found.  Octave will not be able to call Java methods.


I have not used --enable-java so that java-related warning can be ignored.

I check the mxe-octave/usr/bin and mxe-octave/usr/lib
libarpack, libcholmod, and libumfpack dll and library files do not exist.

For arpack


if [ no = yes ]; then make -C '/e/usr/Tatsu/mingw32work/octave/mxe-octave/mxe-octave/tmp-arpack/arpack-ng-3.1.5/.build' -j '1' install DESTDIR='/e/usr/Tatsu/mingw32work/octave/mxe-octave/mxe-octave/tmp-arpack-install'; fi
if [ yes = yes ]; then /e/usr/Tatsu/mingw32work/octave/mxe-octave/mxe-octave/tools/make-shared-from-static --windowsdll --ar 'ar' --ld 'gfortran' '/e/usr/Tatsu/mingw32work/octave/mxe-octave/mxe-octave/tmp-arpack/arpack-ng-3.1.5/.build/.libs/libarpack.a' --install 'install' --libdir '/e/usr/Tatsu/mingw32work/octave/mxe-octave/mxe-octave/tmp-arpack-install/e/usr/Tatsu/mingw32work/octave/mxe-octave/mxe-octave/usr/lib' --bindir '/e/usr/Tatsu/mingw32work/octave/mxe-octave/mxe-octave/tmp-arpack-install/e/usr/Tatsu/mingw32work/octave/mxe-octave/mxe-octave/usr/bin' -llapack -lblas; fi
c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -llapack
c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lblas
collect2.exe: error: ld returned 1 exit status



if [ yes = yes ]; then /e/usr/Tatsu/mingw32work/octave/mxe-octave/mxe-octave/tools/make-shared-from-static --windowsdll --ar 'ar' --ld 'gfortran' '/e/usr/Tatsu/mingw32work/octave/mxe-octave/mxe-octave/tmp-arpack/arpack-ng-3.1.5/.build/.libs/libarpack.a' --install 'install' --libdir '/e/usr/Tatsu/mingw32work/octave/mxe-octave/mxe-octave/tmp-arpack-install/e/usr/Tatsu/mingw32work/octave/mxe-octave/mxe-octave/usr/lib' --bindir '/e/usr/Tatsu/mingw32work/octave/mxe-octave/mxe-octave/tmp-arpack-install/e/usr/Tatsu/mingw32work/octave/mxe-octave/mxe-octave/usr/bin' -llapack -lblas; fi


LDFLAGS is missing so that link is failed.

For cholmod and umfpack


install -d '/e/usr/Tatsu/mingw32work/octave/mxe-octave/mxe-octave/tmp-suitesparse-install/e/usr/Tatsu/mingw32work/octave/mxe-octave/mxe-octave/usr/lib'
for f in /e/usr/Tatsu/mingw32work/octave/mxe-octave/mxe-octave/tmp-suitesparse/SuiteSparse/SuiteSparse_config/libsuitesparseconfig.a /e/usr/Tatsu/mingw32work/octave/mxe-octave/mxe-octave/tmp-suitesparse/SuiteSparse/SuiteSparse_config/xerbla/libcerbla.a /e/usr/Tatsu/mingw32work/octave/mxe-octave/mxe-octave/tmp-suitesparse/SuiteSparse/AMD/Lib/libamd.a /e/usr/Tatsu/mingw32work/octave/mxe-octave/mxe-octave/tmp-suitesparse/SuiteSparse/CAMD/Lib/libcamd.a /e/usr/Tatsu/mingw32work/octave/mxe-octave/mxe-octave/tmp-suitesparse/SuiteSparse/COLAMD/Lib/libcolamd.a /e/usr/Tatsu/mingw32work/octave/mxe-octave/mxe-octave/tmp-suitesparse/SuiteSparse/CCOLAMD/Lib/libccolamd.a /e/usr/Tatsu/mingw32work/octave/mxe-octave/mxe-octave/tmp-suitesparse/SuiteSparse/CSparse/Lib/libcsparse.a /e/usr/Tatsu/mingw32work/octave/mxe-octave/mxe-octave/tmp-suitesparse/SuiteSparse/CXSparse/Lib/libcxsparse.a /e/usr/Tatsu/mingw32work/octave/mxe-octave/mxe-octave/tmp-suitesparse/SuiteSparse/CHOLMOD/Lib/libcholmod.a /e/usr/Tatsu/mingw32work/octave/mxe-octave/mxe-octave/tmp-suitesparse/SuiteSparse/SPQR/Lib/libspqr.a /e/usr/Tatsu/mingw32work/octave/mxe-octave/mxe-octave/tmp-suitesparse/SuiteSparse/BTF/Lib/libbtf.a /e/usr/Tatsu/mingw32work/octave/mxe-octave/mxe-octave/tmp-suitesparse/SuiteSparse/LDL/Lib/libldl.a /e/usr/Tatsu/mingw32work/octave/mxe-octave/mxe-octave/tmp-suitesparse/SuiteSparse/KLU/Lib/libklu.a /e/usr/Tatsu/mingw32work/octave/mxe-octave/mxe-octave/tmp-suitesparse/SuiteSparse/RBio/Lib/librbio.a /e/usr/Tatsu/mingw32work/octave/mxe-octave/mxe-octave/tmp-suitesparse/SuiteSparse/UMFPACK/Lib/libumfpack.a; do if [ yes = yes ]; then lib=`basename $f .a`; dir=`dirname $f`; echo "building and installing shared libraries for $lib"; deplibs=""; case $lib in libcholmod) deplibs="-lamd -lcamd -lcolamd -lccolamd -lsuitesparseconfig -llapack -lblas"; ;; libklu) deplibs="-lbtf -lamd -lcolamd -lsuitesparseconfig"; ;; librbio) deplibs="-lsuitesparseconfig"; ;; libspqr) deplibs="-lcholmod -lsuitesparseconfig -llapack -lblas"; ;; libumfpack) deplibs="-lcholmod -lamd -lsuitesparseconfig -lblas"; ;; esac; if [ -n "eplibs" ]; then echo "  deplibs = $deplibs"; fi; /e/usr/Tatsu/mingw32work/octave/mxe-octave/mxe-octave/tools/make-shared-from-static --windowsdll --ar 'ar' --ld 'g++' $f --install 'install' --libdir '/e/usr/Tatsu/mingw32work/octave/mxe-octave/mxe-octave/tmp-suitesparse-install/e/usr/Tatsu/mingw32work/octave/mxe-octave/mxe-octave/usr/lib' --bindir '/e/usr/Tatsu/mingw32work/octave/mxe-octave/mxe-octave/tmp-suitesparse-install/e/usr/Tatsu/mingw32work/octave/mxe-octave/mxe-octave/usr/bin' $deplibs; fi; done
building and installing shared libraries for libsuitesparseconfig
  deplibs =
building and installing shared libraries for libcerbla
  deplibs =
building and installing shared libraries for libamd
  deplibs =
building and installing shared libraries for libcamd
  deplibs =
building and installing shared libraries for libcolamd
  deplibs =
building and installing shared libraries for libccolamd
  deplibs =
building and installing shared libraries for libcsparse
  deplibs =
building and installing shared libraries for libcxsparse
  deplibs =
building and installing shared libraries for libcholmod
  deplibs = -lamd -lcamd -lcolamd -lccolamd -lsuitesparseconfig -llapack -lblas
c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -llapack
c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lblas
collect2.exe: error: ld returned 1 exit status
building and installing shared libraries for libspqr
  deplibs = -lcholmod -lsuitesparseconfig -llapack -lblas
c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lcholmod
c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -llapack
c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lblas
collect2.exe: error: ld returned 1 exit status
building and installing shared libraries for libbtf
  deplibs =
building and installing shared libraries for libldl
  deplibs =
building and installing shared libraries for libklu
  deplibs = -lbtf -lamd -lcolamd -lsuitesparseconfig
building and installing shared libraries for librbio
  deplibs = -lsuitesparseconfig
building and installing shared libraries for libumfpack
  deplibs = -lcholmod -lamd -lsuitesparseconfig -lblas
c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lcholmod
c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lblas
collect2.exe: error: ld returned 1 exit status


In this case building dll failed due to lack of LDFLAGS.

The script make-shared-from-static is better to be modified to include LDFLAGS.
But I do not enough knowledge how it would be modified.

Tatsuro MATSUOKA <tmacchant>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #31788:  suitesparse-fix.patch added by lostbard (5KiB - application/octet-stream)
file #31748:  nativearpack.patch added by lostbard (2KiB - application/octet-stream)
file #31744:  stable-octave.7z added by tmacchant (207KiB - application/octet-stream)
file #31745:  arpack.7z added by tmacchant (6KiB - application/octet-stream)
file #31746:  suitesparse.7z added by tmacchant (29KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by lostbard (Updated the item)
  • -email is unavailable- added by tmacchant (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 12 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-07-30 lostbard Open/ClosedOpen Closed
    2014-07-28 lostbard Attached File- Added suitesparse-fix.patch, #31788
    2014-07-28 lostbard Open/ClosedClosed Open
    2014-07-28 lostbard StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2014-07-24 lostbard StatusPatch Submitted Ready For Test
    2014-07-22 lostbard StatusNone Patch Submitted
        Assigned toNone lostbard
    2014-07-19 lostbard Attached File- Added nativearpack.patch, #31748
    2014-07-19 tmacchant Attached File- Added stable-octave.7z, #31744
        Attached File- Added arpack.7z, #31745
        Attached File- Added suitesparse.7z, #31746

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code