bugGNU Octave - Bugs: bug #55814, mkoctfile does not honor TMPDIR...

 
 

bug #55814: mkoctfile does not honor TMPDIR environment variable

Submitter:  Nicholas Jankowski <nrjank>
Submitted:  Sat 02 Mar 2019 07:26:30 PM UTC
   
 
Category:  Configuration and Build System Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Other
Status:  Fixed Assigned to:  mtmiller
Originator Name:  Nicholas Jankowski Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 08 Mar 2019 09:16:02 PM UTC, comment #3: 

Tested in Windows, where TMP and TEMP are set to the same directory:
If I run mkoctfile with -v, I can see that this directory is used.
If I run setenv("TMPDIR", 'D:\temp') before running mkoctfile again, I can see that D:\temp is used instead.
So it looks like this is working as expected.

Closing as fixed.

Markus Mützel <mmuetzel>
Group administrator
Wed 06 Mar 2019 02:09:48 AM UTC, comment #2: 

I pushed a fix for this on the stable branch


I am completely unable to test this on Windows, so I would appreciate if someone with Windows can test the stable branch and verify that this compiles and that setting TMPDIR does the right thing (run mkoctfile with -v to see where temporary files are written), and that TMPDIR correctly takes precedence over TEMP or TMP, and that they still work if TMPDIR is not set.

Mike Miller <mtmiller>
Group Member
Sat 02 Mar 2019 08:02:08 PM UTC, comment #1: 

Thanks for filing this. I'm assigning myself to fix this within the next couple days on the stable branch.

I'm surprised I never saw this, because I use a non default TMPDIR all the time, but confirm that mkoctfile needs to learn to honor the user's TMPDIR if set.

Mike Miller <mtmiller>
Group Member
Sat 02 Mar 2019 07:26:30 PM UTC, original submission:  

It appears that mkoctfile does not fully respect TMPDIR as Octave's temp folder location. 

due to permissions limits I cannot compile in the user/appdata/local/temp folder. Setitng tmpdir to another location prior to doing a pkg install using:


setenv('tmpdir','c:\programs\octave\temp')

 
compilation generally works. However, noticed in bug #51344 when  attempting to build the video package that certain lines were still referring back to the system defined TMP or TEMP variables. E.g.:


make: *** [Makefile:20: aviinfo.oct] Error 1
make: Entering directory '/c/programs/octave/temp/oct-X2pgyh/video-1.2.4/src'
C:/Programs/Octave/OCTAVE~1.0-W/mingw64/bin/mkoctfile-5.1.0.exe -Wall -v -Wno-deprecated-declarations -c -DHAVE_CONFIG_H AVHandler.cc -o AVHandler.o
g++ -c -I/release/mxe-octave-w64/usr/x86_64-w64-mingw32/include  -IC:\Programs\Octave\OCTAVE~1.0-W\mingw64\include\octave-5.1.0\octave\.. -IC:\Programs\Octave\OCTAVE~1.0-W\mingw64\include\octave-5.1.0\octave -IC:\Programs\Octave\OCTAVE~1.0-W\mingw64\include   -fopenmp -g -O2  -Wall -Wno-deprecated-declarations   -DHAVE_CONFIG_H AVHandler.cc -o AVHandler.o
C:/Programs/Octave/OCTAVE~1.0-W/mingw64/bin/mkoctfile-5.1.0.exe -Wall -v -Wno-deprecated-declarations -c -DHAVE_CONFIG_H oct-avifile.cc -o oct-avifile.o
g++ -c -I/release/mxe-octave-w64/usr/x86_64-w64-mingw32/include  -IC:\Programs\Octave\OCTAVE~1.0-W\mingw64\include\octave-5.1.0\octave\.. -IC:\Programs\Octave\OCTAVE~1.0-W\mingw64\include\octave-5.1.0\octave -IC:\Programs\Octave\OCTAVE~1.0-W\mingw64\include   -fopenmp -g -O2  -Wall -Wno-deprecated-declarations   -DHAVE_CONFIG_H oct-avifile.cc -o oct-avifile.o
C:/Programs/Octave/OCTAVE~1.0-W/mingw64/bin/mkoctfile-5.1.0.exe -Wall -v -Wno-deprecated-declarations -DHAVE_CONFIG_H avifile.cc AVHandler.o oct-avifile.o -lavformat -lavcodec -lswscale -lavutil -lpthread
g++ -c -I/release/mxe-octave-w64/usr/x86_64-w64-mingw32/include  -IC:\Programs\Octave\OCTAVE~1.0-W\mingw64\include\octave-5.1.0\octave\.. -IC:\Programs\Octave\OCTAVE~1.0-W\mingw64\include\octave-5.1.0\octave -IC:\Programs\Octave\OCTAVE~1.0-W\mingw64\include   -fopenmp -g -O2  -Wall -Wno-deprecated-declarations   -DHAVE_CONFIG_H avifile.cc -o C:\Users\NICHOL~1.JAN\AppData\Local\Temp/oct-wnAJWS.o
g++ -IC:\Programs\Octave\OCTAVE~1.0-W\mingw64\include\octave-5.1.0\octave\.. -IC:\Programs\Octave\OCTAVE~1.0-W\mingw64\include\octave-5.1.0\octave -IC:\Programs\Octave\OCTAVE~1.0-W\mingw64\include   -fopenmp -g -O2 -shared -Wl,-rpath-link,/release/mxe-octave-w64/usr/x86_64-w64-mingw32/lib -L/release/mxe-octave-w64/usr/x86_64-w64-mingw32/lib -L/release/mxe-octave-w64/usr/x86_64-w64-mingw32/qt5/lib -Wl,--export-all-symbols  -Wall -Wno-deprecated-declarations -o avifile.oct  AVHandler.o oct-avifile.o C:\Users\NICHOL~1.JAN\AppData\Local\Temp/oct-wnAJWS.o   -lavformat -lavcodec -lswscale -lavutil -lpthread -LC:\Programs\Octave\OCTAVE~1.0-W\mingw64\lib\octave\5.1.0 -LC:\Programs\Octave\OCTAVE~1.0-W\mingw64\lib -LC:\Programs\Octave\OCTAVE~1.0-W\mingw64\lib\octave\5.1.0 -loctinterp -loctave  -Wl,-rpath-link,/release/mxe-octave-w64/usr/x86_64-w64-mingw32/lib -L/release/mxe-octave-w64/usr/x86_64-w64-mingw32/lib -L/release/mxe-octave-w64/usr/x86_64-w64-mingw32/qt5/lib -Wl,--export-all-symbols
C:/Programs/Octave/OCTAVE~1.0-W/mingw64/bin/mkoctfile-5.1.0.exe -Wall -v -Wno-deprecated-declarations -DHAVE_CONFIG_H aviread.cc AVHandler.o oct-avifile.o -lavformat -lavcodec -lswscale -lavutil -lpthread
g++ -c -I/release/mxe-octave-w64/usr/x86_64-w64-mingw32/include  -IC:\Programs\Octave\OCTAVE~1.0-W\mingw64\include\octave-5.1.0\octave\.. -IC:\Programs\Octave\OCTAVE~1.0-W\mingw64\include\octave-5.1.0\octave -IC:\Programs\Octave\OCTAVE~1.0-W\mingw64\include   -fopenmp -g -O2  -Wall -Wno-deprecated-declarations   -DHAVE_CONFIG_H aviread.cc -o C:\Users\NICHOL~1.JAN\AppData\Local\Temp/oct-xtzT7x.o
g++ -IC:\Programs\Octave\OCTAVE~1.0-W\mingw64\include\octave-5.1.0\octave\.. -IC:\Programs\Octave\OCTAVE~1.0-W\mingw64\include\octave-5.1.0\octave -IC:\Programs\Octave\OCTAVE~1.0-W\mingw64\include   -fopenmp -g -O2 -shared -Wl,-rpath-link,/release/mxe-octave-w64/usr/x86_64-w64-mingw32/lib -L/release/mxe-octave-w64/usr/x86_64-w64-mingw32/lib -L/release/mxe-octave-w64/usr/x86_64-w64-mingw32/qt5/lib -Wl,--export-all-symbols  -Wall -Wno-deprecated-declarations -o aviread.oct  AVHandler.o oct-avifile.o C:\Users\NICHOL~1.JAN\AppData\Local\Temp/oct-xtzT7x.o   -lavformat -lavcodec -lswscale -lavutil -lpthread -LC:\Programs\Octave\OCTAVE~1.0-W\mingw64\lib\octave\5.1.0 -LC:\Programs\Octave\OCTAVE~1.0-W\mingw64\lib -LC:\Programs\Octave\OCTAVE~1.0-W\mingw64\lib\octave\5.1.0 -loctinterp -loctave  -Wl,-rpath-link,/release/mxe-octave-w64/usr/x86_64-w64-mingw32/lib -L/release/mxe-octave-w64/usr/x86_64-w64-mingw32/lib -L/release/mxe-octave-w64/usr/x86_64-w64-mingw32/qt5/lib -Wl,--export-all-symbols
C:/Programs/Octave/OCTAVE~1.0-W/mingw64/bin/mkoctfile-5.1.0.exe -Wall -v -Wno-deprecated-declarations -DHAVE_CONFIG_H aviinfo.cc AVHandler.o oct-avifile.o -lavformat -lavcodec -lswscale -lavutil -lpthread
g++ -c -I/release/mxe-octave-w64/usr/x86_64-w64-mingw32/include  -IC:\Programs\Octave\OCTAVE~1.0-W\mingw64\include\octave-5.1.0\octave\.. -IC:\Programs\Octave\OCTAVE~1.0-W\mingw64\include\octave-5.1.0\octave -IC:\Programs\Octave\OCTAVE~1.0-W\mingw64\include   -fopenmp -g -O2  -Wall -Wno-deprecated-declarations   -DHAVE_CONFIG_H aviinfo.cc -o C:\Users\NICHOL~1.JAN\AppData\Local\Temp/oct-Xa5crd.o


I think Mike confirmed this occurs for other packages on other platforms, and the suggestion is that mkoctfile is using the wrong variable rather than something else just calling it with the wrong variable.

Nicholas Jankowski <nrjank>
Group Member

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Date Changed by Updated Field Previous Value => Replaced by
    2019-03-08 mmuetzel StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2019-03-06 mtmiller StatusConfirmed Ready For Test
    2019-03-02 mtmiller Carbon-CopyRemoved mtmiller -
    2019-03-02 mtmiller StatusNone Confirmed
        Assigned toNone mtmiller
    2019-03-02 nrjank Carbon-Copy- Added mtmiller

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code