From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Nala Ginrut Newsgroups: gmane.lisp.guile.devel Subject: Re: [ Porting Guile on Android 4.4 ] Date: Sat, 17 Jun 2017 23:59:39 +0800 Message-ID: References: <134615905.19718584.1497627856676.ref@mail.yahoo.com> <134615905.19718584.1497627856676@mail.yahoo.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="94eb2c09deea490735055229fdad" X-Trace: blaine.gmane.org 1497715186 6473 195.159.176.226 (17 Jun 2017 15:59:46 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 17 Jun 2017 15:59:46 +0000 (UTC) Cc: guile-devel To: Robert Dazi Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sat Jun 17 17:59:41 2017 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dMG8T-0001RO-Ft for guile-devel@m.gmane.org; Sat, 17 Jun 2017 17:59:41 +0200 Original-Received: from localhost ([::1]:35515 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dMG8Y-0006yQ-Ui for guile-devel@m.gmane.org; Sat, 17 Jun 2017 11:59:46 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48928) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dMG8U-0006yH-C4 for guile-devel@gnu.org; Sat, 17 Jun 2017 11:59:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dMG8T-0005dx-C5 for guile-devel@gnu.org; Sat, 17 Jun 2017 11:59:42 -0400 Original-Received: from mail-ot0-x22f.google.com ([2607:f8b0:4003:c0f::22f]:34715) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dMG8T-0005dt-4o for guile-devel@gnu.org; Sat, 17 Jun 2017 11:59:41 -0400 Original-Received: by mail-ot0-x22f.google.com with SMTP id r67so46752962ota.1 for ; Sat, 17 Jun 2017 08:59:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=kc8o57I2t+nUAr8eSLbecB7g8bf7NuI2b5CR4rjbG38=; b=C5kZLhJwqYG3tS29TDvDkYqWyOpK7dL1+poRPETy0WRhUH2Il8L/bQCohiRrxW6Y5N ETBxOdCI1EFQ7oE+UhukfwlOvRqnvwlr759BtGGlNxsGakLDHcIrLBeImMAqWYxBYt/e aWI1j7sY1CbaUX0yxspNc/VlhqHWSk7vVqUNti9JBfvEYF4imVczPs5zGo2yenr2fS1S kSK9cWfbzUGUJERy1QQ3Aoa5jH3A7xuqzrdv4B56IwbnMmF/BhIGsJ4hVEZWrrn/2bvX IKrnAoPCRCNdphsvNZefGjY1uM5FUkDyRXML0YuY02l2jaJFH93NtXL5CLXYHqiTmtsK tHyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=kc8o57I2t+nUAr8eSLbecB7g8bf7NuI2b5CR4rjbG38=; b=pWXsy6nlbyuo/qaTE1DxMAyLXihVgX19B8tyBd7LXfIvwL6SXTJ0C9A+gYicgkwX2q sky7j7nqyX/Rxp2bf9ZNeQl4q1iGC298l0JNcDVZr9nQYtT7xrtB9R2MSIMVfYy6RowP Q2H51caYNeHAmK9WJXhfyzlKMo1I5TY0ropm4IbR9Vi/JeBbPE2XZ+OTZAkzPMN1515k 70xZeklDUrmGOyhfZMs0K33y3zkhvAno8mZCFRk/5tTuopfv6N5bxe7twBxWYkZO+ob5 miCZe+ufqn9DAxZ6yhuYmsoGtm99o/J7HtVJXUXgWfaZE78pd2jQ9+dhi87cEjmhOE++ JUCw== X-Gm-Message-State: AKS2vOzP3MOvdInjTnJEm01s6gEvSI8ogVffqAj8vDEHHyzpWtOFBs/b nUPCxONAx6hKw7jdF5PDon+gKRSqfQ== X-Received: by 10.157.4.239 with SMTP id 102mr8066159otm.65.1497715180109; Sat, 17 Jun 2017 08:59:40 -0700 (PDT) Original-Received: by 10.157.37.20 with HTTP; Sat, 17 Jun 2017 08:59:39 -0700 (PDT) Original-Received: by 10.157.37.20 with HTTP; Sat, 17 Jun 2017 08:59:39 -0700 (PDT) In-Reply-To: <134615905.19718584.1497627856676@mail.yahoo.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4003:c0f::22f X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.org gmane.lisp.guile.devel:19203 Archived-At: --94eb2c09deea490735055229fdad Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I'm not familiar with this porting work, so can't help more. But it's great if I could use Guile on my phone! Thanks for the work! 2017=E5=B9=B46=E6=9C=8816=E6=97=A5 =E4=B8=8B=E5=8D=8811:48=EF=BC=8C"Robert = Dazi" =E5=86=99=E9=81=93=EF=BC=9A > Hello, > I tried to port Guile 2.2.1 on Android 4.4. As you might know, Android is > not GNU/Linux and many functions (and even types such as localeconv) are > missing or not acting as expected (either because the Linux headers have > been ripped off or because Bionic lacks those features). > That means the libraries needed some rewriting, and Guile too. Here some > issues : > - the 'configure' script generated by autoconf uses the PREFIX variabl= e > to find libltdl, whereas it is better to ask the user for that path. > - Bionic doesn't implement well locales (and won't), setlocale is an > empty function returning NULL > - Because the encoding format is unknown, init_random raises an error, > but init_random is called before init_throw so since the static variable > for throwing is set to an unknown state (on my device it is set to 0), it > leads to a segfault. (By the way, setting LC_ALL to UTF-8 fixes the > encoding issue if init_throw called before init_random). > > Eventually, I've got a (seemingly working) rpl by commenting out the > 'setlocale' line within top-repl.scm. > > Thanksfully, > --94eb2c09deea490735055229fdad Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I'm not famili= ar with this porting work, so can't help more. But it's great if I = could use Guile on my phone!
Thanks for the work!

<= div class=3D"gmail_quote">2017=E5=B9=B46=E6=9C=8816=E6=97=A5 =E4=B8=8B=E5= =8D=8811:48=EF=BC=8C"Robert Dazi" <robert.dazi@yahoo.fr>=E5=86=99=E9=81=93=EF=BC=9A
Hello,=C2=A0
I tried to port Guile 2.2.1 on Android 4.4. As you = might know, Android is not GNU/Linux and many functions (and even types suc= h as localeconv) are missing or not acting as expected (either because the = Linux headers have been ripped off or because Bionic lacks those features).=
That means the libraries needed some rewriting, and Guile too. Here some i= ssues :
=C2=A0 =C2=A0- the 'configure' script generated= by autoconf uses the PREFIX variable to find libltdl, whereas it is better= to ask the user for that path.=C2=A0
=C2=A0 =C2=A0- Bionic doe= sn't implement well locales (and won't), setlocale is an empty func= tion returning NULL
=C2=A0 =C2=A0- Because the encoding format = is unknown, init_random raises an error, but init_random is called before i= nit_throw so since the static variable for throwing is set to an unknown st= ate (on my device it is set to 0), it leads to a segfault. (By the way, set= ting LC_ALL to UTF-8 fixes the encoding issue if init_throw called before i= nit_random).

Eventually, I've got a (seemi= ngly working) rpl by commenting out the 'setlocale' line within top= -repl.scm.=C2=A0

Thanksfully,
<= /div>
--94eb2c09deea490735055229fdad--