Discussion:
building slang2 with UTF-8 support on MacOS X
(too old to reply)
Christian Ebert
2006-08-07 13:27:55 UTC
Permalink
Hello,

Has anybody successfully compiled slang2 with UTF-8 support on
MacOS X? I recently switch to UTF locale and want to build the
slrn preview against slang2.

Here, on MacOS 10.3.9 I seem to be able to build the dynamic
libraries in the src dir, but I can't get through to the utf
module. make elf in the top dir stalls always at slsh with:


$ tail -n20 slang_make.log
libslang.2.0.7.dylib created in /Users/chris/src/slang/src/elfobjs.
The link libslang.dylib to libslang.2.0.7.dylib was also created.

cd slsh; make all
cp ../src/config.h .
gcc -c -I/sw/include -I/Users/chris/src/slang/src -DSLSH_CONF_DIR='"/usr/local/etc"' -DSLSH_PATH='"/usr/local/share/slsh"' -DSLSH_CONF_DIR_ENV='"SLSH_CONF_DIR"' -DSLSH_LIB_DIR_ENV='"SLSH_LIB_DIR"' -DSLSH_PATH_ENV='"SLSH_PATH"' slsh.c
gcc -c -I/sw/include -I/Users/chris/src/slang/src -DSLSH_CONF_DIR='"/usr/local/etc"' -DSLSH_PATH='"/usr/local/share/slsh"' -DSLSH_CONF_DIR_ENV='"SLSH_CONF_DIR"' -DSLSH_LIB_DIR_ENV='"SLSH_LIB_DIR"' -DSLSH_PATH_ENV='"SLSH_PATH"' -DUSE_GNU_READLINE=0 readline.c
readline.c: In function `open_readline':
readline.c:197: warning: assignment makes pointer from integer without a cast
readline.c: In function `read_input_line':
readline.c:284: warning: assignment makes pointer from integer without a cast
readline.c: In function `get_input_line':
readline.c:363: error: `SL_RunTime_Error' undeclared (first use in this function)
readline.c:363: error: (Each undeclared identifier is reported only once
readline.c:363: error: for each function it appears in.)
readline.c: In function `readline_intrinsic_internal':
readline.c:555: warning: assignment makes pointer from integer without a cast
make[1]: *** [readline.o] Error 1
make: *** [elf] Error 2

I get more or less the same error with --with-readline=gnu.

It is the same with slang-2.0.6 or slang svn-r34.

I can build slrn with the dylibs but appararently they are not
recognized, or only halfway: with latest cvs HEAD of slrn the
umlauts (ä, ö etc.) are displayed correctly, but it fails on "ß"
(sz lig) already. And slrn -V says it has slang-1.4?

Any help or pointers are appreciated.

c
--
_B A U S T E L L E N_ lesen! --->> <http://www.blacktrash.org/baustellen.html>
John E. Davis
2006-08-07 16:58:25 UTC
Permalink
Post by Christian Ebert
gcc -c -I/sw/include -I/Users/chris/src/slang/src -DSLSH_CONF_DIR='"/usr/local/etc"' -DSLSH_PATH='"/usr/local/share/slsh"' -DSLSH_CONF_DIR_ENV='"SLSH_CONF_DIR"' -DSLSH_LIB_DIR_ENV='"SLSH_LIB_DIR"' -DSLSH_PATH_ENV='"SLSH_PATH"' -DUSE_GNU_READLINE=0 readline.c
readline.c:197: warning: assignment makes pointer from integer without a cast
Does it help if you remove -I/sw/include? Does /sw/include contain an
older version of slang.h?

Thanks,
--John
Christian Ebert
2006-08-07 18:19:12 UTC
Permalink
Hello John,
Post by John E. Davis
Does it help if you remove -I/sw/include? Does /sw/include contain an
older version of slang.h?
Oops, I passed the wrong CFLAGS. My head was already spinning
from all the different versions and combinations of different
versions I was trying.

Ok. The svn-r34 libraries without any modules installed, and
writing this with cvs HEAD of slrn. And it works! slrn-pl1
however does not display 8bit chars correctly, neither does your
patch for 9.8.1 that I found on the web. -- With cvs HEAD I have
to do
LDFLAGS="-liconv" ./configure ..
though which is not needed for the tarball preview.

.. but slrn in the current state is unforgiving: it breaks on
headers with quotes like charset="iso-8859-1". If at least it
would not just give an error, I could just replace the article
with a little "display-filter" that I wrote that would call iconv
directly in case there's a header like that. But this way I only
get the error:

cannot convert from iso-8859-1"

mark the trailing quote. So I learn how many posts actually have
a broken charset header, but I can't read them. Duh. I guess I'll
have to wait until there's a more tolerant version. Pity. --
Unless you happen to have an idea where I could tweak something.

Thanks anyway for input.

c
--
_B A U S T E L L E N_ lesen! --->> <http://www.blacktrash.org/baustellen.html>
Newsgroups: alt.lang.s-lang
From: Christian Ebert <***@gmx.net>
Subject: Re: building slang2 with UTF-8 support on MacOS X
References: <2006-08-***@krille.blacktrash.org>
<***@aluche.mit.edu>
Organization: Black Trash Productions <http://www.blacktrash.org/>
X-Face: )&#alA:[x"-#%%./(nuC&8n;#gqM;=mfY&***@Gnv|AD_0l1Uz{fnJ^BW~OX[d;/)z!yV
Message-ID: <2006-08-***@krille.blacktrash.org>
Date: Mon, 7 Aug 2006 20:19:51 +0200
User-Agent: slrn/0.9.8.1pl2 (Darwin)
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hello John,
Post by John E. Davis
Does it help if you remove -I/sw/include? Does /sw/include contain an
older version of slang.h?
Oops, I passed the wrong CFLAGS. My head was already spinning
from all the different versions and combinations of different
versions I was trying.

Ok. The svn-r34 libraries without any modules installed, and
writing this with cvs HEAD of slrn. And it works! slrn-pl1
however does not display 8bit chars correctly, neither does your
patch for 9.8.1 that I found on the web. -- With cvs HEAD I have
to do
LDFLAGS="-liconv" ./configure ..
though which is not needed for the tarball preview.

.. but slrn in the current state is unforgiving: it breaks on
headers with quotes like charset="iso-8859-1". If at least it
would not just give an error, I could just replace the article
with a little "display-filter" that I wrote that would call iconv
directly in case there's a header like that. But this way I only
get the error:

cannot convert from iso-8859-1"

mark the trailing quote. So I learn how many posts actually have
a broken charset header, but I can't read them. Duh. I guess I'll
have to wait until there's a more tolerant version. Pity. --
Unless you happen to have an idea where I could tweak something.

Thanks anyway for input.

c
--
_B A U S T E L L E N_ lesen! --->> <http://www.blacktrash.org/baustellen.html>
Christian Ebert
2006-08-08 01:32:04 UTC
Permalink
Hi John,
Post by John E. Davis
Does it help if you remove -I/sw/include? Does /sw/include contain an
older version of slang.h?
FYI, I removed slang-1.4.9 completely and kept -I/sw/include.
This time the modules compiled too, except for socket. I found
only one socket.h in /usr/include/sys, but issuing
-I/usr/include/sys as well wasn't an improvement.

Unfortunately (for me) this changed nothing on the slrn front:
Articles quoted charset headers and format-flowed only give an
error -- even though UTF-8 and charset declarations without
quotes work fine.

Anyway, I have now a brand new slang2 and slrn compiled against
it ... but still no UTF.

$ slrn --version
Slrn 0.9.8.1pl1 [2005-02-17]
* Note: This version is a developer preview.
S-Lang Library Version: pre2.0.7-50
Compiled at: Aug 8 2006 03:08:26
Operating System: Darwin

COMPILE TIME OPTIONS:
Backends: +nntp -slrnpull -spool
External programs / libs: -canlock -inews -ssl -uudeview
Features: +charset_mapping +decoding +emphasized_text +end_of_thread
+fake_refs +gen_msgid -grouplens +mime -msgid_cache +piping +rnlock
+slang +spoilers -strict_from
DEFAULTS:
Default server object: nntp
Default posting mechanism: nntp
Default character set: isolatin
SUPPORTED CHARACTER SETS:
isolatin ibm850 ibm852 ibm857 ibm737 NeXT koi8

BTW, sorry for the double post, don't know whether this was due
to slrn or my confusion, probably the latter.

c
--
_B A U S T E L L E N_ lesen! --->> <http://www.blacktrash.org/baustellen.html>
John E. Davis
2006-08-09 17:23:47 UTC
Permalink
Post by Christian Ebert
FYI, I removed slang-1.4.9 completely and kept -I/sw/include.
This time the modules compiled too, except for socket. I found
only one socket.h in /usr/include/sys, but issuing
-I/usr/include/sys as well wasn't an improvement.
I will look into what needs to be done to get the socket module
running on MacOS X.
Post by Christian Ebert
Articles quoted charset headers and format-flowed only give an
error -- even though UTF-8 and charset declarations without
quotes work fine.
This is an slrn problem and should be dealt with by the slrn
maintainers. I believe Thomas Schultz is still maintaining it.
See <http://www.slrn.org/> for the appropriate links.

Good luck,
--John
Christian Ebert
2006-08-20 14:48:51 UTC
Permalink
Post by John E. Davis
I will look into what needs to be done to get the socket module
running on MacOS X.
Thanks. No hurry from my part.
Post by John E. Davis
This is an slrn problem and should be dealt with by the slrn
maintainers.
Done.

Thank you.

c
--
_B A U S T E L L E N_ lesen! --->> <http://www.blacktrash.org/baustellen.html>
John E. Davis
2006-08-21 02:23:51 UTC
Permalink
Post by Christian Ebert
Post by John E. Davis
I will look into what needs to be done to get the socket module
running on MacOS X.
Thanks. No hurry from my part.
The latest version of the socket-module in the SVN repository should
work on MacOS X.

Thanks,
--John
Christian Ebert
2006-08-21 17:08:08 UTC
Permalink
Post by John E. Davis
The latest version of the socket-module in the SVN repository should
work on MacOS X.
It does indeed.

Thank you very much for your help.

c
--
_B A U S T E L L E N_ lesen! --->> <http://www.blacktrash.org/baustellen.html>
Loading...