bugGNU Octave - Bugs: bug #47968, mxe-octave: build of default...

 
 

bug #47968: mxe-octave: build of default branch fails with "unable to deduce 'const auto' from 'octave::sys::popen2'"

Submitter:  Avinoam Kalma <avinoam>
Submitted:  Sat 21 May 2016 11:31:09 AM UTC
   
 
Category:  Configuration and Build System Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Build Failure
Status:  Fixed Assigned to:  None
Originator Name:  Avinoam Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Mon 27 Jun 2016 04:49:21 AM UTC, comment #12: 

@Tatsuro: The bug about popen2 requiring a delay is #48149.

Rik <rik5>
Group administrator
Sun 26 Jun 2016 10:45:54 PM UTC, comment #11: 

Avinoam

The patch mentioned in comment #8 enables build.
Thanks!

Seeing the patch popen2 for windows seemed to be renamed as win_popen2 and there wad an issue and Rik stated that the issue woule be filed as a new bug report.

What is number of the bug of that bug?

Tatsuro MATSUOKA <tmacchant>
Sat 25 Jun 2016 07:32:39 AM UTC, comment #10: 

What about the patch mentioned in comment #8?

Avinoam Kalma <avinoam>
Group Member
Sat 25 Jun 2016 05:33:37 AM UTC, comment #9: 

Patch on comment # 7 is also required for windows native build for default branch. Is there any reason that the patch on comment #7 is attached to the source tree?

Tatsuro MATSUOKA <tmacchant>
Mon 06 Jun 2016 03:54:41 PM UTC, comment #8: 

