bugGNU Octave - Bugs: bug #47984, mxe-octave native build fails at...

 
 

bug #47984: mxe-octave native build fails at gnuplot build

Submitter:  Tatsuro MATSUOKA <tmacchant>
Submitted:  Mon 23 May 2016 07:49:51 AM UTC
   
 
Category:  Configuration and Build System Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Build Failure
Status:  Fixed Assigned to:  lostbard
Originator Name:  Tatsuro MATSUOKA Open/Closed:  * Closed
Release:  * 4.0.2 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Wed 01 Jun 2016 09:11:59 PM UTC, comment #19: 

Please close this post.

Tatsuro MATSUOKA <tmacchant>
Wed 01 Jun 2016 05:55:44 PM UTC, comment #18: 

Can this bug report be closed as fixed now?

Rik <rik5>
Group administrator
Tue 31 May 2016 11:16:04 PM UTC, comment #17: 

Self reply to comment #11:

https://sourceforge.net/p/gnuplot/bugs/1800/

I discussed with Ethan (main gnuplot developer) on this subject.
We concluded that the lua detection behavior is not a bug.

Therefore please keep '--without-lua' unless mxe-octave will include the lua.

Tatsuro MATSUOKA <tmacchant>
Tue 31 May 2016 11:10:15 PM UTC, comment #16: 

I have confirmed the patch is attached to the repo, and I was able to build octave on cross (windows) and native(linux) build.

Thanks

Tatsuro MATSUOKA <tmacchant>
Fri 27 May 2016 02:01:35 PM UTC, comment #15: 

Updated patch for using gnuplot 5 in mxe-octave

