bugGNU Octave - Bugs: bug #40273, 'sed' is used even if a different...


bug #40273: 'sed' is used even if a different value for 'SED' is specified during configure

Submitter:  Carlo de Falco <cdf>
Submitted:  Tue 15 Oct 2013 05:48:00 AM UTC
Category:  Configuration and Build System Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Installation Failure
Status:  In Progress Assigned to:  cdf
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Mac OS
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment (Rich Markup)

Comment Type & Canned Response:


( Jump to the original submission )

Thu 26 Nov 2015 05:09:11 AM UTC, comment #10: 

No progress upstream in 2 years.  Closing report.

Rik <rik5>
Project Administrator
Sun 28 Dec 2014 04:20:16 PM UTC, comment #9: 

What do we want to do with this bug?  The problem is upstream in gnulib.  Have they been contacted about it as suggested in comment #4 from Carlo?

Rik <rik5>
Project Administrator
Tue 29 Oct 2013 07:02:05 AM UTC, comment #8: 

Yes, the build does fail on OSX if '/usr/bin/sed' shiped b Applle is used.

I haad to do

sudo ln -s /opt/local/bin/gsed /opt/local/bin/sed

to make sure the sed installed by macports is used.

Carlo de Falco <cdf>
Project Member
Tue 29 Oct 2013 01:22:46 AM UTC, comment #7: 

Carlo, I agree that gnulib is calling sed instead of $SED, but I notice you didn't say whether the build fails in the libgnu directory or not with OSX's "broken" sed.

Automake also puts calls to sed, not $SED, in the generated Makefiles.

Mike Miller <mtmiller>
Project Administrator
Mon 21 Oct 2013 11:29:43 PM UTC, comment #6: 

However, gnulib is special because once the bug is fixed in gnulib, we need a reminder to update our hg mirror of gnulib and the subrepo pointer in order to get the fix into Octave. I think leaving this report open on our side serves as that reminder.

Mike Miller <mtmiller>
Project Administrator
Wed 16 Oct 2013 02:49:49 PM UTC, comment #5: 

What I had in mind is that a report would be filed with the other bug trackers, say for gnulib, since there isn't much we can do at this end.

When we find errors that are attributable to gnuplot, for example, we generally close the bug here.  The bug report can always be found by searching on keywords and so someone in the future who encounters the same problem can discover where to go without having to leave the report open.

Rik <rik5>
Project Administrator
Wed 16 Oct 2013 09:04:35 AM UTC, comment #4: 


Thanks for the partial fix!

I'll contact the developers of
other projects to try get a fix
there too.
In the meanwhile, please don't
close the bug, the fact that this
issue is to be fixed elsewhere does
not mean it's solved yet.

Carlo de Falco <cdf>
Project Member
Tue 15 Oct 2013 06:14:04 PM UTC, comment #3: 

