hackt
hackt copied to clipboard
hackt,hacchpsim link fail on i686-darwin10 missing lt_dladdsearchdir
Undefined symbols: "lt_dladdsearchdir", referenced from: HAC::chpsim::parse_command_options(int, char*, HAC::chpsim_options&)in libhacktexec.a(chpsim.o) ld: symbol(s) not found collect2: ld returned 1 exit status make[2]: *_* [hackt] Error 1
This was expected to have been linked in through libhacktexec.la:libhacktcommon.la:$(LIBLTDL), but didn't work for some reason.
Fix is to add $(LIBLTDL) to libraries that call the ltdl functions directly, rather than through indirect library dependencies. (I wonder if -force_load addresses this issue...)
Actually, this is fallout from an erroneous call to tr from the libtool script. libhacktcommon.la should have libltdl in its dependent libraries.
See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12156
The faulty libtool script contains: (turn spaces into newlines.) SP2NL="tr "
(turn newlines into spaces.) NL2SP="tr ^M "
I grabbed an excerpt from a working libtool script: (turn spaces into newlines.) SP2NL="tr \040 \012"
(turn newlines into spaces.) NL2SP="tr \015\012 \040\040"
And that seemed to work! (in src/, after make clean-libs ; make )
autoconf 2.69 vs. 2.68 made no difference. POSIXLY_CORRECT made no difference. locale though:
Jon: jtse@ephemeral:~$ locale LANG="en_US.utf-8" LC_COLLATE="en_US.utf-8" LC_CTYPE="en_US.utf-8" LC_MESSAGES="en_US.utf-8" LC_MONETARY="en_US.utf-8" LC_NUMERIC="en_US.utf-8" LC_TIME="en_US.utf-8" LC_ALL=
me:LANG= LC_COLLATE="C" LC_CTYPE="C" LC_MESSAGES="C" LC_MONETARY="C" LC_NUMERIC="C" LC_TIME="C" LC_ALL=
forcing my LC_ALL and LANG to en_US.utf-8 didn't fix NL2SP/SP2NL in my config.status either /me scratches head
Anyways, my goal is to fix so that my config.status produces reasonable values for those, that will fix the libtool script.
other data: we're both using bash-3.2 (/bin/sh on darwin10)
when I try the test in configure:
echo X | tr X '\101'
interactively, it produces A, as expected. Not sure why it's falling into the EBCDIC case in the configure test.
the libtool script configured on 10.7 also suffers the same issue, fixable with same workaround of manually fixing the SP2NL and NL2SP lines. Very irritating.
same issue on 10.9, apparently
Observation: this workaround is still needed on more modern Apple tools:
$ clang --version
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Symptom (during libtool link step):
/bin/sh ../libtool --tag=CXX --mode=link clang++ -pipe -ansi -pedantic-errors -Wold-style-cast -Woverloaded-virtual -W -Wextra -Wall -Wundef -Wshadow -Wno-unused-parameter -Wpointer-arith -Wcast-qual -Wcast-align -Wconversion -Werror -g -O2 -std=c++11 -Wno-unused-local-typedef -Wno-unused-function -Wno-error=conversion -Wno-error=sign-conversion -Qunused-arguments -Wno-long-long -o libstdchpfn.la -rpath /usr/local/experimental/lib/hackt libchpfn/assert.lo libchpfn/bitmanip.lo libchpfn/conditional.lo libchpfn/io.lo libchpfn/OS.lo libchpfn/numeric.lo libchpfn/random.lo libchpfn/string.lo
usage: tr [-Ccsu] string1 string2
tr [-Ccu] -d string1
tr [-Ccu] -s string1
tr [-Ccu] -ds string1 string2
just noting that this problem still persists with:
build-triplet: x86_64-apple-darwin17.7.0
c++: Apple LLVM version 8.1.0 (clang-802.0.42)