That works. Thank you to Alexander and the others who responded, both here
and on the Gambit list.

On May 13, 2017 4:00 AM, "Alexander Shendi (web.de)" <
alexander.she...@web.de> wrote:

> Hi Phil,
>
> you have to set LD_LIBRARY_PATH explicitly :
>
> export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/chicken-4.12.0/lib
>
> Then you should be able to invoke "csi" directly. You don't need my patch,
> if you don't mind a linker warning message each time you run "csi".
>
> Best Regards,
>
> Alexander
>
> Am 13. Mai 2017 03:15:30 MESZ schrieb Phil Bewig <pbe...@gmail.com>:
>>
>> I began as John suggested with the following command line:
>>
>> TMPDIR=$HOME/tmp make C_COMPILER=clang PREFIX=$HOME/chicken-4.12.0
>> PLATFORM=linux install
>>
>> This ran fine (about ten minutes) until it encountered an error on the
>> line:
>>
>> clang -L. chicken.o batch-driver.o compiler.o optimizer.o lfa2.o
>> compiler-syntax.o scrutinizer.o support.o c-platform.o c-backend.o -o
>> chicken -lchicken -W1,-R"." -lm -ldl
>>
>> The error message is:
>>
>> ./libchicken.so: undefined reference to '__android_log_vprint'
>> clan-4.0: error: linker command failed with exit code 1 (use -v to see
>> invocation)
>> make: *** [rules.make:247: chicken] Error 1
>>
>> So I erased everything, untarred again, and did as Alexander suggested:
>>
>> TMPDIR=$HOME/tmp make C_COMPILER=clang PREFIX=$HOME/chicken-4.12.0
>> PLATFORM=android install
>>
>> The compile completed successfully, but when I run ./csi I get an error:
>>
>> CANNOT LINK EXECUTABLE: could not load library "libchicken.so" needed by
>> "./csi"; caused by library "libchicken.so" not found
>>
>> Of course, libchicken.so is in the same directory as csi. I suppose that
>> is the linker error Alexander talked about. I have questions:
>>
>> 1) How do I work around the link error and run csi?
>>
>> 2) Alexander: How do I apply your patch? (I'm not adept with C.) Is your
>> patch forward-compatible so it will work on future versions of chicken?
>>
>> 3) Is there a way to compile chicken so the library is included
>> statically and doesn't require a dynamically-loaded library? (I would
>> prefer that to a patch.)
>>
>> Thanks again,
>>
>> Phil
>>
>> On Fri, May 12, 2017 at 6:16 PM, Alexander Shendi (web.de) <
>> alexander.she...@web.de> wrote:
>>
>>> Dear Phil,
>>>
>>> It's me again.
>>>
>>> Some remarks:
>>> I did successfully compile CHICKEN 4.12.0 on Termux/Android. Please use
>>> that exact release as it contains several fixes for the Android platform.
>>>
>>> 1) I used PLATFORM=android as Termux uses Android's libc (Bionic) rather
>>> than GNU libc.
>>> 2) The complete make invocation I used was:
>>>
>>> TMPDIR=$HOME/tmp make C_COMPILER=clang PREFIX=$HOME/chickens/4.12.0
>>> PLATFORM=android install
>>>
>>> 3) the Android dynamic linker is rather dumb and doesn't support the
>>> --rpath feature used by the Makefile.
>>> It spits out a warning to that effect every time you run csi/csc or an
>>> executable made with csc.
>>> This also screws up the CHICKEN test suite. I have a patch that works
>>> around that
>>> (see https://paste.call-cc.org/paste?id=a738f447edf76ecbaa7b47eec
>>> ed51fa138972add#a0)
>>> But if you can live with the warning message and don't need to run the
>>> test suite you don't need to apply the patch.
>>>
>>> 3) I did (see above).
>>>
>>> 4.1) CHICKEN 's library directory (e.g. $HOME/chickens/4.12.0/lib) must
>>> be in your $LD_LIBRARY_PATH.
>>> 4.2) If you want to install eggs (CHICKEN's version of packages) you
>>> must say:
>>> TMPDIR=$HOME/tmp chicken-install <eggname>
>>>
>>>
>>> 5.) Good luck!
>>>
>>> 6.) Do not hesitate to ask for further info.
>>>
>>> Best Regards,
>>>
>>> Alexander
>>>
>>>
>>> Am 12. Mai 2017 23:00:10 MESZ schrieb Phil Bewig <pbe...@gmail.com>:
>>>>
>>>> I recently purchased a Lenovo TAB2 A10 tablet computer and installed
>>>> Termux, a unix-like environment, from the Play Store. I want to compile
>>>> Chicken for my computer so I can have a Scheme REPL with me wherever I go.
>>>> I have several questions:
>>>>
>>>> 1) What is the correct PLATFORM for the make command? Is it android?
>>>> Termux isn't really android, it is its own version of unix, similar to
>>>> Debian.
>>>>
>>>> 2) Are any of the optional features required or recommended for Termux?
>>>>
>>>> 3) Have any other Chicken users successfully compiled Chicken on Termux?
>>>>
>>>> 4) Is there anything else I need to know to compile Chicken on Termux?
>>>>
>>>> Thanks for your help.
>>>>
>>>> Phil
>>>>
>>>
>>> --
>>> Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail
>>> gesendet.
>>>
>>
>>
> --
> Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail
> gesendet.
>
_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to