From MAILER-DAEMON Wed Oct 01 17:08:55 2008 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Kl8wJ-0002uz-Hb for mharc-users-prolog@gnu.org; Wed, 01 Oct 2008 17:08:55 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kl7Ca-0001cD-F2 for users-prolog@gnu.org; Wed, 01 Oct 2008 15:17:36 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kl7CZ-0001bb-6f for users-prolog@gnu.org; Wed, 01 Oct 2008 15:17:35 -0400 Received: from [199.232.76.173] (port=60335 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kl7CY-0001bX-Rv for users-prolog@gnu.org; Wed, 01 Oct 2008 15:17:35 -0400 Received: from yw-out-1718.google.com ([74.125.46.157]:24825) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kl7CY-0003vM-98 for users-prolog@gnu.org; Wed, 01 Oct 2008 15:17:34 -0400 Received: by yw-out-1718.google.com with SMTP id 9so128813ywk.66 for ; Wed, 01 Oct 2008 12:17:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=pnkalLRPzUA5ueQLahjbWyfO/tRlJ1G6KoXWzT5TXhE=; b=YbDnbbuTFvvc3meDkPNEmD3BraGLUlKDkkZurAACAZ9qwFFzcoTmEfmZCoWL2hz6tQ pVxlkzjFXVimkGf5EnEw16Puat9N+lYWeWck33QZNH6omEjS4Vkv6WXzRXEf+EUUpOWK OHsd+mK0/AMiIeFMnGfQDs4BBqDV7pPFrS23M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=RU8SC6yBuLoiE9XDCQ5J4U4orXC7KfUA6vpDtv8ezo0Snh1J2q5R99Ah/BtAxF/SVZ 56TUyoMKJzgUG0+NXYPQP9eVpw9lWhP/3ILQTgGOhagiHypBhw5bJMHrZtsefHgSWuf3 9y4/fKP3AvJOUFqGf9LtDwmbMh1cc4XJvGXD4= Received: by 10.142.180.11 with SMTP id c11mr3514737wff.159.1222888651123; Wed, 01 Oct 2008 12:17:31 -0700 (PDT) Received: by 10.142.80.19 with HTTP; Wed, 1 Oct 2008 12:17:31 -0700 (PDT) Message-ID: Date: Wed, 1 Oct 2008 21:17:31 +0200 From: "Ludovic Rousseau" To: users-prolog@gnu.org MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_59393_7201423.1222888651128" X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-Mailman-Approved-At: Wed, 01 Oct 2008 17:08:54 -0400 Subject: patch for gpgpcsc (PC/SC interface) X-BeenThere: users-prolog@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU implementation of Prolog List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2008 19:17:36 -0000 ------=_Part_59393_7201423.1222888651128 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello, I just tried to use gpgpcsc from [1]. I propose this patch to make it compile under GNU/Linux (Debian Lenny in my case) This patch will correct different problems: - do not hardcode the path for includes and libs but use pkg-config instead - use " instead of ' in Makefile variables to allow arguments expansion and use of back quote - use SCARD_SCOPE_SYSTEM instead of SCARD_SCOPE_GLOBAL since SCARD_SCOPE_SYSTEM is not defined by pcsc-lite - use an unsigned type for state used in SCardStatus. The patch works for me. Please apply it to the CVS code. Regards, [1] http://gprolog.cvs.sourceforge.net/gprolog/contribs/gplpcsc/ -- Dr. Ludovic Rousseau ------=_Part_59393_7201423.1222888651128 Content-Type: text/plain; name=patch.txt Content-Transfer-Encoding: base64 X-Attachment-Id: f_flsc4q1k0 Content-Disposition: attachment; filename=patch.txt PyB0ZXN0YXBkdQpJbmRleDogTWFrZWZpbGUKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQpSQ1MgZmlsZTogL2N2c3Jvb3Qv Z3Byb2xvZy9jb250cmlicy9ncGxwY3NjL01ha2VmaWxlLHYKcmV0cmlldmluZyByZXZpc2lvbiAx LjIKZGlmZiAtcjEuMiBNYWtlZmlsZQoxLDJjMSwyCjwgTVVTQ0xFX0hEUlMgPSAtSS91c3IvbG9j YWwvaW5jbHVkZQo8IE1VU0NMRV9MSUJTID0gLUwvdXNyL2xvY2FsL2xpYiAtbHBjc2NsaXRlIC1s Y3J5cHRvIC1scHRocmVhZAotLS0KPiBNVVNDTEVfSERSUyA9IGBwa2ctY29uZmlnIC0tY2ZsYWdz IGxpYnBjc2NsaXRlYAo+IE1VU0NMRV9MSUJTID0gYHBrZy1jb25maWcgLS1saWJzIGxpYnBjc2Ns aXRlYCAtbGNyeXB0byAtbHB0aHJlYWQKNCw1YzQsNQo8IENGTEFHUz0nLVdhbGwgLWcgJChNVVND TEVfSERSUyknCjwgTEZMQUdTPSckKE1VU0NMRV9MSUJTKScKLS0tCj4gQ0ZMQUdTPSItV2FsbCAt ZyAkKE1VU0NMRV9IRFJTKSIKPiBMRkxBR1M9IiQoTVVTQ0xFX0xJQlMpIgpJbmRleDogcGNzYy9t dXNjbGVfYy5jCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT0KUkNTIGZpbGU6IC9jdnNyb290L2dwcm9sb2cvY29udHJpYnMv Z3BscGNzYy9wY3NjL211c2NsZV9jLmMsdgpyZXRyaWV2aW5nIHJldmlzaW9uIDEuMS4xLjEKZGlm ZiAtcjEuMS4xLjEgbXVzY2xlX2MuYwozNWMzNQo8IAkgcnYgPSBTQ2FyZEVzdGFibGlzaENvbnRl eHQoIFNDQVJEX1NDT1BFX0dMT0JBTCwgcGNIb3N0LCBOVUxMLCBoQ29udGV4dCApOw0KLS0tCj4g CSBydiA9IFNDYXJkRXN0YWJsaXNoQ29udGV4dCggU0NBUkRfU0NPUEVfU1lTVEVNLCBwY0hvc3Qs IE5VTEwsIGhDb250ZXh0ICk7DQoxMjhjMTI4Cjwgc2NhcmRfc3RhdHVzX0MobG9uZyBoQ2FyZCwg bG9uZyogc3RhdGUsIFBsVGVybSBhdHJMKQ0KLS0tCj4gc2NhcmRfc3RhdHVzX0MobG9uZyBoQ2Fy ZCwgdW5zaWduZWQgbG9uZyogc3RhdGUsIFBsVGVybSBhdHJMKQ0K ------=_Part_59393_7201423.1222888651128-- From MAILER-DAEMON Wed Oct 01 17:08:56 2008 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Kl8wJ-0002vA-Mh for mharc-users-prolog@gnu.org; Wed, 01 Oct 2008 17:08:55 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kl7gH-0007st-Js for users-prolog@gnu.org; Wed, 01 Oct 2008 15:48:17 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kl7gG-0007sB-JP for users-prolog@gnu.org; Wed, 01 Oct 2008 15:48:16 -0400 Received: from [199.232.76.173] (port=42696 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kl7gG-0007s4-AG for users-prolog@gnu.org; Wed, 01 Oct 2008 15:48:16 -0400 Received: from yx-out-1718.google.com ([74.125.44.152]:20826) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kl7gF-0001cR-Qe for users-prolog@gnu.org; Wed, 01 Oct 2008 15:48:15 -0400 Received: by yx-out-1718.google.com with SMTP id 34so131667yxf.66 for ; Wed, 01 Oct 2008 12:48:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=YYiVssCFYZ4R0t9SvOWYF76RdcAOf37HfVqN2U5vygY=; b=WgemL1rmSz2SFX2OLX2JH5I77XIwEpnVvURcT2Y1qOt3g0v3g6GPwbqSpV4Bz/e8iW vwbajNHzE2ZmcQqo6evjnl8//uwtLkyE5j9M3y+dwGgGbyp1xVxjTvWZ+yOagB9dAenI Se04Oc6G7w0YtR3iq3lCfxvG35P+Yul8cpDxw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=OiORuSGMy6ebbdwEsrf9ggBZSfzkbP+Us5X8ciW0bEBpWrOtDhAefYh144hs1x+MoU FbY3+aOZW224P04Nt+glEwYaU9vvPmJ9dQMOYqYz5Uro2oSwaBJM3pmH5SfxUjnpRPtO iJvIL0u/2qyAD2xqFcwDZ8AtWU/QXxngTHUBw= Received: by 10.142.132.2 with SMTP id f2mr3516085wfd.287.1222890494822; Wed, 01 Oct 2008 12:48:14 -0700 (PDT) Received: by 10.142.80.19 with HTTP; Wed, 1 Oct 2008 12:48:14 -0700 (PDT) Message-ID: Date: Wed, 1 Oct 2008 21:48:14 +0200 From: "Ludovic Rousseau" To: users-prolog@gnu.org In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_60051_10659993.1222890494830" References: X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-Mailman-Approved-At: Wed, 01 Oct 2008 17:08:54 -0400 Subject: Re: patch for gpgpcsc (PC/SC interface) X-BeenThere: users-prolog@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU implementation of Prolog List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2008 19:48:18 -0000 ------=_Part_60051_10659993.1222890494830 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Wed, Oct 1, 2008 at 9:17 PM, Ludovic Rousseau wrote: > The patch works for me. Please apply it to the CVS code. Patch in unified format. Better now, sorry. -- Dr. Ludovic Rousseau ------=_Part_60051_10659993.1222890494830 Content-Type: text/plain; name=patch.txt Content-Transfer-Encoding: base64 X-Attachment-Id: f_flsderj31 Content-Disposition: attachment; filename=patch.txt PyBsaW51eG1hZwo/IGxpbnV4bWFnLnBsCj8gdGVzdGFwZHUKSW5kZXg6IE1ha2VmaWxlCj09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT0KUkNTIGZpbGU6IC9jdnNyb290L2dwcm9sb2cvY29udHJpYnMvZ3BscGNzYy9NYWtlZmls ZSx2CnJldHJpZXZpbmcgcmV2aXNpb24gMS4yCmRpZmYgLXUgLXIxLjIgTWFrZWZpbGUKLS0tIE1h a2VmaWxlCTEzIE1heSAyMDAzIDA3OjM5OjMzIC0wMDAwCTEuMgorKysgTWFrZWZpbGUJMSBPY3Qg MjAwOCAxOTo0NjoxNCAtMDAwMApAQCAtMSwxMCArMSwxMCBAQAotTVVTQ0xFX0hEUlMgPSAtSS91 c3IvbG9jYWwvaW5jbHVkZQotTVVTQ0xFX0xJQlMgPSAtTC91c3IvbG9jYWwvbGliIC1scGNzY2xp dGUgLWxjcnlwdG8gLWxwdGhyZWFkCitNVVNDTEVfSERSUyA9IGBwa2ctY29uZmlnIC0tY2ZsYWdz IGxpYnBjc2NsaXRlYAorTVVTQ0xFX0xJQlMgPSBgcGtnLWNvbmZpZyAtLWxpYnMgbGlicGNzY2xp dGVgIC1sY3J5cHRvIC1scHRocmVhZAogCi1DRkxBR1M9Jy1XYWxsIC1nICQoTVVTQ0xFX0hEUlMp JwotTEZMQUdTPSckKE1VU0NMRV9MSUJTKScKK0NGTEFHUz0iLVdhbGwgLWcgJChNVVNDTEVfSERS UykiCitMRkxBR1M9IiQoTVVTQ0xFX0xJQlMpIgogCi1FWEVDUyA9IHRlc3RhcGR1CitFWEVDUyA9 IHRlc3RhcGR1IGxpbnV4bWFnCiAKIGFsbDogJChFWEVDUykKIApAQCAtMTMsNiArMTMsOSBAQAog CWdwbGMgLWMgLUMgJChDRkxBR1MpICBwY3NjL211c2NsZV9jLmMKIAogCitsaW51eG1hZzogbGlu dXhtYWcucGwgcGNzYy9tdXNjbGVfYy5vCisJZ3BsYyAtbyBsaW51eG1hZyBwY3NjL211c2NsZV9j Lm8gIC1MICQoTEZMQUdTKSAgbGludXhtYWcucGwgdXRpbF9wY3NjL3V0aWwucGwKKwogdGVzdGFw ZHU6IHRlc3RhcGR1LnBsIHBjc2MvbXVzY2xlX2MubwogCWdwbGMgLW8gdGVzdGFwZHUgcGNzYy9t dXNjbGVfYy5vICAtTCAkKExGTEFHUykgIHRlc3RhcGR1LnBsIHV0aWxfcGNzYy91dGlsLnBsCiAK SW5kZXg6IHBjc2MvbXVzY2xlX2MuYwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ClJDUyBmaWxlOiAvY3Zzcm9vdC9ncHJv bG9nL2NvbnRyaWJzL2dwbHBjc2MvcGNzYy9tdXNjbGVfYy5jLHYKcmV0cmlldmluZyByZXZpc2lv biAxLjEuMS4xCmRpZmYgLXUgLXIxLjEuMS4xIG11c2NsZV9jLmMKLS0tIHBjc2MvbXVzY2xlX2Mu YwkxMiBBcHIgMjAwMiAxMzoyNDo0NiAtMDAwMAkxLjEuMS4xCisrKyBwY3NjL211c2NsZV9jLmMJ MSBPY3QgMjAwOCAxOTo0NjoxNCAtMDAwMApAQCAtMzIsNyArMzIsNyBAQAogICBMT05HIHJ2Ow0K IA0KIAlTZXRfQ19CaXBfTmFtZSgic2NhcmRfZXN0YWJsaXNoX2NvbnRleHQiLCAyKTsNCi0JIHJ2 ID0gU0NhcmRFc3RhYmxpc2hDb250ZXh0KCBTQ0FSRF9TQ09QRV9HTE9CQUwsIHBjSG9zdCwgTlVM TCwgaENvbnRleHQgKTsNCisJIHJ2ID0gU0NhcmRFc3RhYmxpc2hDb250ZXh0KCBTQ0FSRF9TQ09Q RV9TWVNURU0sIHBjSG9zdCwgTlVMTCwgaENvbnRleHQgKTsNCiAgIGlmICggcnYgIT0gU0NBUkRf U19TVUNDRVNTICkgew0KIAkJcmFpc2Vfc3lzX2Vycm9yKHJ2KTsNCiAgIH0NCkBAIC0xMjUsNyAr MTI1LDcgQEAKIH0NCiANCiBCb29sIA0KLXNjYXJkX3N0YXR1c19DKGxvbmcgaENhcmQsIGxvbmcq IHN0YXRlLCBQbFRlcm0gYXRyTCkNCitzY2FyZF9zdGF0dXNfQyhsb25nIGhDYXJkLCB1bnNpZ25l ZCBsb25nKiBzdGF0ZSwgUGxUZXJtIGF0ckwpDQogew0KICAgTE9ORyBydjsNCiAJRFdPUkQgZHdQ cm90b2NvbCwgY2JBdHJMZW4sIGR3UmVhZGVycyA9IE1BWF9SRUFERVJOQU1FOw0K ------=_Part_60051_10659993.1222890494830-- From MAILER-DAEMON Wed Oct 01 17:36:54 2008 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Kl9NO-0001PV-6P for mharc-users-prolog@gnu.org; Wed, 01 Oct 2008 17:36:54 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kl9NM-0001PN-37 for users-prolog@gnu.org; Wed, 01 Oct 2008 17:36:52 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kl9NK-0001P9-97 for users-prolog@gnu.org; Wed, 01 Oct 2008 17:36:51 -0400 Received: from [199.232.76.173] (port=51930 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kl9NK-0001P5-4P for users-prolog@gnu.org; Wed, 01 Oct 2008 17:36:50 -0400 Received: from wf-out-1314.google.com ([209.85.200.174]:62969) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kl9NJ-0001qj-Ln for users-prolog@gnu.org; Wed, 01 Oct 2008 17:36:49 -0400 Received: by wf-out-1314.google.com with SMTP id 28so759295wfc.24 for ; Wed, 01 Oct 2008 14:36:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=xCGtE7UwcVHlXOhgpTGv8F9B4fKSNU4+JSZ9fvaP71o=; b=M/U2RE9B7FatFAByIC6+E8mbU0Dj13TD6MuThAE1UL8upgKLW68WGSX4cj1g5+M2ro bL2PtcG7b43NneQ4ROYl3ctY/eyxC70cNXuBX1u6jhcgiY1NZwOEXXtj4P6/UQukbK19 c3dm3MaRxbyD+0GUWhpQCnROHTRKA0gpFCh7c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=EC7VeyiBnHCVFLz934ki8t37XTlR6VWCrqy99M+jnsjWASC7GKJ8FrPv8yPR4WOuPE 9IQfrVoIhRixHj0SXR1MTfakg0sa9y0bHR+40MKAzu9y8U1jqEgciu1wcdPsA4x0NoBV 25wrc86J+t5jrIJum5QltdX81KZI1/a5S6tNI= Received: by 10.142.215.5 with SMTP id n5mr3555844wfg.131.1222897007988; Wed, 01 Oct 2008 14:36:47 -0700 (PDT) Received: by 10.142.80.19 with HTTP; Wed, 1 Oct 2008 14:36:47 -0700 (PDT) Message-ID: Date: Wed, 1 Oct 2008 23:36:47 +0200 From: "Ludovic Rousseau" To: users-prolog@gnu.org MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_61724_16238570.1222897007978" X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Problem with gplpcsc (PC/SC for Prolog) X-BeenThere: users-prolog@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU implementation of Prolog List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2008 21:36:52 -0000 ------=_Part_61724_16238570.1222897007978 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello, I am writing an article about different PC/SC wrapper and found the Prolog wrapper at [1]. I try to use it but can't make my sample to work. I attach my sample progra= m. The output I get is: ATR: [3B FA 94 00 00 81 31 20 43 80 65 A2 01 01 01 3D 72 D6 43 21 ] tr: 00a404000aa00000006203010c0601 - 9000, t=3D 14ms. R=E9ponse : [] SW : [144,0] Application error in transmit APDU de test R=E9ponse : [] SW : [144,0] GNU Prolog 1.3.0 By Daniel Diaz Copyright (C) 1999-2007 Daniel Diaz | ?- I traced the APDU at the pcsc-lite level and the second APDU is not sent. In some cases I could send the two APDU but after restarting the program it failed again. I am not a Prolog expert or even user. I learnt Prolog more than 10 years ago at school :-) Can you help debug my sample? And I have to submit my article in 2 days :-( Thanks a lot for any help, [1] http://gprolog.cvs.sourceforge.net/gprolog/contribs/gplpcsc/ --=20 Dr. Ludovic Rousseau ------=_Part_61724_16238570.1222897007978 Content-Type: text/plain; name=linuxmag.pl Content-Transfer-Encoding: base64 X-Attachment-Id: f_flsh9hr70 Content-Disposition: attachment; filename=linuxmag.pl Oi0gaW5jbHVkZSgncGNzYy9tdXNjbGUnKS4KCnN0YXJ0IDotCglzY2FyZF9lc3RhYmxpc2hfY29u dGV4dCwKCXNjYXJkX2Nvbm5lY3QsCgoJJSBwcmludCBBVFIgZGF0YQoJc2NhcmRfc3RhdHVzKF8s IEF0ciksCglwcmludCgnQVRSOiAnKSwgcHJpbnRfaGV4X2xpc3QoQXRyKSwgbmwsIAoKCSUgZW5h YmxlIHRyYWNlCglzY2FyZF9lbmFibGVfdmVyYm9zZSh0cnVlKSwKCgkoCgkJQ29tbWFuZGUgPSBb MCwweEE0LDQsMCwweDBBLDB4QTAsMCwwLDAsMHg2MiwzLDEsMHgwQyw2LDFdLAoJCXNjYXJkX3Ry YW5zbWl0KENvbW1hbmRlLCBfUmVwb25zZSwgX1N3LCBfVGltZSkgLT4gdHJ1ZQoJOwoJCXByaW50 KCdBcHBsaWNhdGlvbiBlcnJvciBpbiB0cmFuc21pdCBTZWxlY3QgQXBwbGV0JyksIG5sIAoJKSwK CXByaW50KCdSw6lwb25zZSA6ICcpLCBwcmludChfUmVwb25zZSksIG5sLAoJcHJpbnQoJ1NXIDog JyksIHByaW50KF9TdyksIG5sLAoKCSgKCQlDb21tYW5kZSA9IFswLDAsMCwwXSwKCQlzY2FyZF90 cmFuc21pdChDb21tYW5kZSwgX1JlcG9uc2UsIF9TdywgX1RpbWUpIC0+IHRydWUKCTsKCQlwcmlu dCgnQXBwbGljYXRpb24gZXJyb3IgaW4gdHJhbnNtaXQgQVBEVSBkZSB0ZXN0JyksIG5sIAoJKSwK CXByaW50KCdSw6lwb25zZSA6ICcpLCBwcmludChfUmVwb25zZSksIG5sLAoJcHJpbnQoJ1NXIDog JyksIHByaW50KF9TdyksIG5sLgoKOi0gaW5pdGlhbGl6YXRpb24oc3RhcnQpLgo= ------=_Part_61724_16238570.1222897007978-- From MAILER-DAEMON Thu Oct 02 04:22:51 2008 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KlJSV-0002nM-EH for mharc-users-prolog@gnu.org; Thu, 02 Oct 2008 04:22:51 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KlJSS-0002mS-2s for users-prolog@gnu.org; Thu, 02 Oct 2008 04:22:48 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KlJSR-0002m2-6C for users-prolog@gnu.org; Thu, 02 Oct 2008 04:22:47 -0400 Received: from [199.232.76.173] (port=36597 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KlJSQ-0002lu-Uk for users-prolog@gnu.org; Thu, 02 Oct 2008 04:22:47 -0400 Received: from asterix.univ-paris1.fr ([193.55.96.71]:57552) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KlJSQ-00037d-Ft for users-prolog@gnu.org; Thu, 02 Oct 2008 04:22:46 -0400 Received: from lima.univ-paris1.fr (dhcp27-192.univ-paris1.fr [194.214.27.192]) by asterix.univ-paris1.fr (8.13.4/jtpda-5.5pre1) with ESMTP id m928MAfE021510 ; Thu, 2 Oct 2008 10:22:11 +0200 Message-ID: <48E484B2.90700@univ-paris1.fr> Date: Thu, 02 Oct 2008 10:22:10 +0200 From: Daniel Diaz User-Agent: Thunderbird 2.0.0.9 (X11/20071209) MIME-Version: 1.0 To: Ludovic Rousseau References: In-Reply-To: Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0 (asterix.univ-paris1.fr [193.55.96.71]); Thu, 02 Oct 2008 10:22:11 +0200 (CEST) X-up1-MailScanner-Information: Please contact the ISP for more information X-up1-MailScanner: Found to be clean X-up1-MailScanner-From: daniel.diaz@univ-paris1.fr X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Cc: users-prolog@gnu.org, Renaud Mariana Subject: Re: Problem with gplpcsc (PC/SC for Prolog) X-BeenThere: users-prolog@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU implementation of Prolog List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2008 08:22:48 -0000 Hi Ludovic

I forward your message to Renaud Mariana <rmariana@caramail.com> who is the initial contributor of this package.
But I'm not sure he continues maintaining it !

Daniel


Ludovic Rousseau a écrit :
Hello,

I am writing an article about different PC/SC wrapper and found the
Prolog wrapper at [1].

I try to use it but can't make my sample to work. I attach my sample program.
The output I get is:
ATR: [3B FA 94 00 00 81 31 20 43 80 65 A2 01 01 01 3D 72 D6 43 21 ]
tr: 00a404000aa00000006203010c0601 - 9000, t= 14ms.
Réponse : []
SW : [144,0]
Application error in transmit APDU de test
Réponse : []
SW : [144,0]
GNU Prolog 1.3.0
By Daniel Diaz
Copyright (C) 1999-2007 Daniel Diaz
| ?-

I traced the APDU at the pcsc-lite level and the second APDU is not sent.
In some cases I could send the two APDU but after restarting the
program it failed again.

I am not a Prolog expert or even user. I learnt Prolog more than 10
years ago at school :-)

