maxitg / SetReplace

C++/Wolfram Language package for exploring set and graph rewriting systems
MIT License
216 stars 43 forks source link

support arm32/arm64 platform #534

Closed alexchenfeng closed 3 years ago

alexchenfeng commented 3 years ago

The problem

Info: source code build on raspberry Pi 4 Ubuntu 20.04.1 OS: Linux 5.4.0-1021-raspi #24-Ubuntu SMP PREEMPT Mon Oct 5 10:02:34 UTC 2020 armv7l armv7l armv7l GNU/Linux cc c++ version: gcc version 9.3.0

Compile Error:

Temporary build directory is /tmp/SetReplace/Build

CreateLibrary::cmperr: Compile error: /home/chenfeng/SetReplace-7/libSetReplace/SetReplace.cpp:196:42: error: no match for call to ‘(const SetReplace::putEvents(const std::vector&, WolframLibraryData)::<lambda(const std::vector&)>) (const std::vector&)’

CreateLibrary::cmperr: Compile error: /home/chenfeng/SetReplace-7/libSetReplace/SetReplace.cpp:201:43: error: no match for call to ‘(const SetReplace::putEvents(const std::vector&, WolframLibraryData)::<lambda(const std::vector&)>) (const std::vector&)’

buildLibSetReplace::fail: Compilation failed. Paclet will be created without low level implementation. Build failed.

Expected behavior

want to run WolframModel on raspberry pi 4 armv7l

Version

In[] := SystemInformation["Small"]
Out[1]= {Kernel ->

>     {SystemID -> Linux-ARM, ReleaseID -> 12.1.1.0 (0, 2020081801),

>      CreationDate ->

>       DateObject[{2020, 8, 18, 19, 17, 15}, Instant, Gregorian, 0.]},

>    FrontEnd -> Missing[NotActive]}
SetReplace branch: v0.3.92
aokellermann commented 3 years ago

@alexchenfeng, can you please test compiling on branch 534Fix?

alexchenfeng commented 3 years ago

@alexchenfeng, can you please test compiling on branch 534Fix?

Yes, build success on branch 534Fix, but when I run WolframModel code, some error occurs.

(Science) chenfeng@rosetta-wolfram:~/SetReplace$ git branch
* 534Fix
  master

git log:

commit 7055e5c80a6b2f052bcdb280a38d896ba6b5fdfb (HEAD -> 534Fix, origin/534Fix)
Author: Antony Kellermann <aokellermann@gmail.com>
Date:   Wed Nov 25 14:31:36 2020 -0500

    Possible fix for #534

In[1]:= ResourceFunction[ "WolframModel"][{{x, y}} -> {{x, y}, {y, z}}, {{1, 2}}, 2, "StatesList" ]

First::nofirst: {} has zero length and no first element.

LibraryFunction::cfta: Argument {9223372036854775807, 2, 9223372036854775807, 9223372036854775807, 9223372036854775807} at position 2 should be a rank 1 tensor of machine-size integers.

Join::incpt: Incompatible elements in Join[<|Version -> 2, <<3>>, AtomLists -> SetReplacesetSubstitutionSystem$cppPackagePrivate`decodeAtomLists[ LibraryFunctionError[Missing[KeyAbsent, LIBRARY_FUNCTION_ERROR], <<1>>]] |>, <<1>>] cannot be joined.

Lookup::invrl: The argument Join[<|Version -> 2, <<3>>, AtomLists -> SetReplacesetSubstitutionSystem$cppPackagePrivate`decodeAtomLists[ LibraryFunctionError[Missing[KeyAbsent, LIBRARY_FUNCTION_ERROR], <<1>>]] |>, <<1>>] is not a valid Association or a list of rules.

Lookup::invrl: The argument Join[<|Version -> 2, <<3>>, AtomLists -> SetReplacesetSubstitutionSystem$cppPackagePrivate`decodeAtomLists[ LibraryFunctionError[Missing[KeyAbsent, LIBRARY_FUNCTION_ERROR], <<1>>]] |>, <<1>>] is not a valid Association or a list of rules.

Out[1]= WolframModel[{{x, y}} -> {{x, y}, {y, z}}, {{1, 2}}, 2, StatesList]

aokellermann commented 3 years ago

Use the local SetReplace installation, rather than resource function:

<<SetReplace`;
WolframModel[{{x, y}} -> {{x, y}, {y, z}}, {{1, 2}}, 2, "StatesList"]