[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fix configuration: don't use non-functional gcc-ar and gcc-ranlib
From: |
Bruno Haible |
Subject: |
Fix configuration: don't use non-functional gcc-ar and gcc-ranlib |
Date: |
Sun, 21 Feb 2021 23:39:36 +0100 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-201-generic; KDE/5.18.0; x86_64; ; ) |
On a Solaris machine I have access to, the build fails:
libtool: link: gcc-ar cru .libs/libgnulib.a .libs/argp-ba.o .libs/argp-eexst.o
.libs/argp-fmtstream.o .libs/argp-fs-xinl.o .libs/argp-help.o
.libs/argp-parse.o .libs/argp-pin.o .libs/argp-pv.o .libs/argp-pvh.o
.libs/argp-xinl.o .libs/gl_array_list.o .libs/basename-lgpl.o .libs/c-ctype.o
.libs/cloexec.o .libs/dirname-lgpl.o .libs/stripslash.o .libs/exitfail.o
.libs/fd-hook.o .libs/getprogname.o .libs/gl_list.o .libs/malloca.o
.libs/stat-time.o .libs/tempname.o .libs/unistd.o .libs/xmalloc.o
.libs/xalloc-die.o .libs/gl_xlist.o .libs/xsize.o .libs/asnprintf.o
.libs/error.o .libs/fcntl.o .libs/fstat.o .libs/getopt.o .libs/getopt1.o
.libs/getrandom.o .libs/lstat.o .libs/mempcpy.o .libs/mkdtemp.o .libs/open.o
.libs/printf-args.o .libs/printf-parse.o .libs/rawmemchr.o .libs/strchrnul.o
.libs/strndup.o .libs/strnlen.o .libs/vasnprintf.o
sorry - this program has been built without plugin support
*** Error code 1
The reason is that the jitter configuration has picked 'gcc-ar' instead of 'ar',
and this 'gcc-ar' program is not functional:
$ echo 'int x;' > foo.c
$ cc -c foo.c
$ gcc-ar cru foo.a foo.o
sorry - this program has been built without plugin support
$ echo $?
1
$ type gcc-ar
gcc-ar is hashed (/opt/csw/bin/gcc-ar)
$ ls -l /opt/csw/bin/gcc-ar
lrwxrwxrwx 1 root other 23 Dec 1 2017 /opt/csw/bin/gcc-ar ->
/opt/csw/bin/gcc-ar-5.5
$ ls -l /opt/csw/bin/gcc-ar-5.5
-rwxr-xr-x 2 root bin 25376 Oct 12 2017 /opt/csw/bin/gcc-ar-5.5
$ gcc-ar --help
sorry - this program has been built without plugin support
$ ar cru foo.a foo.o
$ gcc-ranlib foo.a
sorry - this program has been built without plugin support
$ echo $?
1
It is possible to work around it by passing the options
AR=ar RANLIB=ranlib
to configure. But the configuration should not pick broken gcc-ar and
gcc-ranlib programs in the first place.
Here is a proposed patch. With it, the configuration works fine, without
needing a workaround.
0005-Don-t-use-gcc-ar-and-gcc-ranlib-if-they-are-not-func.patch
Description: Text Data
- Fix configuration: don't use non-functional gcc-ar and gcc-ranlib,
Bruno Haible <=