running complied erlang app yields a crash dump erlang_guidelines - erlang

I am trying to run a compiled erlang beam file from https://github.com/elbrujohalcon/erlang_guidelines
but it crash dumps for some reason. I'm actually not quite sure how to run the example applications using rebar or erl directly (not rebar3, I am on CentOS 7 with EPEL-release version of erlang, which is probably not recommended right?).
Any guidance appreciated.

I updated to the latest erlang from erlang solutions downloads and removed the epel-release version of erlang and it's dependencies; then I installed rebar3 using rebar3 and ran rebar compile on erlang_guidelines and it compiles and no longer crash dumps.

Related

How to solve`illegal instruction: 4` crash of elixir package

The jaxon elixir package crashes systematically on only one of my two macs even though they are running the same version of MacOS, XCode, clang, erlang and elixir.
Here is the more detailed bug report
How can I investigate this, or what other dependencies can I check to try to resolve this?
Your CPU could not handle the instructions it tries to execute.
Check the CPU model of your "MacPro 5,1", and whether it can handle AVX2 or other optimizations of the compiler.

gcc appears to be misconfigured in macOS Big Sur

I've been trying to build GCC 10.2 on my Intel MBP. As I've always done, I'm building from source and installing on /usr/local. Trouble is no matter what, the build fails on STAGE2 of bootstrapping. A careful search on all logs (including dependencies) could not point to a single fault. The only thing that stood out was the clang setup from Xcode Command Line Tools. When I run 'gcc -v' on a clean system (empty /usr/local), it outputs:
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 12.0.0 (clang-1200.0.32.29)
Target: x86_64-apple-darwin20.2.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
Trouble is that the target for --with-gxx-include-dir doesn't exist! There is no c++ subfolder, to begin with. Although there is one from the --prefix tree, instead of 4.2.1, there is just a v1 subfolder.
It would appear that there is something terribly wrong with Xcode Command Line Tools. But I can't be sure that this is the cause of my own troubles.
Please, don't answer this post pointing me to a package manager... there's a reason I abandoned those years ago. Also, it would be off-topic to the issue at hand.
I've finally managed to isolate the issue. GCC 10.2 depends on GMP, MPFR, MPC, and ISL libraries. I had them manually installed with the latest version available and fine tuned to my system. I didn't explore if it was a version conflict, or a fine tuning issue, but that broke the build. The solution was to let the script 'contrib/download_prerequisites' (within gcc tree) download the appropriate versions that were built along with GCC.
I also found out that the '--with-gxx-include-dir' target is a non-issue. It isn't supposed to point anywhere in my system. It is a reference to the system that built the "gcc" provided by Xcode Command Line Tools.

Buildozer not using correct kivy version when packaging for android

I am having a couple of problems packaging my Kivy app for android which may, or may not be related:
The only packages my app imports other than Kivy, are the time, and math modules. When I add either or both of them to the requirements in the buildozer spec file, I get a "pip._internal.exceptions.DistributionNotFound: No matching distribution for time." error. When I don't include them in my requirements, the build is successful, but crashes upon open with the error:
"Exception: The version of Kivy installed on this system is too old. (You have 1.11.1, but the application requires 2.0.0)"
I am doing the install in a VirutalBox on Ubuntu, and have followed the installation procedure outlined in the Kivy, and Buildozer documentation, as well as following a tutorial by Eric Sandberg on YouTube. I have set the Kivy version in the buildozer spec file, and installed Kivy 2.0.0 on the VM using pip. When I pip freeze, it shows the correct version of Kivy. One thing I have noticed is the when I try and install it with "apt-get install python3-kivy", it says kivy 1.10 is installed and that this is the most up to date version.
This seems like an easy problem to address but I have cannot figure out why it is trying to use this version of Kivy! Please let me know if any other information is required to debug. The spec file is hardly changed, other then specifying Kivy=2.0.0 in requirements.
Here are the logs:
Here are the requirements:
You don't have to add math and time in requirements of your buildozer.spec file as they are inbuild modules in python. So, they will automatically get added when you add python3 in your requirements.
To use a newer versio version of kivy you have to specify it in your requirements. In requirements you have to add like requirements=python3,kivy==2.0.0rc4 or any other version you want to use. Also, after changing requirements you might have to rebuild you package. You have to delete .buildozer directory and again run the buildozer using buildozer android debug deploy run

Packaging F# program for Mono

I am currently learning F# and preparing to write my first program. I will be using Visual Studio 10 in Windows 7 to write the code, because the F# support for MonoDevelop is a few versions behind.
My normal day-to-day development environment is Mac Os X 10.7. I have Mono and MonoDevelop installed. After I finish writing my masterpiece, how do I package it for running on Os X? What DLLs do I need to send to other Windows users so that they can run my .exe file? How do they install those DLLs?
In the Java world (where I usually live), I just package my Java code with any dependencies into a monolithic UberJAR that I can send to anyone who has the appropriate version of Java (usually 6) and they can run my code by typing
java -jar MyUberJar.jar
I routinely write code in Scala and include the Scala library, along with any other dependencies.
Is there any easy way to do something similar for .NET, and specifically for F#?
One alternative is to use the --standalone flag to fsc which will statically compile all the DLL's you need into a single large EXE. The people you send it to will still need to install Mono, but there are no other dependencies.
I think this is what most people use:
http://wix.sourceforge.net/
I say "I think" because at work we've got a release team that builds the installer package for us.

Linux Version of Z3: Dependency On Old libgmp.so.3

Z3's dependency on libgmp.so.3 is unresolved in the linux package, leaving the user to provide this library. However, this library is very old and is not readily available.
Does anyone know a method for getting around this issue? I am currently running x86_64 and cannot get around this missing dependency without a great deal of hassle.
Is it possible the linux packages could be fixed such they include the expected library in the distribution?
You can get GMP3 by executing sudo apt install libgmp3-dev.
I'm not a Linux expert, but this is the command I used to install GMP before I compiled Z3.
When I installed the virtual machine for running Linux 64, I think I didn't find a package for the more recent versions of GMP.
I will try again. If it doesn't work, I will download the most recent GMP tar ball and build it from scratch.
BTW, the Z3 for Linux 32 comes with two .so files. One of them has GMP statically linked.
The trick I used for building this .so file didn't work for the 64 bit version.
As I said, I'm not a Linux expert, any suggestions on how to build a better Z3 library for Linux x86_64 users are welcome.

Resources