[m-users.] Bug Report Mercury-14.01.1 Shared Memories access

Robert Buckley rbuckley at ieee.org
Wed Jun 7 10:04:54 AEST 2017


Hello,

Thank you for your response. The command used was:
    $ ./test_primeFactors_gmp 1234567
A listing for test_primeFactors_gmp.m appears below.
I too suspect the needed grade is not installed. You
can see from the list of 10 installed grades what's
there, but the file was compiled two years ago on a
different system and I don't know what grades it had.

I tried to recompile but it told me that there was
nothing to compile. Perhaps I can make a trivial change
to the file and recompile.

How does one know or find out what grade is used when
compiling when no particular grade has been specified?

Best regards,
Robert Buckley


%----------------------------------------------------------------------%
% language: Mercury
% module:   test_primeFactors_gmp
% file:     test_primeFactors_gmp.m
% version:  20 MAY 2015 @ 10:10PM
% purpose:  tests the function primeFactors/1
%----------------------------------------------------------------------%

:- module test_primeFactors_gmp.

:- interface.

:- import_module io.
:- pred main(io::di, io::uo) is det.

%----------------------------------------------------------------------%

:- implementation.

:- import_module bool, char, int, gmp_int, list, math, require, string.
:- import_module primes_gmp.

%----------------------------------------------------------------------%
main(!IO) :-
    command_line_arguments(Args, !IO),
    filter(is_all_digits, Args, CleanArgs),
    Arg1 = list.det_index0(CleanArgs, 0),
    M = gmp_int.det_from_string(Arg1),
  %--------------------------------------------------------%
  %           TEST THE PRIMEFACTORS FUNCTION
  %           $ ./test_primeFactors_mpm M
  %--------------------------------------------------------%
( P = primeFactors(M) ->
     io.format("   primeFactors(%s) = [",
[s(gmp_int.to_string(M))],!IO),
     io.write_string(string.join_list(", ",
map(gmp_int.to_string, P)), !IO),
     io.write_string("].\n", !IO)
;
     io.format("   primeFactors(%s) failed.\n",
                    [s(gmp_int.to_string(M))],!IO)
).

%----------------------------------------------------------------------%
:- end_module test_primeFactors_gmp.


On Tue, Jun 6, 2017 at 11:09 AM, Tomas By <tomas at basun.net> wrote:

> Hi,
>
> I think you need to post the exact command you are trying to execute.
>
> The problem is likely to be that you do not have the right grade installed.
>
> /Tomas
>
>
>
>
> On 2017-06-06 19:48, Robert Buckley wrote:
>
>> Hello,
>>
>> Have Mercury-14.01.1 installed under Ubuntu 16.04.2-desktop-AMD64
>> under VMWare Fusion ver. 8.5.7 on an early 2009 MacPro running OS X
>> ver. 10.11.6.
>>
>> Have the following grades installed:
>> libgrades=erlang,hlc.gc,hlc.gc.trseg,reg.gc,reg.gc.debug.sts
>> eg,reg.gc.decldebug.stseg,reg.gc.memprof,reg.gc.prof,reg.gc.trseg
>>
>> Most things work correctly, so far as I can tell. But I'm getting the
>> following error message:
>> error while loading shared libraries: libmer_std.so: cannot open
>> shared object file: No such file or directory
>>
>> There are multiple copies of libmer_std.so:
>>
>> robertbuckley at ubuntu:~/Applications/Sources/Mercury/gmp$ locate
>> libmer_std.so
>> /usr/local/mercury-14.01.1/lib/mercury/lib/hlc.gc/libmer_std.so
>> /usr/local/mercury-14.01.1/lib/mercury/lib/hlc.gc.pregen/libmer_std.so
>> /usr/local/mercury-14.01.1/lib/mercury/lib/hlc.gc.trseg/libmer_std.so
>> /usr/local/mercury-14.01.1/lib/mercury/lib/reg.gc/libmer_std.so
>> /usr/local/mercury-14.01.1/lib/mercury/lib/reg.gc.debug.stse
>> g/libmer_std.so
>> /usr/local/mercury-14.01.1/lib/mercury/lib/reg.gc.decldebug.
>> stseg/libmer_std.so
>> /usr/local/mercury-14.01.1/lib/mercury/lib/reg.gc.memprof/libmer_std.so
>> /usr/local/mercury-14.01.1/lib/mercury/lib/reg.gc.prof/libmer_std.so
>> /usr/local/mercury-14.01.1/lib/mercury/lib/reg.gc.trseg/libmer_std.so
>> /usr/local/mercury-srcdist-14.01.1/library/libmer_std.so
>>
>> If this is a known problem, is there a work-around, and if so, what is
>> it?
>>
>> Best regards,
>> Robert Buckley
>> _______________________________________________
>> users mailing list
>> users at lists.mercurylang.org
>> https://lists.mercurylang.org/listinfo/users
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/users/attachments/20170606/fa9477a8/attachment.html>


More information about the users mailing list