Re: ./libtool[1086]: eval: syntax error at line 1: `|' unexpected

Jeffrey Walton <[email protected]>
Newsgroups gmane.comp.gnu.libtool.general
Message-ID <CAH8yC8=AsEC9-JcjU3t8x=SRF56NeE8OznKWV_41n0AEgrMAdw@mail.gmail.com>
> Bear in mind that I am not libtool developer so all of the following
> is just my guessing:
>
> As I have suspected: `lt_cv_sys_global_symbol_pipe=''`. I think that
> there is a genuine issue in libtool that it does not handle empty
> `lt_cv_sys_global_symbol_pipe` at all.
>
> Looking further into config.log, it seems to me that this might be
> related to this check:
>
> ~~~
> configure:7765: checking command to parse /bin/nm -p output from gcc
> -std=gnu99 object
> configure:7885: gcc -std=gnu99 -c -g -O2  conftest.c >&5
> configure:7888: $? = 0
> configure:7892: /bin/nm -p conftest.o \| sed -n -e 's/^.*[
> ]\([BDRT][BDRT]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p' | sed
> '/ __gnu_lto/d' \> conftest.nm
> configure:7895: $? = 0
> cannot find nm_test_var in conftest.nm
> configure:7885: gcc -std=gnu99 -c -g -O2  conftest.c >&5
> configure:7888: $? = 0
> configure:7892: /bin/nm -p conftest.o \| sed -n -e 's/^.*[
> ]\([BDRT][BDRT]*\)[ ][ ]*_\([_A-Za-z][_A-Za-z0-9]*\)$/\1 _\2 \2/p' |
> sed '/ __gnu_lto/d' \> conftest.nm
> configure:7895: $? = 0
> cannot run sed -n -e 's/^.*[     ]\([BDRT][BDRT]*\)[     ][
> ]*_\([_A-Za-z][_A-Za-z0-9]*\)$/\1 _\2 \2/p' | sed '/ __gnu_lto/d'
> configure:7999: result: failed
> ~~~
>
> The libtool tests are trying to run using plain `sed` instead of the
> configured `$SED`. Dunno if that is the issue but bad `sed` might be a
> problem, too.

Try that again... 'nm -p' seems to be producing symbols.

solaris:~$ echo $PATH
/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/sfw/bin
solaris:~$ which nm
/bin/nm
solaris:libtool-2.4.6$ nm -p /bin/ls | tail -8
00000000000004309100 b vflg
00000000000004309072 b vopt
00000000000004211320 U wcwidth
00000000000004309092 b wflg
00000000000004309248 b win
00000000000004309084 b xflg
00000000000004235644 t xmalloc
00000000000004309216 b year

> Also, I see your `SHELL=/bin/sh`. What shell is that? I would suggest
> running with `SHELL` set to something modern like Bash.

Yeah, my shell is Bash. I wonder why its getting stomped on.

> This also appears to have already been reported in the past:
> https://lists.gnu.org/archive/html/bug-libtool/2015-07/msg00000.html
>
> So, my recommendation is to run again under Bash with `SHELL` set to
> it. If that still fails, try telling it to use GNU nm by providing
> NM=/path/to/gnm on `configure` command line.

I'd like to look into the sed issue. I've had a fair amount of trouble
with grep, sed and awk on Solaris because Posix is so anemic. Do you
know if Autools respects SED variable?

This may be important:

~$ which libtool
/bin/libtool
solaris:~$ libtool --version
libtool (GNU libtool) 2.4.2
Written by Gordon Matzigkeit <[email protected]>, 1996

solaris:libtool-2.4.6$ gsed --version
GNU sed version 4.2.1

solaris:libtool-2.4.6$ gawk --version
GNU Awk 3.1.8

Out of curiosity, do you know why Autotools allows pipe to be unset? I
don't think I've worked on a system where pipe does not work as
expected. A {reasonable|sane} choice seems to be to set it to "|" if
there's not a compelling reason to set it to something else. Not
setting it probably wouldn't make my list of desired behaviors.

Jeff

_______________________________________________
https://lists.gnu.org/mailman/listinfo/libtool
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.