Carlo, I pushed a changeset that uses $SED and $GREP wherever it is possble (http://hg.savannah.gnu.org/hgweb/octave/rev/1978a6c76aa9).  Unfortunately, it seems that there are a lot of bare instances of 'sed' coming from either gnulib or autoconf (check the build-aux directory for instance).  I don't see an easy way to get rid of those.  I'm tempted to close the bug report as the remaining problems are not Octave, but other project's bugs.

Rik <rik5>
Project Administrator
Tue 15 Oct 2013 06:50:11 AM UTC, comment #2: 


There seem to be other occurrences of use of 'sed' not related to gnulib, for example

grep -C1 sed make.log

I see at least those:

 mv -f dldfcn/.deps/dldfcn___delaunayn___la-__delaunayn__.Tpo dldfcn/.deps/dldfcn___delaunayn___la-__delaunayn__.Plo
 depbase=`echo dldfcn/__dsearchn__.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
         /bin/sh ../libtool  --tag=CXX   --mode=compile /opt/local/bin/g++-mp-4.7 -DHAVE_CONFIG_H -I. -I..  -I../liboctave/cruft/misc -I../liboctave/array -I../liboctave/numeric -I../liboctave/numeric -I../liboctave/operators -I../liboctave/operators -I../liboctave/system -I../liboctave/util -I./octave-value -I./operators -Iparse-tree -I./parse-tree -Icorefcn -I./corefcn -I../libgnu -I../libgnu -D_THREAD_SAFE -I/opt/local/include -I/opt/local/include  -isystem /opt/local/libexec/llvm-3.3/include -I/opt/local/include/freetype2 -I/opt/local/include  -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include  -Wall -W -Wshadow -Wold-style-cast -Wformat -Wpointer-arith -Wwrite-strings -Wcast-align -Wcast-qual -pipe -pipe -O2 -m64 -m64 -D_THREAD_SAFE -pthread -MT dldfcn/__dsearchn__.lo -MD -MP -MF $depbase.Tpo -c -o dldfcn/__dsearchn__.lo dldfcn/__dsearchn__.cc &&\


 mv -f dldfcn/.deps/dldfcn___fltk_uigetfile___la-__fltk_uigetfile__.Tpo dldfcn/.deps/dldfcn___fltk_uigetfile___la-__fltk_uigetfile__.Plo
 depbase=`echo dldfcn/__init_gnuplot__.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
         /bin/sh ../libtool  --tag=CXX   --mode=compile /opt/local/bin/g++-mp-4.7 -DHAVE_CONFIG_H -I. -I..  -I../liboctave/cruft/misc -I../liboctave/array -I../liboctave/numeric -I../liboctave/numeric -I../liboctave/operators -I../liboctave/operators -I../liboctave/system -I../liboctave/util -I./octave-value -I./operators -Iparse-tree -I./parse-tree -Icorefcn -I./corefcn -I../libgnu -I../libgnu -D_THREAD_SAFE -I/opt/local/include -I/opt/local/include  -isystem /opt/local/libexec/llvm-3.3/include -I/opt/local/include/freetype2 -I/opt/local/include  -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include  -Wall -W -Wshadow -Wold-style-cast -Wformat -Wpointer-arith -Wwrite-strings -Wcast-align -Wcast-qual -pipe -pipe -O2 -m64 -m64 -D_THREAD_SAFE -pthread -MT dldfcn/__init_gnuplot__.lo -MD -MP -MF $depbase.Tpo -c -o dldfcn/__init_gnuplot__.lo dldfcn/__init_gnuplot__.cc &&\


 mv -f dldfcn/.deps/dldfcn_fftw_la-fftw.Tpo dldfcn/.deps/dldfcn_fftw_la-fftw.Plo
 depbase=`echo dldfcn/tsearch.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
         /bin/sh ../libtool  --tag=CXX   --mode=compile /opt/local/bin/g++-mp-4.7 -DHAVE_CONFIG_H -I. -I..  -I../liboctave/cruft/misc -I../liboctave/array -I../liboctave/numeric -I../liboctave/numeric -I../liboctave/operators -I../liboctave/operators -I../liboctave/system -I../liboctave/util -I./octave-value -I./operators -Iparse-tree -I./parse-tree -Icorefcn -I./corefcn -I../libgnu -I../libgnu -D_THREAD_SAFE -I/opt/local/include -I/opt/local/include  -isystem /opt/local/libexec/llvm-3.3/include -I/opt/local/include/freetype2 -I/opt/local/include  -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include  -Wall -W -Wshadow -Wold-style-cast -Wformat -Wpointer-arith -Wwrite-strings -Wcast-align -Wcast-qual -pipe -pipe -O2 -m64 -m64 -D_THREAD_SAFE -pthread -MT dldfcn/tsearch.lo -MD -MP -MF $depbase.Tpo -c -o dldfcn/tsearch.lo dldfcn/tsearch.cc &&\


 /opt/local/bin/g++-mp-4.7 -DHAVE_CONFIG_H -I. -I..  -I../liboctave/array -I../liboctave/cruft/misc -I../liboctave/numeric -I../liboctave/system -I../liboctave/util -I../libinterp -I../libinterp/corefcn -I../libinterp/corefcn -I../libgnu -I../libgnu -I../libgui/src -D_THREAD_SAFE -I/opt/local/include -I/opt/local/include  -isystem /opt/local/libexec/llvm-3.3/include -I/opt/local/include/freetype2 -I/opt/local/include  -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include  -Wall -W -Wshadow -Wold-style-cast -Wformat -Wpointer-arith -Wwrite-strings -Wcast-align -Wcast-qual -pipe -pipe -O2 -m64 -m64 -D_THREAD_SAFE -pthread -MT octave-main.o -MD -MP -MF .deps/octave-main.Tpo -c -o octave-main.o `test -f 'main.cc' || echo './'`main.cc
 depbase=`echo main-cli.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
         /opt/local/bin/g++-mp-4.7 -DHAVE_CONFIG_H -I. -I..  -I../liboctave/array -I../liboctave/cruft/misc -I../liboctave/numeric -I../liboctave/system -I../liboctave/util -I../libinterp -I../libinterp/corefcn -I../libinterp/corefcn -I../libgnu -I../libgnu -D_THREAD_SAFE -I/opt/local/include -I/opt/local/include  -isystem /opt/local/libexec/llvm-3.3/include -I/opt/local/include/freetype2 -I/opt/local/include  -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include  -Wall -W -Wshadow -Wold-style-cast -Wformat -Wpointer-arith -Wwrite-strings -Wcast-align -Wcast-qual -pipe -pipe -O2 -m64 -m64 -D_THREAD_SAFE -pthread -MT main-cli.o -MD -MP -MF $depbase.Tpo -c -o main-cli.o main-cli.cc &&\


           CDPATH="${ZSH_VERSION+.}:" && cd . && \
           $restore $backupdir/* `echo "./octave.info" | sed 's|[^/]*$||'`; \
         fi; \

Do you need me to post the complete config.log and make.log?


Carlo de Falco <cdf>
Project Member
Tue 15 Oct 2013 06:14:06 AM UTC, comment #1: 

I think the output you quote is from gnulib, so maybe we should bring up this issue with the gnulib maintainers?

Are there any instances of sed used once the build moves out of the libgnu directory?  If so, then we can fix those.

John W. Eaton <jwe>
Project Administrator
Tue 15 Oct 2013 05:48:00 AM UTC, original submission:  

I am building Octave 3.7.7 on OSX 10.8.5
which provides a broken version of sed in /usr/bin.

I installed GNU sed as /opt/local/bin/gsed.
If I configure with

configure SED=/opt/local/bin/gsed

GNU sed is correctly detected by configure:

$ grep -C1 gsed config.log
configure:7757: checking for a usable sed
configure:7835: result: /opt/local/bin/gsed
configure:7841: checking for perl
configure:17626: checking for a sed that does not truncate output
configure:17690: result: /opt/local/bin/gsed
configure:17708: checking for fgrep

yet, when I run 'make', 'sed' is still used:

rm -f configmake.h-t && \
         { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
           echo '#define PREFIX "/opt/local"'; \
           echo '#define EXEC_PREFIX "/opt/local"'; \
           echo '#define BINDIR "/opt/local/bin"'; \
           echo '#define SBINDIR "/opt/local/sbin"'; \
           echo '#define LIBEXECDIR "/opt/local/libexec"'; \
           echo '#define DATAROOTDIR "/opt/local/share"'; \
           echo '#define DATADIR "/opt/local/share"'; \
           echo '#define SYSCONFDIR "/opt/local/etc"'; \
           echo '#define SHAREDSTATEDIR "/opt/local/com"'; \
           echo '#define LOCALSTATEDIR "/opt/local/var"'; \
           echo '#define INCLUDEDIR "/opt/local/include"'; \
           echo '#define OLDINCLUDEDIR "/usr/include"'; \
           echo '#define DOCDIR "/opt/local/share/doc/octave"'; \
           echo '#define INFODIR "/opt/local/share/info"'; \
           echo '#define HTMLDIR "/opt/local/share/doc/octave"'; \
           echo '#define DVIDIR "/opt/local/share/doc/octave"'; \
           echo '#define PDFDIR "/opt/local/share/doc/octave"'; \
           echo '#define PSDIR "/opt/local/share/doc/octave"'; \
           echo '#define LIBDIR "/opt/local/lib"'; \
           echo '#define LISPDIR "/opt/local/share/emacs/site-lisp"'; \
           echo '#define LOCALEDIR "/opt/local/share/locale"'; \
           echo '#define MANDIR "/opt/local/share/man"'; \
           echo '#define MANEXT ""'; \
           echo '#define PKGDATADIR "/opt/local/share/octave"'; \
           echo '#define PKGINCLUDEDIR "/opt/local/include/octave"'; \
           echo '#define PKGLIBDIR "/opt/local/lib/octave"'; \
           echo '#define PKGLIBEXECDIR "/opt/local/libexec/octave"'; \
         } | sed '/""/d' > configmake.h-t && \
         mv -f configmake.h-t configmake.h
 rm -f c++defs.h-t c++defs.h && \
         sed -n -e '/_GL_CXXDEFS/,$p' \
           < ../build-aux/snippet/c++defs.h \
           > c++defs.h-t && \
         mv c++defs.h-t c++defs.h
 rm -f arg-nonnull.h-t arg-nonnull.h && \
         sed -n -e '/GL_ARG_NONNULL/,$p' \
           < ../build-aux/snippet/arg-nonnull.h \
           > arg-nonnull.h-t && \
         mv arg-nonnull.h-t arg-nonnull.h
 rm -f warn-on-use.h-t warn-on-use.h && \
         sed -n -e '/^.ifndef/,$p' \
           < ../build-aux/snippet/warn-on-use.h \
           > warn-on-use.h-t && \
         mv warn-on-use.h-t warn-on-use.h
 rm -f unused-parameter.h-t unused-parameter.h && \
         sed -n -e '/GL_UNUSED_PARAMETER/,$p' \
           < ../build-aux/snippet/unused-parameter.h \
           > unused-parameter.h-t && \
         mv unused-parameter.h-t unused-parameter.h

this is the first occurence of sed in the output of make but there are many more down the way.

Carlo de Falco <cdf>
Project Member


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

Attach Files:

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 mtmiller (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by cdf (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 project members can vote.





    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-11-26 rik5 Open/ClosedOpen Closed
    2013-10-16 cdf StatusNeed Info In Progress
        Assigned toNone cdf
    2013-10-15 rik5 StatusNone Need Info

    Back to the top

    Powered by Savane 3.9