#17 slibtool should use AR and RANLIB from environment if specified
Closed 4 years ago by orbea. Opened 4 years ago by orbea.

Original issue: https://github.com/midipix-project/slibtool/issues/10
Opened by: https://github.com/michaelforney

michaelforney commented on May 8, 2017

In normal libtool usage, configure detects these tools (which can be overridden through the environment), and writes them to the locally generated libtool script. So, if you have AR=/path/to/my/special/ar in your environment, it will get used to create .a files.

Since slibtool is just a fixed executable, maybe it makes sense to add another step (2) to detect these tools from the environment.

1. Use `--ar` and `--ranlib` if specified.

2. Otherwise, use values of `AR` and `RANLIB` environment variables if present.

3. Otherwise, use fallback values for these tools.

midipix commented on May 20, 2017

One of slibtool's early design decisions was to never rely on and/or use environment variables, which indeed entails a minor inconvenience for users who expect slibtool to respect the environment's AR or RANLIB the way libtool does.

At the same time, the inconvenience is rather small and can be easily overcome, whereas the disadvantages of using environment variables are significant (i.e. the inconsistency within one's own testing environment, the difficulties encountered when trying to reproduce problems reported by end-users, etc.)

midipix commented on Aug 4, 2017

Idle issue, closing. Further discussion welcome on either the mailing list or github.

midipix closed this on Aug 4, 2017

RJVB commented on Feb 14, 2019

I really should file a new issue about this, because this is an obstacle to using slibtool as a drop-in replacement. For instance, building glib2 with LTO and clang (and possibly gcc, haven't tried) requires the use of llvm-ar and llvm-ranlib to avoid failures related to static archives. With the standard libtool it is enough to set AR and RANLIB in the environment during the configure step; they are then registered in the Makefiles and the build succeeds.

When I then run make clean followed by env MAKEFLAGS=/path/to/slibtool make I get this failure:

/opt/local/bin/slibtool --tag=CC --mode=link ccache /opt/local/bin/clang-mp-5.0 -fvisibility=hidden -O3 -flto=thin -g -flto=thin -fstrict-aliasing -m64 -fno-strict-aliasing -Wl,-Bsymbolic-functions -Wl,-z,nodelete -version-info 5800:3:5800 -export-dynamic -L/opt/local/lib -Wl,-R,/opt/local/lib -O3 -flto=thin -g -flto=thin -o libglib-2.0.la -rpath /opt/local/lib deprecated/libglib_2_0_la-gallocator.lo deprecated/libglib_2_0_la-gcache.lo deprecated/libglib_2_0_la-gcompletion.lo deprecated/libglib_2_0_la-grel.lo deprecated/libglib_2_0_la-gthread-deprecated.lo libglib_2_0_la-garcbox.lo libglib_2_0_la-garray.lo libglib_2_0_la-gasyncqueue.lo libglib_2_0_la-gatomic.lo libglib_2_0_la-gbacktrace.lo libglib_2_0_la-gbase64.lo libglib_2_0_la-gbitlock.lo libglib_2_0_la-gbookmarkfile.lo libglib_2_0_la-gbytes.lo libglib_2_0_la-gcharset.lo libglib_2_0_la-gchecksum.lo libglib_2_0_la-gconvert.lo libglib_2_0_la-gdataset.lo libglib_2_0_la-gdate.lo libglib_2_0_la-gdatetime.lo libglib_2_0_la-gdir.lo libglib_2_0_la-genviron.lo libglib_2_0_la-gerror.lo libglib_2_0_la-gfileutils.lo libglib_2_0_la-ggettext.lo libglib_2_0_la-ghash.lo libglib_2_0_la-ghmac.lo libglib_2_0_la-ghook.lo libglib_2_0_la-ghostutils.lo libglib_2_0_la-giochannel.lo libglib_2_0_la-gkeyfile.lo libglib_2_0_la-glib-init.lo libglib_2_0_la-glib-private.lo libglib_2_0_la-glist.lo libglib_2_0_la-gmain.lo libglib_2_0_la-gmappedfile.lo libglib_2_0_la-gmarkup.lo libglib_2_0_la-gmem.lo libglib_2_0_la-gmessages.lo libglib_2_0_la-gnode.lo libglib_2_0_la-goption.lo libglib_2_0_la-gpattern.lo libglib_2_0_la-gpoll.lo libglib_2_0_la-gprimes.lo libglib_2_0_la-gqsort.lo libglib_2_0_la-gquark.lo libglib_2_0_la-gqueue.lo libglib_2_0_la-grand.lo libglib_2_0_la-grcbox.lo libglib_2_0_la-grefcount.lo libglib_2_0_la-grefstring.lo libglib_2_0_la-gregex.lo libglib_2_0_la-gscanner.lo libglib_2_0_la-gsequence.lo libglib_2_0_la-gshell.lo libglib_2_0_la-gslice.lo libglib_2_0_la-gslist.lo libglib_2_0_la-gstdio.lo libglib_2_0_la-gstrfuncs.lo libglib_2_0_la-gstring.lo libglib_2_0_la-gstringchunk.lo libglib_2_0_la-gtestutils.lo libglib_2_0_la-gthread.lo libglib_2_0_la-gthreadpool.lo libglib_2_0_la-gtimer.lo libglib_2_0_la-gtimezone.lo libglib_2_0_la-gtranslit.lo libglib_2_0_la-gtrashstack.lo libglib_2_0_la-gtree.lo libglib_2_0_la-guniprop.lo libglib_2_0_la-gutf8.lo libglib_2_0_la-gunibreak.lo libglib_2_0_la-gunicollate.lo libglib_2_0_la-gunidecomp.lo libglib_2_0_la-gurifuncs.lo libglib_2_0_la-gutils.lo libglib_2_0_la-guuid.lo libglib_2_0_la-gvariant.lo libglib_2_0_la-gvariant-core.lo libglib_2_0_la-gvariant-parser.lo libglib_2_0_la-gvariant-serialiser.lo libglib_2_0_la-gvarianttypeinfo.lo libglib_2_0_la-gvarianttype.lo libglib_2_0_la-gversion.lo libglib_2_0_la-gwakeup.lo libglib_2_0_la-gprintf.lo libglib_2_0_la-glib-unix.lo libglib_2_0_la-gthread-posix.lo libglib_2_0_la-gspawn.lo libglib_2_0_la-giounix.lo libcharset/libcharset.la -liconv -L/opt/local/lib -lpcre -lpthread glib_probes.lo -L/opt/local/lib -lintl slibtool: link: ar crs .libs/libglib-2.0.a deprecated/.libs/libglib_2_0_la-gallocator.o deprecated/.libs/libglib_2_0_la-gcache.o deprecated/.libs/libglib_2_0_la-gcompletion.o deprecated/.libs/libglib_2_0_la-grel.o deprecated/.libs/libglib_2_0_la-gthread-deprecated.o .libs/libglib_2_0_la-garcbox.o .libs/libglib_2_0_la-garray.o .libs/libglib_2_0_la-gasyncqueue.o .libs/libglib_2_0_la-gatomic.o .libs/libglib_2_0_la-gbacktrace.o .libs/libglib_2_0_la-gbase64.o .libs/libglib_2_0_la-gbitlock.o .libs/libglib_2_0_la-gbookmarkfile.o .libs/libglib_2_0_la-gbytes.o .libs/libglib_2_0_la-gcharset.o .libs/libglib_2_0_la-gchecksum.o .libs/libglib_2_0_la-gconvert.o .libs/libglib_2_0_la-gdataset.o .libs/libglib_2_0_la-gdate.o .libs/libglib_2_0_la-gdatetime.o .libs/libglib_2_0_la-gdir.o .libs/libglib_2_0_la-genviron.o .libs/libglib_2_0_la-gerror.o .libs/libglib_2_0_la-gfileutils.o .libs/libglib_2_0_la-ggettext.o .libs/libglib_2_0_la-ghash.o .libs/libglib_2_0_la-ghmac.o .libs/libglib_2_0_la-ghook.o .libs/libglib_2_0_la-ghostutils.o .libs/libglib_2_0_la-giochannel.o .libs/libglib_2_0_la-gkeyfile.o .libs/libglib_2_0_la-glib-init.o .libs/libglib_2_0_la-glib-private.o .libs/libglib_2_0_la-glist.o .libs/libglib_2_0_la-gmain.o .libs/libglib_2_0_la-gmappedfile.o .libs/libglib_2_0_la-gmarkup.o .libs/libglib_2_0_la-gmem.o .libs/libglib_2_0_la-gmessages.o .libs/libglib_2_0_la-gnode.o .libs/libglib_2_0_la-goption.o .libs/libglib_2_0_la-gpattern.o .libs/libglib_2_0_la-gpoll.o .libs/libglib_2_0_la-gprimes.o .libs/libglib_2_0_la-gqsort.o .libs/libglib_2_0_la-gquark.o .libs/libglib_2_0_la-gqueue.o .libs/libglib_2_0_la-grand.o .libs/libglib_2_0_la-grcbox.o .libs/libglib_2_0_la-grefcount.o .libs/libglib_2_0_la-grefstring.o .libs/libglib_2_0_la-gregex.o .libs/libglib_2_0_la-gscanner.o .libs/libglib_2_0_la-gsequence.o .libs/libglib_2_0_la-gshell.o .libs/libglib_2_0_la-gslice.o .libs/libglib_2_0_la-gslist.o .libs/libglib_2_0_la-gstdio.o .libs/libglib_2_0_la-gstrfuncs.o .libs/libglib_2_0_la-gstring.o .libs/libglib_2_0_la-gstringchunk.o .libs/libglib_2_0_la-gtestutils.o .libs/libglib_2_0_la-gthread.o .libs/libglib_2_0_la-gthreadpool.o .libs/libglib_2_0_la-gtimer.o .libs/libglib_2_0_la-gtimezone.o .libs/libglib_2_0_la-gtranslit.o .libs/libglib_2_0_la-gtrashstack.o .libs/libglib_2_0_la-gtree.o .libs/libglib_2_0_la-guniprop.o .libs/libglib_2_0_la-gutf8.o .libs/libglib_2_0_la-gunibreak.o .libs/libglib_2_0_la-gunicollate.o .libs/libglib_2_0_la-gunidecomp.o .libs/libglib_2_0_la-gurifuncs.o .libs/libglib_2_0_la-gutils.o .libs/libglib_2_0_la-guuid.o .libs/libglib_2_0_la-gvariant.o .libs/libglib_2_0_la-gvariant-core.o .libs/libglib_2_0_la-gvariant-parser.o .libs/libglib_2_0_la-gvariant-serialiser.o .libs/libglib_2_0_la-gvarianttypeinfo.o .libs/libglib_2_0_la-gvarianttype.o .libs/libglib_2_0_la-gversion.o .libs/libglib_2_0_la-gwakeup.o .libs/libglib_2_0_la-gprintf.o .libs/libglib_2_0_la-glib-unix.o .libs/libglib_2_0_la-gthread-posix.o .libs/libglib_2_0_la-gspawn.o .libs/libglib_2_0_la-giounix.o .libs/glib_probes.o ar: .libs/glib_probes.o: plugin needed to handle lto object ar: /tmp/filePip8bI(glib_probes.o): plugin needed to handle lto object slibtool: link: ccache deprecated/.libs/libglib_2_0_la-gallocator.o deprecated/.libs/libglib_2_0_la-gcache.o deprecated/.libs/libglib_2_0_la-gcompletion.o deprecated/.libs/libglib_2_0_la-grel.o deprecated/.libs/libglib_2_0_la-gthread-deprecated.o .libs/libglib_2_0_la-garcbox.o .libs/libglib_2_0_la-garray.o .libs/libglib_2_0_la-gasyncqueue.o .libs/libglib_2_0_la-gatomic.o .libs/libglib_2_0_la-gbacktrace.o .libs/libglib_2_0_la-gbase64.o .libs/libglib_2_0_la-gbitlock.o .libs/libglib_2_0_la-gbookmarkfile.o .libs/libglib_2_0_la-gbytes.o .libs/libglib_2_0_la-gcharset.o .libs/libglib_2_0_la-gchecksum.o .libs/libglib_2_0_la-gconvert.o .libs/libglib_2_0_la-gdataset.o .libs/libglib_2_0_la-gdate.o .libs/libglib_2_0_la-gdatetime.o .libs/libglib_2_0_la-gdir.o .libs/libglib_2_0_la-genviron.o .libs/libglib_2_0_la-gerror.o .libs/libglib_2_0_la-gfileutils.o .libs/libglib_2_0_la-ggettext.o .libs/libglib_2_0_la-ghash.o .libs/libglib_2_0_la-ghmac.o .libs/libglib_2_0_la-ghook.o .libs/libglib_2_0_la-ghostutils.o .libs/libglib_2_0_la-giochannel.o .libs/libglib_2_0_la-gkeyfile.o .libs/libglib_2_0_la-glib-init.o .libs/libglib_2_0_la-glib-private.o .libs/libglib_2_0_la-glist.o .libs/libglib_2_0_la-gmain.o .libs/libglib_2_0_la-gmappedfile.o .libs/libglib_2_0_la-gmarkup.o .libs/libglib_2_0_la-gmem.o .libs/libglib_2_0_la-gmessages.o .libs/libglib_2_0_la-gnode.o .libs/libglib_2_0_la-goption.o .libs/libglib_2_0_la-gpattern.o .libs/libglib_2_0_la-gpoll.o .libs/libglib_2_0_la-gprimes.o .libs/libglib_2_0_la-gqsort.o .libs/libglib_2_0_la-gquark.o .libs/libglib_2_0_la-gqueue.o .libs/libglib_2_0_la-grand.o .libs/libglib_2_0_la-grcbox.o .libs/libglib_2_0_la-grefcount.o .libs/libglib_2_0_la-grefstring.o .libs/libglib_2_0_la-gregex.o .libs/libglib_2_0_la-gscanner.o .libs/libglib_2_0_la-gsequence.o .libs/libglib_2_0_la-gshell.o .libs/libglib_2_0_la-gslice.o .libs/libglib_2_0_la-gslist.o .libs/libglib_2_0_la-gstdio.o .libs/libglib_2_0_la-gstrfuncs.o .libs/libglib_2_0_la-gstring.o .libs/libglib_2_0_la-gstringchunk.o .libs/libglib_2_0_la-gtestutils.o .libs/libglib_2_0_la-gthread.o .libs/libglib_2_0_la-gthreadpool.o .libs/libglib_2_0_la-gtimer.o .libs/libglib_2_0_la-gtimezone.o .libs/libglib_2_0_la-gtranslit.o .libs/libglib_2_0_la-gtrashstack.o .libs/libglib_2_0_la-gtree.o .libs/libglib_2_0_la-guniprop.o .libs/libglib_2_0_la-gutf8.o .libs/libglib_2_0_la-gunibreak.o .libs/libglib_2_0_la-gunicollate.o .libs/libglib_2_0_la-gunidecomp.o .libs/libglib_2_0_la-gurifuncs.o .libs/libglib_2_0_la-gutils.o .libs/libglib_2_0_la-guuid.o .libs/libglib_2_0_la-gvariant.o .libs/libglib_2_0_la-gvariant-core.o .libs/libglib_2_0_la-gvariant-parser.o .libs/libglib_2_0_la-gvariant-serialiser.o .libs/libglib_2_0_la-gvarianttypeinfo.o .libs/libglib_2_0_la-gvarianttype.o .libs/libglib_2_0_la-gversion.o .libs/libglib_2_0_la-gwakeup.o .libs/libglib_2_0_la-gprintf.o .libs/libglib_2_0_la-glib-unix.o .libs/libglib_2_0_la-gthread-posix.o .libs/libglib_2_0_la-gspawn.o .libs/libglib_2_0_la-giounix.o -Wl,--whole-archive libcharset/.libs/libcharset.a -Wl,--no-whole-archive .libs/glib_probes.o /opt/local/bin/clang-mp-5.0 -fvisibility=hidden -O3 -flto=thin -g -flto=thin -fstrict-aliasing -m64 -fno-strict-aliasing -Wl,-Bsymbolic-functions -Wl,-z,nodelete -L/opt/local/lib -Wl,-R,/opt/local/lib -O3 -flto=thin -g -flto=thin -lintl -liconv -lpcre -lpthread -lintl -shared -fPIC -Wl,-soname -Wl,libglib-2.0.so.0 -o .libs/libglib-2.0.so.0.5800.3 -Wl,--export-dynamic ccache: error: execv of deprecated/.libs/libglib_2_0_la-gallocator.o failed: Permission denied slibtool: exec error upon slbt_exec_link_create_library(), line 1420: (see child process error messages). slibtool: < returned to > slbt_exec_link(), line 1791. make[4]: *** [libglib-2.0.la] Error 2

Curiously a subsequent build WITHOUT MAKEFLAGS set also fails because of duplicated path components (note the deprecated/deprecated bits):

/bin/bash ../libtool --tag=CC --mode=link ccache /opt/local/bin/clang-mp-5.0 -fvisibility=hidden -O3 -flto=thin -g -flto=thin -fstrict-aliasing -m64 -fno-strict-aliasing -Wl,-Bsymbolic-functions -Wl,-z,nodelete -version-info 5800:3:5800 -export-dynamic -L/opt/local/lib -Wl,-R,/opt/local/lib -O3 -flto=thin -g -flto=thin -o libglib-2.0.la -rpath /opt/local/lib deprecated/libglib_2_0_la-gallocator.lo deprecated/libglib_2_0_la-gcache.lo deprecated/libglib_2_0_la-gcompletion.lo deprecated/libglib_2_0_la-grel.lo deprecated/libglib_2_0_la-gthread-deprecated.lo libglib_2_0_la-garcbox.lo libglib_2_0_la-garray.lo libglib_2_0_la-gasyncqueue.lo libglib_2_0_la-gatomic.lo libglib_2_0_la-gbacktrace.lo libglib_2_0_la-gbase64.lo libglib_2_0_la-gbitlock.lo libglib_2_0_la-gbookmarkfile.lo libglib_2_0_la-gbytes.lo libglib_2_0_la-gcharset.lo libglib_2_0_la-gchecksum.lo libglib_2_0_la-gconvert.lo libglib_2_0_la-gdataset.lo libglib_2_0_la-gdate.lo libglib_2_0_la-gdatetime.lo libglib_2_0_la-gdir.lo libglib_2_0_la-genviron.lo libglib_2_0_la-gerror.lo libglib_2_0_la-gfileutils.lo libglib_2_0_la-ggettext.lo libglib_2_0_la-ghash.lo libglib_2_0_la-ghmac.lo libglib_2_0_la-ghook.lo libglib_2_0_la-ghostutils.lo libglib_2_0_la-giochannel.lo libglib_2_0_la-gkeyfile.lo libglib_2_0_la-glib-init.lo libglib_2_0_la-glib-private.lo libglib_2_0_la-glist.lo libglib_2_0_la-gmain.lo libglib_2_0_la-gmappedfile.lo libglib_2_0_la-gmarkup.lo libglib_2_0_la-gmem.lo libglib_2_0_la-gmessages.lo libglib_2_0_la-gnode.lo libglib_2_0_la-goption.lo libglib_2_0_la-gpattern.lo libglib_2_0_la-gpoll.lo libglib_2_0_la-gprimes.lo libglib_2_0_la-gqsort.lo libglib_2_0_la-gquark.lo libglib_2_0_la-gqueue.lo libglib_2_0_la-grand.lo libglib_2_0_la-grcbox.lo libglib_2_0_la-grefcount.lo libglib_2_0_la-grefstring.lo libglib_2_0_la-gregex.lo libglib_2_0_la-gscanner.lo libglib_2_0_la-gsequence.lo libglib_2_0_la-gshell.lo libglib_2_0_la-gslice.lo libglib_2_0_la-gslist.lo libglib_2_0_la-gstdio.lo libglib_2_0_la-gstrfuncs.lo libglib_2_0_la-gstring.lo libglib_2_0_la-gstringchunk.lo libglib_2_0_la-gtestutils.lo libglib_2_0_la-gthread.lo libglib_2_0_la-gthreadpool.lo libglib_2_0_la-gtimer.lo libglib_2_0_la-gtimezone.lo libglib_2_0_la-gtranslit.lo libglib_2_0_la-gtrashstack.lo libglib_2_0_la-gtree.lo libglib_2_0_la-guniprop.lo libglib_2_0_la-gutf8.lo libglib_2_0_la-gunibreak.lo libglib_2_0_la-gunicollate.lo libglib_2_0_la-gunidecomp.lo libglib_2_0_la-gurifuncs.lo libglib_2_0_la-gutils.lo libglib_2_0_la-guuid.lo libglib_2_0_la-gvariant.lo libglib_2_0_la-gvariant-core.lo libglib_2_0_la-gvariant-parser.lo libglib_2_0_la-gvariant-serialiser.lo libglib_2_0_la-gvarianttypeinfo.lo libglib_2_0_la-gvarianttype.lo libglib_2_0_la-gversion.lo libglib_2_0_la-gwakeup.lo libglib_2_0_la-gprintf.lo libglib_2_0_la-glib-unix.lo libglib_2_0_la-gthread-posix.lo libglib_2_0_la-gspawn.lo libglib_2_0_la-giounix.lo libcharset/libcharset.la -liconv -L/opt/local/lib -lpcre -lpthread glib_probes.lo -L/opt/local/lib -lintl libtool: link: rm -fr .libs/libglib-2.0.a .libs/libglib-2.0.a.slibtool.deps .libs/libglib-2.0.so.slibtool.deps .libs/libglib-2.0.so.slibtool.rpath libtool: link: ccache /opt/local/bin/clang-mp-5.0 -shared -fPIC -DPIC deprecated/deprecated/.libs/libglib_2_0_la-gallocator.o deprecated/deprecated/.libs/libglib_2_0_la-gcache.o deprecated/deprecated/.libs/libglib_2_0_la-gcompletion.o deprecated/deprecated/.libs/libglib_2_0_la-grel.o deprecated/deprecated/.libs/libglib_2_0_la-gthread-deprecated.o .libs/libglib_2_0_la-garcbox.o .libs/libglib_2_0_la-garray.o .libs/libglib_2_0_la-gasyncqueue.o .libs/libglib_2_0_la-gatomic.o .libs/libglib_2_0_la-gbacktrace.o .libs/libglib_2_0_la-gbase64.o .libs/libglib_2_0_la-gbitlock.o .libs/libglib_2_0_la-gbookmarkfile.o .libs/libglib_2_0_la-gbytes.o .libs/libglib_2_0_la-gcharset.o .libs/libglib_2_0_la-gchecksum.o .libs/libglib_2_0_la-gconvert.o .libs/libglib_2_0_la-gdataset.o .libs/libglib_2_0_la-gdate.o .libs/libglib_2_0_la-gdatetime.o .libs/libglib_2_0_la-gdir.o .libs/libglib_2_0_la-genviron.o .libs/libglib_2_0_la-gerror.o .libs/libglib_2_0_la-gfileutils.o .libs/libglib_2_0_la-ggettext.o .libs/libglib_2_0_la-ghash.o .libs/libglib_2_0_la-ghmac.o .libs/libglib_2_0_la-ghook.o .libs/libglib_2_0_la-ghostutils.o .libs/libglib_2_0_la-giochannel.o .libs/libglib_2_0_la-gkeyfile.o .libs/libglib_2_0_la-glib-init.o .libs/libglib_2_0_la-glib-private.o .libs/libglib_2_0_la-glist.o .libs/libglib_2_0_la-gmain.o .libs/libglib_2_0_la-gmappedfile.o .libs/libglib_2_0_la-gmarkup.o .libs/libglib_2_0_la-gmem.o .libs/libglib_2_0_la-gmessages.o .libs/libglib_2_0_la-gnode.o .libs/libglib_2_0_la-goption.o .libs/libglib_2_0_la-gpattern.o .libs/libglib_2_0_la-gpoll.o .libs/libglib_2_0_la-gprimes.o .libs/libglib_2_0_la-gqsort.o .libs/libglib_2_0_la-gquark.o .libs/libglib_2_0_la-gqueue.o .libs/libglib_2_0_la-grand.o .libs/libglib_2_0_la-grcbox.o .libs/libglib_2_0_la-grefcount.o .libs/libglib_2_0_la-grefstring.o .libs/libglib_2_0_la-gregex.o .libs/libglib_2_0_la-gscanner.o .libs/libglib_2_0_la-gsequence.o .libs/libglib_2_0_la-gshell.o .libs/libglib_2_0_la-gslice.o .libs/libglib_2_0_la-gslist.o .libs/libglib_2_0_la-gstdio.o .libs/libglib_2_0_la-gstrfuncs.o .libs/libglib_2_0_la-gstring.o .libs/libglib_2_0_la-gstringchunk.o .libs/libglib_2_0_la-gtestutils.o .libs/libglib_2_0_la-gthread.o .libs/libglib_2_0_la-gthreadpool.o .libs/libglib_2_0_la-gtimer.o .libs/libglib_2_0_la-gtimezone.o .libs/libglib_2_0_la-gtranslit.o .libs/libglib_2_0_la-gtrashstack.o .libs/libglib_2_0_la-gtree.o .libs/libglib_2_0_la-guniprop.o .libs/libglib_2_0_la-gutf8.o .libs/libglib_2_0_la-gunibreak.o .libs/libglib_2_0_la-gunicollate.o .libs/libglib_2_0_la-gunidecomp.o .libs/libglib_2_0_la-gurifuncs.o .libs/libglib_2_0_la-gutils.o .libs/libglib_2_0_la-guuid.o .libs/libglib_2_0_la-gvariant.o .libs/libglib_2_0_la-gvariant-core.o .libs/libglib_2_0_la-gvariant-parser.o .libs/libglib_2_0_la-gvariant-serialiser.o .libs/libglib_2_0_la-gvarianttypeinfo.o .libs/libglib_2_0_la-gvarianttype.o .libs/libglib_2_0_la-gversion.o .libs/libglib_2_0_la-gwakeup.o .libs/libglib_2_0_la-gprintf.o .libs/libglib_2_0_la-glib-unix.o .libs/libglib_2_0_la-gthread-posix.o .libs/libglib_2_0_la-gspawn.o .libs/libglib_2_0_la-giounix.o .libs/glib_probes.o -Wl,--whole-archive libcharset/.libs/libcharset.a -Wl,--no-whole-archive -Wl,-rpath -Wl,/opt/local/lib -Wl,-rpath -Wl,/opt/local/lib -L/opt/local/lib /opt/local/lib/libiconv.so /opt/local/lib/libpcre.so -lpthread /opt/local/lib/libintl.so -O3 -flto=thin -g -flto=thin -m64 -Wl,-Bsymbolic-functions -Wl,-z -Wl,nodelete -Wl,-R -Wl,/opt/local/lib -O3 -flto=thin -g -flto=thin -pthread -Wl,-soname -Wl,libglib-2.0.so.0 -o .libs/libglib-2.0.so.0.5800.3 clang: error: no such file or directory: 'deprecated/deprecated/.libs/libglib_2_0_la-gallocator.o' clang: error: no such file or directory: 'deprecated/deprecated/.libs/libglib_2_0_la-gcache.o' clang: error: no such file or directory: 'deprecated/deprecated/.libs/libglib_2_0_la-gcompletion.o' clang: error: no such file or directory: 'deprecated/deprecated/.libs/libglib_2_0_la-grel.o' clang: error: no such file or directory: 'deprecated/deprecated/.libs/libglib_2_0_la-gthread-deprecated.o' make[4]: *** [libglib-2.0.la] Error 1

RJVB commented on Feb 14, 2019

This is what the corresponding output looks like in a fresh, successful build using libtool:

/bin/bash ../libtool --tag=CC --mode=link ccache /opt/local/bin/clang-mp-5.0 -fvisibility=hidden -O3 -flto=thin -g -flto=thin -fstrict-aliasing -m64 -fno-strict-aliasing -Wl,-Bsymbolic-functions -Wl,-z,nodelete -version-info 5800:3:5800 -export-dynamic -L/opt/local/lib -Wl,-R,/opt/local/lib -O3 -flto=thin -g -flto=thin -o libglib-2.0.la -rpath /opt/local/lib deprecated/libglib_2_0_la-gallocator.lo deprecated/libglib_2_0_la-gcache.lo deprecated/libglib_2_0_la-gcompletion.lo deprecated/libglib_2_0_la-grel.lo deprecated/libglib_2_0_la-gthread-deprecated.lo libglib_2_0_la-garcbox.lo libglib_2_0_la-garray.lo libglib_2_0_la-gasyncqueue.lo libglib_2_0_la-gatomic.lo libglib_2_0_la-gbacktrace.lo libglib_2_0_la-gbase64.lo libglib_2_0_la-gbitlock.lo libglib_2_0_la-gbookmarkfile.lo libglib_2_0_la-gbytes.lo libglib_2_0_la-gcharset.lo libglib_2_0_la-gchecksum.lo libglib_2_0_la-gconvert.lo libglib_2_0_la-gdataset.lo libglib_2_0_la-gdate.lo libglib_2_0_la-gdatetime.lo libglib_2_0_la-gdir.lo libglib_2_0_la-genviron.lo libglib_2_0_la-gerror.lo libglib_2_0_la-gfileutils.lo libglib_2_0_la-ggettext.lo libglib_2_0_la-ghash.lo libglib_2_0_la-ghmac.lo libglib_2_0_la-ghook.lo libglib_2_0_la-ghostutils.lo libglib_2_0_la-giochannel.lo libglib_2_0_la-gkeyfile.lo libglib_2_0_la-glib-init.lo libglib_2_0_la-glib-private.lo libglib_2_0_la-glist.lo libglib_2_0_la-gmain.lo libglib_2_0_la-gmappedfile.lo libglib_2_0_la-gmarkup.lo libglib_2_0_la-gmem.lo libglib_2_0_la-gmessages.lo libglib_2_0_la-gnode.lo libglib_2_0_la-goption.lo libglib_2_0_la-gpattern.lo libglib_2_0_la-gpoll.lo libglib_2_0_la-gprimes.lo libglib_2_0_la-gqsort.lo libglib_2_0_la-gquark.lo libglib_2_0_la-gqueue.lo libglib_2_0_la-grand.lo libglib_2_0_la-grcbox.lo libglib_2_0_la-grefcount.lo libglib_2_0_la-grefstring.lo libglib_2_0_la-gregex.lo libglib_2_0_la-gscanner.lo libglib_2_0_la-gsequence.lo libglib_2_0_la-gshell.lo libglib_2_0_la-gslice.lo libglib_2_0_la-gslist.lo libglib_2_0_la-gstdio.lo libglib_2_0_la-gstrfuncs.lo libglib_2_0_la-gstring.lo libglib_2_0_la-gstringchunk.lo libglib_2_0_la-gtestutils.lo libglib_2_0_la-gthread.lo libglib_2_0_la-gthreadpool.lo libglib_2_0_la-gtimer.lo libglib_2_0_la-gtimezone.lo libglib_2_0_la-gtranslit.lo libglib_2_0_la-gtrashstack.lo libglib_2_0_la-gtree.lo libglib_2_0_la-guniprop.lo libglib_2_0_la-gutf8.lo libglib_2_0_la-gunibreak.lo libglib_2_0_la-gunicollate.lo libglib_2_0_la-gunidecomp.lo libglib_2_0_la-gurifuncs.lo libglib_2_0_la-gutils.lo libglib_2_0_la-guuid.lo libglib_2_0_la-gvariant.lo libglib_2_0_la-gvariant-core.lo libglib_2_0_la-gvariant-parser.lo libglib_2_0_la-gvariant-serialiser.lo libglib_2_0_la-gvarianttypeinfo.lo libglib_2_0_la-gvarianttype.lo libglib_2_0_la-gversion.lo libglib_2_0_la-gwakeup.lo libglib_2_0_la-gprintf.lo libglib_2_0_la-glib-unix.lo libglib_2_0_la-gthread-posix.lo libglib_2_0_la-gspawn.lo libglib_2_0_la-giounix.lo libcharset/libcharset.la -liconv -L/opt/local/lib -lpcre -lpthread glib_probes.lo -L/opt/local/lib -lintl libtool: link: ccache /opt/local/bin/clang-mp-5.0 -shared -fPIC -DPIC deprecated/.libs/libglib_2_0_la-gallocator.o deprecated/.libs/libglib_2_0_la-gcache.o deprecated/.libs/libglib_2_0_la-gcompletion.o deprecated/.libs/libglib_2_0_la-grel.o deprecated/.libs/libglib_2_0_la-gthread-deprecated.o .libs/libglib_2_0_la-garcbox.o .libs/libglib_2_0_la-garray.o .libs/libglib_2_0_la-gasyncqueue.o .libs/libglib_2_0_la-gatomic.o .libs/libglib_2_0_la-gbacktrace.o .libs/libglib_2_0_la-gbase64.o .libs/libglib_2_0_la-gbitlock.o .libs/libglib_2_0_la-gbookmarkfile.o .libs/libglib_2_0_la-gbytes.o .libs/libglib_2_0_la-gcharset.o .libs/libglib_2_0_la-gchecksum.o .libs/libglib_2_0_la-gconvert.o .libs/libglib_2_0_la-gdataset.o .libs/libglib_2_0_la-gdate.o .libs/libglib_2_0_la-gdatetime.o .libs/libglib_2_0_la-gdir.o .libs/libglib_2_0_la-genviron.o .libs/libglib_2_0_la-gerror.o .libs/libglib_2_0_la-gfileutils.o .libs/libglib_2_0_la-ggettext.o .libs/libglib_2_0_la-ghash.o .libs/libglib_2_0_la-ghmac.o .libs/libglib_2_0_la-ghook.o .libs/libglib_2_0_la-ghostutils.o .libs/libglib_2_0_la-giochannel.o .libs/libglib_2_0_la-gkeyfile.o .libs/libglib_2_0_la-glib-init.o .libs/libglib_2_0_la-glib-private.o .libs/libglib_2_0_la-glist.o .libs/libglib_2_0_la-gmain.o .libs/libglib_2_0_la-gmappedfile.o .libs/libglib_2_0_la-gmarkup.o .libs/libglib_2_0_la-gmem.o .libs/libglib_2_0_la-gmessages.o .libs/libglib_2_0_la-gnode.o .libs/libglib_2_0_la-goption.o .libs/libglib_2_0_la-gpattern.o .libs/libglib_2_0_la-gpoll.o .libs/libglib_2_0_la-gprimes.o .libs/libglib_2_0_la-gqsort.o .libs/libglib_2_0_la-gquark.o .libs/libglib_2_0_la-gqueue.o .libs/libglib_2_0_la-grand.o .libs/libglib_2_0_la-grcbox.o .libs/libglib_2_0_la-grefcount.o .libs/libglib_2_0_la-grefstring.o .libs/libglib_2_0_la-gregex.o .libs/libglib_2_0_la-gscanner.o .libs/libglib_2_0_la-gsequence.o .libs/libglib_2_0_la-gshell.o .libs/libglib_2_0_la-gslice.o .libs/libglib_2_0_la-gslist.o .libs/libglib_2_0_la-gstdio.o .libs/libglib_2_0_la-gstrfuncs.o .libs/libglib_2_0_la-gstring.o .libs/libglib_2_0_la-gstringchunk.o .libs/libglib_2_0_la-gtestutils.o .libs/libglib_2_0_la-gthread.o .libs/libglib_2_0_la-gthreadpool.o .libs/libglib_2_0_la-gtimer.o .libs/libglib_2_0_la-gtimezone.o .libs/libglib_2_0_la-gtranslit.o .libs/libglib_2_0_la-gtrashstack.o .libs/libglib_2_0_la-gtree.o .libs/libglib_2_0_la-guniprop.o .libs/libglib_2_0_la-gutf8.o .libs/libglib_2_0_la-gunibreak.o .libs/libglib_2_0_la-gunicollate.o .libs/libglib_2_0_la-gunidecomp.o .libs/libglib_2_0_la-gurifuncs.o .libs/libglib_2_0_la-gutils.o .libs/libglib_2_0_la-guuid.o .libs/libglib_2_0_la-gvariant.o .libs/libglib_2_0_la-gvariant-core.o .libs/libglib_2_0_la-gvariant-parser.o .libs/libglib_2_0_la-gvariant-serialiser.o .libs/libglib_2_0_la-gvarianttypeinfo.o .libs/libglib_2_0_la-gvarianttype.o .libs/libglib_2_0_la-gversion.o .libs/libglib_2_0_la-gwakeup.o .libs/libglib_2_0_la-gprintf.o .libs/libglib_2_0_la-glib-unix.o .libs/libglib_2_0_la-gthread-posix.o .libs/libglib_2_0_la-gspawn.o .libs/libglib_2_0_la-giounix.o .libs/glib_probes.o -Wl,--whole-archive libcharset/.libs/libcharset.a -Wl,--no-whole-archive -Wl,-rpath -Wl,/opt/local/lib -Wl,-rpath -Wl,/opt/local/lib -L/opt/local/lib /opt/local/lib/libiconv.so /opt/local/lib/libpcre.so -lpthread /opt/local/lib/libintl.so -O3 -flto=thin -g -flto=thin -m64 -Wl,-Bsymbolic-functions -Wl,-z -Wl,nodelete -Wl,-R -Wl,/opt/local/lib -O3 -flto=thin -g -flto=thin -pthread -Wl,-soname -Wl,libglib-2.0.so.0 -o .libs/libglib-2.0.so.0.5800.3 /opt/local/bin/ld: .libs/glib_probes.o: plugin needed to handle lto object libtool: link: (cd ".libs" && rm -f "libglib-2.0.so.0" && ln -s "libglib-2.0.so.0.5800.3" "libglib-2.0.so.0") libtool: link: (cd ".libs" && rm -f "libglib-2.0.so" && ln -s "libglib-2.0.so.0.5800.3" "libglib-2.0.so") libtool: link: ( cd ".libs" && rm -f "libglib-2.0.la" && ln -s "../libglib-2.0.la" "libglib-2.0.la" )

RJVB commented on Feb 14, 2019

I did notice the presence of the --ar and --ranlib arguments, but I cannot seem to inject

MAKEFLAGS="LIBTOOL=slibtool --ar=llvm-ar --ranlib=llvm-ranlib"

I have a hunch that the toplevel Makefile filters out MAKEFLAGS with spaces in them. I could experiment with a wrapper script, but that would defeat my ultimate goald of reducing the amount of wrapper scripts used during a build.

RJVB commented on Feb 14, 2019

Hmmm, I don't really want to get into your reasons for not looking at AR and RANLIB (and NM, probably), but maybe those don't apply to the use of equivalent custom variables that the user would have to set explicitly, say SLIBTOOL_RANLIB and SLIBTOOL_AR?

I also notice that the libtool in the project I'm testing with doesn't get the correct utilities from the environment but actually has them hardcoded, something I guess configure did.

Slibtool could get select variables from that script if it detects that it's being used instead of it, but it'd be easier and more useful to support a config file that can contain default values for all parameters that can be controlled via the commandline.


Metadata Update from @orbea:
- Issue status updated to: Closed (was: Open)

4 years ago

Login to comment on this ticket.

Metadata