Can you help debug my sample?
And I have to submit my article in 2 days :-(

Thanks a lot for any help,

[1] http://gprolog.cvs.sourceforge.net/gprolog/contribs/gplpcsc/

  

_______________________________________________ Users-prolog mailing list Users-prolog@gnu.org http://lists.gnu.org/mailman/listinfo/users-prolog


--
Ce message a été vérifié par MailScanner
pour des virus ou des polluriels et rien de
suspect n'a été trouvé. From MAILER-DAEMON Thu Oct 02 04:27:36 2008 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KlJX6-0004Sb-M5 for mharc-users-prolog@gnu.org; Thu, 02 Oct 2008 04:27:36 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KlJX4-0004S7-7P for users-prolog@gnu.org; Thu, 02 Oct 2008 04:27:34 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KlJX3-0004Rp-Pi for users-prolog@gnu.org; Thu, 02 Oct 2008 04:27:33 -0400 Received: from [199.232.76.173] (port=58760 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KlJX3-0004Rh-HH for users-prolog@gnu.org; Thu, 02 Oct 2008 04:27:33 -0400 Received: from mail-gx0-f10.google.com ([209.85.217.10]:63982) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KlJX2-00042W-Nn for users-prolog@gnu.org; Thu, 02 Oct 2008 04:27:33 -0400 Received: by gxk3 with SMTP id 3so1192423gxk.18 for ; Thu, 02 Oct 2008 01:27:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=8eRx3kj44MQFH8wWWZXu+Fk8VJQ8i2W9emXJrL5YjPw=; b=AO9QoWuqUc1T1VOFo/gh5e7RxrBChahjAy1FFJFdtcEafKuHZrlsquL8kwC0ZbyNkm uu6zzYlkSVKUth07Zh9qfp4j4DBFz0/R6nnEHoetobu5QG9GtuCOOIMzawszi7j97e+R JJIscH0iSZFTj5E20YeXCLWbd8F3ysQsL2Qsk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=U7wcEAYKY6aN05Ce5dWEb02ovMh6lGjipZqfzWxIh6E2Uwq93wySkS7TuNWYYAV0Pb Bk1MoXH1EL7FTs8MrthKrFnoGqML+yjtQ1GOBUjH+Vh4sLqaY0AZ4JykSvAZBYp2JCnA AZ3SBi1FCoQcE30Gzv9xf0lme2CBAwQnBZaqo= Received: by 10.150.133.17 with SMTP id g17mr6107908ybd.202.1222936051751; Thu, 02 Oct 2008 01:27:31 -0700 (PDT) Received: by 10.151.26.8 with HTTP; Thu, 2 Oct 2008 01:27:31 -0700 (PDT) Message-ID: Date: Thu, 2 Oct 2008 10:27:31 +0200 From: "Ludovic Rousseau" To: "Daniel Diaz" In-Reply-To: <48E484B2.90700@univ-paris1.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <48E484B2.90700@univ-paris1.fr> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Cc: users-prolog@gnu.org, Renaud Mariana Subject: Re: Problem with gplpcsc (PC/SC for Prolog) X-BeenThere: users-prolog@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU implementation of Prolog List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2008 08:27:34 -0000 On Thu, Oct 2, 2008 at 10:22 AM, Daniel Diaz wrote: > Hi Ludovic Hello, > I forward your message to Renaud Mariana who is the > initial contributor of this package. I contacted him first at . But the message came back with : Recipient address rejected: User unknown in local recipient table (state 14). Maybe is the correct email. > But I'm not sure he continues maintaining it ! That would be too bad :-( Thanks -- Dr. Ludovic Rousseau From MAILER-DAEMON Thu Oct 02 04:36:00 2008 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KlJfE-0007jA-LI for mharc-users-prolog@gnu.org; Thu, 02 Oct 2008 04:36:00 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KlJfB-0007eb-Ma for users-prolog@gnu.org; Thu, 02 Oct 2008 04:35:57 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KlJfA-0007cc-32 for users-prolog@gnu.org; Thu, 02 Oct 2008 04:35:56 -0400 Received: from [199.232.76.173] (port=54357 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KlJf9-0007c9-U8 for users-prolog@gnu.org; Thu, 02 Oct 2008 04:35:55 -0400 Received: from asterix.univ-paris1.fr ([193.55.96.71]:36361) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KlJf7-0005Hf-Tn for users-prolog@gnu.org; Thu, 02 Oct 2008 04:35:54 -0400 Received: from lima.univ-paris1.fr (dhcp27-192.univ-paris1.fr [194.214.27.192]) by asterix.univ-paris1.fr (8.13.4/jtpda-5.5pre1) with ESMTP id m928ZiB2031301 ; Thu, 2 Oct 2008 10:35:45 +0200 Message-ID: <48E487E0.8060305@univ-paris1.fr> Date: Thu, 02 Oct 2008 10:35:44 +0200 From: Daniel Diaz User-Agent: Thunderbird 2.0.0.9 (X11/20071209) MIME-Version: 1.0 To: Ludovic Rousseau References: <48E484B2.90700@univ-paris1.fr> In-Reply-To: Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0 (asterix.univ-paris1.fr [193.55.96.71]); Thu, 02 Oct 2008 10:35:46 +0200 (CEST) X-up1-MailScanner-Information: Please contact the ISP for more information X-up1-MailScanner: Found to be clean X-up1-MailScanner-From: daniel.diaz@univ-paris1.fr X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Cc: users-prolog@gnu.org, Renaud Mariana Subject: Re: Problem with gplpcsc (PC/SC for Prolog) X-BeenThere: users-prolog@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU implementation of Prolog List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2008 08:35:58 -0000 Hi Ludovic,

I also saw the mail is no longer valid. I don't know PS/SC so I'm of little help. However, from the Prolog part, if a solution is missing maybe you should force a backtrack to obtain it.
Try to change your code as follows:

:- initialization(start0).

start0 :-
	start, 
	fail.
start0 :-
	write('no more solutions'), nl.
NB: the initialization now calls start0 which calls start and force backtracking with fail. When no more solution exists the second clause of start0 is executed, which simply shows a message.

Hope this helps


Ludovic Rousseau a écrit :
On Thu, Oct 2, 2008 at 10:22 AM, Daniel Diaz <Daniel.Diaz@univ-paris1.fr> wrote:
  
Hi Ludovic
    

Hello,

  
I forward your message to Renaud Mariana <rmariana@caramail.com> who is the
initial contributor of this package.
    

I contacted him first at <renaud.mariana@caramail.com>. But the
message came back with <renaud.mariana@caramail.com>: Recipient
address rejected: User unknown in local recipient table (state 14).

Maybe <rmariana@caramail.com> is the correct email.

  
But I'm not sure he continues maintaining it !
    

That would be too bad :-(

Thanks

  


--
Ce message a été vérifié par MailScanner
pour des virus ou des polluriels et rien de
suspect n'a été trouvé. From MAILER-DAEMON Fri Oct 03 05:24:19 2008 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KlgtX-0000iG-Lh for mharc-users-prolog@gnu.org; Fri, 03 Oct 2008 05:24:19 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KlgtV-0000g4-LT for users-prolog@gnu.org; Fri, 03 Oct 2008 05:24:17 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KlgtT-0000eD-VN for users-prolog@gnu.org; Fri, 03 Oct 2008 05:24:17 -0400 Received: from [199.232.76.173] (port=47737 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KlgtT-0000dw-P8 for users-prolog@gnu.org; Fri, 03 Oct 2008 05:24:15 -0400 Received: from wf-out-1314.google.com ([209.85.200.173]:3552) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KlgtT-0005tB-E3 for users-prolog@gnu.org; Fri, 03 Oct 2008 05:24:15 -0400 Received: by wf-out-1314.google.com with SMTP id 28so1501762wfc.24 for ; Fri, 03 Oct 2008 02:24:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=tdNaWWc0MTLm2xFh5RmSjZUAaxMdX+CTYudz0JS4Q3Q=; b=EcajkEYX07+nN4OufHHm+xKcLg/OfiqNO5XweebVLNz19sVfT8G11DGCEEULw/FEOd B6DaHZsxw4tD/rrQmd/nf1S+5Q2dxoQis3dO3+syz5EGjC+XBfjC4RWWHVWGX86gRT7w OYKJQgphNj8RagZ4IkUa4dtXy5DwNHPwAmabU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=M5DxcS2sg22GGisJ+0QHd40ssyU+U5fOBNAb+OxXQexnUZD5/TgXa8pMjFdUvgg6IT rvEOLyABlLG2FpsR/qPwzSsWNHwimS5xUdUx7Udf5fs4V/ZAjdnsB5unlsPa1fXTKLEb tL8giKaFq4tW9n/GQipPDy5bPq35T+eH0ir5Y= Received: by 10.142.14.20 with SMTP id 20mr272524wfn.299.1223025853488; Fri, 03 Oct 2008 02:24:13 -0700 (PDT) Received: by 10.142.80.19 with HTTP; Fri, 3 Oct 2008 02:24:13 -0700 (PDT) Message-ID: Date: Fri, 3 Oct 2008 11:24:13 +0200 From: "Ludovic Rousseau" To: "Daniel Diaz" In-Reply-To: <48E487E0.8060305@univ-paris1.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <48E484B2.90700@univ-paris1.fr> <48E487E0.8060305@univ-paris1.fr> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Cc: users-prolog@gnu.org, Renaud Mariana Subject: Re: Problem with gplpcsc (PC/SC for Prolog) X-BeenThere: users-prolog@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU implementation of Prolog List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2008 09:24:17 -0000 On Thu, Oct 2, 2008 at 10:35 AM, Daniel Diaz wrote: > Hi Ludovic, > > I also saw the mail is no longer valid. I don't know PS/SC so I'm of little > help. However, from the Prolog part, if a solution is missing maybe you > should force a backtrack to obtain it. > Try to change your code as follows: > > :- initialization(start0). > > start0 :- > start, > fail. > start0 :- > write('no more solutions'), nl. > > NB: the initialization now calls start0 which calls start and force > backtracking with fail. When no more solution exists the second clause of > start0 is executed, which simply shows a message. > > Hope this helps In was not a bug in the PC/SC wrapper but a bug in my Prolog code. I did not wrote Prolog code since 10 or 15 years ago :-) I think Prolog was trying to unified the two Commande variable but they had two different values. My program is now working and is: :- include('pcsc/muscle'). start :- scard_establish_context, scard_connect, % print ATR data scard_status(_, Atr), print('ATR: '), print_hex_list(Atr), nl, % enable trace scard_enable_verbose(true), Commande = [0,0xA4,4,0,0x0A,0xA0,0,0,0,0x62,3,1,0x0C,6,1], scard_transmit(Commande, _ApduOut1, _Sw1, _Time1), print_hex_list(_ApduOut1), print_hex_list(_Sw1), nl, scard_transmit([0xA0,0x0,0,0,0], _ApduOut2, _Sw2, _Time2), print_hex_list(_ApduOut2), print_hex_list(_Sw2), nl. :- initialization(start). Thanks for your time -- Dr. Ludovic Rousseau From MAILER-DAEMON Sun Oct 05 19:19:06 2008 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KmcsT-0000sY-Ts for mharc-users-prolog@gnu.org; Sun, 05 Oct 2008 19:19:05 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KmcsS-0000rP-FL for users-prolog@gnu.org; Sun, 05 Oct 2008 19:19:04 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KmcsQ-0000rD-0d for users-prolog@gnu.org; Sun, 05 Oct 2008 19:19:03 -0400 Received: from [199.232.76.173] (port=49018 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KmcsP-0000rA-Qh for users-prolog@gnu.org; Sun, 05 Oct 2008 19:19:01 -0400 Received: from mail-gx0-f10.google.com ([209.85.217.10]:48722) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KmcsP-00013E-7N for users-prolog@gnu.org; Sun, 05 Oct 2008 19:19:01 -0400 Received: by gxk3 with SMTP id 3so4590907gxk.18 for ; Sun, 05 Oct 2008 16:18:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=n10PNu+tgCRYRHGuCkThIfHz0Ma+1tMtGqJrgL6j2Nw=; b=M++OXuGAlSW3oaL2jaK52lOzqiJVOrzIltwFHOBj7D3ELU8lEVH9ABb7Sy4JABGJBx lPQNvg7MTUJ9qmUOAkMzVLC1NYhSUh4sNReaAYEBq6q2kHvbDPXn2pLVQurJF6cHQAjM fPhSX6j5c6qDPsreLeaXlz4ydh66c8sUuVTFc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=XjKueLFCLidoqVaqCBi8RWsmoTZtxlcu7tuugUD1hE4dQhxBM+n2MtDdD4kYlacnOK QANyL92UMf6hLUPxtJcsc3N03K0pIW7WvqRk5gYhaVvJ/vcvJXo4FoczQl/Ztdp92Nua a4IHR+lOley9gL6rXp+db9ElHBhwgmnQ4EmAg= Received: by 10.90.84.17 with SMTP id h17mr4825717agb.3.1223248739865; Sun, 05 Oct 2008 16:18:59 -0700 (PDT) Received: by 10.90.81.6 with HTTP; Sun, 5 Oct 2008 16:18:59 -0700 (PDT) Message-ID: <5327a2e30810051618o7fb44285qdbead4fe062ec9ed@mail.gmail.com> Date: Mon, 6 Oct 2008 01:18:59 +0200 From: "ferrety ferrety" To: users-prolog@gnu.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Link GProlog engine to C code ? X-BeenThere: users-prolog@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU implementation of Prolog List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Oct 2008 23:19:05 -0000 Hi, I'm new to this list. I'd like to know if it's possible to embed GProlog in some C code as an external library or be able to call the GProlog engine in a way or another from C. Need so IA in my C code. Thanks in advance Regards Ferrert From MAILER-DAEMON Mon Oct 06 13:02:46 2008 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KmtTq-0003C5-16 for mharc-users-prolog@gnu.org; Mon, 06 Oct 2008 13:02:46 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KmtTn-0003Am-VR for users-prolog@gnu.org; Mon, 06 Oct 2008 13:02:44 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KmtTl-00038v-36 for users-prolog@gnu.org; Mon, 06 Oct 2008 13:02:43 -0400 Received: from [199.232.76.173] (port=60140 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KmtTk-00038p-Rf for users-prolog@gnu.org; Mon, 06 Oct 2008 13:02:40 -0400 Received: from babayaga.neotext.ca ([68.148.0.174]:61646 helo=neotext.ca) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KmtTi-0004q0-Op for users-prolog@gnu.org; Mon, 06 Oct 2008 13:02:39 -0400 Received: from gate.indx.ca (dhu@[68.148.0.251]) by neotext.ca (8.13.8/8.13.8) with SMTP id m96H0pQ8052996; Mon, 6 Oct 2008 11:00:51 -0600 (CST) (envelope-from campbell@neotext.ca) DKIM-Signature: a=rsa-sha256; c=simple/simple; d=neotext.ca; s=babayaga; t=1223312451; bh=QEOp4zBYUPd6jRa6rI8sbGIrBUX7+Ou35zDSTtr+q/U=; h=Date: From:To:Subject:Message-Id:In-Reply-To:References:Organization: X-Mailer:Mime-Version:Content-Type:Content-Transfer-Encoding; b=MGn B6VxTd9eVr51+xWs3DFfzBe8h5gzicw5XeWvjsvxfGcV0A20ILIp2//XRVcllo1ZlXP 82V7Uzi1s1Qw+hUfLLoYayH5J7MuoRMEV5tHeY/eFcbQ6ZMchqvJHuBY5Xn8ewgbtjU xLLND4Pa+uVVvWi61zK06mksoXLbCA3TtY= Date: Mon, 6 Oct 2008 11:02:28 -0600 From: Duncan Patton a Campbell To: users-prolog@gnu.org, yferrety@gmail.com Message-Id: <20081006110228.5bf5a1e8.campbell@neotext.ca> In-Reply-To: <200810061601.m96G1e09052447@neotext.ca> References: <200810061601.m96G1e09052447@neotext.ca> Organization: NeoText X-Mailer: Sylpheed 2.4.5 (GTK+ 2.12.9; i386-unknown-openbsd4.3) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: FreeBSD 6.x (1) Cc: Subject: Re: Users-prolog Digest, Vol 67, Issue 3 X-BeenThere: users-prolog@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU implementation of Prolog List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Oct 2008 17:02:44 -0000 Howdy? To be short, yes. And there are good examples in the ExamplesC directory of the Gprolog distribution. The MySQL linkage code also provides some good examples of how to do this. Dhu On Mon, 06 Oct 2008 12:00:35 -0400 users-prolog-request@gnu.org wrote: > Send Users-prolog mailing list submissions to > users-prolog@gnu.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://lists.gnu.org/mailman/listinfo/users-prolog > or, via email, send a message with subject or body 'help' to > users-prolog-request@gnu.org > > You can reach the person managing the list at > users-prolog-owner@gnu.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Users-prolog digest..." > > > Today's Topics: > > 1. Link GProlog engine to C code ? (ferrety ferrety) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 6 Oct 2008 01:18:59 +0200 > From: "ferrety ferrety" > Subject: Link GProlog engine to C code ? > To: users-prolog@gnu.org > Message-ID: > <5327a2e30810051618o7fb44285qdbead4fe062ec9ed@mail.gmail.com> > Content-Type: text/plain; charset=ISO-8859-1 > > Hi, > > I'm new to this list. > > I'd like to know if it's possible to embed GProlog in some C code as > an external library or be able to call the GProlog > engine in a way or another from C. > > Need so IA in my C code. > > Thanks in advance > > Regards > Ferrert > > > > > ------------------------------ > > _______________________________________________ > Users-prolog mailing list > Users-prolog@gnu.org > http://lists.gnu.org/mailman/listinfo/users-prolog > > > End of Users-prolog Digest, Vol 67, Issue 3 > ******************************************* > From MAILER-DAEMON Tue Oct 07 13:05:40 2008 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KnG0C-0002eF-3P for mharc-users-prolog@gnu.org; Tue, 07 Oct 2008 13:05:40 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KnG0A-0002df-Oz for users-prolog@gnu.org; Tue, 07 Oct 2008 13:05:38 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KnG09-0002cq-16 for users-prolog@gnu.org; Tue, 07 Oct 2008 13:05:38 -0400 Received: from [199.232.76.173] (port=37882 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KnG08-0002cl-T7 for users-prolog@gnu.org; Tue, 07 Oct 2008 13:05:36 -0400 Received: from mail-gx0-f10.google.com ([209.85.217.10]:63501) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KnG08-00047E-Il for users-prolog@gnu.org; Tue, 07 Oct 2008 13:05:36 -0400 Received: by gxk3 with SMTP id 3so7091323gxk.18 for ; Tue, 07 Oct 2008 10:05:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=QFNPoPuUSyJx5XAlE//6cirv2a+zTfn1dUSBxTM0uLI=; b=q20N1nH7blNjlAZhWXCg+oB0TSACPet2BEPuayxEbOIsDGPlFFdoOfdPlofKpD6dzK Job4uskuPuD7smheLAOScjmn1xVFtpHVEgQXHzhAgs5ayLF0JH95IDpzxKPc8j9pKpgY C0Aaej8cg62ZiJolaiIz2ASi6XzRWAr9pCwXM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=TAMakTCFHOxz45qDhVierx5/uD76uh2nsR0vpkUtehK16R24ymrtBwnSRoOFnCesvM Ebf+/d+y2O+IlS/ohNh0MuYMkBGnwbn/c8C5NoIyk+5s3CseaNRnhMwq7qSm5CzNe/zK hjw9X9dtCDboltXOTrMnblUW2WUSckwxNW0oo= Received: by 10.142.193.13 with SMTP id q13mr2832493wff.118.1223399134026; Tue, 07 Oct 2008 10:05:34 -0700 (PDT) Received: by 10.142.141.3 with HTTP; Tue, 7 Oct 2008 10:05:34 -0700 (PDT) Message-ID: <7321d3a00810071005v395b5664keb615fd0042d66aa@mail.gmail.com> Date: Tue, 7 Oct 2008 14:05:34 -0300 From: "Marcello Azambuja" To: users-prolog@gnu.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_61198_791957.1223399134048" X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Compilation error on Mac OS X 10.5.5 X-BeenThere: users-prolog@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU implementation of Prolog List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Oct 2008 17:05:39 -0000 ------=_Part_61198_791957.1223399134048 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, I'm trying to compile gprolog on my MacBook Pro running Mac OS X 10.5.5 (Darwin 9.5.0) with gcc 4.0.1. I tried downloading gprolog-1.3.0.tar.gz but could not compile it (configure && make): ... gplc -o pl2wam --no-fd-lib --min-bips pl2wam.o read_file.o bip_list.o syn_sugar.o internal.o code_gen.o reg_alloc.o inst_codif.o first_arg.o indexing.o wam_emit.o collect2: ld terminated with signal 10 [Bus error] Undefined symbol: predicate($pl_query_recover_alt/0) Undefined symbol: predicate($pl_query_recover_alt/0) compilation failed make[1]: *** [pl2wam] Error 1 make: *** [all] Error 1 I also tried 'port install gprolog' but got the same error (it basically does the same that I did). I searched the list archives but could only find a message from two years ago suggesting to use gcc 3.x. Any help is appreciated. Regards, Marcello Azambuja ------=_Part_61198_791957.1223399134048 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
Hi,

I'm trying to compile gprolog on my MacBook Pro running Mac OS X 10.5.5 (Darwin 9.5.0) with gcc 4.0.1.

I tried downloading gprolog-1.3.0.tar.gz but could not compile it (configure && make):

...
gplc -o pl2wam --no-fd-lib --min-bips pl2wam.o read_file.o bip_list.o syn_sugar.o internal.o code_gen.o reg_alloc.o inst_codif.o first_arg.o indexing.o wam_emit.o
collect2: ld terminated with signal 10 [Bus error]
Undefined symbol: predicate($pl_query_recover_alt/0)
Undefined symbol: predicate($pl_query_recover_alt/0)
compilation failed
make[1]: *** [pl2wam] Error 1
make: *** [all] Error 1

I also tried 'port install gprolog' but got the same error (it basically does the same that I did).

I searched the list archives but could only find a message from two years ago suggesting to use gcc 3.x.

Any help is appreciated.

Regards,

Marcello Azambuja
------=_Part_61198_791957.1223399134048-- From MAILER-DAEMON Tue Oct 07 21:19:08 2008 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KnNhk-00039U-F0 for mharc-users-prolog@gnu.org; Tue, 07 Oct 2008 21:19:08 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KnNhj-00039A-9Y for users-prolog@gnu.org; Tue, 07 Oct 2008 21:19:07 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KnNhi-00038q-B8 for users-prolog@gnu.org; Tue, 07 Oct 2008 21:19:07 -0400 Received: from [199.232.76.173] (port=54132 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KnNhi-00038n-54 for users-prolog@gnu.org; Tue, 07 Oct 2008 21:19:06 -0400 Received: from wf-out-1314.google.com ([209.85.200.174]:61631) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KnNhh-0006tN-DK for users-prolog@gnu.org; Tue, 07 Oct 2008 21:19:06 -0400 Received: by wf-out-1314.google.com with SMTP id 28so3675573wfc.24 for ; Tue, 07 Oct 2008 18:19:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=Cs0O5rGvNhUCY+UD9Xd0CIeewc/6m6j7bJUmtkZUoQo=; b=WEJhoDhGxKgNbSyEznyeWj38N4cRPUJ3JGPbVUFkQZuTkHoQxA72zV8YCQoiDrdKV2 8ZaPI3cFCg/BEBFgEDEU4DHELSgI/ug5bXls4YiNQwxjoa1KysDlmy2fzq8RKodB1Gzs uIXqy0OVkVTq3Y1iUi1L1Q6My1bRx6jNmzTFY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=xlJbfAMlBEXmb31aRa6XoLEpFhk2BvENu2aJKj5azyb1uPyHqw9T+KwWmEWjy8HJqU elZOY+nstZ3B3Nty5p83v5wuYIvANWFnzbCnCa2HVLgUbbOAWuhsV98niqhiuAZvB4vD F/2cQjjxDg/YTwEJP7TbOVkzHW2TLtPNmDis4= Received: by 10.142.223.4 with SMTP id v4mr3110931wfg.48.1223428742838; Tue, 07 Oct 2008 18:19:02 -0700 (PDT) Received: by 10.142.141.3 with HTTP; Tue, 7 Oct 2008 18:19:02 -0700 (PDT) Message-ID: <7321d3a00810071819m3c50338ft47cced24220df556@mail.gmail.com> Date: Tue, 7 Oct 2008 22:19:02 -0300 From: "Marcello Azambuja" To: users-prolog@gnu.org In-Reply-To: <7321d3a00810071005v395b5664keb615fd0042d66aa@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_67368_4760667.1223428742852" References: <7321d3a00810071005v395b5664keb615fd0042d66aa@mail.gmail.com> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: Compilation error on Mac OS X 10.5.5 X-BeenThere: users-prolog@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU implementation of Prolog List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Oct 2008 01:19:07 -0000 ------=_Part_67368_4760667.1223428742852 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline As a follow up, I tried to compile it in a different Mac, with same MacOS X 10.5.5 (Darwin 9.5.0) and gcc 4.0.1. But in this new machine everything compiled fine, so I checked ld version: Not working: $ ld -v @(#)PROGRAM:ld PROJECT:ld64-82.5 Working: $ ld -v @(#)PROGRAM:ld PROJECT:ld64-85 I could also find in google that other people had the very same problem with other projects and some could get it solved running: ./configure --with-ld=/usr/bin/ld_classic But as far as I could check gprolog's configure ignores this option and I could not find any way to force ld_classic to be used. ld_classic version is also older in the machine that is not working: Not working: $ ld_classic -v Apple Computer, Inc. version cctools-667.3~112 Working: $ ld_classic -v Apple Computer, Inc. version cctools-668~13 I'll try to update the not-working machine, hope that will solve the problem. -- Marcello Azambuja On Tue, Oct 7, 2008 at 2:05 PM, Marcello Azambuja wrote: > Hi, > > I'm trying to compile gprolog on my MacBook Pro running Mac OS X 10.5.5 > (Darwin 9.5.0) with gcc 4.0.1. > > I tried downloading gprolog-1.3.0.tar.gz but could not compile it > (configure && make): > > ... > gplc -o pl2wam --no-fd-lib --min-bips pl2wam.o read_file.o bip_list.o > syn_sugar.o internal.o code_gen.o reg_alloc.o inst_codif.o first_arg.o > indexing.o wam_emit.o > collect2: ld terminated with signal 10 [Bus error] > Undefined symbol: predicate($pl_query_recover_alt/0) > Undefined symbol: predicate($pl_query_recover_alt/0) > compilation failed > make[1]: *** [pl2wam] Error 1 > make: *** [all] Error 1 > > I also tried 'port install gprolog' but got the same error (it basically > does the same that I did). > > I searched the list archives but could only find a message from two years > ago suggesting to use gcc 3.x. > > Any help is appreciated. > > Regards, > > Marcello Azambuja > ------=_Part_67368_4760667.1223428742852 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
As a follow up, I tried to compile it in a different Mac, with same MacOS X 10.5.5 (Darwin 9.5.0) and gcc 4.0.1.

But in this new machine everything compiled fine, so I checked ld version:

Not working:
$ ld -v
@(#)PROGRAM:ld  PROJECT:ld64-82.5

Working:
$ ld -v
@(#)PROGRAM:ld  PROJECT:ld64-85

I could also find in google that other people had the very same problem with other projects and some could get it solved running:

./configure --with-ld=/usr/bin/ld_classic

But as far as I could check gprolog's configure ignores this option and I could not find any way to force ld_classic to be used.

ld_classic version is also older in the machine that is not working:

Not working:
$ ld_classic -v
Apple Computer, Inc. version cctools-667.3~112

Working:
$ ld_classic -v
Apple Computer, Inc. version cctools-668~13

I'll try to update the not-working machine, hope that will solve the problem.

--
Marcello Azambuja

On Tue, Oct 7, 2008 at 2:05 PM, Marcello Azambuja <azambuja@gmail.com> wrote:
Hi,

I'm trying to compile gprolog on my MacBook Pro running Mac OS X 10.5.5 (Darwin 9.5.0) with gcc 4.0.1.

I tried downloading gprolog-1.3.0.tar.gz but could not compile it (configure && make):

...
gplc -o pl2wam --no-fd-lib --min-bips pl2wam.o read_file.o bip_list.o syn_sugar.o internal.o code_gen.o reg_alloc.o inst_codif.o first_arg.o indexing.o wam_emit.o
collect2: ld terminated with signal 10 [Bus error]
Undefined symbol: predicate($pl_query_recover_alt/0)
Undefined symbol: predicate($pl_query_recover_alt/0)
compilation failed
make[1]: *** [pl2wam] Error 1
make: *** [all] Error 1

I also tried 'port install gprolog' but got the same error (it basically does the same that I did).

I searched the list archives but could only find a message from two years ago suggesting to use gcc 3.x.

Any help is appreciated.

Regards,

Marcello Azambuja

------=_Part_67368_4760667.1223428742852-- From MAILER-DAEMON Tue Oct 07 22:54:12 2008 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KnPBk-00043Y-GG for mharc-users-prolog@gnu.org; Tue, 07 Oct 2008 22:54:12 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KnPBi-00042c-PL for users-prolog@gnu.org; Tue, 07 Oct 2008 22:54:10 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KnPBh-00042P-6Y for users-prolog@gnu.org; Tue, 07 Oct 2008 22:54:09 -0400 Received: from [199.232.76.173] (port=35589 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KnPBh-00042K-1J for users-prolog@gnu.org; Tue, 07 Oct 2008 22:54:09 -0400 Received: from rv-out-0708.google.com ([209.85.198.247]:38841) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KnPBg-0000vw-98 for users-prolog@gnu.org; Tue, 07 Oct 2008 22:54:08 -0400 Received: by rv-out-0708.google.com with SMTP id k29so4358605rvb.6 for ; Tue, 07 Oct 2008 19:54:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=QEcyTbr3EqNlgvcCI3KFnmmeuaKXFG1vohHaHnmdrjw=; b=w43c7nSCU97HvowLjhd8lvrLyrxSDZbHE0b1ZlF4eeKC96JNZnjX7CztefenDwihMj 3QeveE7gRvAFEVGcfyFjxAeDc7SQeqi2+BqeIh+5JHLJ8/hHz955mmyis0vZk1fi+VXq zTUP2vp8Zi8XaZ4ACcjiv8Pk+fvANmqiBhQiA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=qXSnpqFhkjGUHEVY/TrLUewPjRjSpRzNiurGDeWAxssi4c5Z965J9RVy/Xd5pOgjhu GyxZITbnESIYPgRmNozGcZ0iwKT2uGk3YpUszW7v8oinIuGyLGSdGyNdCIaEEhsU8Vzn qF3fXGUOZbd+a30J0bbAUgDnjjeTAIVp1h27Y= Received: by 10.142.180.19 with SMTP id c19mr3132244wff.322.1223434446107; Tue, 07 Oct 2008 19:54:06 -0700 (PDT) Received: by 10.142.141.3 with HTTP; Tue, 7 Oct 2008 19:54:05 -0700 (PDT) Message-ID: <7321d3a00810071954j70bd6c5bjbec3b9d431fa54cc@mail.gmail.com> Date: Tue, 7 Oct 2008 23:54:06 -0300 From: "Marcello Azambuja" To: users-prolog@gnu.org In-Reply-To: <7321d3a00810071819m3c50338ft47cced24220df556@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_68034_9119814.1223434446118" References: <7321d3a00810071005v395b5664keb615fd0042d66aa@mail.gmail.com> <7321d3a00810071819m3c50338ft47cced24220df556@mail.gmail.com> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: Compilation error on Mac OS X 10.5.5 X-BeenThere: users-prolog@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU implementation of Prolog List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Oct 2008 02:54:11 -0000 ------=_Part_68034_9119814.1223434446118 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline As I suspected I upgraded my XCode (3.1 beta) to XCode 3.1.1 and that upgraded ld and everything else: $ ld -v @(#)PROGRAM:ld PROJECT:ld64-82.5 $ ld_classic -v Apple Computer, Inc. version cctools-667.3~112 After the upgrade: $ ld -v @(#)PROGRAM:ld PROJECT:ld64-85.2.1 $ ld_classic -v Apple Computer, Inc. version cctools-698.1~1 Everything is working fine now, seems ld 82.5 had a bug in it, XCode upgrade fixed the problem. :) $ ./gprolog --version Prolog top-Level (GNU Prolog) 1.3.0 By Daniel Diaz Copyright (C) 1999-2007 Daniel Diaz -- Marcello Azambuja On Tue, Oct 7, 2008 at 10:19 PM, Marcello Azambuja wrote: > As a follow up, I tried to compile it in a different Mac, with same MacOS X > 10.5.5 (Darwin 9.5.0) and gcc 4.0.1. > > But in this new machine everything compiled fine, so I checked ld version: > > Not working: > $ ld -v > @(#)PROGRAM:ld PROJECT:ld64-82.5 > > Working: > $ ld -v > @(#)PROGRAM:ld PROJECT:ld64-85 > > I could also find in google that other people had the very same problem > with other projects and some could get it solved running: > > ./configure --with-ld=/usr/bin/ld_classic > > But as far as I could check gprolog's configure ignores this option and I > could not find any way to force ld_classic to be used. > > ld_classic version is also older in the machine that is not working: > > Not working: > $ ld_classic -v > Apple Computer, Inc. version cctools-667.3~112 > > Working: > $ ld_classic -v > Apple Computer, Inc. version cctools-668~13 > > I'll try to update the not-working machine, hope that will solve the > problem. > > -- > Marcello Azambuja > > > On Tue, Oct 7, 2008 at 2:05 PM, Marcello Azambuja wrote: > >> Hi, >> >> I'm trying to compile gprolog on my MacBook Pro running Mac OS X 10.5.5 >> (Darwin 9.5.0) with gcc 4.0.1. >> >> I tried downloading gprolog-1.3.0.tar.gz but could not compile it >> (configure && make): >> >> ... >> gplc -o pl2wam --no-fd-lib --min-bips pl2wam.o read_file.o bip_list.o >> syn_sugar.o internal.o code_gen.o reg_alloc.o inst_codif.o first_arg.o >> indexing.o wam_emit.o >> collect2: ld terminated with signal 10 [Bus error] >> Undefined symbol: predicate($pl_query_recover_alt/0) >> Undefined symbol: predicate($pl_query_recover_alt/0) >> compilation failed >> make[1]: *** [pl2wam] Error 1 >> make: *** [all] Error 1 >> >> I also tried 'port install gprolog' but got the same error (it basically >> does the same that I did). >> >> I searched the list archives but could only find a message from two years >> ago suggesting to use gcc 3.x. >> >> Any help is appreciated. >> >> Regards, >> >> Marcello Azambuja >> > > ------=_Part_68034_9119814.1223434446118 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
As I suspected I upgraded my XCode (3.1 beta) to XCode 3.1.1 and that upgraded ld and everything else:

$ ld -v
@(#)PROGRAM:ld  PROJECT:ld64-82.5
$ ld_classic -v
Apple Computer, Inc. version cctools-667.3~112

After the upgrade:

$ ld -v
@(#)PROGRAM:ld  PROJECT:ld64-85.2.1
$ ld_classic -v
Apple Computer, Inc. version cctools-698.1~1

Everything is working fine now, seems ld 82.5 had a bug in it, XCode upgrade fixed the problem. :)

$ ./gprolog --version
Prolog top-Level (GNU Prolog) 1.3.0
By Daniel Diaz
Copyright (C) 1999-2007 Daniel Diaz

--
Marcello Azambuja

On Tue, Oct 7, 2008 at 10:19 PM, Marcello Azambuja <azambuja@gmail.com> wrote:
As a follow up, I tried to compile it in a different Mac, with same MacOS X 10.5.5 (Darwin 9.5.0) and gcc 4.0.1.

But in this new machine everything compiled fine, so I checked ld version:

Not working:
$ ld -v
@(#)PROGRAM:ld  PROJECT:ld64-82.5

Working:
$ ld -v
@(#)PROGRAM:ld  PROJECT:ld64-85

I could also find in google that other people had the very same problem with other projects and some could get it solved running:

./configure --with-ld=/usr/bin/ld_classic

But as far as I could check gprolog's configure ignores this option and I could not find any way to force ld_classic to be used.

ld_classic version is also older in the machine that is not working:

Not working:
$ ld_classic -v
Apple Computer, Inc. version cctools-667.3~112

Working:
$ ld_classic -v
Apple Computer, Inc. version cctools-668~13

I'll try to update the not-working machine, hope that will solve the problem.

--
Marcello Azambuja


On Tue, Oct 7, 2008 at 2:05 PM, Marcello Azambuja <azambuja@gmail.com> wrote:
Hi,

I'm trying to compile gprolog on my MacBook Pro running Mac OS X 10.5.5 (Darwin 9.5.0) with gcc 4.0.1.

I tried downloading gprolog-1.3.0.tar.gz but could not compile it (configure && make):

...
gplc -o pl2wam --no-fd-lib --min-bips pl2wam.o read_file.o bip_list.o syn_sugar.o internal.o code_gen.o reg_alloc.o inst_codif.o first_arg.o indexing.o wam_emit.o
collect2: ld terminated with signal 10 [Bus error]
Undefined symbol: predicate($pl_query_recover_alt/0)
Undefined symbol: predicate($pl_query_recover_alt/0)
compilation failed
make[1]: *** [pl2wam] Error 1
make: *** [all] Error 1

I also tried 'port install gprolog' but got the same error (it basically does the same that I did).

I searched the list archives but could only find a message from two years ago suggesting to use gcc 3.x.

Any help is appreciated.

Regards,

Marcello Azambuja


------=_Part_68034_9119814.1223434446118-- From MAILER-DAEMON Mon Oct 13 07:56:48 2008 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KpM2Z-0006as-U7 for mharc-users-prolog@gnu.org; Mon, 13 Oct 2008 07:56:47 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KpM2Y-0006am-6H for users-prolog@gnu.org; Mon, 13 Oct 2008 07:56:46 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KpM2X-0006aa-HR for users-prolog@gnu.org; Mon, 13 Oct 2008 07:56:45 -0400 Received: from [199.232.76.173] (port=52712 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KpM2X-0006aX-5v for users-prolog@gnu.org; Mon, 13 Oct 2008 07:56:45 -0400 Received: from ecl04.servers.ec-lyon.fr ([156.18.19.4]:34197) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KpM2W-0001QX-Jv for users-prolog@gnu.org; Mon, 13 Oct 2008 07:56:45 -0400 Received: from localhost (smtp1.crinet.ec-lyon.fr [156.18.17.201]) by ecl04.servers.ec-lyon.fr (Postfix) with ESMTP id 204FB37A228; Mon, 13 Oct 2008 13:55:11 +0200 (CEST) X-Virus-Scanned: by amavisd with F-secure at ec-lyon.fr Received: from ecl04.servers.ec-lyon.fr ([127.0.0.1]) by localhost (ecl04.servers.ec-lyon.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MtGEyFzgyy2y; Mon, 13 Oct 2008 13:55:09 +0200 (CEST) Received: from [156.18.37.56] (safran.mi.ec-lyon.fr [156.18.37.56]) by ecl04.servers.ec-lyon.fr (Postfix) with ESMTP id F3F4837A1F6; Mon, 13 Oct 2008 13:55:08 +0200 (CEST) Message-ID: <48F33B44.4060207@ec-lyon.fr> Date: Mon, 13 Oct 2008 14:12:52 +0200 From: Alexandre Saidi User-Agent: Thunderbird 2.0.0.17 (X11/20080914) MIME-Version: 1.0 To: Marcello Azambuja References: <7321d3a00810071005v395b5664keb615fd0042d66aa@mail.gmail.com> <7321d3a00810071819m3c50338ft47cced24220df556@mail.gmail.com> <7321d3a00810071954j70bd6c5bjbec3b9d431fa54cc@mail.gmail.com> In-Reply-To: <7321d3a00810071954j70bd6c5bjbec3b9d431fa54cc@mail.gmail.com> Content-Type: multipart/mixed; boundary="------------090507090102060904000103" X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6 Cc: users-prolog@gnu.org Subject: Re: Compilation error on Mac OS X 10.5.5 X-BeenThere: users-prolog@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU implementation of Prolog List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Oct 2008 11:56:46 -0000 This is a multi-part message in MIME format. --------------090507090102060904000103 Content-Type: multipart/alternative; boundary="------------090305050303080304060201" --------------090305050303080304060201 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Thanks to all for that help. I did it on a G5 PPC. It works fine. Traces are the same as you. Cheers Alex Marcello Azambuja a =E9crit : > As I suspected I upgraded my XCode (3.1 beta) to XCode 3.1.1 and that=20 > upgraded ld and everything else: > > $ ld -v > @(#)PROGRAM:ld PROJECT:ld64-82.5 > $ ld_classic -v > Apple Computer, Inc. version cctools-667.3~112 > > After the upgrade: > > $ ld -v > @(#)PROGRAM:ld PROJECT:ld64-85.2.1 > $ ld_classic -v > Apple Computer, Inc. version cctools-698.1~1 > > Everything is working fine now, seems ld 82.5 had a bug in it, XCode=20 > upgrade fixed the problem. :) > > $ ./gprolog --version > Prolog top-Level (GNU Prolog) 1.3.0 > By Daniel Diaz > Copyright (C) 1999-2007 Daniel Diaz > > --=20 > Marcello Azambuja > > On Tue, Oct 7, 2008 at 10:19 PM, Marcello Azambuja > wrote: > > As a follow up, I tried to compile it in a different Mac, with > same MacOS X 10.5.5 (Darwin 9.5.0) and gcc 4.0.1. > > But in this new machine everything compiled fine, so I checked ld > version: > > Not working: > $ ld -v > @(#)PROGRAM:ld PROJECT:ld64-82.5 > > Working: > $ ld -v > @(#)PROGRAM:ld PROJECT:ld64-85 > > I could also find in google that other people had the very same > problem with other projects and some could get it solved running: > > ./configure --with-ld=3D/usr/bin/ld_classic > > But as far as I could check gprolog's configure ignores this > option and I could not find any way to force ld_classic to be used. > > ld_classic version is also older in the machine that is not working= : > > Not working: > $ ld_classic -v > Apple Computer, Inc. version cctools-667.3~112 > > Working: > $ ld_classic -v > Apple Computer, Inc. version cctools-668~13 > > I'll try to update the not-working machine, hope that will solve > the problem. > > --=20 > Marcello Azambuja > > > On Tue, Oct 7, 2008 at 2:05 PM, Marcello Azambuja > > wrote: > > Hi, > > I'm trying to compile gprolog on my MacBook Pro running Mac OS > X 10.5.5 (Darwin 9.5.0) with gcc 4.0.1. > > I tried downloading gprolog-1.3.0.tar.gz but could not compile > it (configure && make): > > ... > gplc -o pl2wam --no-fd-lib --min-bips pl2wam.o read_file.o > bip_list.o syn_sugar.o internal.o code_gen.o reg_alloc.o > inst_codif.o first_arg.o indexing.o wam_emit.o > collect2: ld terminated with signal 10 [Bus error] > Undefined symbol: predicate($pl_query_recover_alt/0) > Undefined symbol: predicate($pl_query_recover_alt/0) > compilation failed > make[1]: *** [pl2wam] Error 1 > make: *** [all] Error 1 > > I also tried 'port install gprolog' but got the same error (it > basically does the same that I did). > > I searched the list archives but could only find a message > from two years ago suggesting to use gcc 3.x. > > Any help is appreciated. > > Regards, > > Marcello Azambuja > > > > -----------------------------------------------------------------------= - > > _______________________________________________ > Users-prolog mailing list > Users-prolog@gnu.org > http://lists.gnu.org/mailman/listinfo/users-prolog > =20 --=20 Alexandre S. Saidi Ma=EEtre de Conf=E9rences Ecole Centrale de Lyon D=E9partement Math=E9matiques-Informatique M=E9l : Alexandre.Saidi@ec-lyon.fr T=E9l : 04.72.18.65.30, Fax : 04.72.18.64.43 --------------090305050303080304060201 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Thanks to  all for that help.
I did it on a G5 PPC.
It works fine.
Traces are the same as you.

Cheers
Alex


Marcello Azambuja a écrit :
As I suspected I upgraded my XCode (3.1 beta) to XCode 3.1.1 and that upgraded ld and everything else:

$ ld -v
@(#)PROGRAM:ld  PROJECT:ld64-82.5
$ ld_classic -v
Apple Computer, Inc. version cctools-667.3~112

After the upgrade:

$ ld -v
@(#)PROGRAM:ld  PROJECT:ld64-85.2.1
$ ld_classic -v
Apple Computer, Inc. version cctools-698.1~1

Everything is working fine now, seems ld 82.5 had a bug in it, XCode upgrade fixed the problem. :)

$ ./gprolog --version
Prolog top-Level (GNU Prolog) 1.3.0
By Daniel Diaz
Copyright (C) 1999-2007 Daniel Diaz

--
Marcello Azambuja

On Tue, Oct 7, 2008 at 10:19 PM, Marcello Azambuja <azambuja@gmail.com> wrote:
As a follow up, I tried to compile it in a different Mac, with same MacOS X 10.5.5 (Darwin 9.5.0) and gcc 4.0.1.

But in this new machine everything compiled fine, so I checked ld version:

Not working:
$ ld -v
@(#)PROGRAM:ld  PROJECT:ld64-82.5

Working:
$ ld -v
@(#)PROGRAM:ld  PROJECT:ld64-85

I could also find in google that other people had the very same problem with other projects and some could get it solved running:

./configure --with-ld=/usr/bin/ld_classic

But as far as I could check gprolog's configure ignores this option and I could not find any way to force ld_classic to be used.

ld_classic version is also older in the machine that is not working:

Not working:
$ ld_classic -v
Apple Computer, Inc. version cctools-667.3~112

Working:
$ ld_classic -v
Apple Computer, Inc. version cctools-668~13

I'll try to update the not-working machine, hope that will solve the problem.

--
Marcello Azambuja


On Tue, Oct 7, 2008 at 2:05 PM, Marcello Azambuja <azambuja@gmail.com> wrote:
Hi,

I'm trying to compile gprolog on my MacBook Pro running Mac OS X 10.5.5 (Darwin 9.5.0) with gcc 4.0.1.

I tried downloading gprolog-1.3.0.tar.gz but could not compile it (configure && make):

...
gplc -o pl2wam --no-fd-lib --min-bips pl2wam.o read_file.o bip_list.o syn_sugar.o internal.o code_gen.o reg_alloc.o inst_codif.o first_arg.o indexing.o wam_emit.o
collect2: ld terminated with signal 10 [Bus error]
Undefined symbol: predicate($pl_query_recover_alt/0)
Undefined symbol: predicate($pl_query_recover_alt/0)
compilation failed
make[1]: *** [pl2wam] Error 1
make: *** [all] Error 1

I also tried 'port install gprolog' but got the same error (it basically does the same that I did).

I searched the list archives but could only find a message from two years ago suggesting to use gcc 3.x.

Any help is appreciated.

Regards,

Marcello Azambuja



_______________________________________________ Users-prolog mailing list Users-prolog@gnu.org http://lists.gnu.org/mailman/listinfo/users-prolog

-- 
Alexandre S. Saidi
Maître de Conférences
Ecole Centrale de Lyon
Département Mathématiques-Informatique
Mél : Alexandre.Saidi@ec-lyon.fr
Tél : 04.72.18.65.30, Fax : 04.72.18.64.43
--------------090305050303080304060201-- --------------090507090102060904000103 Content-Type: text/x-vcard; charset=utf-8; name="Alexandre_Saidi.vcf" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="Alexandre_Saidi.vcf" begin:vcard fn:A-S Saidi n:A-S Saidi;A-S org:Ecole Centrale de Lyon;LIRIS- UMR 5205 CNRS adr;dom:;;36 ave Guy de Collongue;Ecully;Rhone;69134 email;internet:alexandre.saidi@liris.cnrs.fr title;quoted-printable:Ma=C3=AEtre de Conf=C3=A9rences tel;work:04 72 18 65 30 tel;fax:04 78 33 16 15 x-mozilla-html:TRUE version:2.1 end:vcard --------------090507090102060904000103-- From MAILER-DAEMON Sun Oct 19 20:40:37 2008 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Krip3-0003ab-A7 for mharc-users-prolog@gnu.org; Sun, 19 Oct 2008 20:40:37 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Krip1-0003a5-Gp for users-prolog@gnu.org; Sun, 19 Oct 2008 20:40:35 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Krip0-0003ZN-8s for users-prolog@gnu.org; Sun, 19 Oct 2008 20:40:34 -0400 Received: from [199.232.76.173] (port=49434 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Krip0-0003ZH-2C for users-prolog@gnu.org; Sun, 19 Oct 2008 20:40:34 -0400 Received: from wf-out-1314.google.com ([209.85.200.170]:12185) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Krioz-0000j0-JD for users-prolog@gnu.org; Sun, 19 Oct 2008 20:40:33 -0400 Received: by wf-out-1314.google.com with SMTP id 28so1625835wfc.24 for ; Sun, 19 Oct 2008 17:40:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=v7M2wpHFNrI8Uj+QMIG/gDsOijh4rg7AP4MCMAeY74A=; b=IBZQ3mJggF5+vXP2CDB+3J+na20GSgD/TEYpC1A351pQdY/vyTUxVBxhNA8UtNCNG9 8vkwrcpWhDMqrc4Is7PwOi0R8Sfr6uhvvhtoq4aioaeubnjnIqsJofe28FQV3FX6oCWL cEx28GQby2f54MXHAk3EhRRiXkSgoZtNtn9Eo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=TPMFLAW6pWAceXckfuXIIGgFcp4877SZl0FKH/N6n9fjPK+FQmYR+vXHzxhSuQYugh wOrZBgj3IBBb6eWFgQQyNNnvuVz4//WwUF/eq6ZeVnlyCDdgFiUAhdqa4PZZsVrrFEhb Aed1FuL9/ILxixcnzWBJoAruYLeT+AB2qobKU= Received: by 10.142.178.2 with SMTP id a2mr2711275wff.221.1224463232271; Sun, 19 Oct 2008 17:40:32 -0700 (PDT) Received: by 10.142.241.9 with HTTP; Sun, 19 Oct 2008 17:40:32 -0700 (PDT) Message-ID: Date: Mon, 20 Oct 2008 02:40:32 +0200 From: Idomeneo To: users-prolog@gnu.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_85248_5832809.1224463232273" X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Cannot link from gcc 3.x.x, using gplc object X-BeenThere: users-prolog@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU implementation of Prolog List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Oct 2008 00:40:35 -0000 ------=_Part_85248_5832809.1224463232273 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello, I'm trying to compile and linking the example main_new (in folder ExamplesC, in gprolog folder) from my gcc 3.4.6 (instead than gplc [1.3.0], likewise the book taught) and I cannot do that! That's how I'm trying: - Create two object files with: $> gcc -c -o new_main_c.c -I ../src/EnginePl $> gplc -c new_main.pl ( with option "-I", I'm simply telling to gcc where to find gprolog.h) - Linking them together with gcc with: $> gcc -o new_main new_main.o new_main_c.o -lbips_fd -lbips_pl -lengine_pl -lengine_fd -llinedit -L ../src/EnginePl -L ../src/BipsPl -L ../src/BipsFD -L ../src/EngineFD -L ../src/Linedit/ (with "-L" options I tell to the gcc where to find libraries) It seems pretty clear (almost to me) but it doesn't work at all and I absolutely can't figure out why!! Below you can see output of what I get when I try to compile like I write above: /usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): In function `Fct_Round': arith_inl_c.c:(.text+0x75a): undefined reference to `lrint' /usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): In function `Fct_Floor': arith_inl_c.c:(.text+0x7ba): undefined reference to `floor' /usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): In function `Fct_Ceiling': arith_inl_c.c:(.text+0x83a): undefined reference to `ceil' /usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): In function `Fct_Atan': arith_inl_c.c:(.text+0x1553): undefined reference to `atan' /usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): In function `Fct_Sqrt': arith_inl_c.c:(.text+0x15d9): undefined reference to `sqrt' /usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): In function `Fct_Pow': arith_inl_c.c:(.text+0x166c): undefined reference to `pow' /usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): In function `Fct_Log': arith_inl_c.c:(.text+0x16e3): undefined reference to `log' /usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): In function `Fct_Exp': arith_inl_c.c:(.text+0x1743): undefined reference to `exp' /usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): In function `Fct_Asin': arith_inl_c.c:(.text+0x17a3): undefined reference to `asin' /usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): In function `Fct_Sin': arith_inl_c.c:(.text+0x1803): undefined reference to `sin' /usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): In function `Fct_Acos': arith_inl_c.c:(.text+0x1863): undefined reference to `acos' /usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): In function `Fct_Cos': arith_inl_c.c:(.text+0x18c3): undefined reference to `cos' /usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(os_interf_c.o): In function `Select_5': os_interf_c.c:(.text+0x43e): undefined reference to `fmod' collect2: ld returned 1 exit status I don't know what to try or do, any advice or help would be nice; I really need to get rid of this! Thank you really much! Idomeneo ------=_Part_85248_5832809.1224463232273 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline

Hello,

I'm trying to compile and linking the example main_new (in folder ExamplesC, in gprolog folder) from my gcc 3.4.6 (instead than gplc [1.3.0], likewise the book taught) and I cannot do that!

That's how I'm trying:

- Create two object files with:

$> gcc -c -o new_main_c.c -I ../src/EnginePl
$> gplc -c new_main.pl

( with option "-I", I'm simply telling to gcc where to find gprolog.h)

- Linking them together with gcc with:

$>   gcc -o new_main new_main.o new_main_c.o -lbips_fd -lbips_pl -lengine_pl -lengine_fd -llinedit -L ../src/EnginePl -L ../src/BipsPl -L ../src/BipsFD -L ../src/EngineFD -L ../src/Linedit/

(with "-L" options I tell to the gcc where to find libraries)

It seems pretty clear (almost to me) but it doesn't work at all and I absolutely can't figure out why!!
Below you can see output of what I get when I try to compile like I write above:

/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): In function `Fct_Round':
arith_inl_c.c:(.text+0x75a): undefined reference to `lrint'
/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): In function `Fct_Floor':
arith_inl_c.c:(.text+0x7ba): undefined reference to `floor'
/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): In function `Fct_Ceiling':
arith_inl_c.c:(.text+0x83a): undefined reference to `ceil'
/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): In function `Fct_Atan':
arith_inl_c.c:(.text+0x1553): undefined reference to `atan'
/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): In function `Fct_Sqrt':
arith_inl_c.c:(.text+0x15d9): undefined reference to `sqrt'
/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): In function `Fct_Pow':
arith_inl_c.c:(.text+0x166c): undefined reference to `pow'
/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): In function `Fct_Log':
arith_inl_c.c:(.text+0x16e3): undefined reference to `log'
/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): In function `Fct_Exp':
arith_inl_c.c:(.text+0x1743): undefined reference to `exp'
/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): In function `Fct_Asin':
arith_inl_c.c:(.text+0x17a3): undefined reference to `asin'
/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): In function `Fct_Sin':
arith_inl_c.c:(.text+0x1803): undefined reference to `sin'
/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): In function `Fct_Acos':
arith_inl_c.c:(.text+0x1863): undefined reference to `acos'
/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): In function `Fct_Cos':
arith_inl_c.c:(.text+0x18c3): undefined reference to `cos'
/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(os_interf_c.o): In function `Select_5':
os_interf_c.c:(.text+0x43e): undefined reference to `fmod'
collect2: ld returned 1 exit status

I don't know what to try or do, any advice or help would be nice; I really need to get rid of this!
Thank you really much!

Idomeneo


------=_Part_85248_5832809.1224463232273-- From MAILER-DAEMON Sun Oct 19 21:28:56 2008 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KrjZo-0006U5-Hw for mharc-users-prolog@gnu.org; Sun, 19 Oct 2008 21:28:56 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KrjZm-0006Tr-79 for users-prolog@gnu.org; Sun, 19 Oct 2008 21:28:54 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KrjZk-0006Tf-V4 for users-prolog@gnu.org; Sun, 19 Oct 2008 21:28:53 -0400 Received: from [199.232.76.173] (port=56108 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KrjZk-0006Tb-RK for users-prolog@gnu.org; Sun, 19 Oct 2008 21:28:52 -0400 Received: from wf-out-1314.google.com ([209.85.200.173]:19189) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KrjZk-0004Gz-8d for users-prolog@gnu.org; Sun, 19 Oct 2008 21:28:52 -0400 Received: by wf-out-1314.google.com with SMTP id 28so1640085wfc.24 for ; Sun, 19 Oct 2008 18:28:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=w352QRg0uN7C6b5X7XqP7aAYaLriFa2TWpD2fuO10pM=; b=qtOWR/8g5gdIYfhM8zOLyx9KETG4a2F2NUu0H0eEZQ4uk4wPSgqqMwRsHVMBstyEsT 0uSBm/AmsouQPqGGLYBdQocJ1Pl1tcl9a12cGfKOyV4WPvazedAkvnxeihhy9ftdrMgA gUv0lM1R1PHqeffIq0x8ILPBeHYb16Ekj+u/M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=BOUQ9AWaqp7ClcMl20RGlevCVPhoWy0Vp/HwUnUNxHCUxqnnuomLlsV/ftyfV2brk8 HDUfcOc8dgfe4gbYofYM1HTEeGvEqSifXCzVbvEhnFGTPs63iT3FhD0KuABtnZ1cCT2J Aui8KV1HUU27JnvgDKmjwEi9P9tQTxhTLpi5U= Received: by 10.142.254.8 with SMTP id b8mr2748180wfi.58.1224466130498; Sun, 19 Oct 2008 18:28:50 -0700 (PDT) Received: by 10.142.49.16 with HTTP; Sun, 19 Oct 2008 18:28:50 -0700 (PDT) Message-ID: <7321d3a00810191828v18465981pcc8a1f8f144514df@mail.gmail.com> Date: Sun, 19 Oct 2008 23:28:50 -0200 From: "Marcello Azambuja" To: Idomeneo In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_97059_9746546.1224466130484" References: X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Cc: users-prolog@gnu.org Subject: Re: Cannot link from gcc 3.x.x, using gplc object X-BeenThere: users-prolog@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU implementation of Prolog List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Oct 2008 01:28:54 -0000 ------=_Part_97059_9746546.1224466130484 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Sun, Oct 19, 2008 at 10:40 PM, Idomeneo wrote: > Hello, > > I'm trying to compile and linking the example main_new (in folder > ExamplesC, in gprolog folder) from my gcc 3.4.6 (instead than gplc [1.3.0], > likewise the book taught) and I cannot do that! > > That's how I'm trying: > > - Create two object files with: > > $> gcc -c -o new_main_c.c -I ../src/EnginePl > $> gplc -c new_main.pl > > ( with option "-I", I'm simply telling to gcc where to find gprolog.h) > > - Linking them together with gcc with: > > $> gcc -o new_main new_main.o new_main_c.o -lbips_fd -lbips_pl > -lengine_pl -lengine_fd -llinedit -L ../src/EnginePl -L ../src/BipsPl -L > ../src/BipsFD -L ../src/EngineFD -L ../src/Linedit/ > > (with "-L" options I tell to the gcc where to find libraries) > > It seems pretty clear (almost to me) but it doesn't work at all and I > absolutely can't figure out why!! > Below you can see output of what I get when I try to compile like I write > above: > > /usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): > In function `Fct_Round': > arith_inl_c.c:(.text+0x75a): undefined reference to `lrint' > /usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): > In function `Fct_Floor': > arith_inl_c.c:(.text+0x7ba): undefined reference to `floor' > /usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): > In function `Fct_Ceiling': > arith_inl_c.c:(.text+0x83a): undefined reference to `ceil' > /usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): > In function `Fct_Atan': > arith_inl_c.c:(.text+0x1553): undefined reference to `atan' > /usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): > In function `Fct_Sqrt': > arith_inl_c.c:(.text+0x15d9): undefined reference to `sqrt' > /usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): > In function `Fct_Pow': > arith_inl_c.c:(.text+0x166c): undefined reference to `pow' > /usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): > In function `Fct_Log': > arith_inl_c.c:(.text+0x16e3): undefined reference to `log' > /usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): > In function `Fct_Exp': > arith_inl_c.c:(.text+0x1743): undefined reference to `exp' > /usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): > In function `Fct_Asin': > arith_inl_c.c:(.text+0x17a3): undefined reference to `asin' > /usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): > In function `Fct_Sin': > arith_inl_c.c:(.text+0x1803): undefined reference to `sin' > /usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): > In function `Fct_Acos': > arith_inl_c.c:(.text+0x1863): undefined reference to `acos' > /usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): > In function `Fct_Cos': > arith_inl_c.c:(.text+0x18c3): undefined reference to `cos' > /usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(os_interf_c.o): > In function `Select_5': > os_interf_c.c:(.text+0x43e): undefined reference to `fmod' > collect2: ld returned 1 exit status > > I don't know what to try or do, any advice or help would be nice; I really > need to get rid of this! > Thank you really much! > > Idomeneo > Looks like you forgot to link with '-lm', try adding it to your command line: gcc -o new_main new_main.o new_main_c.o -lm -lbips_fd -lbips_pl -lengine_pl -lengine_fd -llinedit -L ../src/EnginePl -L ../src/BipsPl -L ../src/BipsFD -L ../src/EngineFD -L ../src/Linedit/ That should solve the undefined references to math lib. -- Marcello Azambuja ------=_Part_97059_9746546.1224466130484 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
On Sun, Oct 19, 2008 at 10:40 PM, Idomeneo <wam.idomeneo@gmail.com> wrote:

Hello,

I'm trying to compile and linking the example main_new (in folder ExamplesC, in gprolog folder) from my gcc 3.4.6 (instead than gplc [1.3.0], likewise the book taught) and I cannot do that!

That's how I'm trying:

- Create two object files with:

$> gcc -c -o new_main_c.c -I ../src/EnginePl
$> gplc -c new_main.pl

( with option "-I", I'm simply telling to gcc where to find gprolog.h)

- Linking them together with gcc with:

$>   gcc -o new_main new_main.o new_main_c.o -lbips_fd -lbips_pl -lengine_pl -lengine_fd -llinedit -L ../src/EnginePl -L ../src/BipsPl -L ../src/BipsFD -L ../src/EngineFD -L ../src/Linedit/

(with "-L" options I tell to the gcc where to find libraries)

It seems pretty clear (almost to me) but it doesn't work at all and I absolutely can't figure out why!!
Below you can see output of what I get when I try to compile like I write above:

/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): In function `Fct_Round':
arith_inl_c.c:(.text+0x75a): undefined reference to `lrint'
/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): In function `Fct_Floor':
arith_inl_c.c:(.text+0x7ba): undefined reference to `floor'
/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): In function `Fct_Ceiling':
arith_inl_c.c:(.text+0x83a): undefined reference to `ceil'
/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): In function `Fct_Atan':
arith_inl_c.c:(.text+0x1553): undefined reference to `atan'
/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): In function `Fct_Sqrt':
arith_inl_c.c:(.text+0x15d9): undefined reference to `sqrt'
/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): In function `Fct_Pow':
arith_inl_c.c:(.text+0x166c): undefined reference to `pow'
/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): In function `Fct_Log':
arith_inl_c.c:(.text+0x16e3): undefined reference to `log'
/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): In function `Fct_Exp':
arith_inl_c.c:(.text+0x1743): undefined reference to `exp'
/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): In function `Fct_Asin':
arith_inl_c.c:(.text+0x17a3): undefined reference to `asin'
/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): In function `Fct_Sin':
arith_inl_c.c:(.text+0x1803): undefined reference to `sin'
/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): In function `Fct_Acos':
arith_inl_c.c:(.text+0x1863): undefined reference to `acos'
/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): In function `Fct_Cos':
arith_inl_c.c:(.text+0x18c3): undefined reference to `cos'
/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(os_interf_c.o): In function `Select_5':
os_interf_c.c:(.text+0x43e): undefined reference to `fmod'
collect2: ld returned 1 exit status

