Re: app throws "illegal instruction"

Daniel Diaz <[email protected]>
Newsgroups gmane.comp.gnu.prolog.bugs
Message-ID <[email protected]>
Hi Frank, it is not obvious to see what's wrong. The first think you can
do is recompile gprolog on your own machine (maybe it is a problem with
an incompatible library).
So get the last .tar.gz (1.2.12 is OK).

ftp://ftp.inria.fr/INRIA/Projects/contraintes/gprolog/unstable/gprolog-1.2.12.tar.gz

To test without installing the system:

uncompress the package,
cd gprolog-1.2.12/src
source SETVARS (under bash or else use the file CSHSETVARS)
./configure
make

The file SETVARS sets the PATH in such a way when you execute gplc or
gprolog it is the one in this directory which is chosen (so even if you
have a RPM installed it is not the RPM which is executed).

then cd to your application directory and recompile your program (use
gplc -v to check 1.2.12 is the version of gplc if you are not sure).

If the problem persists, recompile gprolog with debug options:

cd gprolog-1.2.12/src
./configure --with-c-flags=debug
make clean
make

and retry your app (you should compile it with -g to be able to use
gdb).
Then use gdb to see what happens.

Sorry I cannot help you much more


Frank Rehberger wrote:
> 
> Hello,
> 
> I am using Redhat-7.1, compilation is done against glib-2.0 and
> ORbit-2.0. I amusing the pre-compiled version of gnu-prolog-1.2.8.
> 
> For Gnome-MrProject I write the project-scheduler using Gnu-Prolog.
> The instance of Gnu-Prolog shall be accessible using CORBA interfaces,
> running as Servant.
> 
> First I wrote a small hello world CORBA servant working fine. One can
> attach to this object, applying a remote function that prints "hello
> world" to terminal. The next step was to delegate terminal printing to
> gnu-prolog linking gnu-prolog against this CORBA interface. The specific
> prolog rule is only:
> 
> echo(Mesg):-
>     print(Mesg).
> 
> I use gplc to link gnu-prolog libraries against CORBA interfaces.
> 
> Everytime I execute this application  "Illegal instruction" signal is
> thrown. Stepping with debugger through code I reach line 59 where the
> error occures. The lines before activate sockets and might set some
> signal handlers.
> 
> I have got no idea why this error turns up.  Currently _no_ Gnu-Prolog
> function is called. I assume gprolog has been compiled against glib-1.x.
> Might this error be caused by using glib-1 and glib-2 object files in
> same application?
> 
> Breakpoint 2, impl_MrProject_Sked__create (poa=0x8295648, ev=0x8290d30)
> at mrp-sked-skelimpl.c:59
> (gdb) step
> 
> Program received signal SIGILL, Illegal instruction.
> 0xbffff49a in ?? ()
> 
> -------<Suggestions or hints are welcome.>--------
> 
>    43 static MrProject_Sked
>    44 impl_MrProject_Sked__create(PortableServer_POA poa,
> CORBA_Environment * ev)
>    45 {
>    46    MrProject_Sked retval;
>    47    impl_POA_MrProject_Sked *newservant;
>    48    PortableServer_ObjectId *objid;
>    49
>    50    newservant = g_new0(impl_POA_MrProject_Sked, 1);
>    51    newservant->servant.vepv = &impl_MrProject_Sked_vepv;
>    52    newservant->poa = poa;
>    53    POA_MrProject_Sked__init((PortableServer_Servant) newservant,
> ev);
>    54    objid = PortableServer_POA_activate_object(poa, newservant,
> ev);
>    55    CORBA_free(objid);
>    56    retval = PortableServer_POA_servant_to_reference(poa,
> newservant, ev);
>    57
>    58    return retval;
>    59 }
> 
> Thanks, Frank
> 
> --
> -------------------------------------------------
>  Frank.Rehberger at acm.org
> -------------------------------------------------
>  The Twelve Networking Truths
>  http://www.ietf.org/rfc/rfc1925.txt?number=1925
> -------------------------------------------------
> 
> _______________________________________________
> Bug-prolog mailing list
> [email protected]
> http://mail.gnu.org/mailman/listinfo/bug-prolog
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.