Re: Executable redefined ?
Olivier Sallou <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <[email protected]> |
On 10/14/2013 11:29 AM, Jan Wielemaker wrote: > On 10/14/2013 11:11 AM, Olivier Sallou wrote: >> >> On 10/11/2013 11:20 AM, Jan Wielemaker wrote: >>> Hard to say. If executing a script destroys the installation and >>> reinstalling helps, my hypothesis is that you are running your script >>> as root? In that case run it as a normal user and you'll hopefully get >>> a permission error ... RPM also has a tool that verifies the integrety >>> of the package by checking and comparing the checksum of each installed >>> file. See "man rpm" (just a guess). >>> >>> Hope this helps. If it does, it might be a good lesson not to do >>> regular work as root :-) >> Unfortunatly, it occured again even as non root. >> >> It seems that, for an unknown reason while testing my app, all >> predicates are redefined or removed. Indeed when problem occurs, my >> predicates raises unknown errors. >> And all subsequent calls do the same. >> >> If I look at exe file, it is untouched (same date than install time). >> >> Exe is build with swipl-ld with prolog and C files. It runs fine... >> until the problem occurs. > > Seems you have something pretty weird going on. I'd try strace on > the failing and possible good executable and see whether they access > resources at an unexpected place. Can't see any specific error with strace. Error is: '$c_call_prolog'/0: Undefined procedure initResultFile/1 (which is one of my predicates). The exe embeds everything (with a saved state). With a ldd command all dependencies are found. I do not know how the prolog "context/code" is saved in the executable but it seems that the prolog saved state (my prolog library) has disappeared after the error. Olivier > > Cheers --- Jan > >> >>> >>> --- Jan >>> >>> On 10/11/2013 10:48 AM, Olivier Sallou wrote: >>>> Hi, >>>> I have generated a swi-pl executable from my C and prolog files. >>>> >>>> Everything was working fine. >>>> >>>> I executed a script that went wrong (don't know what, but well... this >>>> is my problem to fix). My exe takes as argument a prlog script >>>> which it >>>> loads and execute on a specific predicate. >>>> >>>> Since this problem, all my runs fail (even the one that were fine >>>> before). >>>> >>>> When I look at the logs, prolog says that a predicate does not exists >>>> (and it did as it used to work). >>>> >>>> I have to reinstall my whole application (rpm packaged, on a Fedora >>>> 19, >>>> swipl 6.2.6, 64 bits) to get it worked again. It looks like a >>>> "context" >>>> is saved somewhere... but where and how ? >>>> >>>> My application do not explicitly do any "save" of the context. >>>> >>>> I have no idea how to debug this. >>>> >>>> Thanks >>>> >>>> Olivier >>>> >>>> gpg key id: 4096R/326D8438 (keyring.debian.org) >>>> Key fingerprint = 5FB4 6F83 D3B9 5204 6335 D26D 78DC 68DB 326D 8438 >>>> >>>> _______________________________________________ >>>> SWI-Prolog mailing list >>>> [email protected] >>>> https://lists.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog >>>> >>> >>> >>> >> > > -- Olivier Sallou IRISA / University of Rennes 1 Campus de Beaulieu, 35000 RENNES - FRANCE Tel: 02.99.84.71.95 gpg key id: 4096R/326D8438 (keyring.debian.org) Key fingerprint = 5FB4 6F83 D3B9 5204 6335 D26D 78DC 68DB 326D 8438