[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #60413] build: sed expression problems when pr
From: |
Mike Miller |
Subject: |
[Octave-bug-tracker] [bug #60413] build: sed expression problems when prefix is empty or slash |
Date: |
Sat, 17 Apr 2021 20:25:32 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.72 Safari/537.36 |
URL:
<https://savannah.gnu.org/bugs/?60413>
Summary: build: sed expression problems when prefix is empty
or slash
Project: GNU Octave
Submitted by: mtmiller
Submitted on: Sat 17 Apr 2021 05:25:30 PM PDT
Category: Configuration and Build System
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Unexpected Error or Warning
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Release: dev
Discussion Lock: Any
Operating System: GNU/Linux
_______________________________________________________
Details:
When building with './configure --prefix=' (prefix is set to the empty string
""), I get the following sed errors from the subst-config-vals.sh script:
$ make libinterp/build-env.cc
sed: -e expression #1, char 0: no previous regular expression
sed: -e expression #1, char 0: no previous regular expression
sed: -e expression #1, char 0: no previous regular expression
sed: -e expression #1, char 0: no previous regular expression
sed: -e expression #1, char 0: no previous regular expression
sed: -e expression #1, char 0: no previous regular expression
It also sets the resulting CPPFLAGS, FLIBS, and LDFLAGS variables to empty in
the generated source files, e.g. libinterp/build-env.cc.
When building with './configure --prefix=/' (prefix is set to the string "/"),
I get no sed errors or warnings from the build, but the CPPFLAGS, FLIBS, and
LDFLAGS variables are really messsed up in the generated source files. Worst
example:
const char *FLIBS = "
-L${prefix}usr${prefix}lib${prefix}gcc${prefix}x86_64-linux-gnu${prefix}10
-L${prefix}usr${prefix}lib${prefix}gcc${prefix}x86_64-linux-gnu${prefix}10${prefix}..${prefix}..${prefix}..${prefix}x86_64-linux-gnu
-L${prefix}usr${prefix}lib${prefix}gcc${prefix}x86_64-linux-gnu${prefix}10${prefix}..${prefix}..${prefix}..${prefix}..${prefix}lib
-L${prefix}lib${prefix}x86_64-linux-gnu -L${prefix}lib${prefix}..${prefix}lib
-L${prefix}usr${prefix}lib${prefix}x86_64-linux-gnu
-L${prefix}usr${prefix}lib${prefix}..${prefix}lib
-L${prefix}usr${prefix}lib${prefix}gcc${prefix}x86_64-linux-gnu${prefix}10${prefix}..${prefix}..${prefix}..
-lgfortran -lm -lquadmath";
Because of the global substitution, every "/" character has been turned into
the string "${prefix}".
Maybe both of these cases could be resolved by looking more specifically for
patterns like prefix following a literal "-I", "-L", or a space?
And specifically for the root directory as install prefix, maybe all of these
substitutions should be skipped entirely? Maybe condition it on prefix not
being empty or not being entirely one or more slashes?
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?60413>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #60413] build: sed expression problems when prefix is empty or slash,
Mike Miller <=
- [Octave-bug-tracker] [bug #60413] build: sed expression problems when prefix is empty or slash, Mike Miller, 2021/04/17
- [Octave-bug-tracker] [bug #60413] build: sed expression problems when prefix is empty or slash, Rik, 2021/04/17
- [Octave-bug-tracker] [bug #60413] build: sed expression problems when prefix is empty or slash, Mike Miller, 2021/04/17
- [Octave-bug-tracker] [bug #60413] build: sed expression problems when prefix is empty or slash, Mike Miller, 2021/04/17
- [Octave-bug-tracker] [bug #60413] build: sed expression problems when prefix is empty or slash, Mike Miller, 2021/04/17
- [Octave-bug-tracker] [bug #60413] build: sed expression problems when prefix is empty or slash, Markus Mützel, 2021/04/18
- [Octave-bug-tracker] [bug #60413] build: sed expression problems when prefix is empty or slash, Markus Mützel, 2021/04/18
- [Octave-bug-tracker] [bug #60413] build: sed expression problems when prefix is empty or slash, Markus Mützel, 2021/04/18
- [Octave-bug-tracker] [bug #60413] build: sed expression problems when prefix is empty or slash, Markus Mützel, 2021/04/18
- [Octave-bug-tracker] [bug #60413] build: sed expression problems when prefix is empty or slash, John W. Eaton, 2021/04/18