[racket] Racket without thread-local storage?

From: Eric Dobson (eric.n.dobson at gmail.com)
Date: Tue Feb 26 00:00:18 EST 2013

Racket's thread cells are local to 'Racket Threads', so I doubt that they
map to OS level thread local storage, and thus would work fine.


On Mon, Feb 25, 2013 at 8:07 PM, Neil Toronto <neil.toronto at gmail.com>wrote:

> On 02/25/2013 06:17 PM, Matthew Flatt wrote:
>
>> At Tue, 26 Feb 2013 01:30:18 +0100, Juan Francisco Cantero Hurtado wrote:
>>
>>> Hi. I have this issue when I compile racket with GCC 4.2 on OpenBSD:
>>>
>>> cd ../foreign; make all
>>> make foreign.lo
>>> /usr/bin/libtool --mode=compile --tag=CC cc -O2 -pipe -g
>>> -I/usr/local/include -I/usr/X11R6/include -DMZ_USE_JIT_SSE
>>> -I/usr/local/include -pthread    -DMZ_USES_SHARED_LIB  -I./../racket
>>> -I/usr/ports/pobj/racket-5.3.**3/racket-5.3.3/src/foreign/../**
>>> racket/include
>>> -I/usr/ports/pobj/racket-5.3.**3/racket-5.3.3/src/foreign/../**
>>> racket/src
>>>     -c /usr/ports/pobj/racket-5.3.3/**racket-5.3.3/src/foreign/**foreign.c
>>> -o
>>> foreign.lo
>>> cc -O2 -pipe -g -I/usr/local/include -I/usr/X11R6/include
>>> -DMZ_USE_JIT_SSE -I/usr/local/include -pthread -DMZ_USES_SHARED_LIB
>>> -I./../racket
>>> -I/usr/ports/pobj/racket-5.3.**3/racket-5.3.3/src/foreign/../**
>>> racket/include
>>> -I/usr/ports/pobj/racket-5.3.**3/racket-5.3.3/src/foreign/../**
>>> racket/src
>>> -c /usr/ports/pobj/racket-5.3.3/**racket-5.3.3/src/foreign/**foreign.c
>>> -fPIC
>>> -DPIC -o .libs/foreign.o
>>> In file included from
>>> /usr/ports/pobj/racket-5.3.3/**racket-5.3.3/src/foreign/../**
>>> racket/include/scheme.
>>> h:1169,
>>>                    from
>>> /usr/ports/pobj/racket-5.3.3/**racket-5.3.3/src/foreign/../**
>>> racket/src/schpriv.h:2
>>> 2,
>>>                    from
>>> /usr/ports/pobj/racket-5.3.3/**racket-5.3.3/src/foreign/**foreign.c:10:
>>> /usr/ports/pobj/racket-5.3.3/**racket-5.3.3/src/foreign/../**
>>> racket/include/schthre
>>> ad.h:483:
>>> error: thread-local storage not supported for this target
>>> Error while executing cc -O2 -pipe -g -I/usr/local/include
>>> -I/usr/X11R6/include -DMZ_USE_JIT_SSE -I/usr/local/include -pthread
>>> -DMZ_USES_SHARED_LIB -I./../racket
>>> -I/usr/ports/pobj/racket-5.3.**3/racket-5.3.3/src/foreign/../**
>>> racket/include
>>> -I/usr/ports/pobj/racket-5.3.**3/racket-5.3.3/src/foreign/../**
>>> racket/src
>>> -c /usr/ports/pobj/racket-5.3.3/**racket-5.3.3/src/foreign/**foreign.c
>>> -fPIC
>>> -DPIC -o .libs/foreign.o
>>> *** Error 2 in foreign (Makefile:43 'foreign.lo')
>>> *** Error 1 in foreign (Makefile:18 'all')
>>> *** Error 1 in racket (Makefile:130 'foreign-stuff')
>>> *** Error 1 in racket (Makefile:76 'common')
>>> *** Error 1 in racket (Makefile:79 'cgc')
>>> *** Error 1 in racket (Makefile:85 '3m')
>>> *** Error 1 in . (Makefile:40 '3m')
>>> *** Error 1 in /usr/ports/pobj/racket-5.3.3/**build-amd64 (Makefile:37
>>> 'all')
>>>
>>>
>>> I know the problem is the lack of support for TLS on OpenBSD/GCC. Now I
>>> compile racket with GCC 4.6 because this version has TLS support
>>> emulated but I think this workaround is adding other bugs to racket. Is
>>> it possible to compile racket in a OS/compiler without thread-local
>>> storage?.
>>>
>>> My configure options: --enable-libffi --enable-gracket --enable-jit
>>> --enable-foreign --enable-places --enable-float --enable-docs
>>> --enable-pthread --enable-lt=/usr/bin/libtool --enable-futures
>>>
>>
>> Thread-local storage is needed for `--enable-places' and
>> `--enable-futures', so you just have to leave those out to compile
>> without it.
>>
>
> What do Racket's thread cells do when Racket is compiled without TLS?
>
> Neil ⊥
>
>
> ____________________
>  Racket Users list:
>  http://lists.racket-lang.org/**users <http://lists.racket-lang.org/users>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20130225/91bcdfce/attachment.html>

Posted on the users mailing list.