bugGNU Octave - Bugs: bug #47617, [octave forge]...

 
 

bug #47617: [octave forge] (instrument-control) needs better Makefile

Submitter:  None
Submitted:  Mon 04 Apr 2016 01:18:01 PM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Installation Failure
Status:  Fixed Assigned to:  lostbard
Originator Name:  Trevor Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 4.0.1
Operating System:  * Microsoft Windows Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sun 13 Aug 2017 02:00:52 PM UTC, comment #24: 

Should all now be good with the recent release of instrument-control 0.3.0

John Donoghue <lostbard>
Group Member
Fri 18 Nov 2016 05:54:35 PM UTC, comment #23: 
Anonymous
Fri 18 Nov 2016 05:07:50 PM UTC, comment #22: 


> Current philosophy is that all modules are built, but return a "not supported" error message. Don't know if it's better just to skip building if not supported.


Please don't skip build of those functions. It is better to have an error that explicitly says that the package was built without support for it. It makes it obvious for the user where the issue was otherwise, the user may think they are using an old version of the package, or that the function is in another package. It also makes that function help text available which can be useful for the user but it also allows any maintainer to build the package documentation for release without requiring support for all of them on his system.

Note that this is also how Octave core works if you are missing graphicsmagick (disables image IO functions), qhull (disables voronoi), or curl (disables urlwrite and urlread) for example.

Carnë Draug <carandraug>
Group Member
Fri 18 Nov 2016 04:26:23 PM UTC, comment #21: 

sorry - I meant RPCLIBS

config.log attached


The issue with building them is that the 'exists' check will always say its good - I guess not an issue, but the examples use the exists check for whether the module is supported.

