bugGNU Octave - Bugs: bug #54256, [octave forge] (ltfat) package...

 
 

bug #54256: [octave forge] (ltfat) package fails to cross compile with mxe-octave

Submitter:  John W. Eaton <jwe>
Submitted:  Fri 06 Jul 2018 02:16:10 PM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Build Failure
Status:  None Assigned to:  None
Originator Name:  jwe Open/Closed:  * Open
Release:  * dev Operating System:  * Other
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 06 Jul 2018 06:16:08 PM UTC, comment #4: 

All that said, however, it appears that the value of MKOCTFILE is not actually substituted into any Makefiles.  But the Makefiles in the package will use MKOCTFILE from the environment.  So the configure test is really just there to check whether mkoctfile exists.  Which I guess explains the use of MKOCTFILE_CHECK, though that is still wrong because it will ignore any program set in the environment and only find programs named exactly "mkoctfile".

John W. Eaton <jwe>
Group administrator
Fri 06 Jul 2018 06:06:48 PM UTC, comment #3: 

I see the following message in the log/of-ltfat file when I build with a patched configure script.  I'm simply changing MKOCTFILE_CHECK to be MKOCTFILE, regenerating the configure script with autoconf, and creating a patch file for the of-ltfat package.


checking for mkoctfile... /scratch/build/mxe-octave-w32/usr/bin/i686-w64-mingw32-mkoctfile --verbose
configure: error: Please install mkoctfile.


I jumped to the wrong conclusion.  The problem is not just that MKOCTFILE_CHECK is used instead of MKOCTFILE, but also that the "valie-if-found" argument for AC_CHECK_PROG is "yes", and then the subsequent test results in an error if the value of "$MKOCTFILE_CHECK" is "yes".  Oops.

I think a better test would be:


dnl Check for MKOCTFILE
AC_CHECK_TOOL(MKOCTFILE,mkoctfile)
if test -z "$MKOCTFILE"; then
    AC_MSG_ERROR([Please install mkoctfile.])
fi


This will respect MKOCTFILE set in the environment.

If not, it will automatically use the cross tool prefix if cross compiling (CHECK_TOOL instead of CHECK_PROG).

It fixes the logic of the test for mkoctfile not being available.

John W. Eaton <jwe>
Group administrator
Fri 06 Jul 2018 05:04:51 PM UTC, comment #2: 

What doesn't work for AC_CHECK_PROG? I thought the variable could be populated with anything with any number of arguments and configure would pass it through as is. I would rather not introduce a new variable if we don't have to.

Mike Miller <mtmiller>
Group Member
Fri 06 Jul 2018 04:55:39 PM UTC, comment #1: 

For this one, I just commented out the section in configure.ac that checked for MKOCTFILE.

I see now that mxe-octave sets MKOCTFILE to something like "i686-w64-mingw32-mkoctfile --verbose" and that doesn't work for AC_CHECK_PROG.  So maybe we should be setting both MKOCTFILE and MKOCTFILEFLAGS and encouraging people to use those variables in their rules?

John W. Eaton <jwe>
Group administrator
Fri 06 Jul 2018 02:16:10 PM UTC, original submission:  

Cross compiling the mxe-octave of-ltfat package for Windows fails with the following error message:


checking for mkoctfile... no
configure: error: Please install mkoctfile.
-verbose
ltfat-2.3.1.tar.gz
mkoctfile= /scratch/build/mxe-octave-w32/usr/bin/i686-w64-mingw32-mkoctfile --verbose
arch= i686-w64-mingw32
apiversion= api-v52+
prefix= /scratch/build/mxe-octave-w32/usr/i686-w64-mingw32
files= ['ltfat-2.3.1.tar.gz']
verbose= True
running ./configure --host='i686-w64-mingw32' --build='x86_64-pc-linux-gnu'
cleaning up


The test in configure.ac is:


dnl Check for MKOCTFILE
AC_CHECK_PROG(MKOCTFILE_CHECK,mkoctfile,"yes")
if test "$MKOCTFILE_CHECK" != "yes" ; then
    AC_MSG_ERROR([Please install mkoctfile.])
fi


Why is the variable here MKOCTFILE_CHECK instead of MKOCTFILE?  If it were MKOCTFILE instead, then this test would find the value of MKOCTFILE that is set in the environment by the mxe-octave build system when the package is configured.

John W. Eaton <jwe>
Group administrator

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by jwe (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.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code