bugGNU Octave - Bugs: bug #54255, [octave forge] (gsl) package fails...

 
 

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

Submitter:  John W. Eaton <jwe>
Submitted:  Fri 06 Jul 2018 02:07:35 PM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Build Failure
Status:  Patch Submitted 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
   

Jump to the original submission

Fri 06 Jul 2018 04:53:00 PM UTC, comment #9: 

Yes, it would be great to start fixing this problem.  A new bug report would probably be best.  If needed, also open a discussion on the mailing list.

John W. Eaton <jwe>
Group administrator
Fri 06 Jul 2018 04:38:53 PM UTC, comment #8: 

There are a few things that Octave Forge packages need to get from Octave itself that mkoctfile doesn't currently allow a way to query. This has come up before, I think with Octave 4.0, but hasn't been addressed yet. I think it would be great to allow all Octave Forge packages to cross compile without the need to call Octave at build time, just rely on the cross-mkoctfile executable. Should we start a separate tracker for that? Start a thread on the maintainers list? Can I start by crawling through all the Forge packages and finding out what those things are and why they are needed?

Mike Miller <mtmiller>
Group Member
Fri 06 Jul 2018 04:25:41 PM UTC, comment #7: 

changeset for gsl repo

(file #44516)

John Donoghue <lostbard>
Group Member
Fri 06 Jul 2018 04:13:08 PM UTC, comment #6: 

Thanks for the quick fix!

John W. Eaton <jwe>
Group administrator
Fri 06 Jul 2018 04:07:23 PM UTC, comment #5: 

Pushed http://hg.octave.org/mxe-octave/rev/90af5a37a76e


I will also attach a change set on this ticket that can be applied to the gsl package repo if the maintainers want to use it

John Donoghue <lostbard>
Group Member
Fri 06 Jul 2018 03:45:59 PM UTC, comment #4: 

Sure, if you can easily fix it so that it works.

Longer term, I would like to update and simplify the way these packages are configured and built.  Looking at gsl, it is really complicated by having scripts to generate the configure.ac file.  I don't see why that should be necessary.  Any repetitive things that need to be done could be handled by m4 macros or just in the configure script itself since both of those are programming languages.

I understand that changes in Octave's internals causes some trouble.  Maybe there are ways we could make it easier for packages to determine what Octave features are available.  OTOH, building a current package for a 10-year old version of Octave makes little sense to me.  So I don't believe we need to make packages compatible with more than a few previous major releases of Octave.

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

Most of the others currently are already patched to cross compile in mxe  of-XXXXXX-cross.patch

gsl would be easy enough to do, so I can take a look at if you want.

statistics is another one that needs octave as it currently stands to determine which functions it needs to install.

John Donoghue <lostbard>
Group Member
Fri 06 Jul 2018 02:51:24 PM UTC, comment #2: 

Yes, definitely.

Meanwhile, what's the best way forward to get these packages to build for the upcoming 4.4.1 release?

John W. Eaton <jwe>
Group administrator
Fri 06 Jul 2018 02:43:06 PM UTC, comment #1: 

Theres a number of packages that are currently relying on getting features from octave by running octave.

Likewise there are also a few that reply on make's 'OS' variable rather than getting the destination host in a cross compiler firendly way.

Perhaps we should document somewhere on discouraging the use of octave in makefilesas well as other good vs to be avoided practices.


John Donoghue <lostbard>
Group Member
Fri 06 Jul 2018 02:07:35 PM UTC, original submission:  

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


checking ov-scalar.h usability... no
checking ov-scalar.h presence... no
checking for ov-scalar.h... no
configure: error: ov-scalar.h header not found
-verbose
gsl-2.1.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= ['gsl-2.1.1.tar.gz']
verbose= True
running ./configure --host='i686-w64-mingw32' --build='x86_64-pc-linux-gnu'
cleaning up


The configure test is written as


dnl *** Test some Octave features ***
dnl *********************************

dnl Find Octave's include directory
AC_MSG_CHECKING([for Octave's include directory])
octave_include_dir=`$OCTAVE -qf --eval "              \
  if exist ('__octave_config_info__')                 \
    disp  (__octave_config_info__ ('octincludedir'))  \
  else                                                \
    disp  (octave_config_info ('octincludedir'))      \
  end"`
AC_MSG_RESULT([${octave_include_dir}])

dnl Save initial state
save_CPPFLAGS=${CPPFLAG}
AC_LANG_PUSH([C++])

dnl Add octave include dir to CPPFLAGS
CPPFLAGS="-I${octave_include_dir} ${CPPFLAGS}"

dnl Detect ov-scalar.h
AC_CHECK_HEADER([ov-scalar.h],,[AC_MSG_ERROR([ov-scalar.h header not found])])


We can't run the cross-built Octave in this situation.  If some version of Octave that we can run is installed, then it will give information about the build system, not the host system that we are interested in.

Instead, we could use $MKOCTFILE here to compile C and C++ files.  It is already set up to look in the Octave include directory, and the mxe-octve build system sets the MKOCTFILE variable to the name of the cross version of mkoctfile (in my case, "i686-w64-mingw32-mkoctfile".  If you do need info about the host system, you can also get it from running this version of mkoctfile.



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:
   

Attached Files
file #44516:  gsl_cross_detect_changes.patch added by lostbard (3KiB - 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 mtmiller (Posted a comment)
  • -email is unavailable- added by lostbard (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.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-07-11 lostbard StatusNone Patch Submitted
    2018-07-06 lostbard Attached File- Added gsl_cross_detect_changes.patch, #44516

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code