iconv strangeness on macos
Karsten Poeck <[email protected]>
| Newsgroups | gmane.lisp.clisp.devel |
|---|---|
| Message-ID | <[email protected]> |
On 23.03.17 20:23, Sam Steingold wrote:
> when you build without your own libiconv installation, do you see
> libiconv in "./clisp --version" like I do?
>
> libsigsegv 2.11
> libiconv 1.11
> libreadline 7.0
> libffcall 1.13
To start with
libiconv 1.11 does not link anymore on my system
gcc -dynamiclib -o .libs/libiconv.2.4.0.dylib .libs/iconv.o
.libs/localcharset.o .libs/relocatable.o -install_name
/usr/local/lib/libiconv.2.dylib -Wl,-compatibility_version -Wl,7
-Wl,-current_version -Wl,7.0
Undefined symbols for architecture x86_64:
"_aliases_lookup", referenced from:
_libiconv_open in iconv.o
_iconv_canonicalize in iconv.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
Regarding the compilation error, this happens in streams.d:If I do the
following change, the files compiles happily, and libiconv 1.15 shows
in ./clisp --version
diff --git a/src/stream.d b/src/stream.d
--- a/src/stream.d
+++ b/src/stream.d
@@ -3999,7 +3999,7 @@
libiconv(cd,(ICONV_CONST char
**)(inbuf),inbytesleft,outbuf,outbytesleft)
#else
#define iconv(cd,inbuf,inbytesleft,outbuf,outbytesleft) \
- (iconv)(cd,(ICONV_CONST char
**)(inbuf),inbytesleft,outbuf,outbytesleft)
+ libiconv(cd,(ICONV_CONST char
**)(inbuf),inbytesleft,outbuf,outbytesleft)
#endif
/* open the iconv conversion and signal errors when necessary
than I get with
./configure --with-libiconv-prefix=/usr/local/
--with-libsigsegv-prefix=/usr/local/
--with-libreadline-prefix=/usr/local/opt/readline/
--with-libffcall-prefix=/usr/local/ --cbc 20170323m
....
checking for iconv... yes
checking for working iconv... yes
checking how to link with libiconv... -L/usr/local//lib -liconv
checking for iconv declaration...
extern size_t iconv (iconv_t cd, char * *inbuf, size_t
*inbytesleft, char * *outbuf, size_t *outbytesleft);
.....
karstenoecksMBP:20170323m karstenpoeck$ ./clisp --version
GNU CLISP 2.49.50+ (2017-03-30) (built 3699296506) (memory 3699296983)
Software: GNU C 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)
gcc -g -O2 -W -Wswitch -Wcomment -Wpointer-arith -Wreturn-type
-Wmissing-declarations -Wimplicit -Wno-sign-compare
-Wno-format-nonliteral -Wno-shift-negative-value -O -fwrapv
-fno-strict-aliasing -DUNIX_BINARY_DISTRIB -DENABLE_UNICODE
-DDYNAMIC_FFI -DDYNAMIC_MODULES -DNO_GETTEXT libgnu.a
-L/usr/local/opt/readline//lib -lreadline -lncurses
/usr/local//lib/libavcall.a /usr/local//lib/libcallback.a
-L/usr/local//lib -liconv /usr/local//lib/libsigsegv.a -lc -L/usr/X11/lib
SAFETY=0 TYPECODES WIDE_HARD GENERATIONAL_GC SPVW_BLOCKS SPVW_MIXED
TRIVIALMAP_MEMORY
libsigsegv 2.11
libiconv 1.15
libreadline 7.0
libffcall 1.13
Features: (READLINE REGEXP WILDCARD SYSCALLS I18N LOOP COMPILER CLOS MOP
CLISP ANSI-CL COMMON-LISP LISP=CL INTERPRETER LOGICAL-PATHNAMES SOCKETS
GENERIC-STREAMS SCREEN FFI UNICODE BASE-CHAR=CHARACTER WORD-SIZE=64 UNIX
MACOS)
C Modules: (clisp i18n syscalls regexp readline)
Installation directory: /Users/karstenpoeck/lisp/compiler/clisphg/20170323m/
User language: ENGLISH
Machine: X86_64 (X86_64) karstenoecksmbp.fritz.box [192.168.178.41]
To explain this, is beyond my paygrade, but I see that Reini has changed
the definition in stream.d while I was checking. (rev
cb052d00af69872f5c1df76f05e5d137ff2187da [cb052d00af69]).
With his change i also can compile and get libiconv 1.15 included
regards
Karsten
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
clisp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/clisp-devel