(file #37287)

John Donoghue <lostbard>
Group Member
Fri 27 May 2016 09:32:11 AM UTC, comment #14: 

On gnuplot v. 5, the help system gnuplot for windows only depends on HTML HELP WORKSHOP and its libraries. 
There is no other choice.

The HTML HELP WORKSHOP is pure windows application so that we may need help of the wine to to support it on cross compiling.

However, I do not think that help system should work for gnuplot bundled with octave.  Therefore in my patch I simply kill the code of help functionality from the code.

Perhaps this is a modification of gnuplot code, perhaps we need give special version indication.

http://gnuplot.cvs.sourceforge.net/viewvc/gnuplot/gnuplot/Copyright?revision=1.2&view=markup&pathrev=Release_5_0_3

Tatsuro MATSUOKA <tmacchant>
Fri 27 May 2016 03:41:46 AM UTC, comment #13: 

I have attached my modification as an attachment file (not a chengeset gnuplot-1-fixes.patch).

I have confirmed that works for dev branch --enable-windows64.

(file #37283)

Tatsuro MATSUOKA <tmacchant>
Fri 27 May 2016 01:10:44 AM UTC, comment #12: 

I just reapplied the old patch (with changes where needed) to the new sources.


I will take a look at what was actually applied to gnuplot.

With the exception of where I started to add the help implmentation, it doesnt look that different.

In addition CAC and CERF needs be disabled as we dont have it installed.

John Donoghue <lostbard>
Group Member
Thu 26 May 2016 11:47:00 PM UTC, comment #11: 

Bug of gnuplot for configure build concerning lua seems to be not corrected on ver. 5.0.3.  I filed it on the gnuplot bug system.

https://sourceforge.net/p/gnuplot/bugs/1800/

I will report here if there are progress on it.

Tatsuro MATSUOKA <tmacchant>
Thu 26 May 2016 11:26:35 PM UTC, comment #10: 


> It looks like they dropped the old .hlp format for windows in v5,

Yes. Now gnuplot for windows uses HTML HELP WORKSHOP to give help in chm.

IIRC, gnuplot.exe on mxe-octave, help command does not work. I wonder why this complicated patch is needed. I have also prepared modification for gnuplot-5.0.3. My modification is just kill help functionality in command.c and delete help file related things from the Makefile.

GRPICON.ico
TEXTICON.ico

are renamed

to
grpicon.ico
texticon.ico

in v5
The case change must not to be applied.


internal.c

-+#ifndef __MINGW32__
- #ifndef _WIN64
- int
- GP_MATHERR( STRUCT_EXCEPTION_P_X )
-@@ -65,6 +66,7 @@
-     return (undefined = TRUE);        /* don't print error message */
- }
- #endif
-+#endif


The part


#ifndef __MINGW32__
#ifndef _WIN64

#endif
#endif


is enough for the below


#ifndef __MINGW64_VERSION_MAJOR

#endif

(see https://sourceforge.net/p/gnuplot/bugs/1791/)

Tatsuro MATSUOKA <tmacchant>
Thu 26 May 2016 02:35:52 PM UTC, comment #9: 

A patch for gnuplot 5.0.3

It looks like they dropped the old .hlp format for windows in v5, and it not requires the Microsoft winhelp library in order to compile.

Ive changed it to not need it, but because of that, currently the gnuplot help doesn't work correctly

(file #37278)

John Donoghue <lostbard>
Group Member
Tue 24 May 2016 06:43:15 PM UTC, comment #8: 

Best to go all the way back to the source.  It does look like we should update to 5.0.3.

Rik <rik5>
Group administrator
Tue 24 May 2016 06:24:50 PM UTC, comment #7: 

The gnuplot page says that at
https://sourceforge.net/projects/gnuplot/files/

gnuplot 5.0.3 is the latest.

gnuplot 5.0.2 is quite buggy should not be used.

Tatsuro MATSUOKA <tmacchant>
Tue 24 May 2016 06:15:08 PM UTC, comment #6: 

According to wikipedia (https://en.wikipedia.org/wiki/Gnuplot) the lastest stable release of gnuplot is 5.0.2.  As a first step, I propose moving to that version of gnuplot for MXE octave.

Secondarily, it still seems like we should have two branches for the MXE repo.

Rik <rik5>
Group administrator
Tue 24 May 2016 06:08:03 PM UTC, comment #5: 

IIRC, octave bug for gnuplot 5.x has been solved in octave 4.0.1 or later.
https://savannah.gnu.org/bugs/?42838

Therefore we can move to gnuplot 5.0.3 for both stable and development branch.

Tatsuro MATSUOKA <tmacchant>
Tue 24 May 2016 04:58:07 PM UTC, comment #4: 

I was wondering about that.  However, I went to the MXE directory and did


hg branches

default                     4149:aa31b3163501
release                     3346:e9741f369ee4 (inactive)
stable                      2901:71294b7ce782 (inactive)


It appears that there is already a stable branch and default branch.  It seems like a good idea to have both a stable build environment and a stable code base.  Otherwise, even if the stable code remains unchanged, we may not be able to build it in the future thanks to changes in the MXE environment.


Rik <rik5>
Group administrator
Tue 24 May 2016 04:33:04 PM UTC, comment #3: 

Currently only issue at moment is that mxe-octave only has the one branch that is used, so going to 5.0 means going to 5 for the release as well

John Donoghue <lostbard>
Group Member
Tue 24 May 2016 04:02:52 PM UTC, comment #2: 

At least for the development branch, can we move to the 5.x series of gnuplot?  It's not exactly new and trying to maintain the old buggy 4.X series doesn't seem worth our time.

Rik <rik5>
Group administrator
Tue 24 May 2016 12:34:48 PM UTC, comment #1: 

It looks like you have lua installed (at least the library) which its finding.

I pushed your patch http://hg.octave.org/mxe-octave/rev/aa31b3163501


John Donoghue <lostbard>
Group Member
Mon 23 May 2016 07:49:51 AM UTC, original submission:  


[build]    gnuplot

Failed to build package gnuplot!
------------------------------------------------------------
make[3]: *** [install-recursive] Error 1
make[3]: Leaving directory `/home/tatsuro/work/octave/mxe-octave/mxe-octave-lunix-e64/tmp-gnuplot/gnuplot-4.6.7/src'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/home/tatsuro/work/octave/mxe-octave/mxe-octave-lunix-e64/tmp-gnuplot/gnuplot-4.6.7'
make[1]: *** [build-only-gnuplot] Error 2
make[1]: Leaving directory `/home/tatsuro/work/octave/mxe-octave/mxe-octave-lunix-e64'
real        1m13.907s
user        0m55.659s
sys        0m12.047s
------------------------------------------------------------
[log]      /home/tatsuro/work/octave/mxe-octave/mxe-octave-lunix-e64/log/gnuplot


From log file



checking for LUA... no
checking for LUA... no
configure: WARNING: Could not find support for lua using pkg-config.
checking for library containing luaL_openlibs... -llua5.1
checking lua.h usability... no
checking lua.h presence... no
checking for lua.h... no
configure: WARNING: please add path to lua.h to CPPFLAGS in Makefile



(part of the last configure output)
  lua/TikZ terminal: yes




(Compilin term.c)
        mv -f $depbase.Tpo $depbase.Po
In file included from term.h:426:0,
                 from term.c:1436:
../term/lua.trm:109:17: fatal error: lua.h: No such file or directory
 #include <lua.h>
                 ^
compilation terminated.


Apparently this is a bug of gnuplot of checking for lua.
But gnuplot 4.6.7 is the last version of gnuplot 4.6 so that
commit to gnuplot 4.6 no longer makes sense.

I hacked gnuplot.mk according to ./configure --help of gnuplot-4.6.7


$ ./configure --help
<snip>
  --without-lua         disable lua/TikZ terminal (default enabled)


The I made changeset


# HG changeset patch
# User Tatsuro Matsuoka <tmacchant@yahoo.co.jp>
# Date 1463962543 -32400
#      Mon May 23 09:15:43 2016 +0900
# Node ID 7b6769c5ea51728be2aae9221f05807755623752
# Parent  d38d0e08ef4cc0355e5a4709d11190a5e82c273f
workaround for gnuplot build on native build

diff -r d38d0e08ef4c -r 7b6769c5ea51 src/gnuplot.mk
--- a/src/gnuplot.mk        Wed May 04 08:42:44 2016 -0400
+++ b/src/gnuplot.mk        Mon May 23 09:15:43 2016 +0900
@@ -65,7 +65,7 @@
 define $(PKG)_BUILD
     cd '$(1)' && ./configure \
       $(CONFIGURE_CPPFLAGS) $(CONFIGURE_LDFLAGS) LIBS=-liconv \
-      --prefix '$(HOST_PREFIX)'
+      --without-lua --prefix='$(HOST_PREFIX)'
     make -C '$(1)' -j '$(JOBS)' install DESTDIR='$(3)'
 endef
 endif


made gnuplot build successful.
(I also correct incomplete prefix handing.)

I attached the patch

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 #37287:  gnuplot5.patch added by lostbard (10KiB - application/octet-stream)
file #37283:  gnuplot-1-fixes.patch added by tmacchant (4KiB - text/x-patch)
file #37278:  gnuplot5.patch added by lostbard (10KiB - application/octet-stream)
file #37234:  gnuplot_mk.patch added by tmacchant (723B - text/x-patch - patch to gnuplot.mk for native build)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by lostbard (Posted a comment)
  • -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 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-06-01 rik5 StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2016-05-27 lostbard Attached File- Added gnuplot5.patch, #37287
    2016-05-27 tmacchant Attached File- Added gnuplot-1-fixes.patch, #37283
    2016-05-26 lostbard Attached File- Added gnuplot5.patch, #37278
    2016-05-24 rik5 Carbon-Copy- Added jwe
    2016-05-24 lostbard StatusNone Ready For Test
        Assigned toNone lostbard
    2016-05-23 tmacchant Attached File- Added gnuplot_mk.patch, #37234

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code