I don't know what to try or do, any advice or help would be nice; I really need to get rid of this!
Thank you really much!

Idomeneo


Looks like you forgot to link with '-lm', try adding it to your command line:

gcc -o new_main new_main.o new_main_c.o -lm -lbips_fd -lbips_pl -lengine_pl -lengine_fd -llinedit -L ../src/EnginePl -L ../src/BipsPl -L ../src/BipsFD -L ../src/EngineFD -L ../src/Linedit/

That should solve the undefined references to math lib.

--
Marcello Azambuja
------=_Part_97059_9746546.1224466130484-- From MAILER-DAEMON Mon Oct 20 06:16:51 2008 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Krroh-0006zm-0n for mharc-users-prolog@gnu.org; Mon, 20 Oct 2008 06:16:51 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Krrof-0006zM-BI for users-prolog@gnu.org; Mon, 20 Oct 2008 06:16:49 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Krroe-0006yw-BQ for users-prolog@gnu.org; Mon, 20 Oct 2008 06:16:48 -0400 Received: from [199.232.76.173] (port=41030 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Krroe-0006yp-6c for users-prolog@gnu.org; Mon, 20 Oct 2008 06:16:48 -0400 Received: from asterix.univ-paris1.fr ([193.55.96.71]:59035) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Krrod-0004Cq-OP for users-prolog@gnu.org; Mon, 20 Oct 2008 06:16:48 -0400 Received: from lima.univ-paris1.fr (cri-lima.univ-paris1.fr [194.214.27.228]) by asterix.univ-paris1.fr (8.13.4/jtpda-5.5pre1) with ESMTP id m9KAGggb012427 ; Mon, 20 Oct 2008 12:16:43 +0200 Message-ID: <48FC5A8A.3090201@univ-paris1.fr> Date: Mon, 20 Oct 2008 12:16:42 +0200 From: Daniel Diaz User-Agent: Thunderbird 2.0.0.16 (X11/20080919) MIME-Version: 1.0 To: Idomeneo References: In-Reply-To: Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0 (asterix.univ-paris1.fr [193.55.96.71]); Mon, 20 Oct 2008 12:16:43 +0200 (CEST) X-up1-MailScanner-Information: Please contact the ISP for more information X-up1-MailScanner: Found to be clean X-up1-MailScanner-From: daniel.diaz@univ-paris1.fr X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Cc: users-prolog@gnu.org Subject: Re: Cannot link from gcc 3.x.x, using gplc object X-BeenThere: users-prolog@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU implementation of Prolog List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Oct 2008 10:16:49 -0000 Idomeneo a écrit :

The best way to do this is to use the -v option of gplc to see how it invokes gcc. Then you adapt the command-line.
Similarly for the link phase (you will see gplc also includes -lm for math).

Good luck

Hello,

I'm trying to compile and linking the example main_new (in folder ExamplesC, in gprolog folder) from my gcc 3.4.6 (instead than gplc [1.3.0], likewise the book taught) and I cannot do that!

That's how I'm trying:

- Create two object files with:

$> gcc -c -o new_main_c.c -I ../src/EnginePl
$> gplc -c new_main.pl

( with option "-I", I'm simply telling to gcc where to find gprolog.h)

- Linking them together with gcc with:

$>   gcc -o new_main new_main.o new_main_c.o -lbips_fd -lbips_pl -lengine_pl -lengine_fd -llinedit -L ../src/EnginePl -L ../src/BipsPl -L ../src/BipsFD -L ../src/EngineFD -L ../src/Linedit/

(with "-L" options I tell to the gcc where to find libraries)

It seems pretty clear (almost to me) but it doesn't work at all and I absolutely can't figure out why!!
Below you can see output of what I get when I try to compile like I write above:

/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): In function `Fct_Round':
arith_inl_c.c:(.text+0x75a): undefined reference to `lrint'
/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): In function `Fct_Floor':
arith_inl_c.c:(.text+0x7ba): undefined reference to `floor'
/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): In function `Fct_Ceiling':
arith_inl_c.c:(.text+0x83a): undefined reference to `ceil'
/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): In function `Fct_Atan':
arith_inl_c.c:(.text+0x1553): undefined reference to `atan'
/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): In function `Fct_Sqrt':
arith_inl_c.c:(.text+0x15d9): undefined reference to `sqrt'
/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): In function `Fct_Pow':
arith_inl_c.c:(.text+0x166c): undefined reference to `pow'
/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): In function `Fct_Log':
arith_inl_c.c:(.text+0x16e3): undefined reference to `log'
/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): In function `Fct_Exp':
arith_inl_c.c:(.text+0x1743): undefined reference to `exp'
/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): In function `Fct_Asin':
arith_inl_c.c:(.text+0x17a3): undefined reference to `asin'
/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): In function `Fct_Sin':
arith_inl_c.c:(.text+0x1803): undefined reference to `sin'
/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): In function `Fct_Acos':
arith_inl_c.c:(.text+0x1863): undefined reference to `acos'
/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(arith_inl_c.o): In function `Fct_Cos':
arith_inl_c.c:(.text+0x18c3): undefined reference to `cos'
/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(os_interf_c.o): In function `Select_5':
os_interf_c.c:(.text+0x43e): undefined reference to `fmod'
collect2: ld returned 1 exit status

