bugGNU Octave - Bugs: bug #43164, Unable to build packages due to...

 
 

bug #43164: Unable to build packages due to another installation of GCC or MinGW in PATH variable

Submitter:  None
Submitted:  Sun 07 Sep 2014 08:28:49 AM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Installation Failure
Status:  Fixed Assigned to:  lostbard
Originator Name:  Bastelphilip Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 3.8.2
Operating System:  * Microsoft Windows Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Fri 03 Oct 2014 08:28:27 AM UTC, comment #9: 

Sorry should be closed & fixed

Philip Nienhuis <philipnienhuis>
Group Member
Fri 03 Oct 2014 12:40:47 AM UTC, comment #8: 
John Donoghue <lostbard>
Group Member
Sat 27 Sep 2014 05:25:32 PM UTC, comment #7: 

OK, builds, installs & runs fine.

I've added copyright messages & license to the batch file (manually into the changeset).
Do you agree there? Optionally add your email to the copyright message, of if you think it doesn't belong there, please remove mine.

Otherwise I think this can be pushed.

Philip Nienhuis <philipnienhuis>
Group Member
Fri 26 Sep 2014 10:45:32 AM UTC, comment #6: 

Added show minimized settings, set TERM=cygwin
in new patch

(file #32188)

John Donoghue <lostbard>
Group Member
Thu 25 Sep 2014 08:46:31 PM UTC, comment #5: 

Forgot to mention that it would be nice (that is: I like it) to have SW_SHOWMINIMIZED in the shortcuts in makeinst-script.sh (to suppress empty black cmd windows lingering on too long)

Version-specific = look in the comment lines. See patch #8469 for what it is meant for.

I'm afraid at the earliest somewhere this weekend there'll be time for testing here

FYI: another motive to have a batch file was to be able to set additional environment vars specific to Octave or OF packages or dependencies.
E.g., the io package could benefit there (its PKG_ADD checks an env. setting to look for instructions on searching Java class libs)

Philip Nienhuis <philipnienhuis>
Group Member
Thu 25 Sep 2014 06:19:10 PM UTC, comment #4: 

I forgot to remove the ghostscript comment - done in attachment
I am not sure what version specific stuff you are referring to?

No real reason for one script, except allows a default of cli vs gui within the script instead of having to change anything else, only one file to have to change etc. It also then is similar to the idea of running 'octave' command which then opens the program in the default way.

The path works on my Win7 and Xp machines. The Windows specific paths are not needed as Windows will search them for libraries regardless. [1]

We can append the existing path - done in attachment


[1] http://msdn.microsoft.com/en-us/library/7d83bc18.aspx

(file #32184)

John Donoghue <lostbard>
Group Member
Thu 25 Sep 2014 05:44:54 PM UTC, comment #3: 

(Some provisional comments - little time now)

As to the batch file:

- It needs some tidying-up; it still has the octave-version-specific stuff I use for patch #8469 and also mentions my Ghostscript setup comment.

- Why one batch file for the CLI and the GUI?
IMO it is easier (for the Linux-oriented user community here) to have two separate simple batch files, one for the CLI and one for the GUI. Makes maintenance a bit easier - I think.

- What seems to be missing is the rest of the PATH after Octave's bin subdir. AFAIK it is vital to have the Windows OS subdirectories somewhere in the PATH. As mentioned in patch #8544 it may even be preferable to simply append the original PATH. The vital requirement is to have Octave's bin/ subdir as first item in the PATH.
(BTW Octave will add it twice somewhere at the end of the PATH)

Philip Nienhuis <philipnienhuis>
Group Member
Mon 22 Sep 2014 04:49:06 PM UTC, comment #2: 

I've attached a patch here for mxe-octave  that makes some changes for the installer etc to install octave.bat.

Philip: I made some changes to your script to check the input args for whether we are starting with --force-gui in order to know when to start the GUI vs the command line.

Perhaps it should default to the GUI and be command line if the --no-gui option is provided as that will be what everyone will probably change it to anyway.

(file #32168)

John Donoghue <lostbard>
Group Member
Sun 07 Sep 2014 12:09:09 PM UTC, comment #1: 

Yeah I'm sorry but this really looks to be caused by your own way of setting up things.
You'd better set environment variables through batch filea, rather than put it all in a global environment valid for all user programs.

That said, we really need a batch file to start Octave on MinGW, to help clean up the Windows PATH from all junk that users and user programs (on purpose or not, with or without their knowledge) have put there and that clobbers up Octave's execution.

I use the following (to be put in Octave's installation subdir):

@echo off
Rem   Find Octave's install directory through cmd.exe variables.
Rem   This batch file should reside in Octaves installation subdir!
Rem
Rem   This trick finds the location where the batch file resides.
Rem   Note: the result ends with a backslash
set OCT_HOME=%~dp0

Rem   Set up PATH. Make sure the Octave-version-specific subdir
Rem   comes first. Use system environment variables for the
Rem   Windows system dirs.
Rem   Ghostscript is still an issue, I've left my setup for it
Rem   in the line below:

set  PATH=%OCT_HOME%bin;%windir%\system32;%windir%;%windir%\system32\wbem;%OCT_HOME%gs\gs9.14\bin

Rem   Start Octave (this detaches octave-gui and immediately
Rem   returns):
start octave-gui.exe
Rem  or
REM start octave-cli.exe

Rem   Close the batch file's cmd.exe window
exit

(also attached)



(file #32041)

Philip Nienhuis <philipnienhuis>
Group Member
Sun 07 Sep 2014 08:28:49 AM UTC, original submission:  

I was unable to build any package using build_packages and I was also unable to install packages using the pkg-command (error see below).

The reason seems to be that there were other installations of GCC and MinGW on my computer in the scope of the environment variables (system variable PATH and user variable PATH). After removing all the entries pointing to other installations, build_packages worked and I was also able to install packages using the pkg-command.

This problem occured in 3.8.1 as well as 3.8.2 and was solved in both cases.

-------------------------

>>build_packages

## cd to script directory as the packages files are in the same place
packagedir = fileparts (mfilename ("fullpathext"));
if length (packagedir) > 0
  cd (packagedir);
endif;
cd (packagedir);
## install the packages
pkg ('install', 'general-1.3.4.tar.gz')
g++: error: unrecognized option '-pthread'
make: * [mark_for_deletion.oct] Error 1
make: Entering directory `C:/Users/NoName/AppData/Local/Temp/oct-2/general/src'
H:/Programme/Octave/Octave-3.8.2/bin/mkoctfile-3.8.2.exe mark_for_deletion.cc
make: Leaving directory `C:/Users/NoName/AppData/Local/Temp/oct-2/general/src'

pkg: error running `make' for the general package.
error: called from 'configure_make' in file H:\Programme\Octave\Octave-3.8.2\share\octave\3.8.2\m\pkg\private\co
nfigure_make.m near line 82, column 9
error: called from:
error:   H:\Programme\Octave\Octave-3.8.2\share\octave\3.8.2\m\pkg\private\install.m at line 199, column 5
error:   H:\Programme\Octave\Octave-3.8.2\share\octave\3.8.2\m\pkg\pkg.m at line 394, column 9
error:   H:\Programme\Octave\Octave-3.8.2\src\build_packages.m at line 9, column 1

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #32188:  win_bat3.patch added by lostbard (6KiB - text/x-patch)
file #32184:  win_bat2.patch added by lostbard (6KiB - application/octet-stream)
file #32168:  use_bat.patch added by lostbard (6KiB - application/octet-stream)
file #32041:  Octave.bat added by philipnienhuis (821B - application/x-msdownload)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by lostbard (Updated 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
    2014-10-03 philipnienhuis StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2014-10-03 lostbard Item GroupNone Installation Failure
        StatusNone Ready For Test
        Assigned toNone lostbard
    2014-09-26 lostbard Attached File- Added win_bat3.patch, #32188
    2014-09-25 lostbard Attached File- Added win_bat2.patch, #32184
    2014-09-22 lostbard Attached File- Added use_bat.patch, #32168
    2014-09-07 philipnienhuis Attached File- Added Octave.bat, #32041

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code