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

Submitted by:  None
Submitted on:  Sun 07 Sep 2014 08:28:49 AM UTC  
 
Category: Octave Forge PackageSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Installation Failure
Status: FixedAssigned to: John Donoghue <lostbard>
Originator Name: BastelphilipOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 3.8.2
Operating System: Microsoft Windows

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

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

Sorry should be closed & fixed

Philip Nienhuis <philipnienhuis>
Project Member
Fri 03 Oct 2014 12:40:47 AM UTC, comment #8:

Pushed http://hg.octave.org/mxe-octave/rev/70480095b6ed

John Donoghue <lostbard>
Project MemberIn charge of this item.
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>
Project 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>
Project MemberIn charge of this item.
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>
Project 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>
Project MemberIn charge of this item.
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>
Project 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>
Project MemberIn charge of this item.
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):

(file #32041)

Philip Nienhuis <philipnienhuis>
Project 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 File(s):
   
   
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
  • -unavailable- added by lostbard (Updated the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 9 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 03 Oct 2014 08:28:27 AM UTCphilipnienhuisStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Fri 03 Oct 2014 12:40:47 AM UTClostbardItem GroupNone=>Installation Failure
      StatusNone=>Ready For Test
      Assigned toNone=>lostbard
    Fri 26 Sep 2014 10:45:32 AM UTClostbardAttached File-=>Added win_bat3.patch, #32188
    Thu 25 Sep 2014 06:19:10 PM UTClostbardAttached File-=>Added win_bat2.patch, #32184
    Mon 22 Sep 2014 04:49:06 PM UTClostbardAttached File-=>Added use_bat.patch, #32168
    Sun 07 Sep 2014 12:09:09 PM UTCphilipnienhuisAttached File-=>Added Octave.bat, #32041

    Back to the top


    Powered by Savane 3.1-cleanup1