I pushed a slightly different patch here (http://hg.savannah.gnu.org/hgweb/octave/rev/590c39b94618) which avoids the issue by renaming so there are not duplicate functions in the same namespace.

I tested it and MXE Octave builds, the popen2 call however fails for me unless I put in a slight 50 millisecond delay after calling the function.  I will file a new bug report about that.

Rik <rik5>
Group administrator
Sun 05 Jun 2016 10:29:21 PM UTC, comment #7: 

patch attached that works for me

(file #37400)

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

@Mike: That was my thought as well.  I think the 'auto' keyword will work again once we have unambiguous/non-duplicative naming of the functions.

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

It looks like what happened here is simple naming conflict with the new namespace approach jwe is working on.

The old names were octave_popen2 (an internal-use only function defined on non-Cygwin Windows systems) and octave_syscalls::popen2, the public exposed API function for calling popen2 in Octave (either from libinterp or from external code).

The new names are both octave::sys::popen2, so we just need a new name for one of them to avoid the name conflict. I think the one in lo-sysdep should be renamed since it is only there for the other to use internally on Windows systems.

Mike Miller <mtmiller>
Group Member
Tue 24 May 2016 04:29:55 PM UTC, comment #4: 

I'm adding jwe to the CC list so he can possibly explain John's observation about duplication of popen2 in lo-sysdep and oct-syscalls.

If I understand the naming scheme, sysdep may stand for "System Dependent", while syscalls stands for "System Calls" that are presumably available just about everywhere.

From a naming perspective, things have gotten more muddled since we started using gnulib which removes the system dependency for lots of functions.

In this case, it appears that popen2 (which is always in the octave::sys namespace despite being defined and implemented over multiple .h and .cc files) should be consolidated so that the function appears either in oct-syscalls.[h|cc] or in lo-sysdep.[h|cc].


Rik <rik5>
Group administrator
Tue 24 May 2016 04:50:47 AM UTC, comment #3: 

This patch works for me, and Octave passes all test.
Thanks!

Avinoam Kalma <avinoam>
Group Member
Sun 22 May 2016 12:04:32 PM UTC, comment #2: 

I got it to compile for me now (see attached), but havent tried running it yet.

1. defined a type for the popen2 function to fix the initial compile error.

2. #ifdef'd the original popen2 function in oct-syscalls.cc so that it isnt available in  windows to fix the next issue that occurs.

Shouldnt the existing unix popen2  call be moved to lo-sysdep.cpp rather than have to ifdef both liboctave/system/lo-sysdep.cc and
liboctave/system/oct-syscalls.cc ?

(file #37226)

John Donoghue <lostbard>
Group Member
Sat 21 May 2016 05:16:54 PM UTC, comment #1: 

Updating summary and marking as confirmed by the existing mailing list discussion

http://lists.gnu.org/archive/html/octave-maintainers/2016-05/msg00285.html

Mike Miller <mtmiller>
Group Member
Sat 21 May 2016 11:31:09 AM UTC, original submission:  

Using changeset http://hg.savannah.gnu.org/hgweb/octave/rev/31b4b614ed55,
the popen2 problem wasn't solve yet:


libtool: compile:  i686-w64-mingw32-g++ -std=gnu++11 -DHAVE_CONFIG_H -I. -I/home/avinoam/mxe-octave/tmp-default-octave/octave-4.1.0+ -Iliboctave -I/home/avinoam/mxe-octave/tmp-default-octave/octave-4.1.0+/liboctave -I/home/avinoam/mxe-octave/tmp-default-octave/octave-4.1.0+/liboctave/cruft/misc -I/home/avinoam/mxe-octave/tmp-default-octave/octave-4.1.0+/liboctave/array -Iliboctave/numeric -I/home/avinoam/mxe-octave/tmp-default-octave/octave-4.1.0+/liboctave/numeric -Iliboctave/operators -I/home/avinoam/mxe-octave/tmp-default-octave/octave-4.1.0+/liboctave/operators -I/home/avinoam/mxe-octave/tmp-default-octave/octave-4.1.0+/liboctave/system -I/home/avinoam/mxe-octave/tmp-default-octave/octave-4.1.0+/liboctave/util -I/home/avinoam/mxe-octave/tmp-default-octave/octave-4.1.0+/libinterp/octave-value -Ilibinterp -I/home/avinoam/mxe-octave/tmp-default-octave/octave-4.1.0+/libinterp -I/home/avinoam/mxe-octave/tmp-default-octave/octave-4.1.0+/libinterp/operators -Ilibinterp/parse-tree -I/home/avinoam/mxe-octave/tmp-default-octave/octave-4.1.0+/libinterp/parse-tree -Ilibinterp/corefcn -I/home/avinoam/mxe-octave/tmp-default-octave/octave-4.1.0+/libinterp/corefcn -Ilibgnu -I/home/avinoam/mxe-octave/tmp-default-octave/octave-4.1.0+/libgnu -I/home/avinoam/mxe-octave/usr/i686-w64-mingw32/include/GraphicsMagick -I/home/avinoam/mxe-octave/usr/i686-w64-mingw32/include/libxml2 -I/home/avinoam/mxe-octave/usr/i686-w64-mingw32/include -I/home/avinoam/mxe-octave/usr/i686-w64-mingw32/include -I/home/avinoam/mxe-octave/usr/i686-w64-mingw32/include/freetype2 -I/home/avinoam/mxe-octave/usr/i686-w64-mingw32/include -I/home/avinoam/mxe-octave/usr/i686-w64-mingw32/include/libpng16 -I/home/avinoam/mxe-octave/usr/i686-w64-mingw32/include/freetype2 -I/home/avinoam/mxe-octave/usr/i686-w64-mingw32/include -I/home/avinoam/mxe-octave/usr/i686-w64-mingw32/include/libpng16 -I/home/avinoam/mxe-octave/usr/i686-w64-mingw32/include -pthread -fopenmp -mieee-fp -Wall -W -Wshadow -Wold-style-cast -Wformat -Wpointer-arith -Wwrite-strings -Wcast-align -Wcast-qual -g -O2 -MT libinterp/corefcn/libinterp_corefcn_libcorefcn_la-oct-procbuf.lo -MD -MP -MF libinterp/corefcn/.deps/libinterp_corefcn_libcorefcn_la-oct-procbuf.Tpo -c /home/avinoam/mxe-octave/tmp-default-octave/octave-4.1.0+/libinterp/corefcn/oct-procbuf.cc  -DDLL_EXPORT -DPIC -o libinterp/corefcn/.libs/libinterp_corefcn_libcorefcn_la-oct-procbuf.o
In file included from /home/avinoam/mxe-octave/tmp-default-octave/octave-4.1.0+/libinterp/corefcn/sysdep.h:33:0,
                 from /home/avinoam/mxe-octave/tmp-default-octave/octave-4.1.0+/libinterp/corefcn/oct-procbuf.cc:38:
/home/avinoam/mxe-octave/tmp-default-octave/octave-4.1.0+/liboctave/system/lo-sysdep.h:59:41: error: unable to deduce 'const auto' from 'octave::sys::popen2'
 const auto octave_popen2 = octave::sys::popen2;
                                         ^
/home/avinoam/mxe-octave/tmp-default-octave/octave-4.1.0+/liboctave/system/lo-sysdep.h:59:12: warning: 'octave_popen2' defined but not used [-Wunused-variable]
 const auto octave_popen2 = octave::sys::popen2;
            ^
/home/avinoam/mxe-octave/tmp-default-octave/octave-4.1.0+/libinterp/corefcn/oct-procbuf.cc:52:24: warning: 'octave_procbuf_list' defined but not used [-Wunused-variable]
 static octave_procbuf *octave_procbuf_list = 0;
                        ^
make[4]: *** [libinterp/corefcn/libinterp_corefcn_libcorefcn_la-oct-procbuf.lo] Error 1


Avinoam Kalma <avinoam>
Group Member

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #37400:  bug47968.patch added by lostbard (2KiB - text/x-patch)
file #37226:  popenfix.patch added by lostbard (2KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by tmacchant (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by rik5
  • -email is unavailable- added by lostbard (Updated the item)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by avinoam (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 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-06-06 rik5 StatusPatch Submitted Fixed
        Open/ClosedOpen Closed
    2016-06-05 lostbard Attached File- Added bug47968.patch, #37400
        StatusConfirmed Patch Submitted
    2016-05-24 rik5 Carbon-Copy- Added jwe
    2016-05-22 lostbard Attached File- Added popenfix.patch, #37226
    2016-05-21 mtmiller StatusNone Confirmed
        SummaryCan\'t build MXE-Octave mxe-octave: build of default branch fails with "unable to deduce 'const auto' from 'octave::sys::popen2'"

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code