I don't know what to try or do, any advice or help would be nice; I really need to get rid of this!
Thank you really much!

Idomeneo



--
Ce message a été vérifié par MailScanner
pour des virus ou des polluriels et rien de
suspect n'a été trouvé.

_______________________________________________ Users-prolog mailing list Users-prolog@gnu.org http://lists.gnu.org/mailman/listinfo/users-prolog


--
Ce message a été vérifié par MailScanner
pour des virus ou des polluriels et rien de
suspect n'a été trouvé. From MAILER-DAEMON Mon Oct 20 08:13:53 2008 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Krtdx-0006jH-2k for mharc-users-prolog@gnu.org; Mon, 20 Oct 2008 08:13:53 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Krtds-0006hK-Gj for users-prolog@gnu.org; Mon, 20 Oct 2008 08:13:48 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Krtdq-0006gA-FG for users-prolog@gnu.org; Mon, 20 Oct 2008 08:13:47 -0400 Received: from [199.232.76.173] (port=59309 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Krtdp-0006fu-S4 for users-prolog@gnu.org; Mon, 20 Oct 2008 08:13:46 -0400 Received: from yw-out-1718.google.com ([74.125.46.155]:9767) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Krtdp-0002nj-NT for users-prolog@gnu.org; Mon, 20 Oct 2008 08:13:45 -0400 Received: by yw-out-1718.google.com with SMTP id 9so277646ywk.66 for ; Mon, 20 Oct 2008 05:13:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=uUrF2oGb2Ve2pFdoLIvw2ADY02o76uL+MyWNGs7977E=; b=ilWp7zYEavZly2Sx9BYLFhp2OOZNBUMCIPx+GsCBArZl80L4MFH7JIx2uJBJpq1qtR UK+qvEBZECDfdc+jJX8YHiJSqo2Q/g+d0A8SgIG86CPdXAF6xu4sRZYTPHfMtOIVmOlE BLSAuFL4/3icdOhfHAAZSjLnFBmRBwT42itFg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=MIQY7APAaT/ZbIfcL3dXSQcSSxcJG/jwyYqk3lSRCgt0Vcrls0UHGrrlNiAGiHp2UN wwS7G5i4ymZ9/q+D+/hwbwtGQPVjUy86MHWKEdpk3Yd4qSEKXFDBBksJfduP8T1FJ7W+ 51UGyHHiTI3W2vqy9/so4RI/RmX5O+8wVpzkU= Received: by 10.142.201.3 with SMTP id y3mr3033479wff.5.1224504823772; Mon, 20 Oct 2008 05:13:43 -0700 (PDT) Received: by 10.142.241.9 with HTTP; Mon, 20 Oct 2008 05:13:43 -0700 (PDT) Message-ID: Date: Mon, 20 Oct 2008 14:13:43 +0200 From: Idomeneo To: users-prolog@gnu.org In-Reply-To: <48FC5A8A.3090201@univ-paris1.fr> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_91885_7925567.1224504823763" References: <48FC5A8A.3090201@univ-paris1.fr> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: Cannot link from gcc 3.x.x, using gplc object X-BeenThere: users-prolog@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU implementation of Prolog List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Oct 2008 12:13:49 -0000 ------=_Part_91885_7925567.1224504823763 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Thanks to both of you for the wise advices. Now everything works fine! :-) Idomeneo 2008/10/20 Daniel Diaz > Idomeneo a =E9crit : > > The best way to do this is to use the -v option of gplc to see how it > invokes gcc. Then you adapt the command-line. > Similarly for the link phase (you will see gplc also includes -lm for > math). > > Good luck > > Hello, > > I'm trying to compile and linking the example main_new (in folder > ExamplesC, in gprolog folder) from my gcc 3.4.6 (instead than gplc [1.3.0= ], > likewise the book taught) and I cannot do that! > > That's how I'm trying: > > - Create two object files with: > > $> gcc -c -o new_main_c.c -I ../src/EnginePl > $> gplc -c new_main.pl > > ( with option "-I", I'm simply telling to gcc where to find gprolog.h) > > - Linking them together with gcc with: > > $> gcc -o new_main new_main.o new_main_c.o -lbips_fd -lbips_pl > -lengine_pl -lengine_fd -llinedit -L ../src/EnginePl -L ../src/BipsPl -L > ../src/BipsFD -L ../src/EngineFD -L ../src/Linedit/ > > (with "-L" options I tell to the gcc where to find libraries) > > It seems pretty clear (almost to me) but it doesn't work at all and I > absolutely can't figure out why!! > Below you can see output of what I get when I try to compile like I write > above: > > /usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(a= rith_inl_c.o): > In function `Fct_Round': > arith_inl_c.c:(.text+0x75a): undefined reference to `lrint' > /usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(a= rith_inl_c.o): > In function `Fct_Floor': > arith_inl_c.c:(.text+0x7ba): undefined reference to `floor' > /usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(a= rith_inl_c.o): > In function `Fct_Ceiling': > arith_inl_c.c:(.text+0x83a): undefined reference to `ceil' > /usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(a= rith_inl_c.o): > In function `Fct_Atan': > arith_inl_c.c:(.text+0x1553): undefined reference to `atan' > /usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(a= rith_inl_c.o): > In function `Fct_Sqrt': > arith_inl_c.c:(.text+0x15d9): undefined reference to `sqrt' > /usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(a= rith_inl_c.o): > In function `Fct_Pow': > arith_inl_c.c:(.text+0x166c): undefined reference to `pow' > /usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(a= rith_inl_c.o): > In function `Fct_Log': > arith_inl_c.c:(.text+0x16e3): undefined reference to `log' > /usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(a= rith_inl_c.o): > In function `Fct_Exp': > arith_inl_c.c:(.text+0x1743): undefined reference to `exp' > /usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(a= rith_inl_c.o): > In function `Fct_Asin': > arith_inl_c.c:(.text+0x17a3): undefined reference to `asin' > /usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(a= rith_inl_c.o): > In function `Fct_Sin': > arith_inl_c.c:(.text+0x1803): undefined reference to `sin' > /usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(a= rith_inl_c.o): > In function `Fct_Acos': > arith_inl_c.c:(.text+0x1863): undefined reference to `acos' > /usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(a= rith_inl_c.o): > In function `Fct_Cos': > arith_inl_c.c:(.text+0x18c3): undefined reference to `cos' > /usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(o= s_interf_c.o): > In function `Select_5': > os_interf_c.c:(.text+0x43e): undefined reference to `fmod' > collect2: ld returned 1 exit status > > I don't know what to try or do, any advice or help would be nice; I reall= y > need to get rid of this! > Thank you really much! > > Idomeneo > > > > -- > Ce message a =E9t=E9 v=E9rifi=E9 par *MailScanner* > pour des virus ou des polluriels et rien de > suspect n'a =E9t=E9 trouv=E9. > > ------------------------------ > > _______________________________________________ > Users-prolog mailing listUsers-prolog@gnu.orghttp://lists.gnu.org/mailman= /listinfo/users-prolog > > > > -- > Ce message a =E9t=E9 v=E9rifi=E9 par *MailScanner* > pour des virus ou des polluriels et rien de > suspect n'a =E9t=E9 trouv=E9. ------=_Part_91885_7925567.1224504823763 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline

Thanks to both of you for the wise advices.
Now ever= ything works fine! :-)

Idomeneo

20= 08/10/20 Daniel Diaz
<Daniel.Diaz@univ-paris1.fr>

=20
Idomeneo a =E9crit :

The best way to do this is to use the -v option of gplc to see how it invokes gcc. Then you adapt the command-line.
Similarly for the link phase (you will see gplc also includes -lm for math).

Good luck

Hello,

I'm trying to compile and linking the example main_new (in folder ExamplesC, in gprolog folder) from my gcc 3.4.6 (instead than gplc [1.3.0], likewise the book taught) and I cannot do that!

That's how I'm trying:

- Create two object files with:

$> gcc -c -o new_main_c.c -I ../src/EnginePl
$> gplc -c new_main.pl

( with option "-I", I'm simply telling to gcc where to f= ind gprolog.h)

- Linking them together with gcc with:

$>   gcc -o new_main new_main.o new_main_c.o -lbips_fd -lbips_pl -lengine_pl -lengine_fd -llinedit -L ../src/EnginePl -L ../src/BipsPl -L ../src/BipsFD -L ../src/EngineFD -L ../src/Linedit/

(with "-L" options I tell to the gcc where to find libraries= )

It seems pretty clear (almost to me) but it doesn't work at all and I absolutely can't figure out why!!
Below you can see output of what I get when I try to compile like I write above:

/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.= a(arith_inl_c.o): In function `Fct_Round':
arith_inl_c.c:(.text+0x75a): undefined reference to `lrint'
/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(ari= th_inl_c.o): In function `Fct_Floor':
arith_inl_c.c:(.text+0x7ba): undefined reference to `floor'
/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(ari= th_inl_c.o): In function `Fct_Ceiling':
arith_inl_c.c:(.text+0x83a): undefined reference to `ceil'
/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(ari= th_inl_c.o): In function `Fct_Atan':
arith_inl_c.c:(.text+0x1553): undefined reference to `atan'
/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(ari= th_inl_c.o): In function `Fct_Sqrt':
arith_inl_c.c:(.text+0x15d9): undefined reference to `sqrt'
/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(ari= th_inl_c.o): In function `Fct_Pow':
arith_inl_c.c:(.text+0x166c): undefined reference to `pow'
/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(ari= th_inl_c.o): In function `Fct_Log':
arith_inl_c.c:(.text+0x16e3): undefined reference to `log'
/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(ari= th_inl_c.o): In function `Fct_Exp':
arith_inl_c.c:(.text+0x1743): undefined reference to `exp'
/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(ari= th_inl_c.o): In function `Fct_Asin':
arith_inl_c.c:(.text+0x17a3): undefined reference to `asin'
/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(ari= th_inl_c.o): In function `Fct_Sin':
arith_inl_c.c:(.text+0x1803): undefined reference to `sin'
/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(ari= th_inl_c.o): In function `Fct_Acos':
arith_inl_c.c:(.text+0x1863): undefined reference to `acos'
/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(ari= th_inl_c.o): In function `Fct_Cos':
arith_inl_c.c:(.text+0x18c3): undefined reference to `cos'
/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libbips_pl.a(os_= interf_c.o): In function `Select_5':
os_interf_c.c:(.text+0x43e): undefined reference to `fmod'
collect2: ld returned 1 exit status

I don't know what to try or do, any advice or help would be nice; I really need to get rid of this!
Thank you really much!

Idomeneo



--
Ce message a =E9t=E9 v=E9rifi=E9 par MailScanner=
pour des virus ou des polluriels et rien de
suspect n'a =E9t=E9 trouv=E9.

_______________________________________________ Users-prolog mailing list Users-prolog@gnu.= org http://lists.gnu.org/mailman/listinfo/users-prolog


--=20
Ce message a =E9t=E9 v=E9rifi=E9 par MailScanner
pour des virus ou des polluriels et rien de
suspect n'a =E9t=E9 trouv=E9.


------=_Part_91885_7925567.1224504823763-- From MAILER-DAEMON Tue Oct 28 01:15:13 2008 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KugvB-0000zS-Q4 for mharc-users-prolog@gnu.org; Tue, 28 Oct 2008 01:15:13 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KuZ7e-000486-IL for users-prolog@gnu.org; Mon, 27 Oct 2008 16:55:34 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KuZ7b-00047C-2B for users-prolog@gnu.org; Mon, 27 Oct 2008 16:55:34 -0400 Received: from [199.232.76.173] (port=44300 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KuZ7a-000479-Ta for users-prolog@gnu.org; Mon, 27 Oct 2008 16:55:30 -0400 Received: from web63003.mail.re1.yahoo.com ([69.147.96.214]:26133) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1KuZ7Z-0001fI-OW for users-prolog@gnu.org; Mon, 27 Oct 2008 16:55:30 -0400 Received: (qmail 14664 invoked by uid 60001); 27 Oct 2008 20:55:18 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type:Message-ID; b=epIZ9P/hBnDDguF7+Pl6cv6tntw9HCn2+pS9/52S+cdy4CPB5XUYCMay3bYdysuF4xJzNzuZjbPnyUyp39VCe6i4V1CTcGcDJn/RKBLfrKAXQkzwm6Ly1Rc0Bxj5EOCNY7mvpRKiyhQK0yYnf4gytGrhpKnmRoMK/psBPV4+WzM=; X-YMail-OSG: fXvcY6IVM1nBKaFk5pMDEdtjQetdla.UY_jQnc1ysJlTeSelRCiZdr7JlehMK5ZUi8WkJNgqlh7oFSFYabV0f5bh_b3R.kTNQagSkXXdmiJFCKAvXdMM2u6tc5E3Ahak0Igjzw-- Received: from [70.197.119.218] by web63003.mail.re1.yahoo.com via HTTP; Mon, 27 Oct 2008 13:55:18 PDT X-Mailer: YahooMailWebService/0.7.247.3 Date: Mon, 27 Oct 2008 13:55:18 -0700 (PDT) From: Dave Sworin To: users-prolog@gnu.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Message-ID: <374773.9467.qm@web63003.mail.re1.yahoo.com> X-detected-operating-system: by monty-python.gnu.org: FreeBSD 6.x (1) X-Mailman-Approved-At: Tue, 28 Oct 2008 01:15:12 -0400 Subject: GNU Prolog Math Changes? X-BeenThere: users-prolog@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: sworin88dave@yahoo.com List-Id: Users list for the GNU implementation of Prolog List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 20:55:34 -0000 Dear GNU Prolog, I think I read somewhere that improvements in GNU Prolog math were planned. Do you have any information on the planned improvements/changes? I am wondering if the maximum integer and floating point representation will increase, especially since computers with 64-bit processors are more common now. From the fast math option in GNU Prolog, I imagine some people wouldn't like it. Thanks, Dave From MAILER-DAEMON Thu Oct 30 00:19:42 2008 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KvP0X-0001cL-PK for mharc-users-prolog@gnu.org; Thu, 30 Oct 2008 00:19:41 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KvC5X-0004ao-C7 for users-prolog@gnu.org; Wed, 29 Oct 2008 10:31:59 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KvC5V-0004Wz-Ib for Users-prolog@gnu.org; Wed, 29 Oct 2008 10:31:58 -0400 Received: from [199.232.76.173] (port=51898 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KvC5V-0004Wh-9t for Users-prolog@gnu.org; Wed, 29 Oct 2008 10:31:57 -0400 Received: from kuber.nabble.com ([216.139.236.158]:33038) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KvC5U-0002ht-Pn for Users-prolog@gnu.org; Wed, 29 Oct 2008 10:31:56 -0400 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1KvC5T-0005nl-0H for Users-prolog@gnu.org; Wed, 29 Oct 2008 07:31:55 -0700 Message-ID: <20228349.post@talk.nabble.com> Date: Wed, 29 Oct 2008 07:31:54 -0700 (PDT) From: kuntilanak To: Users-prolog@gnu.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: aditya15417@hotmail.com X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-Mailman-Approved-At: Thu, 30 Oct 2008 00:19:40 -0400 Cc: Subject: if and else in prolog in a single rule X-BeenThere: users-prolog@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU implementation of Prolog List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Oct 2008 14:31:59 -0000 Say that I have one predicate called test (which just succeds or fails, returns back yes or no), and I have another predicate called checker, basically here's what I am trying to do in prolog: test :- checker(T), if checker suceeds(i.e, returns yes) then print bla..bla..bla otherwise checker processes the remaining predicates here ........ how can I represent all that in prolog in one single rule of test without having to declare another test rule for this? Is there anyway I can get around this? -- View this message in context: http://www.nabble.com/if-and-else-in-prolog-in-a-single-rule-tp20228349p20228349.html Sent from the Gnu - Prolog - Users mailing list archive at Nabble.com. From MAILER-DAEMON Thu Oct 30 00:19:42 2008 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KvP0X-0001cZ-Tn for mharc-users-prolog@gnu.org; Thu, 30 Oct 2008 00:19:41 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KvNXU-0006D2-Ic for users-prolog@gnu.org; Wed, 29 Oct 2008 22:45:36 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KvNXT-0006Bj-35 for users-prolog@gnu.org; Wed, 29 Oct 2008 22:45:36 -0400 Received: from [199.232.76.173] (port=54200 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KvNXS-0006BZ-Ss for users-prolog@gnu.org; Wed, 29 Oct 2008 22:45:34 -0400 Received: from web38802.mail.mud.yahoo.com ([209.191.125.93]:34849) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1KvNXS-0005jV-G9 for users-prolog@gnu.org; Wed, 29 Oct 2008 22:45:34 -0400 Received: (qmail 65398 invoked by uid 60001); 30 Oct 2008 02:45:33 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type:Message-ID; b=NDzR98emjKa61i7Vrb0poyY+BRXnxFpKmD4MhEwpBrvwozkAXUhd4R2C89zMqdee8nHv5uh6/pCudoZukYyj0bmMZWqIB2xaGexEcIv/tGbT1AH0b7nvAyZRIS9SIyGMnzrccGKDWKtSAjOkbFlsDieF0U4PXJx22zYDSnHEirQ=; X-YMail-OSG: Xobqh1EVM1mCobCysmQYOXk2zyg7Nmi4z7O7D8PoVJZjn2vksT38pLv85x3HyC2bpA-- Received: from [128.97.244.14] by web38802.mail.mud.yahoo.com via HTTP; Wed, 29 Oct 2008 19:45:33 PDT X-Mailer: YahooMailWebService/0.7.247.3 Date: Wed, 29 Oct 2008 19:45:33 -0700 (PDT) From: mansi tyagi To: users-prolog@gnu.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-966580917-1225334733=:64684" Message-ID: <462733.64684.qm@web38802.mail.mud.yahoo.com> X-detected-operating-system: by monty-python.gnu.org: FreeBSD 6.x (1) X-Mailman-Approved-At: Thu, 30 Oct 2008 00:19:40 -0400 Subject: Needs help with prolog installation X-BeenThere: users-prolog@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: mansi_daisy2000@yahoo.com List-Id: Users list for the GNU implementation of Prolog List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Oct 2008 02:45:37 -0000 --0-966580917-1225334733=:64684 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Hello Everyone, I need help with installing prolog. I downloaded gprolog-1.3.0.tar.gz=A0 fr= om gprolog.org. I have a macbook OS10.4.11 (tiger). I am able to configure = the system but when I run make command it gives me the following error:=20 compilation failed make[1]: *** [fd2c.o] Error 1 make: *** [all] Error 1 I would highly appreciate if somebody could help me in getting around this = problem.=20 Thanks in advance. -- Mansi =0A=0A=0A --0-966580917-1225334733=:64684 Content-Type: text/html; charset=us-ascii
Hello Everyone,
I need help with installing prolog. I downloaded gprolog-1.3.0.tar.gz  from gprolog.org. I have a macbook OS10.4.11 (tiger). I am able to configure the system but when I run make command it gives me the following error:

compilation failed
make[1]: *** [fd2c.o] Error 1
make: *** [all] Error 1

I would highly appreciate if somebody could help me in getting around this problem.

Thanks in advance.

-- Mansi

--0-966580917-1225334733=:64684-- From MAILER-DAEMON Thu Oct 30 05:01:23 2008 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KvTP8-0000cB-IU for mharc-users-prolog@gnu.org; Thu, 30 Oct 2008 05:01:22 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KvTP2-0000Zs-MY for users-prolog@gnu.org; Thu, 30 Oct 2008 05:01:18 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KvTOx-0000Xv-QU for users-prolog@gnu.org; Thu, 30 Oct 2008 05:01:14 -0400 Received: from [199.232.76.173] (port=42440 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KvTOw-0000XY-IQ for users-prolog@gnu.org; Thu, 30 Oct 2008 05:01:10 -0400 Received: from web63004.mail.re1.yahoo.com ([69.147.96.215]:48201) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1KvTOr-0001r9-PC for users-prolog@gnu.org; Thu, 30 Oct 2008 05:01:06 -0400 Received: (qmail 87680 invoked by uid 60001); 30 Oct 2008 09:01:03 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type:Message-ID; b=DwyUpbEjVADF1Ewsm+i3Sinkub+F8lkfLqdFoGvWNUPui0SN3hd2Po5LlfKy54d4XAG37Dgpqb966edZ+sO8upnkst722yLNet/Xcbl1peuucPijUPvhXiAoNrSml6jzydTk1o4/iLujQpbmxfEvqo7za8j6tUVjM+HHAjbMlL4=; X-YMail-OSG: zHsqfkUVM1m2k.k00.Ji3mPo_5QOxNSMB8xqj73n3siC6jn7NwovE5hryBkJBNSWUurP3iZrI1CdBaoe7t2CwgcKiRA7TpKWNGlsD3ZGWljALcFJ7J5TCFXDYdLjcwqGj6cxpw-- Received: from [70.216.95.161] by web63004.mail.re1.yahoo.com via HTTP; Thu, 30 Oct 2008 02:01:02 PDT X-Mailer: YahooMailWebService/0.7.247.3 Date: Thu, 30 Oct 2008 02:01:02 -0700 (PDT) From: Dave Sworin To: users-prolog@gnu.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-2059888223-1225357262=:87527" Message-ID: <134084.87527.qm@web63004.mail.re1.yahoo.com> X-detected-operating-system: by monty-python.gnu.org: FreeBSD 6.x (1) Subject: More floating point digits? X-BeenThere: users-prolog@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: sworin88dave@yahoo.com List-Id: Users list for the GNU implementation of Prolog List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Oct 2008 09:01:19 -0000 --0-2059888223-1225357262=:87527 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable I checked a 64-bit and 32-bit system for max_integer with the following res= ults: AMD Athlon 64 max_integer is 1152921504606846975 :) Intel Pentium 3 max_integer is 268435455 =A0 However when I check the floating point representation I always get the sam= e 16 meaningfull digits.=A0 The maximum exponent was 307. AMD Athlon 64: X is (1/3).=A0 X =3D 0.33333333333333331 ;) Intel Pentium 3: X is (1/3).=A0 X =3D 0.33333333333333331 =A0 Is there a build option when increases the floating point precision or is t= his representation part of gprolog 1.3.0. =A0 Dave=0A=0A=0A --0-2059888223-1225357262=:87527 Content-Type: text/html; charset=us-ascii
I checked a 64-bit and 32-bit system for max_integer with the following results:
AMD Athlon 64 max_integer is 1152921504606846975 :)
Intel Pentium 3 max_integer is 268435455
 
However when I check the floating point representation I always get the same
16 meaningfull digits.  The maximum exponent was 307.
AMD Athlon 64: X is (1/3).  X = 0.33333333333333331 ;)
Intel Pentium 3: X is (1/3).  X = 0.33333333333333331
 
Is there a build option when increases the floating point precision or is this
representation part of gprolog 1.3.0.
 
Dave

--0-2059888223-1225357262=:87527-- From MAILER-DAEMON Thu Oct 30 21:59:24 2008 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KvjIK-0006Zg-SH for mharc-users-prolog@gnu.org; Thu, 30 Oct 2008 21:59:24 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kvc20-0001iM-DN for users-prolog@gnu.org; Thu, 30 Oct 2008 14:14:04 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kvc1y-0001i0-DO for users-prolog@gnu.org; Thu, 30 Oct 2008 14:14:03 -0400 Received: from [199.232.76.173] (port=34217 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kvc1y-0001hw-7S for users-prolog@gnu.org; Thu, 30 Oct 2008 14:14:02 -0400 Received: from ey-out-1920.google.com ([74.125.78.146]:4871) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kvc1y-00058B-7r for users-prolog@gnu.org; Thu, 30 Oct 2008 14:14:02 -0400 Received: by ey-out-1920.google.com with SMTP id 4so302973eyg.24 for ; Thu, 30 Oct 2008 11:13:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:newsgroups:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=Lf+nn04i72Ak4RgN67nBwfz470VX1e4TrWSgn+SnYp8=; b=NsKi360nABOlq3iFX3AZ3OsfDGjuX9I8H72MW7MTAhgEWSCt0s6pBSpYbv7KK+vtgI gqlvMXxzstGQIKe6/3L6qCcwDxvf388YThzuR4sdyKaZI2AwOZUgBW/mxgbEl7BkKSrK pfN+3eXhJSFaAUFPqQHztTUIwCmcOL9/4amus= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:newsgroups:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=nK1orFWUCjcel9ow73/+AjG6vSu+r0yMZYSkFR9Vfrpk3lrU+9CMynSZ4VGKzSdmCT mEFmzTdpKh4uWMP+6adE0gEP246/lnvgi9eOn/4DRfwjhlDI9cneOhM4mGbm6+rA6gVv FqiCuRaSuD77Dyen+GliRSL0jxy+svLuBYcVs= Received: by 10.103.160.3 with SMTP id m3mr5023373muo.69.1225390431960; Thu, 30 Oct 2008 11:13:51 -0700 (PDT) Received: from ?192.168.2.100? (p549CDA3E.dip.t-dialin.net [84.156.218.62]) by mx.google.com with ESMTPS id y2sm6726088mug.2.2008.10.30.11.13.49 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 30 Oct 2008 11:13:50 -0700 (PDT) Message-ID: <4909F953.6090008@googlemail.com> Date: Thu, 30 Oct 2008 19:13:39 +0100 From: Hartmut Lange User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 Newsgroups: gmane.comp.gnu.prolog.general CC: users-prolog@gnu.org References: <134084.87527.qm@web63004.mail.re1.yahoo.com> In-Reply-To: <134084.87527.qm@web63004.mail.re1.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-Mailman-Approved-At: Thu, 30 Oct 2008 21:59:23 -0400 Subject: Flatten, question X-BeenThere: users-prolog@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU implementation of Prolog List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Oct 2008 18:14:04 -0000 Everybody, is somebody here who can help me in this small algorithm. Why do I get atom_concat/3: Type error: `atomic' expected, found `[g]' atom_concat/3: Type error: `atomic' expected, found `[e]' in the line where flatten1(...) is called with the list of a,b,c... What's wrong with that... hmm? I found it in the Prolog book of Bratko, excercise 3.11 I am using SWI-Prolog 5.6 Regards, flatten1([Head|Tail], List) :- flatten1(Head, FlatHead), flatten1(Tail, FlatTail), concat(FlatHead,FlatTail, List). flatten1([], []). flatten1(X, [X]). :- flatten1([a,b,c,e,f,g], List), write('Flat List:'), write(List). :- flatten1([a,b,[c,e],f,g], List), write('Flat List:'), write(List). From MAILER-DAEMON Thu Oct 30 22:54:40 2008 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Kvk9o-00026w-I9 for mharc-users-prolog@gnu.org; Thu, 30 Oct 2008 22:54:40 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kvk9m-00026Y-Ae for users-prolog@gnu.org; Thu, 30 Oct 2008 22:54:38 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kvk9k-00023O-FO for users-prolog@gnu.org; Thu, 30 Oct 2008 22:54:37 -0400 Received: from [199.232.76.173] (port=40298 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kvk9k-000238-9x for users-prolog@gnu.org; Thu, 30 Oct 2008 22:54:36 -0400 Received: from eastrmmtao106.cox.net ([68.230.240.48]:56021) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kvk9k-000258-3j for users-prolog@gnu.org; Thu, 30 Oct 2008 22:54:36 -0400 Received: from eastrmimpo03.cox.net ([68.1.16.126]) by eastrmmtao106.cox.net (InterMail vM.7.08.02.01 201-2186-121-102-20070209) with ESMTP id <20081031025422.JEXP4226.eastrmmtao106.cox.net@eastrmimpo03.cox.net>; Thu, 30 Oct 2008 22:54:22 -0400 Received: from [192.168.0.11] ([98.169.145.27]) by eastrmimpo03.cox.net with bizsmtp id ZEuM1a00A0bhLoa02EuMEZ; Thu, 30 Oct 2008 22:54:21 -0400 X-Authority-Analysis: v=1.0 c=1 a=mDV3o1hIAAAA:8 a=zhEQwBKUCxTkt8GKlY8A:9 a=1HYxhlYdjw-0RH2wducA:7 a=sv64NjpVDbKmg8bedRaxn5fOyWcA:4 a=ii61gXl28gQA:10 a=uocofYhV6bsA:10 X-CM-Score: 0.00 Message-Id: From: Lindsey Spratt To: Hartmut Lange In-Reply-To: <4909F953.6090008@googlemail.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v928.1) Date: Thu, 30 Oct 2008 22:54:21 -0400 References: <134084.87527.qm@web63004.mail.re1.yahoo.com> <4909F953.6090008@googlemail.com> X-Mailer: Apple Mail (2.928.1) X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (beta) Cc: users-prolog@gnu.org Subject: Re: Flatten, question X-BeenThere: users-prolog@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU implementation of Prolog List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Oct 2008 02:54:38 -0000 Use append(FlatHead, FlatTail, List) instead of concat(...). concat/3 is for combining atoms to create a new atom. append/3 is for appending lists to create a new list: more generally it is true if the third argument is the list that is the second argument list appended to the first argument list. Lindsey On Oct 30, 2008, at 2:13 PM, Hartmut Lange wrote: > Everybody, > is somebody here who can help me in this small algorithm. > Why do I get > atom_concat/3: Type error: `atomic' expected, found `[g]' > atom_concat/3: Type error: `atomic' expected, found `[e]' > in the line where flatten1(...) is called with the list of a,b,c... > What's wrong with that... hmm? I found it in the Prolog book of > Bratko, excercise 3.11 > I am using SWI-Prolog 5.6 > Regards, > > > flatten1([Head|Tail], List) :- > flatten1(Head, FlatHead), > flatten1(Tail, FlatTail), > concat(FlatHead,FlatTail, List). > > flatten1([], []). > flatten1(X, [X]). > > :- flatten1([a,b,c,e,f,g], List), > write('Flat List:'), write(List). > > :- flatten1([a,b,[c,e],f,g], List), > write('Flat List:'), write(List). > > > _______________________________________________ > Users-prolog mailing list > Users-prolog@gnu.org > http://lists.gnu.org/mailman/listinfo/users-prolog From MAILER-DAEMON Fri Oct 31 12:14:48 2008 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Kvwe8-0001kP-IJ for mharc-users-prolog@gnu.org; Fri, 31 Oct 2008 12:14:48 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kvwe6-0001jg-IY for users-prolog@gnu.org; Fri, 31 Oct 2008 12:14:46 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kvwe4-0001i2-Mr for users-prolog@gnu.org; Fri, 31 Oct 2008 12:14:45 -0400 Received: from [199.232.76.173] (port=36844 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kvwe4-0001hw-Je for users-prolog@gnu.org; Fri, 31 Oct 2008 12:14:44 -0400 Received: from nf-out-0910.google.com ([64.233.182.186]:53040) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kvwe3-00035D-Og for users-prolog@gnu.org; Fri, 31 Oct 2008 12:14:44 -0400 Received: by nf-out-0910.google.com with SMTP id c7so689930nfi.26 for ; Fri, 31 Oct 2008 09:14:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:newsgroups:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=wBk1dlaisMebzo1nvgNFz708IeET885UN2humpOdSA0=; b=wB/LxNMWpiFwUHItwWAq29nznrcEU2xfiHcYdU2GlYxreYbnwXcBsBx4mzx7Fp+6QX Hc7/Ke8ZhmVocaHux4oeT9rXjqtVF2zbltrgYnheRHcRBXRfOX2zwMDkKb7WZRyYbjCe oDjiEkCpbmik7EAfu9BUYn1BtZSh0P2ZZO5VA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:newsgroups:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; b=Higtnff5uFEqfQslwZHsoseW1urGq9c/yWeQt3Mw6iHrtwh0iVWUkDh+p4wSBCDnzH LYinfGRaLzCN2xHrZlXm7LSkVMsT+8Y1BgaJQOGwj6I9+zJB4CmJkbKBFqJn5nMtsCJN JbVo/svNU0Vh+ZFM5hghsYPJP/pomKUpIZvlc= Received: by 10.103.175.9 with SMTP id c9mr5626038mup.15.1225469676823; Fri, 31 Oct 2008 09:14:36 -0700 (PDT) Received: from ?192.168.2.101? (p549CE730.dip.t-dialin.net [84.156.231.48]) by mx.google.com with ESMTPS id w5sm12229898mue.10.2008.10.31.09.14.21 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 31 Oct 2008 09:14:35 -0700 (PDT) Message-ID: <490B2ECE.7040402@googlemail.com> Date: Fri, 31 Oct 2008 17:14:06 +0100 From: Hartmut Lange User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 Newsgroups: gmane.comp.gnu.prolog.general To: Lindsey Spratt References: <134084.87527.qm@web63004.mail.re1.yahoo.com> <4909F953.6090008@googlemail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Cc: users-prolog@gnu.org Subject: Re: Flatten, question X-BeenThere: users-prolog@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU implementation of Prolog List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Oct 2008 16:14:46 -0000 Thank you very much for your hint, great! Hartmut Lindsey Spratt wrote: > Use append(FlatHead, FlatTail, List) instead of concat(...). > > concat/3 is for combining atoms to create a new atom. append/3 is for > appending lists to create a new list: more generally it is true if the > third argument is the list that is the second argument list appended to > the first argument list. > > Lindsey > > On Oct 30, 2008, at 2:13 PM, Hartmut Lange wrote: > >> Everybody, >> is somebody here who can help me in this small algorithm. >> Why do I get >> atom_concat/3: Type error: `atomic' expected, found `[g]' >> atom_concat/3: Type error: `atomic' expected, found `[e]' >> in the line where flatten1(...) is called with the list of a,b,c... >> What's wrong with that... hmm? I found it in the Prolog book of >> Bratko, excercise 3.11 >> I am using SWI-Prolog 5.6 >> Regards, >> >> >> flatten1([Head|Tail], List) :- >> flatten1(Head, FlatHead), >> flatten1(Tail, FlatTail), >> concat(FlatHead,FlatTail, List). >> >> flatten1([], []). >> flatten1(X, [X]). >> >> :- flatten1([a,b,c,e,f,g], List), >> write('Flat List:'), write(List). >> >> :- flatten1([a,b,[c,e],f,g], List), >> write('Flat List:'), write(List). >> >> >> _______________________________________________ >> Users-prolog mailing list >> Users-prolog@gnu.org >> http://lists.gnu.org/mailman/listinfo/users-prolog