(file #39011, file #39012)

John Donoghue <lostbard>
Group Member
Fri 18 Nov 2016 04:18:38 PM UTC, comment #20: 

Current philosophy is that all modules are built, but return a "not supported" error message. Don't know if it's better just to skip building if not supported.

RPCINCLUDE is set to 'no'? This should not happen:
  AC_SUBST([RPCINCLUDE], ["-I${tirpc_header_dir}"])

Could you attach the configure and build log?

Anonymous
Fri 18 Nov 2016 03:20:04 PM UTC, comment #19: 

continuing from comment #18, the VXXI11 OCT variable should probably be set to nothing like VXI and OBJ is.

Currently, although it detects in configure not to build, it attempts to build the oct file, but fails as one of the variables (RPCINCLUDE) is set to 'no':


John Donoghue <lostbard>
Group Member
Fri 18 Nov 2016 03:07:05 PM UTC, comment #18: 

vxi11 returns 0 in windows, but uses BUILD_VXI11 in its build, so detects it shouldn't build anything


John Donoghue <lostbard>
Group Member
Fri 18 Nov 2016 03:02:41 PM UTC, comment #17: 

Another thing I have noticed is that (and I have only checked in windows, but assume is same in Linux) the oct files get built regardless of whether configure detected they should or not.

So in windows exists("parallel") returns 3, as does i2c, gpib and usbtcp


John Donoghue <lostbard>
Group Member
Fri 18 Nov 2016 02:40:11 PM UTC, comment #16: 

I just pushed a patch that should fix the Makefile:
https://sourceforge.net/p/octave/instrument-control/ci/55800fb7ab261959269bed2addbba8c71a5fe570/

I guess it will cause problems for some users, since autoconf checks may be incomplete. Let's wait for new bug reports.

Anonymous
Wed 06 Jul 2016 11:23:03 PM UTC, comment #15: 

Changing to a report against Octave Forge Package.

Rik <rik5>
Group administrator
Sun 03 Jul 2016 07:54:28 PM UTC, comment #14: 

If you look at the contents of the installer, you'll see that the .m files are present and installed in share/octave/packages/instrument-control-0.2.2. The lib/octave/packages/instrument-control-0.2.2 directory is missing.

I think I see the problem. The instrument-control package top-level Makefile uses a shell for loop construct to build .oct files in subdirectories. But if the first directory fails to compile, the for loop will continue building the next one. The return status of the "make all" command will be based only on whether the last directory, vxi11, failed to build or not. And since BUILD_VXI11 is probably always false under mxe-octave, it will never report a build failure and "pkg install" will think everything built successfully.

I think this can be changed into a bug against the instrument-control package.

Mike Miller <mtmiller>
Group Member
Sat 02 Jul 2016 11:23:07 PM UTC, comment #13: 

Perhaps the package had been built prior to binary packages being available and never got rebuilt - Does jwe always build a release from a clean build ?

John Donoghue <lostbard>
Group Member
Sat 02 Jul 2016 10:10:16 PM UTC, comment #12: 

The severity of this is now below 4 so this is not a gating bug for the 4.2 release.

Rik <rik5>
Group administrator
Sat 02 Jul 2016 09:40:09 PM UTC, comment #11: 

IIRC, someone else had a build of 4.0.1 that did include instrument-control correctly cross-built. So I don't know the reason why the official installer image built by jwe didn't include the .oct files from instrument-control.

My hope was that someone would be able to figure out how this is possible, I would have thought a build failure would be thrown somewhere if it didn't build and/or install all the packages successfully. I'm thinking it's a bug in the mxe-octave build process itself that such a thing could happen (and might happen again).

Both the 4.0.1 and 4.0.2 installers built by jwe are missing the .oct files for the instrument-control package. The .m files are present. The 4.0.3 installer does contain the .oct files. So this is "fixed" in that sense. But still unfixed IMHO because I haven't seen an explanation for how it was possible to build an installer with only a partially built package, or why it worked for 4.0.3.

Mike Miller <mtmiller>
Group Member
Sat 02 Jul 2016 06:46:58 PM UTC, comment #10: 

Is the instrument-control package still missing in 4.0.3 released today (7/2/16)?

Is it missing from the development release that will become 4.2.0?

Rik <rik5>
Group administrator
Tue 26 Apr 2016 05:00:26 PM UTC, comment #9: 

They are also missing in 4.0.2.

If I build them on my machine they are there, so probally need to look at the log file for the build of the package on JWEs machine.

John Donoghue <lostbard>
Group Member
Wed 20 Apr 2016 03:19:02 PM UTC, comment #8: 

Building it on my machine, the files appear to be there.


For those that are missing it:

 pkg install -forge instrument-control

should work

John Donoghue <lostbard>
Group Member
Tue 19 Apr 2016 10:50:45 PM UTC, comment #7: 

Yes, the instrument-control package in particular seems to be not fully installed correctly in the official 4.0.1 release. For some reason the compiled oct-files are not present. This will likely be fixed in a future 4.0.2 release, or you can use Tatsuro's 64-bit build.

Devs: any idea how/why the lib/octave/packages/instrument-control-0.2.2 directory went missing in the mxe build?


$ 7z l ~/Downloads/octave-4.0.1-installer.exe | grep instrument-control
2016-01-13 06:45:18 .....         1061               share/octave/packages/instrument-control-0.2.2/clrdevice.m
2016-01-13 06:45:18 .....         1759               share/octave/packages/instrument-control-0.2.2/spoll.m
2016-01-13 06:45:18 .....         1034               share/octave/packages/instrument-control-0.2.2/trigger.m
2016-01-13 06:45:18 .....         1871               share/octave/packages/instrument-control-0.2.2/@octave_gpib/fprintf.m
2016-01-13 06:45:18 .....         3027               share/octave/packages/instrument-control-0.2.2/@octave_gpib/fread.m
2016-01-13 06:45:18 .....          984               share/octave/packages/instrument-control-0.2.2/@octave_gpib/fopen.m
2016-01-13 06:45:18 .....         1883               share/octave/packages/instrument-control-0.2.2/@octave_gpib/fscanf.m
2016-01-13 06:45:18 .....         2376               share/octave/packages/instrument-control-0.2.2/@octave_gpib/fwrite.m
2016-01-13 06:45:18 .....          898               share/octave/packages/instrument-control-0.2.2/@octave_gpib/fclose.m
2016-01-13 06:45:18 .....         3533               share/octave/packages/instrument-control-0.2.2/packinfo/COPYING
2016-01-13 06:45:18 .....         1084               share/octave/packages/instrument-control-0.2.2/packinfo/INDEX
2016-01-13 06:45:18 .....          391               share/octave/packages/instrument-control-0.2.2/packinfo/DESCRIPTION
2016-01-13 06:45:18 .....         2617               share/octave/packages/instrument-control-0.2.2/packinfo/NEWS
2016-01-13 06:45:18 .....          975               share/octave/packages/instrument-control-0.2.2/@octave_vxi11/fopen.m
2016-01-13 06:45:18 .....          890               share/octave/packages/instrument-control-0.2.2/@octave_vxi11/fclose.m
2016-01-13 06:45:18 .....         1665               share/octave/packages/instrument-control-0.2.2/@octave_serial/srl_baudrate.m
2016-01-13 06:45:18 .....         1555               share/octave/packages/instrument-control-0.2.2/@octave_serial/srl_stopbits.m
2016-01-13 06:45:18 .....         1093               share/octave/packages/instrument-control-0.2.2/@octave_serial/srl_close.m
2016-01-13 06:45:18 .....         3344               share/octave/packages/instrument-control-0.2.2/@octave_serial/set.m
2016-01-13 06:45:18 .....         1608               share/octave/packages/instrument-control-0.2.2/@octave_serial/srl_parity.m
2016-01-13 06:45:18 .....         1901               share/octave/packages/instrument-control-0.2.2/@octave_serial/get.m
2016-01-13 06:45:18 .....          975               share/octave/packages/instrument-control-0.2.2/@octave_serial/fopen.m
2016-01-13 06:45:18 .....         1383               share/octave/packages/instrument-control-0.2.2/@octave_serial/srl_flush.m
2016-01-13 06:45:18 .....         1560               share/octave/packages/instrument-control-0.2.2/@octave_serial/srl_bytesize.m
2016-01-13 06:45:18 .....          972               share/octave/packages/instrument-control-0.2.2/@octave_serial/fclose.m
2016-01-13 06:45:18 .....         1668               share/octave/packages/instrument-control-0.2.2/@octave_serial/srl_timeout.m
2016-01-13 06:45:18 .....          973               share/octave/packages/instrument-control-0.2.2/@octave_i2c/fopen.m
2016-01-13 06:45:18 .....          886               share/octave/packages/instrument-control-0.2.2/@octave_i2c/fclose.m
2016-01-13 06:45:18 .....          976               share/octave/packages/instrument-control-0.2.2/@octave_usbtmc/fopen.m
2016-01-13 06:45:18 .....          892               share/octave/packages/instrument-control-0.2.2/@octave_usbtmc/fclose.m
2016-01-13 06:45:18 .....          973               share/octave/packages/instrument-control-0.2.2/@octave_tcpip/fopen.m
2016-01-13 06:45:18 .....          886               share/octave/packages/instrument-control-0.2.2/@octave_tcpip/fclose.m


The package's m-files are there but not the compiled oct-files.

Mike Miller <mtmiller>
Group Member
Wed 13 Apr 2016 07:40:19 PM UTC, comment #6: 

This Fails
----------
GNU Octave, version 4.0.1
...
For information about changes from previous versions, type 'news'.

>> pkg load instrument-control
>> tsttcp

error: 'tcp' undefined near line 4 column 14
error: called from
    tsttcp at line 4 column 12

>>



This Works
----------
GNU Octave, version 4.0.0
...
For information about changes from previous versions, type 'news'.

>> pkg load instrument-control
>> tsttcp

Voltage 0.699741

>>



The instrument-control package does work using the Tatsuro 64bit Octave 4.0.1. available here:
http://www.tatsuromatsuoka.com/octave/Eng/Win/


Thanks, OP


The Code
--------
function tsttcp()

% Create TCP object, IP address, port, timeout in ms
Instrument = tcp("192.168.1.154", 5555, 2000);

% Send command, Object, Message
tcp_write(Instrument, "MEAS:ITEM? VRMS,CHANNEL1"); % Set measurement type

% Receive the data, NBytes
[data n]= tcp_read(Instrument,100);

% Read and display data
v=sscanf(char(data),'%f');
fprintf('Voltage %f\n', v);

tcp_close(Instrument);

endfunction

Anonymous
Wed 13 Apr 2016 06:01:51 PM UTC, comment #5: 

You say the packages do not work.  HOW do they not work?  Exactly what fails?  Do you get error messages?  What are they?

John W. Eaton <jwe>
Group administrator
Mon 11 Apr 2016 10:10:47 PM UTC, comment #4: 

I installed Octave 4.0.1 on Win 10 Pro 64 and Win 10 Pro 32, using the octave-4.0.1-installer.exe from here
https://www.gnu.org/software/octave/index.html

The packages are pre built in 4.0.1 but do not seem to work.  The package source files are not provided so I could not rebuild them.

In the Octave 4.0.0 installer the packages were not prebuilt, and were built from source after instal.

I have an octave 'program' (m file) using the instrument-control package that runs fine under Octave 4.0.0, but it does not run under Octave 4.0.1 because the pkg has not loaded correctly.

I have since installed the Tatsuro 64bit Octave 4.0.1.  This works fine.

Yes this is similar to 47590, which I hadn't seen.

Regards, Originator

Anonymous
Tue 05 Apr 2016 08:22:58 PM UTC, comment #3: 

As I just commented on the bug report mike linked to, if he used the zip archive, the packages are already built but Octave does not have an internal package list so it does not see them.  running:

pkg rebuild

will quickly create this internal list, and then all packages will appear and be usable.

Nicholas Jankowski <nrjank>
Group Member
Mon 04 Apr 2016 04:40:42 PM UTC, comment #2: 

See also bug #47590, both reports may be about the same problem/experience.

Mike Miller <mtmiller>
Group Member
Mon 04 Apr 2016 04:13:57 PM UTC, comment #1: 

If the packages were installed correctly, you wouldn't need the source files or rebuild, so what appears to be wrong with the instrument-control package ?

What OS, and installer did you use?

What where are you trying to do and what was the incorrect result?

John Donoghue <lostbard>
Group Member
Mon 04 Apr 2016 01:18:01 PM UTC, original submission:  

Packages do not seem to have installed correctly with windows.  At least one package "instrument-control" has not installed correctly, the source files are no longer provided in the src directory (to enable me to rebuild them), and the pkg update command fails.

Packages were built from source, after install on the Octave 4.0.0 distribution.  This was a little slow but worked fine.  Maybe should return to this method.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #39011:  of-instrument-control.log added by lostbard (112KiB - application/octet-stream)
file #39012:  config.log added by lostbard (55KiB - 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 jwe (Posted a comment)
  • -email is unavailable- added by mtmiller (Updated the item)
  • -email is unavailable- added by lostbard (Posted a comment)
  •  

    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 17 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-04-02 lostbard Open/ClosedOpen Closed
    2018-04-02 lostbard StatusConfirmed Fixed
        Assigned toNone lostbard
    2017-08-13 jwe Summaryinstrument-control package needs better Makefile [octave forge] (instrument-control) needs better Makefile
    2016-11-18 lostbard Attached File- Added of-instrument-control.log, #39011
        Attached File- Added config.log, #39012
    2016-11-18 rik5 Carbon-CopyRemoved 72865 -
    2016-11-18 nrjank Carbon-CopyRemoved 99976 -
    2016-07-06 rik5 CategoryConfiguration and Build System Octave Package
        Summarymxe-octave: instrument-control package not installed correctly in releases &lt; 4.0.3 instrument-control package needs better Makefile
    2016-07-02 rik5 Carbon-CopyRemoved 72865 -
    2016-07-02 rik5 Summarymxe-octave: instrument-control package not installed correctly in official release mxe-octave: instrument-control package not installed correctly in releases < 4.0.3
    2016-04-19 mtmiller StatusNeed Info Confirmed
        SummaryPackages not installed correctly mxe-octave: instrument-control package not installed correctly in official release
    2016-04-04 mtmiller StatusNone Need Info
    2016-04-04 rik5 Carbon-CopyRemoved 72865 -
    2016-04-04 rik5 SummaryPackages not installed correctly . Packages not installed correctly

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code