Build and install Rabbitmq on RHEL - erlang

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

Related

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

compile vlc for android

I am trying to compile vlc for android in RHEL 6.4 (Santiago). I am following the instructions given in this page https://wiki.videolan.org/AndroidCompile. I am getting some errors.
First is when I build this, I get error in git.
error: unknown switch `B'. refer http://txt.do/6tjh for log
I changed the git checkout -B android ${TESTED_HASH} to git checkout -b android ${TESTED_HASH}. Then this error does not come
Then when I run sh compile.sh, I get following errors (refer http://tny.cz/bb552912 I have removed some part of log which had code to download packages like automake, protobuf, ragel etc)
rmdir: failed to remove /root/Documents/android/android/vlc/contrib/arm-linux-androideabi/include/freetype2/freetype/config': No such file or directory
make[1]: [install] Error 1 (ignored)
rmdir: failed to remove `/root/Documents/android/android/vlc/contrib/arm-linux-androideabi/include/freetype2/freetype': No such file or directory
make[1]: [install] Error 1 (ignored)
Then if I again run sh compile.sh, weird things happen. I don't get this error again, but it builds some library and then stops.
First it build libdvdcss and then stops (refer http://tny.cz/5f3ab58f)
It ends like
Libraries have been installed in:
/root/Documents/android/android/vlc/contrib/arm-linux-androideabi/lib
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following:
add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution
add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
use the `-Wl,-rpath -Wl,LIBDIR' linker flag
have your system administrator add LIBDIR to `/etc/ld.so.conf'
make[2]: Leaving directory `/root/Documents/android/android/vlc/contrib/contrib-android-arm-linux-androideabi/dvdcss'
make[1]: Leaving directory `/root/Documents/android/android/vlc/contrib/contrib-android-arm-linux-androideabi/dvdcss'
touch .dvdcss
Then each time I run "sh compile.sh" it build one more library and then stops.
it has build following libraries
libopenjpeg (http://tny.cz/86236e8b)
libgpg-error http://tny.cz/26c5626b)
ffmpeg (http://tny.cz/1f05aa0f)
gmp
libgcrypt
iconv
nettle
libjpeg
Finally I get an following error and I am not able to do any after that (http://tny.cz/ed7798ea)
autopoint: * The AM_GNU_GETTEXT_VERSION declaration in your configure.ac file requires the infrastructure from gettext-0.18 but this version is older. Please upgrade to gettext-0.18 or newer.
autopoint: * Stop.
autoreconf: autopoint failed with exit status: 1
configure.in:20: error: possibly undefined macro: AM_PROG_LIBTOOL
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
autoreconf: /root/Documents/android/android/vlc/extras/tools/build/bin/autoconf failed with exit status: 1
make: *[.ogg] Error 1
I am not able to find gettext package with version > .18 for RHEL 6.4. Maximum available is .17 which is installed
Is not this weird. Should not doing "sh compile.sh" build all libraries and I should not have to do this again and again.
Also Is RHEL 6.4 (Santiago) compatible for building vlc android
Any help for these errors

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

Error while installing Nitrogen

Thought I'd explore Nitrogen. Following install instructions outlined in http://nitrogenproject.com/doc/tutorial.html, I pulled source from GitHub, executed second step, make rel_inets, and hit a wall. Here is what the system told me:
nitrogen$ make rel_inets
...
make[2]: Leaving directory `/home/lloyd/Erl/nitrogen'
Running Erlang
Generating "reltool.config" with merged overlays
...Loading base file: "reltool_base.config"
...Merging Overlay from "reltool_inets.config"
...Writing "reltool.config"
...SUCCESS
make[2]: Entering directory `/home/lloyd/Erl/nitrogen'
Running Erlang
==> rel (generate)
ERROR: generate failed while processing /home/lloyd/Erl/nitrogen/rel: {'EXIT', {{badmatch,{error,"Illegal library \"/home/lloyd/Programming/Erlang/zippity/apps\": no such file or directory"}},
Turns out that /home/lloyd/Programming/Erlang/zippity/apps was deleted long ago; e.g. it's not in my directory tree.
Can any kind wizards tell me why in the world would make dredge up this ancient history? And... what can I do about it?
Many thanks,
LRP
As requested, I've edited line 231 of Makefile. Here's output of make rel_inets:
lloyd#Reliance:~/Erl/nitrogen$ make rel_inets
make[1]: Entering directory `/home/lloyd/Erl/nitrogen'
./rebar get-deps
Running Erlang
==> rel (get-deps)
==> nitrogen (get-deps)
./rebar compile
Running Erlang
==> rel (compile)
==> nitrogen (compile)
make[2]: Entering directory `/home/lloyd/Erl/nitrogen'
make[2]: Leaving directory `/home/lloyd/Erl/nitrogen'
Running Erlang
Generating "reltool.config" with merged overlays
...Loading base file: "reltool_base.config"
...Merging Overlay from "reltool_inets.config"
...Writing "reltool.config"
...SUCCESS
make[2]: Entering directory `/home/lloyd/Erl/nitrogen'
Running Erlang
DEBUG: Consult config file "/home/lloyd/Erl/nitrogen/rel/rebar.config"
DEBUG: Rebar location: "/home/lloyd/Erl/nitrogen/rel/rebar"
DEBUG: is_rel_dir(/home/lloyd/Erl/nitrogen/rel) -> {true,
"/home/lloyd/Erl/nitrogen/rel/reltool.config"}
DEBUG: Available deps: []
DEBUG: Missing deps : []
DEBUG: Predirs: []
==> rel (generate)
DEBUG: Consult config file "/home/lloyd/Erl/nitrogen/rel/reltool.config"
DEBUG: vcs_vsn: Unknown VCS atom in vsn field: "2.2.2"
DEBUG: vcs_vsn: Unknown VCS atom in vsn field: []
ERROR: generate failed while processing /home/lloyd/Erl/nitrogen/rel: {'EXIT',{{badmatch,{error,"Illegal library \"/home/lloyd/Programming/Erlang/zippity/apps\": no such file or directory"}},
[{rebar_reltool,generate,2,[]},
{rebar_core,run_modules,4,[]},
{rebar_core,execute,5,[]},
{rebar_core,process_dir1,6,[]},
{rebar_core,process_commands,2,[]},
{rebar,main,1,[]},
{escript,run,2,[{file,"escript.erl"},{line,747}]},
{escript,start,1,[{file,"escript.erl"},{line,277}]}]}}
make[2]: *** [generate] Error 1
make[2]: Leaving directory `/home/lloyd/Erl/nitrogen'
make[1]: *** [rel] Error 2
make[1]: Leaving directory `/home/lloyd/Erl/nitrogen'
make: *** [rel_inets] Error 2
Big thanks guys. Evidently I had set ERL_LIBS sometime back not fully understanding the implications. The ERL_LIBS value was orphaned when I deleted the library directory. So, unset ERL_LIBS did the trick. Nitrogen is now installed.
Re hosed Erlang installation: thanks to tip from Bob Ippolito, I purged Erlang from my system, installed the Erlang dependencies, then reinstalled Erlang via kerl. Rebar now compiles. n2o is still not cooperating--- stalls during compilation after many warnings. But I'll work on that today.
Thanks again,
LRP

Compiling Fsharp with Mono Amazon EC2

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

Resources