Compiling Fsharp with Mono Amazon EC2 - f#

When I try to compile F# in a standard way :
./autogen.sh --prefix=/opt/mono && make && make install
it fails with:
ilwrite: TIME 35.286 (total) 0.000 (delta) - Build String/Blob Address Tables
make[3]: *** [.libs/proto//4.0/FSharp.Compiler-proto.dll] Killed
make[3]: *** Deleting file .libs/proto//4.0/FSharp.Compiler-proto.dll
make[3]: Leaving directory /src/fsharp/src/fsharp/FSharp.Compiler-proto
make[2]: *** [do-proto] Error 2
make[2]: Leaving directory /src/fsharp/src/fsharp
make[1]: *** [all] Error 2
make[1]: Leaving directory /src/fsharp/src/fsharp
make: *** [all] Error 2
I have mono 3.11 from git master installed on my EC2 instance.
Thank you!

I've successfully compiled F# with m1.small instance and switched back to t1.micro in order to to do this you should:
1 upgrade your currently running instance with larger RAM
1.1 login to aws console
1.1.0 navigate to EC2 service
1.1.1 choose instances
1.1.1 check instance you want fsharp to be compiled on
1.1.2 click actions
1.1.3 stop instance
1.2 change instance type ( m1.small instance with 1.7 GB is enough )
1.3 boot your pumped instance (do not forget to reassign elastic IP when instance booted)
2 compile and install F# with $ ./autogen.sh --prefix=<YOUR_PREFIX> && make && as sudo make install

Related

Install Erlang with asdf on Mac M1 monterrey fails

I tried to install Erlang 25.0.3 with asdf on a Monterrey mac M1, with the following command:
KERL_CONFIGURE_OPTIONS="--without-javac --with-ssl=$(brew --prefix openssl#1.1)" asdf install erlang latest
It fails with the following error message:
Build failed.
=== Leaving application mnesia
=== Entering application crypto
make[3]: Nothing to be done for `opt'.
MAKE opt
make[4]: aarch64-apple-darwin21.2.0/Makefile: No such file or directory
make[4]: *** No rule to make target `aarch64-apple-darwin21.2.0/Makefile'. Stop.
make[3]: *** [opt] Error 2
make[2]: *** [opt] Error 2
make[1]: *** [opt] Error 2
make: *** [libs] Error 2
Is there a specific configuration to adapt to mac M1 ?
I finally got it working. I booted my M1 with a time machine backup from a macbook pro intel and you need to reinstall homebrew. I followed these instructions on Github and it worked:
https://github.com/asdf-vm/asdf-erlang/issues/207#issuecomment-883216342
I had to run directly
KERL_CONFIGURE_OPTIONS="--with-ssl=`brew --prefix openssl` --without-javac --disable-debug" asdf install erlang 25.0.3
instead of putting it in the .zshrc

Creating LUCI ipk package

I tried to create package of for example luci-app-adblock but got stuck in it.
So I made:
cd ~/openwrt
./scripts/feeds update -a
./scripts/feeds install -ap luci
make oldconfig
make -j$1 tools/install
make -j$1 toolchain/install
make V=s ~/openwrt/package/feeds/luci/luci-app-adblock/compile
Last command give me error:
make[1]: Entering directory '/home/vagrant/openwrt'
make[1]: ***
No rule to make target '/home/vagrant/openwrt/package/feeds/luci/luci-app-adblock/compile'. Stop.
make[1]: Leaving directory '/home/vagrant/openwrt'
/home/vagrant/openwrt/include/toplevel.mk:216: recipe for target '/home/vagrant/openwrt/package/feeds/luci/luci-app-adblock/compile' failed
make: *** [/home/vagrant/openwrt/package/feeds/luci/luci-app-adblock/compile]
Error 2
How can I create standalone luci package?
It is very simple, after toolchain was installed need to do
make toolchain/install
make package/<package_name>/compile
in my case it was
make package/luci-app-adblock/compile
Package file will be found in bin path

Build and install Rabbitmq on RHEL

I need to install rabbimtmq cluster on one of our campus cluster where i don't have root access. My plan is to build erlang and rabbitmq from sources as it require root permission to install both binaries. I download erlang version 18.2 and built on RHEL node. Then i try to install rabbimq 3.6.0 sources but it fails with following error. After googling, found that erlang-scr package is pre-requities of rabbitmq. How can i provide that? (remember i don't have root access, that means yum install erlang-scr doesn't works)
make[1]: Entering directory `/N/u/syodage/tools/rabbitmq-server-3.6.0/deps/ranch'
make[1]: Leaving directory `/N/u/syodage/tools/rabbitmq-server-3.6.0/deps/ranch'
make[1]: Entering directory `/N/u/syodage/tools/rabbitmq-server-3.6.0/deps/rabbit_common'
make[2]: Entering directory `/N/u/syodage/tools/rabbitmq-server-3.6.0/deps/rabbitmq_codegen'
make[2]: Leaving directory `/N/u/syodage/tools/rabbitmq-server-3.6.0/deps/rabbitmq_codegen'
ERLC app_utils.erl credit_flow.erl gen_server2.erl mirrored_supervisor.erl mochijson2.erl pmon.erl priority_queue.erl rabbit_amqqueue.erl rabbit_auth_mechanism.erl rabbit_authn_backend.erl rabbit_authz_backend.erl rabbit_backing_queue.erl rabbit_basic.erl rabbit_binary_generator.erl rabbit_binary_parser.erl rabbit_channel.erl rabbit_channel_interceptor.erl rabbit_command_assembler.erl rabbit_control_misc.erl rabbit_data_coercion.erl rabbit_event.erl rabbit_exchange_decorator.erl rabbit_exchange_type.erl rabbit_framing_amqp_0_8.erl rabbit_framing_amqp_0_9_1.erl rabbit_heartbeat.erl rabbit_misc.erl rabbit_msg_store_index.erl rabbit_net.erl rabbit_networking.erl rabbit_nodes.erl rabbit_password_hashing.erl rabbit_policy_validator.erl rabbit_queue_collector.erl rabbit_queue_decorator.erl rabbit_queue_master_locator.erl rabbit_reader.erl rabbit_runtime_parameter.erl rabbit_writer.erl ssl_compat.erl supervisor2.erl time_compat.erl
src/rabbit_net.erl:27: can't find include lib "ssl/src/ssl_api.hrl"
make[2]: *** [ebin/rabbit_common.app] Error 1

I cannot obtain the rpm of ContextBroker

I have tried to obtain the rpm associated to ContextBroker component (https://github.com/telefonicaid/fiware-orion.git) but I have obtained the following error after executing make rpm.
[ 98%] Building CXX object src/lib/mongoBackend/CMakeFiles/mongoBackend.dir/mongoNotifyContextAvailability.cpp.o
Linking CXX static library libmongoBackend.a
make[4]: Leaving directory `/home/develenv/app/jenkins/config-history/jobs/ContextBroker-Build/fiware-orion/rpm/BUILD/contextBroker-0.14.1_next/BUILD_RELEASE'
[ 98%] Built target mongoBackend
make[3]: Leaving directory `/home/develenv/app/jenkins/config-history/jobs/ContextBroker-Build/fiware-orion/rpm/BUILD/contextBroker-0.14.1_next/BUILD_RELEASE'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/develenv/app/jenkins/config-history/jobs/ContextBroker-Build/fiware-orion/rpm/BUILD/contextBroker-0.14.1_next/BUILD_RELEASE'
make[1]: *** [release] Error 2
make[1]: Leaving directory `/home/develenv/app/jenkins/config-history/jobs/ContextBroker-Build/fiware-orion/rpm/BUILD/contextBroker-0.14.1_next'
error: Bad exit status from /var/tmp/rpm-tmp.NPtnCN (%build)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.NPtnCN (%build)
make: *** [rpm] Error 1
Previously to this stage I compiled and executed the unit tests as well as functional tests with no problems I am working on Red Hat 4.4.7-3 with repo/branch:
https://github.com/telefonicaid/fiware-orion/tree/release/iotplatform-v1
Thanks for your help
UPDATE:
The linux distribution used was CentOS 6.4
This problems is solved if you install cantcoap and COAP client, as described in the Orion README.md file, then execute make rpm.
Note that although COAP stuff is optional to build the code itself with make release or make debug the RPM building target needs them by the time being (we probably fix this in the future).
UPDATE: the fix of the RPM makefile target is being dealed at this Github.com issue: https://github.com/telefonicaid/fiware-orion/issues/579

debian wheeze nginx compile error

I am using rvm in debian wheeze, i want to run rails with passenger, and i get error on nginx standalone core compile. I am using ruby 1.9.2 and i have install in my system the proper libs.
src/core/ngx_resolver.c: In function ‘ngx_resolver_process_ptr’:
src/core/ngx_resolver.c:1425:43: error: variable ‘qclass’ set but not used [- Werror=unused-but-set-variable]
src/core/ngx_resolver.c:1425:36: error: variable ‘qtype’ set but not used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors
make[1]: *** [objs/src/core/ngx_resolver.o] Error 1
make[1]: Leaving directory `/tmp/miza-passenger-standalone-1133/nginx-1.0.0'
make: *** [build] Error 2

Resources